aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/windows
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-02-11 01:11:57 +0000
committerKenneth Russel <[email protected]>2006-02-11 01:11:57 +0000
commit8ebdef6860e34bf16b9b13c657f651bf9ce32ab3 (patch)
treee1b51b0c8cacf3987f219b2e992af089aea5d1b4 /src/classes/com/sun/opengl/impl/windows
parentb75d4a3718b1a5744218e19c4f5c1a9ff0311f34 (diff)
Further work on FBO support in Java2D/JOGL bridge. Upgraded JOGL's
Java2D class to latest proposed set of APIs in OGLUtilities and changed usage of these APIs to be approximately correct. Left in fallback path for working with non-FBO case in current Mustang builds. Not working yet, and don't yet understand why; checking in at this intermediate point to be able to more easily test on more machines. Added error checking to creation of external GLContexts and GLDrawables on Windows and X11 platforms. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@597 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/opengl/impl/windows')
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/windows/WindowsExternalGLContext.java3
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/windows/WindowsExternalGLDrawable.java3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/classes/com/sun/opengl/impl/windows/WindowsExternalGLContext.java b/src/classes/com/sun/opengl/impl/windows/WindowsExternalGLContext.java
index a12f156f5..c56614599 100755
--- a/src/classes/com/sun/opengl/impl/windows/WindowsExternalGLContext.java
+++ b/src/classes/com/sun/opengl/impl/windows/WindowsExternalGLContext.java
@@ -51,6 +51,9 @@ public class WindowsExternalGLContext extends WindowsGLContext {
public WindowsExternalGLContext() {
super(null, null);
hglrc = WGL.wglGetCurrentContext();
+ if (hglrc == 0) {
+ throw new GLException("Error: attempted to make an external GLContext without a drawable/context current");
+ }
if (DEBUG) {
System.err.println(getThreadName() + ": !!! Created external OpenGL context " + toHexString(hglrc) + " for " + this);
}
diff --git a/src/classes/com/sun/opengl/impl/windows/WindowsExternalGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/WindowsExternalGLDrawable.java
index 68ab83161..23ec0a1fc 100755
--- a/src/classes/com/sun/opengl/impl/windows/WindowsExternalGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/windows/WindowsExternalGLDrawable.java
@@ -46,6 +46,9 @@ public class WindowsExternalGLDrawable extends WindowsGLDrawable {
public WindowsExternalGLDrawable() {
super(new GLCapabilities(), null);
hdc = WGL.wglGetCurrentDC();
+ if (hdc == 0) {
+ throw new GLException("Error: attempted to make an external GLDrawable without a drawable/context current");
+ }
}
public GLContext createContext(GLContext shareWith) {