An arbitrary named shader uniform (name → float / vec2 / vec3 / vec4). More...
#include <canvas.hpp>
Public Attributes | |
| std::string | name |
| int | count = 1 |
| 1=float, 2=vec2, 3=vec3, 4=vec4 | |
| float | v [4] = {0, 0, 0, 0} |
An arbitrary named shader uniform (name → float / vec2 / vec3 / vec4).
Lets a custom post-effect (save_layer_with_sksl_post_effect) accept any uniform its shader declares, not just the fixed widget vocabulary above — the difference between a real user-facing shader-effect API and a toy. count selects the arity (1..4); only that many of v are read. Bound via SkRuntimeEffectBuilder::uniform(name) guarded by findUniform, so names the shader doesn't declare are ignored.
| int pulp::canvas::Canvas::NamedUniform::count = 1 |
1=float, 2=vec2, 3=vec3, 4=vec4
| std::string pulp::canvas::Canvas::NamedUniform::name |
| float pulp::canvas::Canvas::NamedUniform::v[4] = {0, 0, 0, 0} |