Search Results for

    Show / Hide Table of Contents

    Class GLShader

    The OpenGL implementation of a shader object.

    Inheritance
    object
    GraphicsResource
    Shader
    GLShader
    Inherited Members
    Shader.Description
    Shader.GetHashCode()
    GraphicsResource.disposed
    GraphicsResource.Context
    GraphicsResource.Disposed
    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
    Shader.Name

    NativePointer

    Gets the native pointer.

    Declaration
    public override nint NativePointer { get; }
    Property Value
    Type Description
    nint
    Overrides
    GraphicsResource.NativePointer

    Methods

    CreateNativeResource()

    Initializes native GLResource.

    Declaration
    public void CreateNativeResource()

    DeleteNativeResource()

    Deletes the native GLResource.

    Declaration
    public void DeleteNativeResource()

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public override void Dispose()
    Overrides
    GraphicsResource.Dispose()

    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.

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX