Class GLShader
The OpenGL implementation of a shader object.
Inherited Members
Namespace: Evergine.OpenGL
Assembly: Evergine.OpenGL.dll
Syntax
public class GLShader : Shader
Constructors
GLShader(GraphicsContext, ref ShaderDescription)
Initializes a new instance of the GLShader class.
Declaration
public GLShader(GraphicsContext context, ref ShaderDescription description)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsContext | context | The graphics context. |
| ShaderDescription | description | The shader description. |
Fields
isCreated
Indicates whether the native shader has already been created.
Declaration
protected bool isCreated
Field Value
| Type | Description |
|---|---|
| bool |
Properties
Name
Gets or sets a string identifying this instance. Can be used in graphics debugger tools.
Declaration
public override string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
NativePointer
Gets the native pointer.
Declaration
public override nint NativePointer { get; }
Property Value
| Type | Description |
|---|---|
| nint |
Overrides
Methods
CreateNativeResource()
Initializes native GLResource.
Declaration
public void CreateNativeResource()
DeleteNativeResource()
Deletes the native GLResource.
Declaration
public void DeleteNativeResource()
Destroy()
Destroy graphics native resources.
Declaration
protected override void Destroy()
Overrides
ShaderCompile(string)
Bypass GLSL string to byte array.
Declaration
public static CompilationResult ShaderCompile(string shaderSource)
Parameters
| Type | Name | Description |
|---|---|---|
| string | shaderSource | The GLSL source code. |
Returns
| Type | Description |
|---|---|
| CompilationResult | A byte array of the GLSL code. |