Class Shader
Represents a shader used in graphics rendering.
Inherited Members
Namespace: Genesis.Graphics
Assembly: Genesis.dll
Syntax
public class Shader
Constructors
Shader()
Default constructor for the Shader class.
Declaration
public Shader()
Shader(string)
Constructor for the Shader class that initializes the source code.
Declaration
public Shader(string source)
Parameters
| Type | Name | Description |
|---|---|---|
| string | source | The source code of the shader. |
Properties
ShaderID
Gets or sets the ID of the shader.
Declaration
public int ShaderID { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Source
Gets or sets the source code of the shader.
Declaration
public string Source { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
FromFile(string)
Creates a Shader object by reading the source code from a file.
Declaration
public static Shader FromFile(string filename)
Parameters
| Type | Name | Description |
|---|---|---|
| string | filename | The path to the file containing the shader source code. |
Returns
| Type | Description |
|---|---|
| Shader | A Shader object with the source code read from the file. |