aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-02-15 23:28:25 +0100
committerSven Gothel <[email protected]>2014-02-15 23:28:25 +0100
commit1e1b408ba1527edc2ee5ceede92816ee87e4c461 (patch)
tree0de7897b7537e4dc40b7bb762bdc35280840cc23
parent1638fb3e80a1102670b5d216647ee6fce0031d7f (diff)
Graph: RendereState: Create own PMVMatrix if passed value is null; Renderer: Add reshapeNotify(..) for NOP PMV reshape notification
-rw-r--r--make/scripts/tests.sh6
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java6
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java8
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/RenderStateImpl.java4
4 files changed, 14 insertions, 10 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index c69c72f46..9365a6bce 100644
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -152,7 +152,7 @@ function jrun() {
#D_ARGS="-Djogl.1thread=false -Djogl.debug.Threading"
#D_ARGS="-Djogl.1thread=true -Djogl.debug.Threading"
#D_ARGS="-Djogl.debug.DebugGL -Djogl.debug.TraceGL -Djogl.debug.GLContext.TraceSwitch -Djogl.debug=all"
- D_ARGS="-Djogl.debug.AudioSink"
+ #D_ARGS="-Djogl.debug.AudioSink"
#D_ARGS="-Djogl.debug.GLArrayData"
#D_ARGS="-Dnewt.debug.Screen -Dnewt.debug.Window"
#D_ARGS="-Dnewt.debug.Screen"
@@ -367,8 +367,8 @@ function testawtswt() {
# av demos
#
#testnoawt jogamp.opengl.openal.av.ALDummyUsage $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube $*
-testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieSimple $*
+testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieSimple $*
#
# performance tests
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java
index 6a8fb6a67..9b0f32ef6 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java
@@ -42,7 +42,7 @@ public abstract class RenderState {
private static final String thisKey = "jogamp.graph.curve.RenderState" ;
public static RenderState createRenderState(ShaderState st, Vertex.Factory<? extends Vertex> pointFactory) {
- return new RenderStateImpl(st, pointFactory);
+ return new RenderStateImpl(st, pointFactory, null);
}
public static RenderState createRenderState(ShaderState st, Vertex.Factory<? extends Vertex> pointFactory, PMVMatrix pmvMatrix) {
@@ -61,8 +61,8 @@ public abstract class RenderState {
protected RenderState(ShaderState st, Vertex.Factory<? extends Vertex> vertexFactory, PMVMatrix pmvMatrix) {
this.st = st;
this.vertexFactory = vertexFactory;
- this.pmvMatrix = pmvMatrix;
- this.gcu_PMVMatrix = new GLUniformData(UniformNames.gcu_PMVMatrix, 4, 4, pmvMatrix.glGetPMvMatrixf());
+ this.pmvMatrix = null != pmvMatrix ? pmvMatrix : new PMVMatrix();
+ this.gcu_PMVMatrix = new GLUniformData(UniformNames.gcu_PMVMatrix, 4, 4, this.pmvMatrix.glGetPMvMatrixf());
st.ownUniform(gcu_PMVMatrix);
}
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java
index 8783906c2..029286601 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java
@@ -241,6 +241,14 @@ public abstract class Renderer {
}
}
+ /** No PMVMatrix operation is performed here. PMVMatrix will be updated if gl is not null. */
+ public boolean reshapeNotify(GL2ES2 gl, int width, int height) {
+ this.vp_width = width;
+ this.vp_height = height;
+ updateMatrix(gl);
+ return true;
+ }
+
public boolean reshapePerspective(GL2ES2 gl, float angle, int width, int height, float near, float far) {
this.vp_width = width;
this.vp_height = height;
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/RenderStateImpl.java b/src/jogl/classes/jogamp/graph/curve/opengl/RenderStateImpl.java
index fe2dd7363..68f926b0a 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/RenderStateImpl.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/RenderStateImpl.java
@@ -61,10 +61,6 @@ public class RenderStateImpl extends RenderState {
// st.ownUniform(gcu_Strength);
}
- public RenderStateImpl(ShaderState st, Vertex.Factory<? extends Vertex> pointFactory) {
- this(st, pointFactory, new PMVMatrix());
- }
-
@Override
public final GLUniformData getWeight() { return gcu_Weight; }
@Override