From 62fb860ffc454fc00ed73f9b6da54bba34a6d64f Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 5 Oct 2009 15:26:28 -0700 Subject: Fix On-/Offscreen and PBuffer. Demos are working again: demos.jrefract.JRefract - X11, Win32, OSX -Dsun.java2d.opengl=true demos.jrefract.JRefract - X11, Win32 demos.readbuffer.Main [-GL2,-GL2ES1] -test 0 demos.es1.RedSquare - X11, Win32, OSX, EGL demos.readbuffer.Main [-GL2,-GL2ES1] -test [12] demos.es1.RedSquare - X11, Win32 - OSX not, because of the missing feature of attaching a read surface. - EGL not, because the emulation I used didn't support attaching a read surface. Emulation bug .. probably .. MacOSXWindowSystemInterface.m createContext(): - Verify if passed surface handle _is_ a view, now it could be a pbuffer etc .. handle as well. Cleanup GLDrawableImpl.setRealized(boolean realized) - Calls setRealizedImpl() (implementation) now, and only if new stated differs .. - setRealizedImpl() fixed for: MacOSXPbufferCGLDrawable: recreate/destroy WindowsOffscreenWGLDrawable: recreate/destroy WindowsPbufferWGLDrawable: no-recreate/destroy X11OffscreenGLXDrawable: recreate/destroy X11PbufferGLXDrawable: recreate/destroy WindowsWGLContext: - wglMakeContextCurrent(): uses isFunctionAvailable .. - create(): Uses WGL.MakeCurrent() and releases the created context, due to unavailable MakeContextCurrent extensions before updating the procaddress tables. --- src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java') diff --git a/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java b/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java index f109c9497..dd801e4e2 100755 --- a/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java +++ b/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java @@ -97,9 +97,7 @@ public abstract class EGLDrawable extends GLDrawableImpl { } } - public void setRealized(boolean realized) { - super.setRealized(realized); - + protected void setRealizedImpl() { if (realized) { if ( NativeWindow.LOCK_SURFACE_NOT_READY == lockSurface() ) { throw new GLException("Couldn't lock surface"); -- cgit v1.2.3