From 917325a616f2bd89589bc3b6a4bdce0679bb99cf Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Tue, 4 Nov 2003 02:29:09 +0000 Subject: Implemented a per-thread GLContext stack, which gives a thread knowledge of the OpenGL contexts it has made current and allows a GLDrawable to make its context current recursively as well as allowing a GLEventListener to call another GLDrawable's display() method from within its display(). This mechanism can be used fairly easily to expose swapBuffers in the public API, as has been requested. Updated the demos which had to explicitly call display() on more than one drawable to use the Animator class and to call GLDrawable.display() from within their GLEventListeners' display() methods. Updated documentation. Fixed bugs in gleem's CameraParameters class. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@27 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4 --- src/gleem/CameraParameters.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/gleem/CameraParameters.java') diff --git a/src/gleem/CameraParameters.java b/src/gleem/CameraParameters.java index 658820d..c406cda 100644 --- a/src/gleem/CameraParameters.java +++ b/src/gleem/CameraParameters.java @@ -61,6 +61,8 @@ public class CameraParameters { Vec3f forwardDirection, Vec3f upDirection, Rotf orientation, + Mat4f modelviewMatrix, + Mat4f projectionMatrix, float vertFOV, float imagePlaneAspectRatio, int xSize, @@ -69,6 +71,8 @@ public class CameraParameters { setForwardDirection(forwardDirection); setUpDirection(upDirection); setOrientation(orientation); + setModelviewMatrix(modelviewMatrix); + setProjectionMatrix(projectionMatrix); setVertFOV(vertFOV); setImagePlaneAspectRatio(imagePlaneAspectRatio); setXSize(xSize); @@ -79,12 +83,25 @@ public class CameraParameters { setPosition(params.getPosition()); setForwardDirection(params.getForwardDirection()); setUpDirection(params.getUpDirection()); + setOrientation(params.getOrientation()); + setModelviewMatrix(params.getModelviewMatrix()); + setProjectionMatrix(params.getProjectionMatrix()); setVertFOV(params.getVertFOV()); setImagePlaneAspectRatio(params.getImagePlaneAspectRatio()); setXSize(params.getXSize()); setYSize(params.getYSize()); } + public Object clone() { + CameraParameters params = new CameraParameters(); + params.set(this); + return params; + } + + public CameraParameters copy() { + return (CameraParameters) clone(); + } + /** Sets 3-space origin of camera */ public void setPosition(Vec3f position) { this.position.set(position); } /** Gets 3-space origin of camera */ -- cgit v1.2.3