ShaderProgram

Undocumented in source.

Constructors

this
this()

Creates an empty shader program in OpenGL state. OpenGL must be initialized before creating.

this
this(string vertShaderSource, string fragShaderSource)
Undocumented in source.

Members

Functions

attachShader
void attachShader(GLenum shaderType, string shaderSource)

Compiles shader source of the given type and attaches it to the shader program. If shader compilation fails, writes compilation info to the error log of the shader program (_errorLog)

bind
void bind()

Binds shader to the current OpenGL state. Must be used only after attaching all the shaders and compilation. If compilation fails, no shader will be used.

close
void close()
Undocumented in source. Be warned that the author may not have intended to support it.
compile
bool compile()

Compiles shaderProgram. If any error occurs, writes log to _errorLog. After compile detaches shaders from program.

getUniform
Uniform getUniform(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
getUniformLoc
uint getUniformLoc(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(string uniName, T t1)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform2
void setUniform2(string uniName, T t1, T t2)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform3
void setUniform3(string uniName, T t1, T t2, T t3)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform4
void setUniform4(string uniName, T t1, T t2, T t3, T t4)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

errorLog
string errorLog [@property getter]
program
GLuint program [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

unbind
void unbind()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta