summaryrefslogtreecommitdiffstats
path: root/src/net/java/games/jogl/GLDrawable.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2003-11-04 02:29:09 +0000
committerKenneth Russel <[email protected]>2003-11-04 02:29:09 +0000
commitf516d8cdc25577dd1227b85578d361749ab8063d (patch)
tree3ced6a2d9944594df420e5b02b458591691eeb83 /src/net/java/games/jogl/GLDrawable.java
parentb76c821858e7ee132aa08cc8d9d61e82eb9aa53f (diff)
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/trunk@69 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/jogl/GLDrawable.java')
-rw-r--r--src/net/java/games/jogl/GLDrawable.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/net/java/games/jogl/GLDrawable.java b/src/net/java/games/jogl/GLDrawable.java
index 6197688b1..26b7b0a06 100644
--- a/src/net/java/games/jogl/GLDrawable.java
+++ b/src/net/java/games/jogl/GLDrawable.java
@@ -111,9 +111,11 @@ public interface GLDrawable extends ComponentEvents {
{@link GLEventListener}s. Called automatically by the window
system toolkit upon receiving a repaint() request. When used in
conjunction with {@link
- net.java.games.jogl.GLDrawable#setRenderingThread}, this routine may be
- called manually by the application's main loop for higher
- performance and better control over the rendering process. */
+ net.java.games.jogl.GLDrawable#setRenderingThread}, this routine
+ may be called manually by the application's main loop for higher
+ performance and better control over the rendering process. It is
+ legal to call another GLDrawable's display method from within
+ {@link GLEventListener#display}. */
public void display();
/** <P> Changes this GLDrawable to allow OpenGL rendering only from
@@ -129,7 +131,9 @@ public interface GLDrawable extends ComponentEvents {
drawable. Throws {@link GLException} if the rendering thread for
this drawable has been set and attempts are made to set or clear
the rendering thread from another thread, or if the passed
- thread is not equal to the current thread or null. </P>
+ thread is not equal to the current thread or null. Also throws
+ {@link GLException} if the current thread attempts to call
+ <code>setRenderingThread</code> on more than one drawable. </P>
<P> <B>NOTE:</B> Currently this routine is only advisory, which
means that on some platforms the underlying optimizations are