aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun')
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/windows/WindowsWindow.java5
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java1
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java13
3 files changed, 15 insertions, 4 deletions
diff --git a/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java b/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java
index 7393326d3..bfaf79d42 100755
--- a/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java
+++ b/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java
@@ -113,10 +113,9 @@ public class WindowsWindow extends Window {
private static long hInstance;
private static synchronized long getHInstance() {
if (hInstance == 0) {
- // FIXME: will require modification once this is moved into its own DLL ("newt")
- hInstance = LoadLibraryW("jogl");
+ hInstance = LoadLibraryW("newt");
if (hInstance == 0) {
- throw new RuntimeException("Error finding HINSTANCE for \"jogl\"");
+ throw new RuntimeException("Error finding HINSTANCE for \"newt\"");
}
}
return hInstance;
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java
index c6676d36d..150c86526 100644
--- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java
@@ -70,6 +70,7 @@ public class WindowsWGLContext extends GLContextImpl {
public WindowsWGLContext(WindowsWGLDrawable drawable,
GLContext shareWith) {
super(shareWith);
+ this.drawable = drawable;
}
public Object getPlatformGLExtensions() {
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java
index 1b1805e91..322ae3983 100644
--- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java
@@ -66,6 +66,9 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl {
public int lockSurface() throws GLException {
int ret = super.lockSurface();
if(NativeWindow.LOCK_SURFACE_NOT_READY == ret) {
+ if (DEBUG) {
+ System.err.println("WindowsWGLDrawable.lockSurface: surface not ready");
+ }
return ret;
}
if (!pixelFormatChosen) {
@@ -73,6 +76,10 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl {
choosePixelFormat(true);
setPixelFormatFailCount = 0;
} catch (RuntimeException e) {
+ if (DEBUG) {
+ System.err.println("WindowsWGLDrawable.lockSurface: squelching exception");
+ e.printStackTrace();
+ }
// Workaround for problems seen on Intel 82855 cards in particular
// Make it look like the lockSurface() call didn't succeed
unlockSurface();
@@ -265,10 +272,14 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl {
pfd = glCapabilities2PFD(capabilities, onscreen);
// Remove one-basing of pixel format (added on later)
recommendedPixelFormat = WGL.ChoosePixelFormat(hdc, pfd) - 1;
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": Recommended pixel format = " + recommendedPixelFormat);
+ }
numFormats = WGL.DescribePixelFormat(hdc, 1, 0, null);
if (numFormats == 0) {
- throw new GLException("Unable to enumerate pixel formats of window for GLCapabilitiesChooser");
+ throw new GLException("Unable to enumerate pixel formats of window " +
+ toHexString(hdc) + " for GLCapabilitiesChooser");
}
availableCaps = new GLCapabilities[numFormats];
for (int i = 0; i < numFormats; i++) {