Shader.opIndexAssign

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.

  1. void opIndexAssign(float x, const(char)[] name)
  2. void opIndexAssign(ref const(Vec2) vector, const(char)[] name)
  3. void opIndexAssign(ref const(Vec3) vector, const(char)[] name)
  4. void opIndexAssign(ref const(Vec4) vector, const(char)[] name)
  5. void opIndexAssign(int x, const(char)[] name)
  6. void opIndexAssign(ref const(Ivec2) vector, const(char)[] name)
  7. void opIndexAssign(ref const(Ivec3) vector, const(char)[] name)
  8. void opIndexAssign(ref const(Ivec4) vector, const(char)[] name)
  9. void opIndexAssign(bool x, const(char)[] name)
  10. void opIndexAssign(ref const(Bvec2) vector, const(char)[] name)
  11. void opIndexAssign(ref const(Bvec3) vector, const(char)[] name)
  12. void opIndexAssign(ref const(Bvec4) vector, const(char)[] name)
  13. void opIndexAssign(ref const(Mat3) matrix, const(char)[] name)
  14. void opIndexAssign(ref const(Mat4) matrix, const(char)[] name)
  15. void opIndexAssign(const(Texture) texture, const(char)[] name)
    class Shader
    void
    opIndexAssign
    (
    ,
    const(char)[] name
    )
  16. void opIndexAssign(CurrentTextureType, const(char)[] name)
  17. void opIndexAssign(const(float)[] scalars, const(char)[] name)
  18. void opIndexAssign(const(Vec2)[] vectors, const(char)[] name)
  19. void opIndexAssign(const(Vec3)[] vectors, const(char)[] name)
  20. void opIndexAssign(const(Vec4)[] vectors, const(char)[] name)
  21. void opIndexAssign(const(Mat3)[] matrices, const(char)[] name)
  22. void opIndexAssign(const(Mat4)[] matrices, const(char)[] name)
  23. void opIndexAssign(Color color, const(char)[] name)
  24. void opIndexAssign(Transform transform, const(char)[] name)
  25. void setUniform(const(char)[] name, const(Texture) texture)

Parameters

name
Type: const(char)[]

Name of the texture in the shader

Meta