aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/games/jogl/impl/macosx/MacOSXOffscreenGLContext.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-07-17 06:13:24 +0000
committerKenneth Russel <[email protected]>2005-07-17 06:13:24 +0000
commit7e7e225eaf4fddb31152ab204bf1776f26079d40 (patch)
tree522044c1fb226235fa34b9d013945f320765edd8 /src/net/java/games/jogl/impl/macosx/MacOSXOffscreenGLContext.java
parent9d28b7f7fffdaeee7353945000546cb73a00157b (diff)
Further context-related changes for the JSR-231 API. The GLContext
implementations on all platforms have been split into orthogonal GLDrawable and GLContext concepts. It is now possible to create more than one GLContet per GLDrawable (though this has not been tested yet). GLCanvas has been reimplemented in terms of GLDrawableFactory.getGLDrawable(). More functionality has been moved from GLDrawable to GLAutoDrawable. Reimplemented lazy sending of reshape GLEventListener events in GLCanvas and GLJPanel and deleted notion of deferred reshapes from GLDrawableHelper and elsewhere. Sharing of textures and display lists is now expressed in terms of GLContexts instead of GLDrawables. Still need to move pbuffer creation into GLDrawableFactory from the onscreen GLContext implementations. Added option to gleem ExaminerViewer to disable automatic redraws upon mouse events and respecified more of gleem to work on GLAutoDrawables rather than GLDrawables. Updated all JOGL demos to work with new APIs and slightly different initialization sequences (in particular, for pbuffers -- this will change with the addition of GLDrawableFactory.createGLPbuffer()). git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JSR-231@324 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/jogl/impl/macosx/MacOSXOffscreenGLContext.java')
-rw-r--r--src/net/java/games/jogl/impl/macosx/MacOSXOffscreenGLContext.java45
1 files changed, 8 insertions, 37 deletions
diff --git a/src/net/java/games/jogl/impl/macosx/MacOSXOffscreenGLContext.java b/src/net/java/games/jogl/impl/macosx/MacOSXOffscreenGLContext.java
index 39aab5652..c6ac894b1 100644
--- a/src/net/java/games/jogl/impl/macosx/MacOSXOffscreenGLContext.java
+++ b/src/net/java/games/jogl/impl/macosx/MacOSXOffscreenGLContext.java
@@ -45,34 +45,21 @@ import net.java.games.jogl.impl.*;
public class MacOSXOffscreenGLContext extends MacOSXPbufferGLContext
{
- public MacOSXOffscreenGLContext(GLCapabilities capabilities,
- GLCapabilitiesChooser chooser,
+ public MacOSXOffscreenGLContext(MacOSXPbufferGLDrawable drawable,
GLContext shareWith) {
- super(capabilities, -1, -1);
+ super(drawable, shareWith);
}
- protected boolean isOffscreen() {
- return true;
- }
-
- public boolean offscreenImageNeedsVerticalFlip() {
- return true;
- }
-
- public int getOffscreenContextWidth() {
- return initWidth;
- }
-
- public int getOffscreenContextHeight() {
- return initWidth;
- }
-
public int getOffscreenContextPixelDataType() {
- return GL.GL_UNSIGNED_INT_8_8_8_8_REV;
+ return GL.GL_UNSIGNED_INT_8_8_8_8_REV;
}
public int getOffscreenContextReadBuffer() {
- return GL.GL_BACK;
+ return GL.GL_FRONT;
+ }
+
+ public boolean offscreenImageNeedsVerticalFlip() {
+ return true;
}
public void bindPbufferToTexture() {
@@ -82,20 +69,4 @@ public class MacOSXOffscreenGLContext extends MacOSXPbufferGLContext
public void releasePbufferFromTexture() {
throw new GLException("Should not call this");
}
-
- protected int makeCurrentImpl() throws GLException {
- if (pendingOffscreenResize && (nsContext != 0)) {
- if (pendingOffscreenWidth != width || pendingOffscreenHeight != height) {
- destroyPBuffer();
- initWidth = pendingOffscreenWidth;
- initHeight = pendingOffscreenHeight;
- createPbuffer(0, 0);
- pendingOffscreenResize = false;
- }
- }
- return super.makeCurrentImpl();
- }
-
- public void swapBuffers() throws GLException {
- }
}