From e03aaaf1b14cc40cb2c8f2158acf02390c4fafe6 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 5 Mar 2009 01:25:12 +0000 Subject: - 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 --- src/gleem/TestMultiWin.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/gleem/TestMultiWin.java') diff --git a/src/gleem/TestMultiWin.java b/src/gleem/TestMultiWin.java index d143721..d398299 100644 --- a/src/gleem/TestMultiWin.java +++ b/src/gleem/TestMultiWin.java @@ -46,6 +46,7 @@ import java.awt.Point; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.media.opengl.GL; +import javax.media.opengl.GL2ES1; import javax.media.opengl.GL2; import javax.media.opengl.GLAutoDrawable; import javax.media.opengl.GLEventListener; @@ -90,18 +91,18 @@ public class TestMultiWin { private ExaminerViewer viewer; public void init(GLAutoDrawable drawable) { - GL gl = drawable.getGL(); + GL2 gl = drawable.getGL().getGL2(); gl.glClearColor(0, 0, 0, 0); float[] lightPosition = new float[] {1, 1, 1, 0}; float[] ambient = new float[] { 0.0f, 0.0f, 0.0f, 1.0f }; float[] diffuse = new float[] { 1.0f, 1.0f, 1.0f, 1.0f }; - gl.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, ambient, 0); - gl.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, diffuse, 0); - gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, lightPosition, 0); + gl.glLightfv(GL2ES1.GL_LIGHT0, GL2ES1.GL_AMBIENT, ambient, 0); + gl.glLightfv(GL2ES1.GL_LIGHT0, GL2ES1.GL_DIFFUSE, diffuse, 0); + gl.glLightfv(GL2ES1.GL_LIGHT0, GL2ES1.GL_POSITION, lightPosition, 0); - gl.glEnable(GL.GL_LIGHTING); - gl.glEnable(GL.GL_LIGHT0); + gl.glEnable(GL2ES1.GL_LIGHTING); + gl.glEnable(GL2ES1.GL_LIGHT0); gl.glEnable(GL.GL_DEPTH_TEST); params.setPosition(new Vec3f(0, 0, 0)); @@ -112,10 +113,10 @@ public class TestMultiWin { params.xSize = X_SIZE; params.ySize = Y_SIZE; - gl.glMatrixMode(GL.GL_PROJECTION); + gl.glMatrixMode(GL2ES1.GL_PROJECTION); gl.glLoadIdentity(); glu.gluPerspective(45, 1, 1, 100); - gl.glMatrixMode(GL.GL_MODELVIEW); + gl.glMatrixMode(GL2ES1.GL_MODELVIEW); gl.glLoadIdentity(); // Register the window with the ManipManager -- cgit v1.2.3