Shader.setUniform
- void setUniform(const(char)[] name, float x)
- void setUniform(const(char)[] name, ref const(Vec2) vector)
- void setUniform(const(char)[] name, ref const(Vec3) vector)
- void setUniform(const(char)[] name, ref const(Vec4) vector)
- void setUniform(const(char)[] name, int x)
- void setUniform(const(char)[] name, ref const(Ivec2) vector)
- void setUniform(const(char)[] name, ref const(Ivec3) vector)
- void setUniform(const(char)[] name, ref const(Ivec4) vector)
- void setUniform(const(char)[] name, bool x)
- void setUniform(const(char)[] name, ref const(Bvec2) vector)
- void setUniform(const(char)[] name, ref const(Bvec3) vector)
- void setUniform(const(char)[] name, ref const(Bvec4) vector)
- void setUniform(const(char)[] name, ref const(Mat3) matrix)
- void setUniform(const(char)[] name, ref const(Mat4) matrix)
- void setUniform(const(char)[] name, const(Texture) texture)
- void setUniform(const(char)[] name, CurrentTextureType)
- void opIndexAssign(const(Texture) texture, const(char)[] name)
dsfmlgraphicsshaderShader
constructorsdestructorsenumsfunctionsstatic functionsstatic variablesstructs
Specify a texture as sampler2D uniform.
'name' is the name of the variable to change in the shader. The corresponding parameter in the shader must be a 2D texture (sampler2D GLSL type).
It is important to note that texture must remain alive as long as the shader uses it, no copy is made internally.
To use the texture of the object being drawn, which cannot be known in advance, you can pass the special value CurrentTexture.