Table of Contents

Class ShaderBase

Namespace
ReFuel.Graphics.OpenGL
Assembly
ReFuel.dll

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 int

The 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 string

VertexAttribute 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 string

Uniform 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 string

Uniform 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()