aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-jogl/src/main/java
diff options
context:
space:
mode:
authorJoshua Slack <[email protected]>2017-10-18 22:58:42 -0500
committerJoshua Slack <[email protected]>2017-10-18 22:58:42 -0500
commit667f946d11b29f9d6618b46d7b821099f6a83b77 (patch)
treef39e0623a8460a4398a96047f1a5cbdbf10f4ed7 /ardor3d-jogl/src/main/java
parentfd6f4654f290521487dcc1cd9ac700e3b94ecd0e (diff)
Fixed bug with caps in Jogl recently introduced.
Diffstat (limited to 'ardor3d-jogl/src/main/java')
-rw-r--r--ardor3d-jogl/src/main/java/com/ardor3d/renderer/jogl/JoglContextCapabilities.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/renderer/jogl/JoglContextCapabilities.java b/ardor3d-jogl/src/main/java/com/ardor3d/renderer/jogl/JoglContextCapabilities.java
index 1151533..78d6023 100644
--- a/ardor3d-jogl/src/main/java/com/ardor3d/renderer/jogl/JoglContextCapabilities.java
+++ b/ardor3d-jogl/src/main/java/com/ardor3d/renderer/jogl/JoglContextCapabilities.java
@@ -21,6 +21,7 @@ import javax.media.opengl.GL2ES3;
import javax.media.opengl.GLAutoDrawable;
import com.ardor3d.renderer.ContextCapabilities;
+import com.ardor3d.util.geom.BufferUtils;
import com.ardor3d.util.geom.jogl.DirectNioBuffersSet;
public class JoglContextCapabilities extends ContextCapabilities {
@@ -131,9 +132,10 @@ public class JoglContextCapabilities extends ContextCapabilities {
_maxRenderBufferSize = buf.get(0);
// max viewport size.
- gl.glGetIntegerv(GL.GL_MAX_VIEWPORT_DIMS, buf);
- _maxViewportWidth = buf.get(0);
- _maxViewportHeight = buf.get(1);
+ final IntBuffer dimsBuf = BufferUtils.createIntBuffer(2);
+ gl.glGetIntegerv(GL.GL_MAX_VIEWPORT_DIMS, dimsBuf);
+ _maxViewportWidth = dimsBuf.get(0);
+ _maxViewportHeight = dimsBuf.get(1);
// Check for support of multitextures.
_supportsMultiTexture = gl.isExtensionAvailable("GL_ARB_multitexture");