diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/windows/wgl')
3 files changed, 9 insertions, 11 deletions
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java index c3588fd48..7882982eb 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java @@ -122,7 +122,7 @@ public class WindowsExternalWGLContext extends WindowsWGLContext { lastContext = null; } - protected void makeCurrentImpl(boolean newCreated) throws GLException { + protected void makeCurrentImpl() throws GLException { } protected void releaseImpl() throws GLException { diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLContext.java index 97c63ea52..0f610495d 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLContext.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLContext.java @@ -42,6 +42,8 @@ package jogamp.opengl.windows.wgl; import javax.media.opengl.*; +import jogamp.opengl.GLContextImpl; + public class WindowsPbufferWGLContext extends WindowsWGLContext { // State for render-to-texture and render-to-texture-rectangle support private boolean rtt; // render-to-texture? @@ -86,9 +88,9 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext { } } - protected void makeCurrentImpl(boolean newCreated) throws GLException { - super.makeCurrentImpl(newCreated); - if (newCreated) { + protected boolean createImpl(GLContextImpl shareWith) { + boolean res = super.createImpl(shareWith); + if(res) { GLCapabilitiesImmutable capabilities = drawable.getChosenGLCapabilities(); // Initialize render-to-texture support if requested @@ -135,6 +137,7 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext { } } } + return res; } public int getFloatingPointMode() { diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java index 300b5c5c7..10963b70f 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java @@ -332,7 +332,7 @@ public class WindowsWGLContext extends GLContextImpl { if(glCaps.getGLProfile().isGL3()) { WGL.wglMakeCurrent(0, 0); WGL.wglDeleteContext(temp_ctx); - throw new GLException("WindowsWGLContext.createContext failed, but context > GL2 requested "+getGLVersion()+", "); + throw new GLException("WindowsWGLContext.createContext ctx !ARB, context > GL2 requested "+getGLVersion()); } if(DEBUG) { System.err.println("WindowsWGLContext.createContext failed, fall back to !ARB context "+getGLVersion()); @@ -361,15 +361,10 @@ public class WindowsWGLContext extends GLContextImpl { return true; } - protected void makeCurrentImpl(boolean newCreated) throws GLException { + protected void makeCurrentImpl() throws GLException { if (WGL.wglGetCurrentContext() != contextHandle) { if (!wglMakeContextCurrent(drawable.getHandle(), drawableRead.getHandle(), contextHandle)) { throw new GLException("Error making context current: 0x" + toHexString(contextHandle) + ", werr: " + GDI.GetLastError() + ", " + this); - } else { - if (DEBUG && newCreated) { - System.err.println(getThreadName() + ": wglMakeCurrent(hdc " + toHexString(drawable.getHandle()) + - ", contextHandle " + toHexString(contextHandle) + ") succeeded"); - } } } } |