diff options
author | Sven Gothel <[email protected]> | 2010-11-28 03:54:00 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-11-28 03:54:00 +0100 |
commit | 597007fc23fbf86e036629b6c6b157e0e0506715 (patch) | |
tree | 688dd4c70e76dd23df399a3e008e31a7412dc9aa /src/jogl/classes/com/jogamp/opengl/impl/egl | |
parent | 0c9eb947a2ffabba2c10799f6ea50756a2749702 (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/egl')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java index d95a9e3ff..246814537 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java @@ -50,14 +50,9 @@ public abstract class EGLContext extends GLContextImpl { // EGL extension functions. private EGLExtProcAddressTable eglExtProcAddressTable; - public EGLContext(GLDrawableImpl drawable, GLDrawableImpl drawableRead, - GLContext shareWith) { - super(drawable, drawableRead, shareWith); - } - - public EGLContext(GLDrawableImpl drawable, - GLContext shareWith) { - this(drawable, null, shareWith); + EGLContext(GLDrawableImpl drawable, + GLContext shareWith) { + super(drawable, shareWith); } public Object getPlatformGLExtensions() { @@ -83,6 +78,10 @@ public abstract class EGLContext extends GLContextImpl { protected Map/*<String, String>*/ getExtensionNameMap() { return null; } + public final boolean isGLReadDrawableAvailable() { + return true; + } + protected void makeCurrentImpl(boolean newCreated) throws GLException { if(EGL.EGL_NO_DISPLAY==((EGLDrawable)drawable).getDisplay() ) { throw new GLException("drawable not properly initialized, NO DISPLAY: "+drawable); |