OpenGLUtil

Description

static class Tinman.AddOns.OpenGL.OpenGLUtil

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

Helper class for this namespace.

Public / Methods

Constant​Value​For

2 overloads


[Pure]
public static method ConstantValueFor1 → (1)

format in : RenderTargetFormat

The render target format.

returns → Vec2I

Vec2I.X: The OpenGL internal format (for example GL.RGBA8) of the color buffer, 0 if format in does not contain any color buffer flags or -1 if not supported.
Vec2I.Y: The OpenGL internal format (for example GL.DEPTH24_STENCIL8) of the depth buffer, 0 if format in does not contain any depth buffer flags or -1 if not supported.

Returns the OpenGL constant values for the given RenderTargetFormat value.


[Pure]
public static method ConstantValueFor2 → (3)

factory in : OpenGLTextureFactory

[not-null]
The texture factory.

value in : TextureFormat

The value.

srgb in : bool

Return the sRGB variant, if existent?

returns → Vec3I

Vec4I.X: The OpenGL internal format (for example GL.RGBA8) or -1 if not supported.
Vec4I.Y: The OpenGL data format (for example GL.RGBA) or 0 if the internal format is compressed.
Vec4I.Z: The OpenGL data type (for example GL.UNSIGNED_BYTE) or 0 if the internal format is compressed.

Returns the OpenGL constant values for the given TextureFormat value.

Constant​Value​For​Color


[Pure]
public static method ConstantValueForColor → (1)

format in : RenderTargetFormat

The render target format.

returns → Vec3I

Vec2I.X: The OpenGL internal format (for example GL.RGBA8) of the color buffer, 0 if format in does not contain any color buffer flags or -1 if not supported.
Vec4I.Y: The OpenGL data format (for example GL.RGBA).
Vec4I.Z: The OpenGL data type (for example GL.UNSIGNED_BYTE).

Returns the OpenGL constant values for RenderTargetFormat.MaskColor of the given RenderTargetFormat value.

Constant​Value​For​Depth


[Pure]
public static method ConstantValueForDepth → (1)

format in : RenderTargetFormat

The render target format.

returns → int32

The OpenGL internal format (for example GL.DEPTH24_STENCIL8) of the depth buffer, 0 if format in does not contain any depth buffer flags or -1 if not supported.

Returns the OpenGL constant value for RenderTargetFormat.MaskDepth if the given RenderTargetFormat value.

Logging

Logger


public static readonly attribute Logger → (ILogger)

The logger object of this class.