Class GLEnvironment
- Namespace
- ValveResourceFormat.Renderer
- Assembly
- Renderer.dll
OpenGL environment initialization and default render state configuration.
public static class GLEnvironmentInheritance
Inherited Members
Fields
RequiredVersion
Minimum required OpenGL version (4.6).
public static readonly Version RequiredVersionField Value
Properties
GpuRendererAndDriver
Gets the GPU renderer name and driver version string.
public static string? GpuRendererAndDriver { get; }Property Value
IndirectCountSupported
public static bool IndirectCountSupported { get; }Property Value
Methods
Initialize(ILogger)
Initializes the OpenGL environment and queries capabilities.
public static void Initialize(ILogger logger)Parameters
loggerILogger-
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
Returns
ToOpenTK(Matrix4x4)
Converts a System.Numerics.Matrix4x4 to an OpenTK Matrix4.
public static Matrix4 ToOpenTK(this Matrix4x4 m)