diff options
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java')
-rw-r--r-- | src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java index 24d53c1a2..8265b014a 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java @@ -241,12 +241,9 @@ public class VBORegionSPES2 extends GLRegion { final Texture tex = frame.getTexture(); tex.bind(gl); tex.enable(gl); // nop on core - final int colorTexUnit = colorTexSeq.getTextureUnit(); - if( colorTexUnit != gcu_ColorTexUnit.intValue() ) { - gcu_ColorTexUnit.setData(colorTexUnit); - gl.glUniform(gcu_ColorTexUnit); - } - gl.glUniform(gcu_ColorTexBBox); // FIXME: Only if changed! + gcu_ColorTexUnit.setData(colorTexSeq.getTextureUnit()); + gl.glUniform(gcu_ColorTexUnit); // Always update, since program maybe used by multiple regions + gl.glUniform(gcu_ColorTexBBox); // Always update, since program maybe used by multiple regions gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesBuffer.getElementCount() * indicesBuffer.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0); tex.disable(gl); // nop on core } else { |