Manages an OpenGL Program object
More...
|
| static Program | Current [get] |
| | The currently active program. Manually invoking glUseProgram will break this. More...
|
| |
| string | Name [get, protected set] |
| | Name of this GLObject used for identification More...
|
| |
Manages an OpenGL Program object
◆ AttributeLocation()
| int Diamond.Shaders.Program.AttributeLocation |
( |
string |
name | ) |
|
Get the location of an attribute
- Parameters
-
| name | The name of the attribute |
- Returns
- The location of the attribute
◆ Dispose()
| override void Diamond.Shaders.Program.Dispose |
( |
| ) |
|
|
virtual |
◆ FromFiles()
| static Program Diamond.Shaders.Program.FromFiles |
( |
params string [] |
paths | ) |
|
|
static |
Create shaders from glsl source files, and create a program using them. Shader types must be inferrable from file extensions.
- Parameters
-
| paths | The glsl source files |
- Returns
- The linked program, or null if initialization faileds
◆ FromShaders() [1/4]
| static Program Diamond.Shaders.Program.FromShaders |
( |
string |
name, |
|
|
params Shader [] |
shaders |
|
) |
| |
|
static |
Create a program from compiled shaders
- Parameters
-
| name | The name of this GLObject |
| shaders | The shaders to use in this program |
- Returns
- The linked program, or null if initialization failed
◆ FromShaders() [2/4]
| static Program Diamond.Shaders.Program.FromShaders |
( |
string |
name, |
|
|
IEnumerable< Shader > |
shaders |
|
) |
| |
|
static |
Create a program from compiled shaders
- Parameters
-
| name | The name of this GLObject |
| shaders | The shaders to use in this program |
- Returns
- The linked program, or null if initialization failed
◆ FromShaders() [3/4]
| static Program Diamond.Shaders.Program.FromShaders |
( |
params Shader [] |
shaders | ) |
|
|
static |
Create a program from compiled shaders
- Parameters
-
| shaders | The shaders to use in this program |
- Returns
- The linked program, or null if initialization failed
◆ FromShaders() [4/4]
| static Program Diamond.Shaders.Program.FromShaders |
( |
IEnumerable< Shader > |
shaders | ) |
|
|
static |
Create a program from compiled shaders
- Parameters
-
| shaders | The shaders to use in this program |
- Returns
- The linked program, or null if initialization failed
◆ HasAttribute()
| bool Diamond.Shaders.Program.HasAttribute |
( |
string |
name | ) |
|
Check if the program has an attribute
- Parameters
-
| name | The name of the attribute |
- Returns
- Whether the program has this attribute
◆ HasUniform()
| bool Diamond.Shaders.Program.HasUniform |
( |
string |
name | ) |
|
Check if the program has a uniform
- Parameters
-
| name | The name of the uniform |
- Returns
- Whether the program has this uniform
◆ UniformLocation()
| int Diamond.Shaders.Program.UniformLocation |
( |
string |
name | ) |
|
Get the location of a uniform
- Parameters
-
| name | The name of the uniform |
- Returns
- The location of the uniform
◆ Use()
| void Diamond.Shaders.Program.Use |
( |
| ) |
|
◆ UseDefault()
| static void Diamond.Shaders.Program.UseDefault |
( |
| ) |
|
|
static |
Use the default shader to render
◆ Current
| Program Diamond.Shaders.Program.Current |
|
staticget |
The currently active program. Manually invoking glUseProgram will break this.
The documentation for this class was generated from the following file:
- Diamond/Shaders/Program.cs