diff options
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; |