Skip to content

Commit 966583d

Browse files
committed
Adding SkRuntimeEffectBuilder.setUniform taking a float
Part of kyamagu#320
1 parent 3932576 commit 966583d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/skia/RuntimeEffect.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,12 @@ runtime_effect_builder
199199
v = uniform;
200200
},
201201
py::arg("name"), py::arg("uniform"))
202+
.def("setUniform",
203+
[] (SkRuntimeEffectBuilder& builder, std::string_view name, float uniform) {
204+
auto v = builder.uniform(name);
205+
v = uniform;
206+
},
207+
py::arg("name"), py::arg("uniform"))
202208
.def("setUniform",
203209
[] (SkRuntimeEffectBuilder& builder, std::string_view name, const SkV3& uniform) {
204210
auto v = builder.uniform(name);

0 commit comments

Comments
 (0)