diff options
author | Sven Gothel <[email protected]> | 2012-02-22 03:53:13 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-02-22 03:53:13 +0100 |
commit | 4504693a4cacd273b2c5610b793aeb6af748ad09 (patch) | |
tree | fe84cf60ded9cc252a25e3c94340603957a0782d /src/jogl/classes/jogamp/graph/curve | |
parent | b36ca1f8a21f3aa25a08a40097cb5f07393534c7 (diff) |
Fix VBORegion2PES2: Don't exceed MAQX_TEXTURE_SIZE
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve')
-rw-r--r-- | src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java index 758d0e999..4c664e883 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java @@ -190,10 +190,18 @@ public class VBORegion2PES2 extends GLRegion { // the buffers were disabled, since due to real/fbo switching and other vbo usage } + int[] maxTexSize = new int[] { -1 } ; + protected void drawImpl(GL2ES2 gl, RenderState rs, int vp_width, int vp_height, int width) { if(vp_width <=0 || vp_height <= 0 || width <= 0){ renderRegion(gl); } else { + if(0 > maxTexSize[0]) { + gl.glGetIntegerv(GL.GL_MAX_TEXTURE_SIZE, maxTexSize, 0); + } + if(width > maxTexSize[0]) { + width = maxTexSize[0]; + } if(width != tex_width_c) { renderRegion2FBO(gl, rs, width); } |