aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-04-09 09:09:51 +0200
committerSven Gothel <[email protected]>2014-04-09 09:09:51 +0200
commitfe47c613e3e07681a5366d6ec3f071fdc4ade65d (patch)
treefd980c33b0fde468918227d31174320b8ae6b163 /src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
parentff4e2b1996d2cfab1eb154020106004fb71471fd (diff)
Bug 801: Region Dirty Update; TextureSequence GLMediaPlayer Fix; Blending Fix ;
- Region Dirty Update - Split dirty -> ShapeDirty + StateDirty, where StateDirty forces re-rendering content w/o geometry update as req. for 2-pass mode. - Fix TextureSequence (GLMediaPlayer) usage in RegionRenderer / GLRegion* - handle GL_TEXTURE_EXTERNAL_OES incl. Android ES3 bug - inject TextureSequence's shader stubs - shader: Use abstract lookup 'texture2D' -> 'gcuTexture2D' - flip scaled colorTexBBox if TextureSequence 'tex.getMustFlipVertically()' - TODO: Handle multiple TextureSequence shader programs! - Fix Blending: GLRegion* / RegionRenderer / RenderState - Disable/Enable depth-writing w/ blending - Region impl. sets proper glBlendFunc*(..), i.e. 2-pass: - render2FBO: glClearColor(0f, 0f, 0f, 0f) glBlendFuncSeparate(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA, GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA) - renderFBO: glBlendFunc(GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA) - User code shall not set glClearColor(..) for 2-pass anymore - Graph-UI Demo - UIShape: - Add MouseGestureListener, combining MouseListener + GestureListener - EventDetails -> PointerEventInfo - PointerEventInfo contains objPos (ray-intersection) and glWin-pos - Toggle: - Separate color (on/off) if enabled - Toggle on click if enabled - SceneUIController - Use PinchToZoomGesture and propagete same gesture to UIShape - Use AABBox.getRayIntersection(..) using 'real' shape coordinates for 1st picking. - Use shape PMV for secondary picking (drag, zoom 2-pointer, etc), see windowToShapeCoords(..) - Sort shapes according to z-value (render: ascending; picking: descending) - Only 'drag' if pointerId matches 1st pressed pointer
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java')
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
index 3c6045a1f..49c1944b1 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
@@ -83,7 +83,7 @@ public abstract class GLRegion extends Region {
/**
* Updates a graph region by updating the ogl related
- * objects for use in rendering if {@link #isDirty()}.
+ * objects for use in rendering if {@link #isShapeDirty()}.
* <p>Allocates the ogl related data and initializes it the 1st time.<p>
* <p>Called by {@link #draw(GL2ES2, RenderState, int, int, int)}.</p>
*/
@@ -139,11 +139,11 @@ public abstract class GLRegion extends Region {
* @see RegionRenderer#enable(GL2ES2, boolean)
*/
public final void draw(final GL2ES2 gl, final RegionRenderer renderer, final int[/*1*/] sampleCount) {
- if(isDirty()) {
+ if( isShapeDirty() ) {
updateImpl(gl);
- setDirty(false);
}
drawImpl(gl, renderer, sampleCount);
+ clearDirtyBits(DIRTY_SHAPE|DIRTY_STATE);
}
protected abstract void drawImpl(final GL2ES2 gl, final RegionRenderer renderer, final int[/*1*/] sampleCount);