C# Class CSharpGL.ShaderProgram

A shader program object.
Mostra file Open project: bitzhuwei/CSharpGL Class Usage Examples

Public Methods

Method Description
Bind ( ) : void

Use this program.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetAttributeLocation ( string attributeName ) : int

Query location/index of specified attributeName.

GetUniformLocation ( string uniformName ) : int

Initialize ( ) : void

Initialize this shader program object.

SetUniform ( string uniformName, bool v0 ) : int

SetUniform ( string uniformName, bvec2 values ) : int

SetUniform ( string uniformName, bvec3 values ) : int

SetUniform ( string uniformName, bvec4 values ) : int

SetUniform ( string uniformName, float values ) : int

SetUniform ( string uniformName, float v0, float v1 ) : int

SetUniform ( string uniformName, float v0, float v1, float v2 ) : int

SetUniform ( string uniformName, float v0, float v1, float v2, float v3 ) : int

SetUniform ( string uniformName, int values ) : int

SetUniform ( string uniformName, int v0, int v1 ) : int

SetUniform ( string uniformName, int v0, int v1, int v2 ) : int

SetUniform ( string uniformName, int v0, int v1, int v2, int v3 ) : int

SetUniform ( string uniformName, ivec2 values ) : int

SetUniform ( string uniformName, ivec3 values ) : int

SetUniform ( string uniformName, ivec4 values ) : int

SetUniform ( string uniformName, uint v0 ) : int

SetUniform ( string uniformName, uint v0, uint v1 ) : int

SetUniform ( string uniformName, uint v0, uint v1, uint v2 ) : int

SetUniform ( string uniformName, uint v0, uint v1, uint v2, uint v3 ) : int

SetUniform ( string uniformName, uvec2 values ) : int

SetUniform ( string uniformName, uvec3 values ) : int

SetUniform ( string uniformName, uvec4 values ) : int

SetUniform ( string uniformName, vec2 values ) : int

SetUniform ( string uniformName, vec3 values ) : int

SetUniform ( string uniformName, vec4 values ) : int

SetUniformMatrix2 ( string uniformName, float m ) : int

SetUniformMatrix2 ( string uniformName, CSharpGL.mat2 m ) : int

SetUniformMatrix3 ( string uniformName, float m ) : int

SetUniformMatrix3 ( string uniformName, mat3 m ) : int

SetUniformMatrix4 ( string uniformName, float m ) : int

SetUniformMatrix4 ( string uniformName, CSharpGL.mat4 m ) : int

Unbind ( ) : void

Stop using this program.

Private Methods

Method Description
Dispose ( bool disposing ) : void

Dispose managed and unmanaged resources of this instance.

GetInfoLog ( uint programId ) : string
GetLinkStatus ( uint programId ) : bool

Method Details

Bind() public method

Use this program.
public Bind ( ) : void
return void

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

GetAttributeLocation() public method

Query location/index of specified attributeName.
public GetAttributeLocation ( string attributeName ) : int
attributeName string
return int

GetUniformLocation() public method

public GetUniformLocation ( string uniformName ) : int
uniformName string
return int

Initialize() public method

Initialize this shader program object.
public Initialize ( ) : void
return void

SetUniform() public method

public SetUniform ( string uniformName, bool v0 ) : int
uniformName string
v0 bool
return int

SetUniform() public method

public SetUniform ( string uniformName, bvec2 values ) : int
uniformName string
values bvec2
return int

SetUniform() public method

public SetUniform ( string uniformName, bvec3 values ) : int
uniformName string
values bvec3
return int

SetUniform() public method

public SetUniform ( string uniformName, bvec4 values ) : int
uniformName string
values bvec4
return int

SetUniform() public method

public SetUniform ( string uniformName, float values ) : int
uniformName string
values float
return int

SetUniform() public method

public SetUniform ( string uniformName, float v0, float v1 ) : int
uniformName string
v0 float
v1 float
return int

SetUniform() public method

public SetUniform ( string uniformName, float v0, float v1, float v2 ) : int
uniformName string
v0 float
v1 float
v2 float
return int

SetUniform() public method

public SetUniform ( string uniformName, float v0, float v1, float v2, float v3 ) : int
uniformName string
v0 float
v1 float
v2 float
v3 float
return int

SetUniform() public method

public SetUniform ( string uniformName, int values ) : int
uniformName string
values int
return int

SetUniform() public method

public SetUniform ( string uniformName, int v0, int v1 ) : int
uniformName string
v0 int
v1 int
return int

SetUniform() public method

public SetUniform ( string uniformName, int v0, int v1, int v2 ) : int
uniformName string
v0 int
v1 int
v2 int
return int

SetUniform() public method

public SetUniform ( string uniformName, int v0, int v1, int v2, int v3 ) : int
uniformName string
v0 int
v1 int
v2 int
v3 int
return int

SetUniform() public method

public SetUniform ( string uniformName, ivec2 values ) : int
uniformName string
values ivec2
return int

SetUniform() public method

public SetUniform ( string uniformName, ivec3 values ) : int
uniformName string
values ivec3
return int

SetUniform() public method

public SetUniform ( string uniformName, ivec4 values ) : int
uniformName string
values ivec4
return int

SetUniform() public method

public SetUniform ( string uniformName, uint v0 ) : int
uniformName string
v0 uint
return int

SetUniform() public method

public SetUniform ( string uniformName, uint v0, uint v1 ) : int
uniformName string
v0 uint
v1 uint
return int

SetUniform() public method

public SetUniform ( string uniformName, uint v0, uint v1, uint v2 ) : int
uniformName string
v0 uint
v1 uint
v2 uint
return int

SetUniform() public method

public SetUniform ( string uniformName, uint v0, uint v1, uint v2, uint v3 ) : int
uniformName string
v0 uint
v1 uint
v2 uint
v3 uint
return int

SetUniform() public method

public SetUniform ( string uniformName, uvec2 values ) : int
uniformName string
values uvec2
return int

SetUniform() public method

public SetUniform ( string uniformName, uvec3 values ) : int
uniformName string
values uvec3
return int

SetUniform() public method

public SetUniform ( string uniformName, uvec4 values ) : int
uniformName string
values uvec4
return int

SetUniform() public method

public SetUniform ( string uniformName, vec2 values ) : int
uniformName string
values vec2
return int

SetUniform() public method

public SetUniform ( string uniformName, vec3 values ) : int
uniformName string
values vec3
return int

SetUniform() public method

public SetUniform ( string uniformName, vec4 values ) : int
uniformName string
values vec4
return int

SetUniformMatrix2() public method

public SetUniformMatrix2 ( string uniformName, float m ) : int
uniformName string
m float
return int

SetUniformMatrix2() public method

public SetUniformMatrix2 ( string uniformName, CSharpGL.mat2 m ) : int
uniformName string
m CSharpGL.mat2
return int

SetUniformMatrix3() public method

public SetUniformMatrix3 ( string uniformName, float m ) : int
uniformName string
m float
return int

SetUniformMatrix3() public method

public SetUniformMatrix3 ( string uniformName, mat3 m ) : int
uniformName string
m mat3
return int

SetUniformMatrix4() public method

public SetUniformMatrix4 ( string uniformName, float m ) : int
uniformName string
m float
return int

SetUniformMatrix4() public method

public SetUniformMatrix4 ( string uniformName, CSharpGL.mat4 m ) : int
uniformName string
m CSharpGL.mat4
return int

Unbind() public method

Stop using this program.
public Unbind ( ) : void
return void