diff options
author | Kenneth Russel <[email protected]> | 2005-07-19 01:53:36 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2005-07-19 01:53:36 +0000 |
commit | 74adb7cc4ba59369964b562e3c84988f63025296 (patch) | |
tree | 0a850c1110afa161eeadb930c4035eb310b79f84 /src/net/java/games/jogl/impl/windows | |
parent | b01ac27a7d6ae4863490537e1ba8749795cd84de (diff) |
Added workaround for problem loading JAWT library on X11 platforms
before the AWT toolkit had been loaded. Added check for
jogl.gljpanel.nosw system property to diagnose problems with pbuffer
support. Fixed bootstrapping problem with GLX where its function
pointer table needed to be initialized before the first OpenGL context
was created in the case where a pbuffer was the first thing created.
Moved helper functions for resetting proc address table and dynamic
function lookup to GLDrawableFactoryImpl from GLContextImpl.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JSR-231@331 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/jogl/impl/windows')
-rw-r--r-- | src/net/java/games/jogl/impl/windows/WindowsGLContext.java | 18 | ||||
-rwxr-xr-x | src/net/java/games/jogl/impl/windows/WindowsGLDrawableFactory.java | 19 |
2 files changed, 19 insertions, 18 deletions
diff --git a/src/net/java/games/jogl/impl/windows/WindowsGLContext.java b/src/net/java/games/jogl/impl/windows/WindowsGLContext.java index 1c0365571..532483c68 100644 --- a/src/net/java/games/jogl/impl/windows/WindowsGLContext.java +++ b/src/net/java/games/jogl/impl/windows/WindowsGLContext.java @@ -40,7 +40,6 @@ package net.java.games.jogl.impl.windows; import java.util.*; -import net.java.games.gluegen.runtime.*; // for PROCADDRESS_VAR_PREFIX import net.java.games.jogl.*; import net.java.games.jogl.impl.*; @@ -54,8 +53,6 @@ public class WindowsGLContext extends GLContextImpl { // Table that holds the addresses of the native C-language entry points for // OpenGL functions. private GLProcAddressTable glProcAddressTable; - // Handle to GLU32.dll - private long hglu32; static { functionNameMap = new HashMap(); @@ -184,21 +181,6 @@ public class WindowsGLContext extends GLContextImpl { } } - protected long dynamicLookupFunction(String glFuncName) { - long res = WGL.wglGetProcAddress(glFuncName); - if (res == 0) { - // GLU routines aren't known to the OpenGL function lookup - if (hglu32 == 0) { - hglu32 = WGL.LoadLibraryA("GLU32"); - if (hglu32 == 0) { - throw new GLException("Error loading GLU32.DLL"); - } - } - res = WGL.GetProcAddress(hglu32, glFuncName); - } - return res; - } - public boolean isCreated() { return (hglrc != 0); } diff --git a/src/net/java/games/jogl/impl/windows/WindowsGLDrawableFactory.java b/src/net/java/games/jogl/impl/windows/WindowsGLDrawableFactory.java index ebaf80394..b29bcf157 100755 --- a/src/net/java/games/jogl/impl/windows/WindowsGLDrawableFactory.java +++ b/src/net/java/games/jogl/impl/windows/WindowsGLDrawableFactory.java @@ -57,6 +57,10 @@ public class WindowsGLDrawableFactory extends GLDrawableFactoryImpl { private static final boolean DEBUG = Debug.debug("WindowsGLDrawableFactory"); private static final boolean VERBOSE = Debug.verbose(); + // Handle to GLU32.dll + // FIXME: this should go away once we delete support for the C GLU library + private long hglu32; + static { NativeLibLoader.load(); @@ -213,6 +217,21 @@ public class WindowsGLDrawableFactory extends GLDrawableFactoryImpl { return (GLPbuffer) returnList.get(0); } + public long dynamicLookupFunction(String glFuncName) { + long res = WGL.wglGetProcAddress(glFuncName); + if (res == 0) { + // GLU routines aren't known to the OpenGL function lookup + if (hglu32 == 0) { + hglu32 = WGL.LoadLibraryA("GLU32"); + if (hglu32 == 0) { + throw new GLException("Error loading GLU32.DLL"); + } + } + res = WGL.GetProcAddress(hglu32, glFuncName); + } + return res; + } + static String wglGetLastError() { int err = WGL.GetLastError(); String detail = null; |