Package com.jozufozu.flywheel.backend.gl
Class GlCompat
java.lang.Object
com.jozufozu.flywheel.backend.gl.GlCompat
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic final @UnknownNullability org.lwjgl.opengl.GLCapabilitiesstatic final Driverstatic final GlslVersionstatic final intstatic final booleanstatic final boolean -
Method Summary
Modifier and TypeMethodDescriptionstatic intgetComputeGroupCount(int invocations) static voidinit()static voidsafeShaderSource(int glId, CharSequence source) Modified from:
canvas
-
Field Details
-
CAPABILITIES
public static final @UnknownNullability org.lwjgl.opengl.GLCapabilities CAPABILITIES -
DRIVER
-
SUBGROUP_SIZE
public static final int SUBGROUP_SIZE -
ALLOW_DSA
public static final boolean ALLOW_DSA- See Also:
-
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
Modified from:
canvasIdentical 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.
-