sealed class Tinman.AddOns.OpenGL.OpenGLContext

Derived from

GLContext abstract

Full source code is included in the Tinman 3D SDK download.

An implementation of the IGraphicsContext interface that uses an OpenGL 4.1 Core Profile context (or newer).

You can use the OpenGLContextFactory object to configure and create an instance of this class. Also you can use the constructor to wrap an existing GL object.

By default, OpenGL interprets sequences of pixel/texel rows as bottom-to-top, while ITexture2D (and thus IGraphicsContext) specifies top-to-bottom. Textures and 3D models are authored against the latter. To avoid the necessity to modify texture data and/or 3D model data (texture coordinates), the following GLSL statement must be added after outputting gl_Position:

gl_Position.y *= 1.0;

The returned INativeHandles can be interpreted as follows:

The IGraphicsContext.ClearRenderTarget method modifies the following state:

The IGraphicsContext.ReadPixels method modifies the following state:

The IGraphicsContext.SetClip method modifies the following state:

The IGraphicsContext.SetGeometryBuffer method modifies the following state:

The IGraphicsContext.SetRenderTarget method modifies the following state:

The IGraphicsContext.SetViewport method modifies the following state:

The following binding targets are modified by the classes of this graphics context implementation and will be cleared to zero after use:

Public / Constructors


public constructor OpenGLContext → (5)

renderContext in : RenderContext own

The RenderContext object to use for GLApi.OpenGL_41.

availableVideoMemory in : int32

See IGraphicsContextFactory.AvailableVideoMemory.

maximumTextureSize in : int32

See IGraphicsContextFactory.MaximumTextureSize.

shaderRepository in : Path

See IGraphicsContextFactory.ShaderRepository.

multiSample in : MultiSampleType

The multi-sample settings, see IGraphicsContext.IsMultiSample.

Creates a new instance of OpenGLContext.


If a graphics subsystem error has occurred.