diff options
author | Sven Gothel <[email protected]> | 2009-03-05 01:23:34 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2009-03-05 01:23:34 +0000 |
commit | 6833b2827d31a7bf08e22963b0d44be6470bdf07 (patch) | |
tree | 0a4db7776d9a1489d2bec772227a6410eeb62cf6 /src/classes/javax/media/opengl/awt | |
parent | 8e2154eebe45e2f5fd6b0c6598a26ef16617e425 (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/branches/JOGL_2_SANDBOX@1856 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/javax/media/opengl/awt')
-rw-r--r-- | src/classes/javax/media/opengl/awt/GLCanvas.java | 4 | ||||
-rw-r--r-- | src/classes/javax/media/opengl/awt/GLJPanel.java | 25 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/classes/javax/media/opengl/awt/GLCanvas.java b/src/classes/javax/media/opengl/awt/GLCanvas.java index bce58be0f..e0d997dc5 100644 --- a/src/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/classes/javax/media/opengl/awt/GLCanvas.java @@ -373,6 +373,10 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable { drawableHelper.removeGLEventListener(listener); } + public void setContext(GLContext ctx) { + context=(GLContextImpl)ctx; + } + public GLContext getContext() { return context; } diff --git a/src/classes/javax/media/opengl/awt/GLJPanel.java b/src/classes/javax/media/opengl/awt/GLJPanel.java index d5f44ff21..37f1dfa7b 100644 --- a/src/classes/javax/media/opengl/awt/GLJPanel.java +++ b/src/classes/javax/media/opengl/awt/GLJPanel.java @@ -324,6 +324,13 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { public void setRealized(boolean realized) { } + public void setContext(GLContext ctx) { + if (backend == null) { + return; + } + backend.setContext(ctx); + } + public GLContext getContext() { if (backend == null) { return null; @@ -565,6 +572,9 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { // this GLJPanel public GLContext createContext(GLContext shareWith); + // Called to set the current backend's GLContext + public void setContext(GLContext ctx); + // Called to get the current backend's GLContext public GLContext getContext(); @@ -797,6 +807,10 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { return offscreenDrawable.createContext(shareWith); } + public void setContext(GLContext ctx) { + offscreenContext=(GLContextImpl)ctx; + } + public GLContext getContext() { return offscreenContext; } @@ -873,6 +887,13 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { return pbuffer.createContext(shareWith); } + public void setContext(GLContext ctx) { + if (pbuffer == null && Beans.isDesignTime()) { + return; + } + pbuffer.setContext(ctx); + } + public GLContext getContext() { // Workaround for crashes in NetBeans GUI builder if (pbuffer == null && Beans.isDesignTime()) { @@ -1040,6 +1061,10 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { throw new GLException("Not yet implemented"); } + public void setContext(GLContext ctx) { + joglContext=ctx; + } + public GLContext getContext() { return joglContext; } |