Class RendererShader
Inheritance
System.Object
RendererShader
Namespace: Aximo.Render.OpenGL
Assembly: Aximo.Render.dll
Syntax
public class RendererShader : IObjectLabel, IObjectIdentifier, IObjectHandle
Constructors
| Improve this Doc View SourceRendererShader()
Declaration
public RendererShader()
RendererShader(String, String, String, Boolean, IDictionary<String, Object>)
Declaration
public RendererShader(string vertPath, string fragPath, string geomPath = null, bool compile = true, IDictionary<string, object> defines = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | vertPath | |
System.String | fragPath | |
System.String | geomPath | |
System.Boolean | compile | |
System.Collections.Generic.IDictionary<System.String, System.Object> | defines |
Properties
| Improve this Doc View SourceHandle
Declaration
public int Handle { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ObjectLabel
Declaration
public string ObjectLabel { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ObjectLabelIdentifier
Declaration
public ObjectLabelIdentifier ObjectLabelIdentifier { get; }
Property Value
Type | Description |
---|---|
OpenToolkit.Graphics.OpenGL4.ObjectLabelIdentifier |
Methods
| Improve this Doc View SourceAddSource(String, ShaderType)
Declaration
public void AddSource(string path, ShaderType type)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | |
OpenToolkit.Graphics.OpenGL4.ShaderType | type |
AttributeNameForField(String)
Declaration
public string AttributeNameForField(string structFieldName)
Parameters
Type | Name | Description |
---|---|---|
System.String | structFieldName |
Returns
Type | Description |
---|---|
System.String |
Bind()
Declaration
public void Bind()
BindBlock(String, BindingPoint)
Declaration
public void BindBlock(string blockName, BindingPoint bindingPoint)
Parameters
Type | Name | Description |
---|---|---|
System.String | blockName | |
BindingPoint | bindingPoint |
BindInternal()
Declaration
public void BindInternal()
Compile()
Declaration
public void Compile()
Free()
Declaration
public void Free()
GetAttribLocation(String)
Declaration
public int GetAttribLocation(string attribName)
Parameters
Type | Name | Description |
---|---|---|
System.String | attribName |
Returns
Type | Description |
---|---|
System.Int32 |
Reload()
Declaration
public void Reload()
SetBool(String, Boolean)
Set a uniform int on this shader.
Declaration
public void SetBool(string name, bool data)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the uniform |
System.Boolean | data | The data to set |
SetDefine(String)
Declaration
public void SetDefine(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
SetDefine(String, Object)
Declaration
public void SetDefine(string name, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | |
System.Object | value |
SetFloat(String, Single)
Set a uniform float on this shader.
Declaration
public void SetFloat(string name, float data)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the uniform |
System.Single | data | The data to set |
SetInt(String, Int32)
Set a uniform int on this shader.
Declaration
public void SetInt(string name, int data)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the uniform |
System.Int32 | data | The data to set |
SetMaterial(String, RendererMaterial)
Declaration
public void SetMaterial(string name, RendererMaterial material)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | |
RendererMaterial | material |
SetMatrix3(String, Matrix3)
Set a uniform Matrix3 on this shader
Declaration
public void SetMatrix3(string name, Matrix3 data)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the uniform |
OpenToolkit.Mathematics.Matrix3 | data | The data to set |
Remarks
The matrix is transposed before being sent to the shader.
SetMatrix4(String, Matrix4)
Set a uniform Matrix4 on this shader
Declaration
public void SetMatrix4(string name, Matrix4 data)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the uniform |
OpenToolkit.Mathematics.Matrix4 | data | The data to set |
Remarks
The matrix is transposed before being sent to the shader.
SetVector2(String, Vector2)
Set a uniform Vector2 on this shader.
Declaration
public void SetVector2(string name, Vector2 data)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the uniform |
OpenToolkit.Mathematics.Vector2 | data | The data to set |
SetVector3(String, Vector3)
Set a uniform Vector3 on this shader.
Declaration
public void SetVector3(string name, Vector3 data)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the uniform |
OpenToolkit.Mathematics.Vector3 | data | The data to set |
SetVector4(String, Vector4)
Set a uniform Vector4 on this shader.
Declaration
public void SetVector4(string name, Vector4 data)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the uniform |
OpenToolkit.Mathematics.Vector4 | data | The data to set |