Effect

Effect (aka OpenGL program)

Constructors

this
this(EffectId id)
Undocumented in source.
this
this(string vertexShader, string fragmentShader, string defs)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

getVertexElementLocation
int getVertexElementLocation(VertexElementType type)

get location for vertex attribute

init
void init()
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.
loadVertexSource
string loadVertexSource(string resourceId)
Undocumented in source. Be warned that the author may not have intended to support it.
preProcessIncludes
void preProcessIncludes(char[] buf, string src)
Undocumented in source. Be warned that the author may not have intended to support it.
preProcessSource
string preProcessSource(string src)
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.
id
const(EffectId) id [@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

_defText
string _defText;
Undocumented in source.
_defs
string[string] _defs;
Undocumented in source.
_id
EffectId _id;
Undocumented in source.
_visitedIncludes
bool[string] _visitedIncludes;
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)

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

Meta