Class GLShader
The OpenGL implementation of a shader object.
Implements
Inherited Members
Namespace: Evergine.OpenGL
Assembly: Evergine.OpenGL.dll
Syntax
public class GLShader : Shader, IDisposable
  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
Whether the native shader is already 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 debuggers tools.
Declaration
public override string Name { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
Overrides
NativePointer
Gets the native pointer.
Declaration
public override IntPtr NativePointer { get; }
  Property Value
| Type | Description | 
|---|---|
| IntPtr | 
Overrides
Methods
CreateNativeResource()
Initialize native GLResource.
Declaration
public void CreateNativeResource()
  DeleteNativeResource()
Delete native GLResource.
Declaration
public void DeleteNativeResource()
  Dispose()
Dispose this instance.
Declaration
public override void Dispose()
  Overrides
ShaderCompile(string)
By pass 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.  |