aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
index 34cc0eb07..b8709f31c 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
@@ -179,7 +179,9 @@ public class GLReadBufferUtil {
if(res) {
psm.setAlignment(gl, alignment, alignment);
readPixelBuffer.clear();
- gl.glReadPixels(0, 0, drawable.getWidth(), drawable.getHeight(), textureDataFormat, textureDataType, readPixelBuffer);
+ try {
+ gl.glReadPixels(0, 0, drawable.getWidth(), drawable.getHeight(), textureDataFormat, textureDataType, readPixelBuffer);
+ } catch(GLException gle) { res = false; gle.printStackTrace(); }
readPixelBuffer.position(readPixelSize);
readPixelBuffer.flip();
final int glerr1 = gl.glGetError();