video.glshader
OpenGL shader.
- struct GLShader;
OpenGL (GLSL only right now) shader.
- this(string name, VFSDir shaderDir);
Construct (load) a shader.
Parameters:Throws:string name File name of the shader in the "shaders/" subdirectory. VFSDir shaderDir Shader data directory. ShaderException if the shader could not be loaded or was invalid.- void start();
Use this shader in following drawing commands.
- const GLint getAttribute(const string name);
Get a handle to vertex attribute with specified name in the shader.
Parameters:Returns:string name Name of the attribute. Handle to the attribute or -1 if not found in the shader.- const GLint getUniform(const string name);
Get a handle to uniform variable with specified name in the shader.
Parameters:Returns:string name Name of the uniform. Handle to the uniform or -1 if not found in the shader.