diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml
index 4383ed6b26..247802e226 100644
--- a/runelite-client/pom.xml
+++ b/runelite-client/pom.xml
@@ -143,6 +143,12 @@
jogl-rl
2.4.0-rc-20220318
+
+ net.runelite.jogl
+ jogl-gldesktop-dbg
+ 2.4.0-rc-20220318
+ true
+
net.runelite.jogl
jogl-rl
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GpuPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GpuPlugin.java
index 12034c7875..9f80cf6023 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GpuPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GpuPlugin.java
@@ -30,6 +30,7 @@ import com.jogamp.nativewindow.AbstractGraphicsConfiguration;
import com.jogamp.nativewindow.NativeWindowFactory;
import com.jogamp.nativewindow.awt.AWTGraphicsConfiguration;
import com.jogamp.nativewindow.awt.JAWTWindow;
+import com.jogamp.opengl.DebugGL4;
import com.jogamp.opengl.GL;
import static com.jogamp.opengl.GL.GL_ARRAY_BUFFER;
import static com.jogamp.opengl.GL.GL_DYNAMIC_DRAW;
@@ -418,10 +419,17 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
this.gl = glContext.getGL().getGL4();
- setupSyncMode();
-
if (log.isDebugEnabled())
{
+ try
+ {
+ gl = new DebugGL4(gl);
+ }
+ catch (NoClassDefFoundError ex)
+ {
+ log.debug("Disabling DebugGL due to jogl-gldesktop-dbg not being present on the classpath");
+ }
+
gl.glEnable(gl.GL_DEBUG_OUTPUT);
// GLDebugEvent[ id 0x20071
@@ -441,6 +449,8 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
gl.GL_DONT_CARE, 1, new int[]{0x20052}, 0, false);
}
+ setupSyncMode();
+
initVao();
try
{