Manges a OpenGL Shader object
More...
|
|
override string | ToString () |
| |
| override void | Dispose () |
| | Delegate Dispose to underlying wrapper class More...
|
| |
|
| static Shader | FromSource (string source, ShaderType type, string name="Shader") |
| | Create and compile a shader from glsl source code More...
|
| |
| static Shader | FromFile (string path, ShaderType type, string name=null) |
| | Create and compile a shader from a glsl source file More...
|
| |
| static Shader | FromFile (string path, string name=null) |
| | Create and compile a shader from a glsl source file. Shader type is inferred from file extension. Extension must be .vs, .vert, .fs, .frag, .gs, or .geom. This can optionally be followed by .glsl or .txt, but the shader type extension must be present. More...
|
| |
Manges a OpenGL Shader object
◆ Dispose()
| override void Diamond.Shaders.Shader.Dispose |
( |
| ) |
|
|
virtual |
◆ FromFile() [1/2]
| static Shader Diamond.Shaders.Shader.FromFile |
( |
string |
path, |
|
|
ShaderType |
type, |
|
|
string |
name = null |
|
) |
| |
|
static |
Create and compile a shader from a glsl source file
- Parameters
-
| path | The path to the glsl source file |
| type | The type of the shader to create |
| name | The name of this GLObject |
- Returns
◆ FromFile() [2/2]
| static Shader Diamond.Shaders.Shader.FromFile |
( |
string |
path, |
|
|
string |
name = null |
|
) |
| |
|
static |
Create and compile a shader from a glsl source file. Shader type is inferred from file extension. Extension must be .vs, .vert, .fs, .frag, .gs, or .geom. This can optionally be followed by .glsl or .txt, but the shader type extension must be present.
- Parameters
-
| path | The path to the glsl source file |
| name | The name of this GLObject |
- Returns
- The compiled shader, or null if initialization failed or shader type cannot be inferred
◆ FromSource()
| static Shader Diamond.Shaders.Shader.FromSource |
( |
string |
source, |
|
|
ShaderType |
type, |
|
|
string |
name = "Shader" |
|
) |
| |
|
static |
Create and compile a shader from glsl source code
- Parameters
-
| source | The glsl source |
| type | The type of shader to create |
| name | The name of this GLObject |
- Returns
- The compiled Shader, or null if initialization failed
◆ Source
| string Diamond.Shaders.Shader.Source |
|
get |
The source used to create this shader
◆ Type
| ShaderType Diamond.Shaders.Shader.Type |
|
get |
The documentation for this class was generated from the following file:
- Diamond/Shaders/Shader.cs