gstgl.glshader
Module for [GLShader] class
Types 3
classGLShader : gst.object.ObjectWrap
Methods
GLShaderGidBuilder builder()Get builder for [gstgl.glshader.GLShader] Returns: New builder objectbool linked() @propertygstgl.glshader.GLShader newDefault(gstgl.glcontext.GLContext context)Note: must be called in the GL threadstring stringFragmentExternalOesGetDefault(gstgl.glcontext.GLContext context, gstgl.types.GLSLVersion version_, gstgl.types.GLSLProfile profile)string stringFragmentGetDefault(gstgl.glcontext.GLContext context, gstgl.types.GLSLVersion version_, gstgl.types.GLSLProfile profile)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)int getProgramHandle()bool isLinked()Note: must be called in the GL thread Returns: whether shader has been successfully linkedbool 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 shadervoid setUniform1fv(string name, float[] value)Perform `glUniform1fv()` for name on shadervoid setUniform1i(string name, int value)Perform `glUniform1i()` for name on shadervoid setUniform1iv(string name, int[] value)Perform `glUniform1iv()` for name on shadervoid setUniform2f(string name, float v0, float v1)Perform `glUniform2f()` for name on shadervoid setUniform2fv(string name, float[] value)Perform `glUniform2fv()` for name on shadervoid setUniform2i(string name, int v0, int v1)Perform `glUniform2i()` for name on shadervoid setUniform2iv(string name, int[] value)Perform `glUniform2iv()` for name on shadervoid setUniform3f(string name, float v0, float v1, float v2)Perform `glUniform3f()` for name on shadervoid setUniform3fv(string name, float[] value)Perform `glUniform3fv()` for name on shadervoid setUniform3i(string name, int v0, int v1, int v2)Perform `glUniform3i()` for name on shadervoid setUniform3iv(string name, int[] value)Perform `glUniform3iv()` for name on shadervoid setUniform4f(string name, float v0, float v1, float v2, float v3)Perform `glUniform4f()` for name on shadervoid setUniform4fv(string name, float[] value)Perform `glUniform4fv()` for name on shadervoid setUniform4i(string name, int v0, int v1, int v2, int v3)Perform `glUniform4i()` for name on shadervoid setUniform4iv(string name, int[] value)Perform `glUniform4iv()` for name on shadervoid use()Mark's shader as being used for the next GL draw command.Constructors
this(gstgl.glcontext.GLContext context)Note: must be called in the GL thread