From e16e974a3e2b38c65355838eeb010954354097d2 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 14 Mar 2014 08:13:42 +0100 Subject: Bug 801: Add Frustum support to Region; Misc .. Region: Add Frustum support, to drop 'out of sight' shapes RenderState: Add hints, e.g. BITHINT_BLENDING_ENABLED, allowing user code to toggle background color etc Demos: Incomplete - WIP - Reuse mapped object to window coords computed at reshape - TODO: Use minimal Scenegraph for Graph-UI .. --- src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java') diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java index bdf824b6a..e45e623ba 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java @@ -81,7 +81,7 @@ public class VBORegionSPES2 extends GLRegion { } @Override - protected void update(final GL2ES2 gl, final RegionRenderer renderer) { + protected void updateImpl(final GL2ES2 gl, final RegionRenderer renderer) { if( !buffersAttached ) { final ShaderState st = renderer.getShaderState(); st.ownAttribute(verticeAttr, true); @@ -104,6 +104,12 @@ public class VBORegionSPES2 extends GLRegion { @Override protected void drawImpl(final GL2ES2 gl, final RegionRenderer renderer, final int[/*1*/] sampleCount) { + if( 0 >= indicesBuffer.getElementCount() ) { + if(DEBUG_INSTANCE) { + System.err.printf("VBORegionSPES2.drawImpl: Empty%n"); + } + return; // empty! + } verticeAttr.enableBuffer(gl, true); texCoordAttr.enableBuffer(gl, true); indicesBuffer.bindBuffer(gl, true); // keeps VBO binding -- cgit v1.2.3