From 667f946d11b29f9d6618b46d7b821099f6a83b77 Mon Sep 17 00:00:00 2001 From: Joshua Slack Date: Wed, 18 Oct 2017 22:58:42 -0500 Subject: Fixed bug with caps in Jogl recently introduced. --- .../java/com/ardor3d/renderer/jogl/JoglContextCapabilities.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ardor3d-jogl/src/main/java') 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"); -- cgit v1.2.3