GLProgram

Undocumented in source.
static if(BACKEND_GUI)
static if(ENABLE_OPENGL)
class GLProgram : GraphicsEffect {}

Destructor

~this
~this()
Undocumented in source.

Members

Functions

bind
void bind()

binds program to current context

check
bool check()

returns true if program is ready for use

compile
bool compile()
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw(Mesh mesh, bool wireframe)

draw mesh using this program (program should be bound by this time and all uniforms should be set)

getAttribLocation
int getAttribLocation(DefaultAttribute id)

get attribute location from program by uniform id, returns -1 if location is not found

getAttribLocation
int getAttribLocation(string variableName)

get attribute location from program, returns -1 if location is not found

getUniformLocation
int getUniformLocation(DefaultUniform uniform)

get uniform location from program by uniform id, returns -1 if location is not found

getUniformLocation
int getUniformLocation(string variableName)

get uniform location from program, returns -1 if location is not found

getVertexElementLocation
int getVertexElementLocation(VertexElementType type)

get location for vertex attribute

hasUniform
bool hasUniform(DefaultUniform id)

returns true if effect has uniform

hasUniform
bool hasUniform(string uniformName)

returns true if effect has uniform

initLocations
bool initLocations()

override to init shader code locations

initStandardLocations
void initStandardLocations()
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(string uniformName, vec2[] vec)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(DefaultUniform id, vec2[] vec)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(string uniformName, vec2 vec)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(DefaultUniform id, vec2 vec)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(string uniformName, vec3 vec)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(DefaultUniform id, vec3 vec)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(string uniformName, vec3[] vec)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(DefaultUniform id, vec3[] vec)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(string uniformName, vec4 vec)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(DefaultUniform id, vec4 vec)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(string uniformName, vec4[] vec)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(DefaultUniform id, vec4[] vec)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(string uniformName, const(mat4) matrix)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(DefaultUniform id, const(mat4) matrix)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(string uniformName, const(mat4)[] matrix)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(DefaultUniform id, const(mat4)[] matrix)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(string uniformName, float v)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(DefaultUniform id, float v)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(string uniformName, float[] v)
Undocumented in source. Be warned that the author may not have intended to support it.
setUniform
void setUniform(DefaultUniform id, float[] v)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

fragmentSource
string fragmentSource [@property getter]
Undocumented in source.
vertexSource
string vertexSource [@property getter]
Undocumented in source.

Static functions

unbind
void unbind()

unbinds program from current context

Static variables

currentProgram
GLuint currentProgram;
Undocumented in source.

Variables

_attribIdLocations
int[DefaultAttribute.max + 1] _attribIdLocations;
Undocumented in source.
_attribLocations
int[string] _attribLocations;
Undocumented in source.
_uniformIdLocations
int[DefaultUniform.max + 1] _uniformIdLocations;
Undocumented in source.
_uniformLocations
int[string] _uniformLocations;
Undocumented in source.
error
bool error;
Undocumented in source.
initialized
bool initialized;
Undocumented in source.
program
GLuint program;
Undocumented in source.

Inherited Members

From GraphicsEffect

getVertexElementLocation
int getVertexElementLocation(VertexElementType type)

get location for vertex attribute

setUniform
void setUniform(string uniformName, const(mat4) matrix)
Undocumented in source.
setUniform
void setUniform(string uniformName, const(mat4)[] matrix)
Undocumented in source.
setUniform
void setUniform(string uniformName, float v)
Undocumented in source.
setUniform
void setUniform(string uniformName, float[] v)
Undocumented in source.
setUniform
void setUniform(string uniformName, vec2 vec)
Undocumented in source.
setUniform
void setUniform(string uniformName, vec2[] vec)
Undocumented in source.
setUniform
void setUniform(string uniformName, vec3 vec)
Undocumented in source.
setUniform
void setUniform(string uniformName, vec3[] vec)
Undocumented in source.
setUniform
void setUniform(string uniformName, vec4 vec)
Undocumented in source.
setUniform
void setUniform(string uniformName, vec4[] vec)
Undocumented in source.
setUniform
void setUniform(DefaultUniform id, const(mat4) matrix)
Undocumented in source.
setUniform
void setUniform(DefaultUniform id, const(mat4)[] matrix)
Undocumented in source.
setUniform
void setUniform(DefaultUniform id, float v)
Undocumented in source.
setUniform
void setUniform(DefaultUniform id, float[] v)
Undocumented in source.
setUniform
void setUniform(DefaultUniform id, vec2 vec)
Undocumented in source.
setUniform
void setUniform(DefaultUniform id, vec2[] vec)
Undocumented in source.
setUniform
void setUniform(DefaultUniform id, vec3 vec)
Undocumented in source.
setUniform
void setUniform(DefaultUniform id, vec3[] vec)
Undocumented in source.
setUniform
void setUniform(DefaultUniform id, vec4 vec)
Undocumented in source.
setUniform
void setUniform(DefaultUniform id, vec4[] vec)
Undocumented in source.
hasUniform
bool hasUniform(DefaultUniform id)

returns true if effect has uniform

hasUniform
bool hasUniform(string uniformName)

returns true if effect has uniform

draw
void draw(Mesh mesh, bool wireframe)
Undocumented in source.

Meta