gstgl.glshader

Module for [GLShader] class

Types 3

Methods
GType _gType() @property
GLShader self()Returns `this`, for use in `with` statements.
GLShaderGidBuilder builder()Get builder for [gstgl.glshader.GLShader] Returns: New builder object
bool linked() @property
gstgl.glshader.GLShader newDefault(gstgl.glcontext.GLContext context)Note: must be called in the GL thread
string stringGetHighestPrecision(gstgl.glcontext.GLContext context, gstgl.types.GLSLVersion version_, gstgl.types.GLSLProfile profile)Generates 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)Attaches stage to shader. stage must have been successfully compiled with [gstgl.glslstage.GLSLStage.compile].
bool attachUnlocked(gstgl.glslstage.GLSLStage stage)Attaches stage to shader. stage must have been successfully compiled with [gstgl.glslstage.GLSLStage.compile].
void bindAttributeLocation(uint index, string name)Bind attribute name to the specified location index using `glBindAttributeLocation()`.
void bindFragDataLocation(uint index, string name)Bind 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)Detaches 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)Detaches 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)
bool isLinked()Note: 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()Releases the shader and stages.
void releaseUnlocked()Releases the shader and stages.
void setUniform1f(string name, float value)Perform `glUniform1f()` for name on shader
void setUniform1fv(string name, float[] value)Perform `glUniform1fv()` for name on shader
void setUniform1i(string name, int value)Perform `glUniform1i()` for name on shader
void setUniform1iv(string name, int[] value)Perform `glUniform1iv()` for name on shader
void setUniform2f(string name, float v0, float v1)Perform `glUniform2f()` for name on shader
void setUniform2fv(string name, float[] value)Perform `glUniform2fv()` for name on shader
void setUniform2i(string name, int v0, int v1)Perform `glUniform2i()` for name on shader
void setUniform2iv(string name, int[] value)Perform `glUniform2iv()` for name on shader
void setUniform3f(string name, float v0, float v1, float v2)Perform `glUniform3f()` for name on shader
void setUniform3fv(string name, float[] value)Perform `glUniform3fv()` for name on shader
void setUniform3i(string name, int v0, int v1, int v2)Perform `glUniform3i()` for name on shader
void setUniform3iv(string name, int[] value)Perform `glUniform3iv()` for name on shader
void setUniform4f(string name, float v0, float v1, float v2, float v3)Perform `glUniform4f()` for name on shader
void setUniform4fv(string name, float[] value)Perform `glUniform4fv()` for name on shader
void setUniform4i(string name, int v0, int v1, int v2, int v3)Perform `glUniform4i()` for name on shader
void setUniform4iv(string name, int[] value)Perform `glUniform4iv()` for name on shader
void use()Mark'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 for [gstgl.glshader.GLShader]

Methods