Class ShaderBase
Base class for all OpenGL3.2 shaders.
public abstract class ShaderBase : GLObject, IDisposable
- Inheritance
-
ShaderBase
- Implements
- Derived
- Inherited Members
Constructors
ShaderBase()
public ShaderBase()
Methods
CheckShaderCompileStatus(int)
Check the compile status of a shader stage and log errors.
protected bool CheckShaderCompileStatus(int shader)
Parameters
shader
intThe shader stage to check.
Returns
- bool
True if compiled successfully.
CheckShaderLinkStatus()
Check the program link status of this shader.
protected bool CheckShaderLinkStatus()
Returns
- bool
True if the program linked successfully.
GetAttributeLocation(string)
Get the location of a shader attribute.
public int GetAttributeLocation(string name)
Parameters
name
stringVertexAttribute name.
Returns
- int
The attribute location, or -1
GetUniformBlockIndex(string)
Get the location of a shader uniform block.
public uint GetUniformBlockIndex(string name)
Parameters
name
stringUniform block name.
Returns
- uint
Uniform block index, or -1.
GetUniformLocation(string)
Get the location of a shader uniform variable.
public int GetUniformLocation(string name)
Parameters
name
stringUniform variable name.
Returns
- int
The uniform location, or -1.
Initialize()
Initialize the shader program.
public override void Initialize()
InitializeInternal()
Function for internal shader initialization.
protected abstract void InitializeInternal()