diff options
-rw-r--r-- | make/build.xml | 108 | ||||
-rw-r--r-- | make/gl-gl2.cfg | 2 | ||||
-rw-r--r-- | make/gl-impl-CustomJavaCode-common.java | 17 | ||||
-rwxr-xr-x | make/intptr.cfg | 2 | ||||
-rwxr-xr-x | src/classes/com/sun/javafx/newt/windows/WindowsWindow.java | 5 | ||||
-rw-r--r-- | src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java | 1 | ||||
-rw-r--r-- | src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java | 13 | ||||
-rw-r--r-- | src/classes/javax/media/opengl/GLProfile.java | 1 |
8 files changed, 85 insertions, 64 deletions
diff --git a/make/build.xml b/make/build.xml index f050fbf0d..6e45f1714 100644 --- a/make/build.xml +++ b/make/build.xml @@ -514,74 +514,74 @@ <target name="declare.win32.vc6" if="isVC6"> <echo message="Win32.VC6" /> <property name="compiler.cfg.id" value="compiler.cfg.win32.msvc" /> - <property name="linker.cfg.id.base" value="linker.cfg.win32.msvc" /> - <property name="linker.cfg.id.oswin" value="linker.cfg.win32.msvc.jogl.x11" /> - <property name="linker.cfg.id.gl2" value="linker.cfg.win32.msvc.jogl.gl2" /> + <property name="linker.cfg.id.base" value="linker.cfg.win32.msvc" /> + <property name="linker.cfg.id.oswin" value="linker.cfg.win32.msvc.jogl.gl2" /> + <property name="linker.cfg.id.gl2" value="linker.cfg.win32.msvc.jogl.gl2" /> </target> <target name="declare.win32.vc7" if="isVC7"> <echo message="Win32.VC7" /> <property name="compiler.cfg.id" value="compiler.cfg.win32.msvc" /> - <property name="linker.cfg.id.base" value="linker.cfg.win32.msvc" /> - <property name="linker.cfg.id.oswin" value="linker.cfg.win32.msvc.jogl.x11" /> - <property name="linker.cfg.id.gl2" value="linker.cfg.win32.msvc.jogl.gl2" /> + <property name="linker.cfg.id.base" value="linker.cfg.win32.msvc" /> + <property name="linker.cfg.id.oswin" value="linker.cfg.win32.msvc.jogl.gl2" /> + <property name="linker.cfg.id.gl2" value="linker.cfg.win32.msvc.jogl.gl2" /> </target> <target name="declare.win32.vc8" if="isVC8"> <echo message="Win32.VC8" /> <property name="compiler.cfg.id" value="compiler.cfg.win32.msvc" /> - <property name="linker.cfg.id.base" value="linker.cfg.win32.msvc" /> - <property name="linker.cfg.id.oswin" value="linker.cfg.win32.msvc.jogl.x11" /> - <property name="linker.cfg.id.gl2" value="linker.cfg.win32.msvc.jogl.gl2" /> + <property name="linker.cfg.id.base" value="linker.cfg.win32.msvc" /> + <property name="linker.cfg.id.oswin" value="linker.cfg.win32.msvc.jogl.gl2" /> + <property name="linker.cfg.id.gl2" value="linker.cfg.win32.msvc.jogl.gl2" /> </target> <target name="declare.win32.vc8_x64" if="isVC8_X64"> <echo message="Win32.VC8_X64" /> <property name="compiler.cfg.id" value="compiler.cfg.win32.msvc" /> - <property name="linker.cfg.id.base" value="linker.cfg.win32.msvc" /> - <property name="linker.cfg.id.oswin" value="linker.cfg.win32.msvc.jogl.x11" /> - <property name="linker.cfg.id.gl2" value="linker.cfg.win32.msvc.jogl.gl2" /> + <property name="linker.cfg.id.base" value="linker.cfg.win32.msvc" /> + <property name="linker.cfg.id.oswin" value="linker.cfg.win32.msvc.jogl.gl2" /> + <property name="linker.cfg.id.gl2" value="linker.cfg.win32.msvc.jogl.gl2" /> </target> <target name="declare.win32.mingw" if="isMingW"> <echo message="Win32.MingW" /> - <property name="compiler.cfg.id" value="compiler.cfg.win32.mingw" /> - <property name="linker.cfg.id.base" value="linker.cfg.win32.mingw" /> - <property name="linker.cfg.id.oswin" value="linker.cfg.win32.mingw.jogl.x11" /> - <property name="linker.cfg.id.gl2" value="linker.cfg.win32.mingw.jogl.gl2" /> + <property name="compiler.cfg.id" value="compiler.cfg.win32.mingw" /> + <property name="linker.cfg.id.base" value="linker.cfg.win32.mingw" /> + <property name="linker.cfg.id.oswin" value="linker.cfg.win32.mingw.jogl.gl2" /> + <property name="linker.cfg.id.gl2" value="linker.cfg.win32.mingw.jogl.gl2" /> </target> <target name="declare.linux.x86" if="isLinuxX86"> <echo message="Linux.x86" /> <property name="java.includes.dir.platform" value="${java.includes.dir.linux}" /> - <property name="java.lib.dir.platform" value="${java.lib.dir.linux}" /> + <property name="java.lib.dir.platform" value="${java.lib.dir.linux}" /> - <property name="compiler.cfg.id" value="compiler.cfg.linux" /> - <property name="linker.cfg.id.base" value="linker.cfg.linux" /> - <property name="linker.cfg.id.oswin" value="linker.cfg.linux.jogl.x11" /> - <property name="linker.cfg.id.gl2" value="linker.cfg.linux.jogl.gl2" /> + <property name="compiler.cfg.id" value="compiler.cfg.linux" /> + <property name="linker.cfg.id.base" value="linker.cfg.linux" /> + <property name="linker.cfg.id.oswin" value="linker.cfg.linux.jogl.x11" /> + <property name="linker.cfg.id.gl2" value="linker.cfg.linux.jogl.gl2" /> </target> <target name="declare.linux.amd64" if="isLinuxAMD64"> <echo message="Linux.AMD64" /> <property name="java.includes.dir.platform" value="${java.includes.dir.linux}" /> - <property name="java.lib.dir.platform" value="${java.lib.dir.linux.amd64}" /> + <property name="java.lib.dir.platform" value="${java.lib.dir.linux.amd64}" /> - <property name="compiler.cfg.id" value="compiler.cfg.linux.amd64" /> - <property name="linker.cfg.id.base" value="linker.cfg.linux.amd64" /> - <property name="linker.cfg.id.oswin" value="linker.cfg.linux.amd64.jogl.x11" /> - <property name="linker.cfg.id.gl2" value="linker.cfg.linux.amd64.jogl.gl2" /> + <property name="compiler.cfg.id" value="compiler.cfg.linux.amd64" /> + <property name="linker.cfg.id.base" value="linker.cfg.linux.amd64" /> + <property name="linker.cfg.id.oswin" value="linker.cfg.linux.amd64.jogl.x11" /> + <property name="linker.cfg.id.gl2" value="linker.cfg.linux.amd64.jogl.gl2" /> </target> <target name="declare.linux.ia64" if="isLinuxIA64"> <echo message="Linux.IA64" /> <property name="java.includes.dir.platform" value="${java.includes.dir.linux}" /> - <property name="java.lib.dir.platform" value="${java.lib.dir.linux.ia64}" /> + <property name="java.lib.dir.platform" value="${java.lib.dir.linux.ia64}" /> - <property name="compiler.cfg.id" value="compiler.cfg.linux" /> - <property name="linker.cfg.id.base" value="linker.cfg.linux" /> - <property name="linker.cfg.id.oswin" value="linker.cfg.linux.jogl.x11" /> - <property name="linker.cfg.id.gl2" value="linker.cfg.linux.jogl.gl2" /> + <property name="compiler.cfg.id" value="compiler.cfg.linux" /> + <property name="linker.cfg.id.base" value="linker.cfg.linux" /> + <property name="linker.cfg.id.oswin" value="linker.cfg.linux.jogl.x11" /> + <property name="linker.cfg.id.gl2" value="linker.cfg.linux.jogl.gl2" /> </target> <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.x11" if="isLinux" /> @@ -591,10 +591,10 @@ <property name="java.includes.dir.platform" value="${java.includes.dir.solaris}" /> <property name="java.lib.dir.platform" value="${java.lib.dir.solaris}" /> - <property name="compiler.cfg.id" value="compiler.cfg.solaris" /> - <property name="linker.cfg.id.base" value="linker.cfg.solaris" /> - <property name="linker.cfg.id.oswin" value="linker.cfg.solaris.jogl.x11" /> - <property name="linker.cfg.id.gl2" value="linker.cfg.solaris.jogl.gl2" /> + <property name="compiler.cfg.id" value="compiler.cfg.solaris" /> + <property name="linker.cfg.id.base" value="linker.cfg.solaris" /> + <property name="linker.cfg.id.oswin" value="linker.cfg.solaris.jogl.x11" /> + <property name="linker.cfg.id.gl2" value="linker.cfg.solaris.jogl.gl2" /> </target> @@ -603,10 +603,10 @@ <property name="java.includes.dir.platform" value="${java.includes.dir.solaris}" /> <property name="java.lib.dir.platform" value="${java.lib.dir.solaris}" /> - <property name="compiler.cfg.id" value="compiler.cfg.solaris.sparcv9" /> - <property name="linker.cfg.id.base" value="linker.cfg.solaris.sparcv9" /> - <property name="linker.cfg.id.oswin" value="linker.cfg.solaris.sparcv9.jogl.x11" /> - <property name="linker.cfg.id.gl2" value="linker.cfg.solaris.sparcv9.jogl.gl2" /> + <property name="compiler.cfg.id" value="compiler.cfg.solaris.sparcv9" /> + <property name="linker.cfg.id.base" value="linker.cfg.solaris.sparcv9" /> + <property name="linker.cfg.id.oswin" value="linker.cfg.solaris.sparcv9.jogl.x11" /> + <property name="linker.cfg.id.gl2" value="linker.cfg.solaris.sparcv9.jogl.gl2" /> </target> @@ -615,10 +615,10 @@ <property name="java.includes.dir.platform" value="${java.includes.dir.solaris}" /> <property name="java.lib.dir.platform" value="${java.lib.dir.solaris}" /> - <property name="compiler.cfg.id" value="compiler.cfg.solaris.amd64" /> - <property name="linker.cfg.id.base" value="linker.cfg.solaris.amd64" /> - <property name="linker.cfg.id.oswin" value="linker.cfg.solaris.amd64.jogl.x11" /> - <property name="linker.cfg.id.gl2" value="linker.cfg.solaris.amd64.jogl.gl2" /> + <property name="compiler.cfg.id" value="compiler.cfg.solaris.amd64" /> + <property name="linker.cfg.id.base" value="linker.cfg.solaris.amd64" /> + <property name="linker.cfg.id.oswin" value="linker.cfg.solaris.amd64.jogl.x11" /> + <property name="linker.cfg.id.gl2" value="linker.cfg.solaris.amd64.jogl.gl2" /> </target> <target name="declare.freebsd" depends="declare.x11" if="isFreeBSD"> @@ -627,9 +627,9 @@ <property name="java.lib.dir.platform" value="${java.lib.dir.linux}" /> <property name="compiler.cfg.id" value="compiler.cfg.freebsd.jogl" /> - <property name="linker.cfg.id.base" value="linker.cfg.linux" /> - <property name="linker.cfg.id.oswin" value="linker.cfg.linux.jogl.x11" /> - <property name="linker.cfg.id.gl2" value="linker.cfg.linux.jogl.gl2" /> + <property name="linker.cfg.id.base" value="linker.cfg.linux" /> + <property name="linker.cfg.id.oswin" value="linker.cfg.linux.jogl.x11" /> + <property name="linker.cfg.id.gl2" value="linker.cfg.linux.jogl.gl2" /> </target> <target name="declare.hpux" depends="declare.x11" if="isHPUX"> @@ -637,15 +637,15 @@ <property name="java.includes.dir.platform" value="${java.includes.dir.hpux}" /> <property name="java.lib.dir.platform" value="${java.lib.dir.hpux}" /> <property name="compiler.cfg.id" value="compiler.cfg.hpux" /> - <property name="linker.cfg.id.base" value="linker.cfg.hpux" /> - <property name="linker.cfg.id.oswin" value="linker.cfg.hpux.jogl.x11" /> - <property name="linker.cfg.id.gl2" value="linker.cfg.hpux.jogl.gl2" /> + <property name="linker.cfg.id.base" value="linker.cfg.hpux" /> + <property name="linker.cfg.id.oswin" value="linker.cfg.hpux.jogl.x11" /> + <property name="linker.cfg.id.gl2" value="linker.cfg.hpux.jogl.gl2" /> </target> <target name="declare.win32" depends="declare.win32.vc6,declare.win32.vc7,declare.win32.vc8,declare.win32.vc8_x64,declare.win32.mingw" if="isWindows"> <property name="java.includes.dir.platform" value="${java.includes.dir.win32}" /> <property name="java.lib.dir.platform" value="${java.lib.dir.win32}" /> - </target> + </target> <target name="declare.x11" depends="init" if="isX11"> </target> @@ -654,10 +654,10 @@ <property name="java.includes.dir.platform" value="${java.includes.dir.macosx}" /> <property name="java.lib.dir.platform" value="${java.lib.dir.macosx}" /> - <property name="compiler.cfg.id" value="compiler.cfg.macosx" /> - <property name="linker.cfg.id.base" value="linker.cfg.macosx" /> - <property name="linker.cfg.id.oswin" value="linker.cfg.macosx.jogl.x11" /> - <property name="linker.cfg.id.gl2" value="linker.cfg.macosx.jogl.gl2" /> + <property name="compiler.cfg.id" value="compiler.cfg.macosx" /> + <property name="linker.cfg.id.base" value="linker.cfg.macosx" /> + <property name="linker.cfg.id.oswin" value="linker.cfg.macosx.jogl.x11" /> + <property name="linker.cfg.id.gl2" value="linker.cfg.macosx.jogl.gl2" /> </target> <!-- ================================================================== --> diff --git a/make/gl-gl2.cfg b/make/gl-gl2.cfg index 5292375c1..d7d0e736a 100644 --- a/make/gl-gl2.cfg +++ b/make/gl-gl2.cfg @@ -42,7 +42,7 @@ CustomJavaCode GL2 public void glDepthRangef(float zNear, float zFar); CustomJavaCode GL2Impl public void glDepthRangef(float zNear, float zFar) { CustomJavaCode GL2Impl glDepthRange((double)zNear, (double)zFar); } -CustomCCode #if defined(WIN32) +CustomCCode #if defined(_WIN32) CustomCCode #define WIN32_LEAN_AND_MEAN CustomCCode #include <windows.h> CustomCCode #undef WIN32_LEAN_AND_MEAN diff --git a/make/gl-impl-CustomJavaCode-common.java b/make/gl-impl-CustomJavaCode-common.java index 2273ebf12..23daabf1d 100644 --- a/make/gl-impl-CustomJavaCode-common.java +++ b/make/gl-impl-CustomJavaCode-common.java @@ -78,8 +78,19 @@ } public final String toString() { - return "GL: "+getClass().getName()+ - "(GLContext: "+getContext().getClass().getName()+","+ - " Factory: "+ getContext().getGLDrawable().getFactory().getClass().getName()+")"; + StringBuffer buf = new StringBuffer(); + buf.append("GL: "); + buf.append(getClass().getName()); + buf.append(" (GLContext: "); + GLContext context = getContext(); + buf.append(context.getClass().getName()); + buf.append(", GLDrawable: "); + GLDrawable drawable = context.getGLDrawable(); + buf.append(drawable.getClass().getName()); + buf.append(", Factory: "); + GLDrawableFactory factory = drawable.getFactory(); + buf.append(factory.getClass().getName()); + buf.append(")"); + return buf.toString(); } diff --git a/make/intptr.cfg b/make/intptr.cfg index 42f910004..c946e4851 100755 --- a/make/intptr.cfg +++ b/make/intptr.cfg @@ -1,4 +1,4 @@ -CustomCCode #ifdef WIN32 +CustomCCode #ifdef _WIN32 CustomCCode #ifdef _MSC_VER CustomCCode /* This typedef is apparently needed for Microsoft compilers before VC8, CustomCCode and on Windows CE */ 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++) { diff --git a/src/classes/javax/media/opengl/GLProfile.java b/src/classes/javax/media/opengl/GLProfile.java index c1d46d8bb..c2c82f018 100644 --- a/src/classes/javax/media/opengl/GLProfile.java +++ b/src/classes/javax/media/opengl/GLProfile.java @@ -66,7 +66,6 @@ public class GLProfile { } } catch (Exception e) { System.out.println("Profile: "+profile+" not available"); - System.out.println("Exception: "+e); profile=null; } } |