aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/impl/macosx
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2010-11-28 03:54:00 +0100
committerSven Gothel <sgothel@jausoft.com>2010-11-28 03:54:00 +0100
commit597007fc23fbf86e036629b6c6b157e0e0506715 (patch)
tree688dd4c70e76dd23df399a3e008e31a7412dc9aa /src/jogl/classes/com/jogamp/opengl/impl/macosx
parent0c9eb947a2ffabba2c10799f6ea50756a2749702 (diff)
JOGL: Proper handling of Read Drawable Support (if not supported), add query.
Read Drawable feature reflects the make context current API having a seperate read drawable next to the write drawable (default). glXMakeContextCurrent(write, read, ..) On X11 a ready drawable is only supported for GLX >= 1.3, on Windows only if extension WGL_ARB_make_current_read is available, on EGL it's always supported, on OSX not at all. API cleanup GLContext: changes: setGLDrawableRead(GLDrawable) -> setGLReadDrawable(GLDrawable) new: isGLReadDrawableAvailable() new: getGLExtensionsString(); Access qualifier cleanup. GLContextImpl: GLVersionNumber moved out.
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/macosx')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java20
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/awt/MacOSXJava2DCGLContext.java2
2 files changed, 8 insertions, 14 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java
index 3cd2aa650..6a916765a 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java
@@ -56,14 +56,9 @@ public abstract class MacOSXCGLContext extends GLContextImpl
// CGL extension functions.
private CGLExtProcAddressTable cglExtProcAddressTable;
- public MacOSXCGLContext(GLDrawableImpl drawable, GLDrawableImpl drawableRead,
- GLContext shareWith) {
- super(drawable, drawableRead, shareWith);
- }
-
- public MacOSXCGLContext(GLDrawableImpl drawable,
- GLContext shareWith) {
- this(drawable, null, shareWith);
+ protected MacOSXCGLContext(GLDrawableImpl drawable,
+ GLContext shareWith) {
+ super(drawable, shareWith);
}
public Object getPlatformGLExtensions() {
@@ -99,6 +94,10 @@ public abstract class MacOSXCGLContext extends GLContextImpl
// FIXME
}
+ public final boolean isGLReadDrawableAvailable() {
+ return false;
+ }
+
/**
* Creates and initializes an appropriate OpenGl Context (NS). Should only be
* called by {@link makeCurrentImpl()}.
@@ -292,11 +291,6 @@ public abstract class MacOSXCGLContext extends GLContextImpl
throw new GLException("Not yet implemented");
}
- public boolean isFunctionAvailable(String glFunctionName)
- {
- return super.isFunctionAvailable(glFunctionName);
- }
-
public boolean isExtensionAvailable(String glExtensionName) {
if (glExtensionName.equals("GL_ARB_pbuffer") ||
glExtensionName.equals("GL_ARB_pixel_format")) {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/awt/MacOSXJava2DCGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/awt/MacOSXJava2DCGLContext.java
index b42f1132c..f19fbcf6b 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/awt/MacOSXJava2DCGLContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/awt/MacOSXJava2DCGLContext.java
@@ -62,7 +62,7 @@ public class MacOSXJava2DCGLContext extends MacOSXCGLContext implements Java2DGL
// rethink this in particular if using FBOs to implement the
// Java2D/OpenGL pipeline on Mac OS X
- public MacOSXJava2DCGLContext(GLContext shareWith) {
+ MacOSXJava2DCGLContext(GLContext shareWith) {
super(null, shareWith);
}