summaryrefslogtreecommitdiffstats
path: root/src/demos/es2/perftst/Perftst.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-03-05 01:25:12 +0000
committerSven Gothel <[email protected]>2009-03-05 01:25:12 +0000
commite03aaaf1b14cc40cb2c8f2158acf02390c4fafe6 (patch)
treecf7eacef23ee86b7e1dfddd69800eaa303ce399b /src/demos/es2/perftst/Perftst.java
parent612955ad82326024f5cb99d9fe4175dce78caa27 (diff)
- Fixed rootrel.build usage, this works properly through gluegen, jogl-demos and this build.
You can say -Drootrel.build=build-x86_64 for example. - Fixed jogl-demos in regard to this changeset - Gluegen - Fixed gluegen BuildComposablePipeline's 'getGL*' methods. Now they return 'this', otherwise the pipeline would be broken/removed. - Add BuildComposablePipeline CustomPipeline, which allows customized class composition with an interface (to be wrapped), prolog class and the downstream class. - Add GlueGen (incl. ant task) 'outputRootDir' to be able to set a top output root dir via ant / commandline. - GL fixed function - Package 'javax.media.opengl.sub.fixed.*' defines some fixed function interfaces. This allows partitioning of custom implementation. - Using gluegen's new CustomPipeline to compose a GLFixedFuncIf implementation, using a GL downstream and a GLFixedFuncHookIf prolog. The latter implements the fixed functionality. Example is the GLFixedFuncImpl. gl.getContext().setGL( new GLFixedFuncImpl(gl, new FixedFuncHook(gl.getGL2ES2())) ) ; or gl.getContext().setGL( new GLFixedFuncImpl(gl, gl.getGL2ES1()) ) ; - The example GLFixedFuncHookIf impl FixedFuncPipeline/ can be instantiated with custom shader code. - ES2 and all other interfaces only contain the original functionality, besides minor convenient data access methods. - Fix: GL2ES2 createCompileShader() and createLoadShader() is moved to ShaderCode util class. - Updated PMVMatrix - Add: GLAutoDrawable.setContext() .. and all it's implementations Necessary to set a new GLContext. - Add: GLContext getAttachedObject(int) and putAttachedObject(int, Object), to allow the user to attach application specific and TLS sensitive objects to the GLContext. - git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@316 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/es2/perftst/Perftst.java')
-rwxr-xr-xsrc/demos/es2/perftst/Perftst.java14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/demos/es2/perftst/Perftst.java b/src/demos/es2/perftst/Perftst.java
index a1d9412..ee1924e 100755
--- a/src/demos/es2/perftst/Perftst.java
+++ b/src/demos/es2/perftst/Perftst.java
@@ -88,11 +88,7 @@ public class Perftst implements MouseListener, GLEventListener {
System.err.println("GL_EXTENSIONS:");
System.err.println(" " + gl.glGetString(gl.GL_EXTENSIONS));
- if(gl.isGLES2()) {
- pmvMatrix = gl.getGLES2().getPMVMatrix();
- } else {
- pmvMatrix = new PMVMatrix();
- }
+ pmvMatrix = new PMVMatrix();
pmod.initShaderState(gl);
st = ShaderState.getCurrent();
@@ -100,9 +96,9 @@ public class Perftst implements MouseListener, GLEventListener {
// Push the 1st uniform down the path
st.glUseProgram(gl, true);
- pmvMatrix.glMatrixMode(gl.GL_PROJECTION);
+ pmvMatrix.glMatrixMode(pmvMatrix.GL_PROJECTION);
pmvMatrix.glLoadIdentity();
- pmvMatrix.glMatrixMode(gl.GL_MODELVIEW);
+ pmvMatrix.glMatrixMode(pmvMatrix.GL_MODELVIEW);
pmvMatrix.glLoadIdentity();
if(!st.glUniform(gl, new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf()))) {
@@ -125,11 +121,11 @@ public class Perftst implements MouseListener, GLEventListener {
st.glUseProgram(gl, true);
// Set location in front of camera
- pmvMatrix.glMatrixMode(GL2ES2.GL_PROJECTION);
+ pmvMatrix.glMatrixMode(pmvMatrix.GL_PROJECTION);
pmvMatrix.glLoadIdentity();
pmvMatrix.glOrthof(0f, 1.0f, 0.0f, 1.0f, 1.0f, 100.0f);
- pmvMatrix.glMatrixMode(gl.GL_MODELVIEW);
+ pmvMatrix.glMatrixMode(pmvMatrix.GL_MODELVIEW);
pmvMatrix.glLoadIdentity();
pmvMatrix.glTranslatef(0, 0, -10);