Table of Contents

Class GLShader<T>

Namespace
ReFuel.Graphics.OpenGL
Assembly
ReFuel.dll
public class GLShader<T> : Shader<T>, IEnumerable<EcsNode>, IResourceInfo, IArc, IDisposable, IInitializer, IGLShader, IEnumerable<KeyValuePair<GLShaderStages, string>>, IEnumerable, IInitializer<IGLShader>, IInitializer<GLShaderPromise>, IInitializer<GLShaderSource>, IInitializerBase where T : Material

Type Parameters

T
Inheritance
GLShader<T>
Implements
Derived
Inherited Members

Properties

ActiveAttributesList

public IReadOnlyList<GLAttribute> ActiveAttributesList { get; }

Property Value

IReadOnlyList<GLAttribute>

ActiveAttributesMap

public IReadOnlyDictionary<string, GLAttribute> ActiveAttributesMap { get; }

Property Value

IReadOnlyDictionary<string, GLAttribute>

ActiveUniformBlocksList

public IReadOnlyList<GLUniformBlock> ActiveUniformBlocksList { get; }

Property Value

IReadOnlyList<GLUniformBlock>

ActiveUniformBlocksMap

public IReadOnlyDictionary<string, GLUniformBlock> ActiveUniformBlocksMap { get; }

Property Value

IReadOnlyDictionary<string, GLUniformBlock>

ActiveUniformsList

public IReadOnlyList<GLUniform> ActiveUniformsList { get; }

Property Value

IReadOnlyList<GLUniform>

ActiveUniformsMap

public IReadOnlyDictionary<string, GLUniform> ActiveUniformsMap { get; }

Property Value

IReadOnlyDictionary<string, GLUniform>

Compute

public string? Compute { get; }

Property Value

string

Fragment

public string? Fragment { get; }

Property Value

string

Geometry

public string? Geometry { get; }

Property Value

string

IsCompiled

public bool IsCompiled { get; }

Property Value

bool

IsCompute

public bool IsCompute { get; }

Property Value

bool

Program

public GLObject Program { get; }

Property Value

GLObject

Renderer

protected OpenGLRenderer Renderer { get; }

Property Value

OpenGLRenderer

Stages

public GLShaderStages Stages { get; }

Property Value

GLShaderStages

TesselationControl

public string? TesselationControl { get; }

Property Value

string

TesselationEvaluation

public string? TesselationEvaluation { get; }

Property Value

string

Vertex

public string? Vertex { get; }

Property Value

string

Methods

AssertStatus()

public void AssertStatus()

CheckShaderCompileStatus(int)

Check the compile status of a shader stage and log errors.

protected bool CheckShaderCompileStatus(int shader)

Parameters

shader int

The shader stage to check.

Returns

bool

True if compiled successfully.

CheckShaderLinkStatus()

Check the program link status of this shader.

protected bool CheckShaderLinkStatus()

Returns

bool

True if the program linked successfully.

CompileShader(bool)

public void CompileShader(bool force = false)

Parameters

force bool

CreateComputeShader(out int)

protected bool CreateComputeShader(out int shader)

Parameters

shader int

Returns

bool

CreateShader(GLShaderStages, out int)

protected bool CreateShader(GLShaderStages stage, out int shader)

Parameters

stage GLShaderStages
shader int

Returns

bool

Dispose(bool)

Internal function to handle dispose behavior.

protected override void Dispose(bool disposing)

Parameters

disposing bool

True if disposing.

GetAttributeLocation(string)

public int GetAttributeLocation(string name)

Parameters

name string

Returns

int

GetFragDataLocation(string)

public int GetFragDataLocation(string name)

Parameters

name string

Returns

int

GetUniformBlockLocation(string)

public int GetUniformBlockLocation(string name)

Parameters

name string

Returns

int

GetUniformLocation(string)

public int GetUniformLocation(string name)

Parameters

name string

Returns

int

Initialize(GLShaderPromise)

public void Initialize(GLShaderPromise promise)

Parameters

promise GLShaderPromise

Initialize(GLShaderSource)

public void Initialize(GLShaderSource shader)

Parameters

shader GLShaderSource

Initialize(IGLShader)

public void Initialize(IGLShader shader)

Parameters

shader IGLShader

Operators

implicit operator int(GLShader<T>)

public static implicit operator int(GLShader<T> self)

Parameters

self GLShader<T>

Returns

int