Shader.setUniform

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.

Parameters

name
Type: const(char)[]

Name of the texture in the shader

Meta