abstract class Tinman.Engine.API.GLContext

Derived from

GraphicsContext abstract

Extended by

OpenGLContext sealed
OpenGLESContext sealed

Abstract base class for IGraphicsContext implementations that use a GL-style API.

Public / Attributes


[DebugHelper] [ShutdownClear]
public static attribute DebugFrequentErrorChecks → (bool)

Perform GL error checks with GLBase.ErrorReset2 more often?

Protected / Constructors


protected constructor GLContext → (3)

name in : string

See IGraphicsContext.Name.

renderContext in : RenderContext own

The GL render context.

multiSample in : MultiSampleType

The maximum multi-sample setting to use.

Creates a new instance of GraphicsContext.

Protected / Methods


protected method ComputeMaximumTextureSize → (1)

size in : int32

The maximum texture size that has been provided externally (in megabytes) or 0 to set the default value.

returns → int32

The maximum texture size, in megabytes.

Computes the maximum texture size.


protected method ComputeVideoMemory → (1)

memory in : int32

The video memory size that has been provided externally (in megabytes) or 0 to try to determine the amount of video memory automatically.

returns → int32

The amount of video memory, in megabytes.

Computes the amount of available video memory.


protected method FrameBufferApply → (1)

targets in : RenderTargets

The render target set.

Applies the given render targets in.


protected abstract method FrameBufferObjectCreate → (1)

targets in : RenderTargets

The render target set.

returns → int32

The framebuffer object.

Creates a framebuffer object for the given render target set.


protected abstract method FrameBufferObjectDelete → (1)

fbo in : int32 own

The framebuffer object.

Deletes the given framebuffer object.


protected abstract method FrameBufferObjectSet → (1)

fbo in : int32

The framebuffer object or 0 for the default framebuffer.

Applies the given framebuffer object for subsequent use.


protected method InputLayoutApply_Buffer → (3)

buffer in : IGeometryBuffer

The mapping or null.

instanceCount in : int32

The instance count.

firstInstance in : int32

The base instance.

returns → RangeI

The instance range or RangeI.Zero if the geometry is not instanced.

Applies the given buffer in to the input layout.


protected abstract method VertexArrayObjectCreate → (3)

buffer in : IGeometryBuffer

The geometry buffer (vertex / index buffer)..

program in : int32

The program name (vertex attribute locations).

mapping in : Mapping2D<int32>

Mapping between vertex elements and attribute location.

returns → int32

The created vertex array object.

Creates a vertex array object for the given input.


protected abstract method VertexArrayObjectDelete → (1)

vao in : int32 own

The vertex array object.

Deletes the given vertex array object.


protected abstract method VertexArrayObjectSet → (1)

vao in : int32

The vertex array object or 0 for none.

Applies the given vertex array object for subsequent use.

Protected / Attributes


protected attribute multiSample → (int32)

The maximum multi-sample count or 0 if multi-sampling is not available.


protected attribute renderContext → (RenderContext)

The GL render context.