Shift
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Pages
Shift.Graphics.GL.ShaderProgram Class Reference
Inheritance diagram for Shift.Graphics.GL.ShaderProgram:

Public Member Functions

 ShaderProgram (Shader vertexShader, Shader fragmentShader)
 Links a vertex and fragment shader together to create a shader program. More...
 
 ShaderProgram (string vertexShaderSource, string fragmentShaderSource)
 Creates two shaders and then links them together to create a shader program. More...
 
void Use ()
 
int GetUniformLocation (string Name)
 
int GetAttributeLocation (string Name)
 
void Dispose ()
 

Properties

uint ProgramID [get, set]
 Specifies the OpenGL shader program ID. More...
 
Shader VertexShader [get, set]
 Specifies the vertex shader used in this program. More...
 
Shader FragmentShader [get, set]
 Specifies the fragment shader used in this program. More...
 
bool DisposeChildren [get, set]
 Specifies whether this program will dispose of the child vertex/fragment programs when the IDisposable method is called. More...
 
ProgramParam this[string name] [get]
 Queries the shader parameter hashtable to find a matching attribute/uniform. More...
 
string ProgramLog [get]
 Returns Gl.GetProgramInfoLog(ShaderID), which contains any linking errors. More...
 

Detailed Description

Definition at line 272 of file Shader.cs.

Constructor & Destructor Documentation

Shift.Graphics.GL.ShaderProgram.ShaderProgram ( Shader  vertexShader,
Shader  fragmentShader 
)
inline

Links a vertex and fragment shader together to create a shader program.

Parameters
vertexShaderSpecifies the vertex shader.
fragmentShaderSpecifies the fragment shader.

Definition at line 320 of file Shader.cs.

Shift.Graphics.GL.ShaderProgram.ShaderProgram ( string  vertexShaderSource,
string  fragmentShaderSource 
)
inline

Creates two shaders and then links them together to create a shader program.

Parameters
vertexShaderSourceSpecifies the source code of the vertex shader.
fragmentShaderSourceSpecifies the source code of the fragment shader.

Definition at line 339 of file Shader.cs.

Member Function Documentation

void Shift.Graphics.GL.ShaderProgram.Dispose ( )
inline

Definition at line 392 of file Shader.cs.

int Shift.Graphics.GL.ShaderProgram.GetAttributeLocation ( string  Name)
inline

Definition at line 386 of file Shader.cs.

int Shift.Graphics.GL.ShaderProgram.GetUniformLocation ( string  Name)
inline

Definition at line 380 of file Shader.cs.

void Shift.Graphics.GL.ShaderProgram.Use ( )
inline

Definition at line 375 of file Shader.cs.

Property Documentation

bool Shift.Graphics.GL.ShaderProgram.DisposeChildren
getset

Specifies whether this program will dispose of the child vertex/fragment programs when the IDisposable method is called.

Definition at line 293 of file Shader.cs.

Shader Shift.Graphics.GL.ShaderProgram.FragmentShader
getset

Specifies the fragment shader used in this program.

Definition at line 287 of file Shader.cs.

uint Shift.Graphics.GL.ShaderProgram.ProgramID
getset

Specifies the OpenGL shader program ID.

Definition at line 277 of file Shader.cs.

string Shift.Graphics.GL.ShaderProgram.ProgramLog
get

Returns Gl.GetProgramInfoLog(ShaderID), which contains any linking errors.

Definition at line 311 of file Shader.cs.

ProgramParam Shift.Graphics.GL.ShaderProgram.this[string name]
get

Queries the shader parameter hashtable to find a matching attribute/uniform.

Parameters
nameSpecifies the case-sensitive name of the shader attribute/uniform.
Returns
The requested attribute/uniform, or null on a failure.

Definition at line 303 of file Shader.cs.

Shader Shift.Graphics.GL.ShaderProgram.VertexShader
getset

Specifies the vertex shader used in this program.

Definition at line 282 of file Shader.cs.


The documentation for this class was generated from the following file: