MyGLProgram

Undocumented in source.

Members

Functions

createBuffers
Tuple!(VAO, VBO) createBuffers(float[] vertices, float[] colors, float[] texcoords)
Undocumented in source. Be warned that the author may not have intended to support it.
execute
void execute(VAO vao, int vertsCount, Tex2D texture, bool linear, float[16] matrix)
Undocumented in source. Be warned that the author may not have intended to support it.
initLocations
bool initLocations()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

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

Variables

colAttrLocation
GLint colAttrLocation;
Undocumented in source.
matrixLocation
GLint matrixLocation;
Undocumented in source.
texCoordLocation
GLint texCoordLocation;
Undocumented in source.
vertexLocation
GLint vertexLocation;
Undocumented in source.

Inherited Members

From GLProgram

vertexSource
string vertexSource [@property getter]
Undocumented in source.
fragmentSource
string fragmentSource [@property getter]
Undocumented in source.
program
GLuint program;
Undocumented in source.
initialized
bool initialized;
Undocumented in source.
error
bool error;
Undocumented in source.
compile
bool compile()
Undocumented in source. Be warned that the author may not have intended to support it.
initStandardLocations
void initStandardLocations()
Undocumented in source. Be warned that the author may not have intended to support it.
initLocations
bool initLocations()

override to init shader code locations

~this
~this()
Undocumented in source.
check
bool check()

returns true if program is ready for use

currentProgram
GLuint currentProgram;
Undocumented in source.
bind
void bind()

binds program to current context

unbind
void unbind()

unbinds program from current context

_uniformLocations
int[string] _uniformLocations;
Undocumented in source.
_attribLocations
int[string] _attribLocations;
Undocumented in source.
_uniformIdLocations
int[DefaultUniform.max + 1] _uniformIdLocations;
Undocumented in source.
_attribIdLocations
int[DefaultAttribute.max + 1] _attribIdLocations;
Undocumented in source.
getVertexElementLocation
int getVertexElementLocation(VertexElementType type)

get location for vertex attribute

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

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

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.
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)

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

Meta