Table of Contents

Class GLEnvironment

Namespace
ValveResourceFormat.Renderer
Assembly
Renderer.dll

OpenGL environment initialization and default render state configuration.

public static class GLEnvironment

Inheritance

Inherited Members

Fields

RequiredVersion

Minimum required OpenGL version (4.6).

public static readonly Version RequiredVersion

Field Value

Version

Properties

GpuRendererAndDriver

Gets the GPU renderer name and driver version string.

public static string? GpuRendererAndDriver { get; }

Property Value

string?

IndirectCountSupported

public static bool IndirectCountSupported { get; }

Property Value

bool

Methods

Initialize(ILogger)

Initializes the OpenGL environment and queries capabilities.

public static void Initialize(ILogger logger)

Parameters

logger ILogger

Logger for diagnostic output.

Exceptions

NotSupportedException

Thrown if the OpenGL version is too old.

SetDefaultRenderState()

Sets the default OpenGL render state for Source 2 rendering.

public static void SetDefaultRenderState()

To3x4(Matrix4x4)

Converts a System.Numerics.Matrix4x4 to an OpenTK Matrix3x4 by dropping the last row.

public static Matrix3x4 To3x4(this Matrix4x4 m)

Parameters

m Matrix4x4

Returns

Matrix3x4

ToOpenTK(Matrix4x4)

Converts a System.Numerics.Matrix4x4 to an OpenTK Matrix4.

public static Matrix4 ToOpenTK(this Matrix4x4 m)

Parameters

m Matrix4x4

Returns

Matrix4