gstgl.glshader

Module for [GLShader] class

Types 3

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
GLShader self() nothrowReturns `this`, for use in `with` statements.
GLShaderGidBuilder builder() static nothrowGet builder for [gstgl.glshader.GLShader] Returns: New builder object
bool linked() @property nothrow
gstgl.glshader.GLShader newDefault(gstgl.glcontext.GLContext context) staticNote: must be called in the GL thread
string stringGetHighestPrecision(gstgl.glcontext.GLContext context, gstgl.types.GLSLVersion version_, gstgl.types.GLSLProfile profile) static nothrowGenerates a shader string that defines the precision of float types in GLSL shaders. This is particularly needed for fragment shaders in a GLSL ES context where there is no default precision speci...
bool attach(gstgl.glslstage.GLSLStage stage) nothrowAttaches stage to shader. stage must have been successfully compiled with [gstgl.glslstage.GLSLStage.compile].
bool attachUnlocked(gstgl.glslstage.GLSLStage stage) nothrowAttaches stage to shader. stage must have been successfully compiled with [gstgl.glslstage.GLSLStage.compile].
void bindAttributeLocation(uint index, string name) nothrowBind attribute name to the specified location index using `glBindAttributeLocation()`.
void bindFragDataLocation(uint index, string name) nothrowBind attribute name to the specified location index using `glBindFragDataLocation()`.
bool compileAttachStage(gstgl.glslstage.GLSLStage stage)Compiles stage and attaches it to shader.
void detach(gstgl.glslstage.GLSLStage stage) nothrowDetaches stage from shader. stage must have been successfully attached to shader with [gstgl.glshader.GLShader.attach] or [gstgl.glshader.GLShader.attachUnlocked].
void detachUnlocked(gstgl.glslstage.GLSLStage stage) nothrowDetaches stage from shader. stage must have been successfully attached to shader with [gstgl.glshader.GLShader.attach] or [gstgl.glshader.GLShader.attachUnlocked].
int getAttributeLocation(string name) nothrow
int getProgramHandle() nothrow
bool isLinked() nothrowNote: must be called in the GL thread Returns: whether shader has been successfully linked
bool link()Links the current list of #GstGLSLStage's in shader.
void release() nothrowReleases the shader and stages.
void releaseUnlocked() nothrowReleases the shader and stages.
void setUniform1f(string name, float value) nothrowPerform `glUniform1f()` for name on shader
void setUniform1fv(string name, float[] value) nothrowPerform `glUniform1fv()` for name on shader
void setUniform1i(string name, int value) nothrowPerform `glUniform1i()` for name on shader
void setUniform1iv(string name, int[] value) nothrowPerform `glUniform1iv()` for name on shader
void setUniform2f(string name, float v0, float v1) nothrowPerform `glUniform2f()` for name on shader
void setUniform2fv(string name, float[] value) nothrowPerform `glUniform2fv()` for name on shader
void setUniform2i(string name, int v0, int v1) nothrowPerform `glUniform2i()` for name on shader
void setUniform2iv(string name, int[] value) nothrowPerform `glUniform2iv()` for name on shader
void setUniform3f(string name, float v0, float v1, float v2) nothrowPerform `glUniform3f()` for name on shader
void setUniform3fv(string name, float[] value) nothrowPerform `glUniform3fv()` for name on shader
void setUniform3i(string name, int v0, int v1, int v2) nothrowPerform `glUniform3i()` for name on shader
void setUniform3iv(string name, int[] value) nothrowPerform `glUniform3iv()` for name on shader
void setUniform4f(string name, float v0, float v1, float v2, float v3) nothrowPerform `glUniform4f()` for name on shader
void setUniform4fv(string name, float[] value) nothrowPerform `glUniform4fv()` for name on shader
void setUniform4i(string name, int v0, int v1, int v2, int v3) nothrowPerform `glUniform4i()` for name on shader
void setUniform4iv(string name, int[] value) nothrowPerform `glUniform4iv()` for name on shader
void use() nothrowMark's shader as being used for the next GL draw command.
Constructors
this(void * ptr, Flag!"Take" take)
this(gstgl.glcontext.GLContext context)Note: must be called in the GL thread

Fluent builder implementation template for gstgl.glshader.GLShader

Fluent builder for gstgl.glshader.GLShader

Methods
GLShader build() nothrowCreate object from builder. Returns: New object