aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/curve/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve/opengl')
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java8
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);
}