Class GLProgram
A set of shaders used to draw something.
Implements
Inherited Members
Namespace: Evergine.OpenGL
Assembly: Evergine.OpenGL.dll
Syntax
public class GLProgram : IDisposable
Constructors
GLProgram(GLGraphicsContext, ComputeShaderStateDescription)
Initializes a new instance of the GLProgram class.
Declaration
public GLProgram(GLGraphicsContext context, ComputeShaderStateDescription shaderDescription)
Parameters
| Type | Name | Description |
|---|---|---|
| GLGraphicsContext | context | Graphics Context. |
| ComputeShaderStateDescription | shaderDescription | The current shader descriptor. |
GLProgram(GLGraphicsContext, GraphicsShaderStateDescription)
Initializes a new instance of the GLProgram class.
Declaration
public GLProgram(GLGraphicsContext context, GraphicsShaderStateDescription shaderDescription)
Parameters
| Type | Name | Description |
|---|---|---|
| GLGraphicsContext | context | Graphics Context. |
| GraphicsShaderStateDescription | shaderDescription | The current shader descriptor. |
Fields
Hash
The GetHashCode that represent this program.
Declaration
public int Hash
Field Value
| Type | Description |
|---|---|
| int |
disposed
Holds if the instance has been disposed.
Declaration
protected bool disposed
Field Value
| Type | Description |
|---|---|
| bool |
uniformBlockBindings
The uniform block bindings index.
Declaration
protected List<uint> uniformBlockBindings
Field Value
| Type | Description |
|---|---|
| List<uint> |
uniformSlots
The uniform slots.
Declaration
protected Dictionary<int, int> uniformSlots
Field Value
| Type | Description |
|---|---|
| Dictionary<int, int> |
Methods
Apply()
Install a program object as part of the current graphics state.
Declaration
public void Apply()
Dispose()
Dispose this instance.
Declaration
public void Dispose()
ExistsBufferBinding(uint)
Get slot binding to buffer element index.
Declaration
public bool ExistsBufferBinding(uint binding)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | binding | slot index. |
Returns
| Type | Description |
|---|---|
| bool | if exists a buffer binding in this slot. |
GetAttribLocation(ElementSemanticType, uint, out int)
Gets the attribute location from the semantic type and index.
Declaration
public bool GetAttribLocation(ElementSemanticType semanticType, uint semanticIndex, out int location)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementSemanticType | semanticType | The semantic type. |
| uint | semanticIndex | The semantic index. |
| int | location | The attribute location. -1 if is not available. |
Returns
| Type | Description |
|---|---|
| bool | If this attribute location is available. |
GetUniformInfo(int)
Get uniformInfo binding to uniform element index.
Declaration
public int GetUniformInfo(int slot)
Parameters
| Type | Name | Description |
|---|---|---|
| int | slot | Slot index. |
Returns
| Type | Description |
|---|---|
| int | Uniform information. |