Class GLEnvironment
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
OpenGL environment initialization and default render state configuration.
public static class GLEnvironmentInheritance
Fields
RequiredVersion
Minimum required OpenGL version.
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
Indicates whether indirect count draw calls are supported by the current driver.
public static bool IndirectCountSupported { get; }Property Value
SlowMultiDrawIndirect
Indicates whether the driver does not perform efficiently with small sub-draws, making GPU-driven rendering slower than direct draws. Intel drivers also misassign gl_BaseInstance across sub-draws when baseVertex varies within one multidraw.
public static bool SlowMultiDrawIndirect { get; }Property Value
Methods
EnableParallelShaderCompile()
Allows the driver to compile and link shaders on its own worker threads.
public static void EnableParallelShaderCompile()Initialize(ILogger)
Initializes the OpenGL environment and queries capabilities.
public static void Initialize(ILogger logger)Parameters
logger ILogger
Logger for diagnostic output.
Exceptions
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 to an OpenTK Matrix3x4, transposing the matrix and dropping the last (M14/M24/M34/M44) column.
public static Matrix3x4 To3x4(this Matrix4x4 m)Parameters
Returns
ToOpenTK(Matrix4x4)
Converts a to an OpenTK Matrix4.
public static Matrix4 ToOpenTK(this Matrix4x4 m)
