Class GlCompat

java.lang.Object
com.jozufozu.flywheel.backend.gl.GlCompat

public final class GlCompat extends Object
  • Field Details

    • CAPABILITIES

      public static final @UnknownNullability org.lwjgl.opengl.GLCapabilities CAPABILITIES
    • DRIVER

      public static final Driver DRIVER
    • SUBGROUP_SIZE

      public static final int SUBGROUP_SIZE
    • ALLOW_DSA

      public static final boolean ALLOW_DSA
      See Also:
    • MAX_GLSL_VERSION

      public static final GlslVersion MAX_GLSL_VERSION
    • SUPPORTS_INSTANCING

      public static final boolean SUPPORTS_INSTANCING
    • SUPPORTS_INDIRECT

      public static final boolean SUPPORTS_INDIRECT
  • Method Details

    • init

      public static void init()
    • getComputeGroupCount

      public static int getComputeGroupCount(int invocations)
    • safeShaderSource

      public static void safeShaderSource(int glId, CharSequence source)
      Modified from:
      canvas

      Identical in function to GL20C.glShaderSource(int, CharSequence) but passes a null pointer for string length to force the driver to rely on the null terminator for string length. This is a workaround for an apparent flaw with some AMD drivers that don't receive or interpret the length correctly, resulting in an access violation when the driver tries to read past the string memory.

      Hat tip to fewizz for the find and the fix.