diff options
author | Sven Gothel <[email protected]> | 2011-04-23 06:14:38 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-04-23 06:14:38 +0200 |
commit | f5e0656fe20925d8c921d1b4cc70acd02dfbf9fd (patch) | |
tree | 17f7bae0f416eab6438b2826e9b57ddb0791eebf /src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java | |
parent | 48201a6ea6471eb5951edb735b36156ab3410a15 (diff) |
GLContextImpl: GLContextLock -> RecursiveLock
RecursiveLock maintains a queue of waiting Threads,
ensuring the longest waiting thread will be notified at unlock.
Delete GLContextLock.
Cleanup HashMap generics style.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java index 94017e79a..91a907a09 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java @@ -58,8 +58,8 @@ import jogamp.opengl.GLContextShareSet; import jogamp.opengl.GLDrawableImpl; public class WindowsWGLContext extends GLContextImpl { - static final Map/*<String, String>*/ functionNameMap; - static final Map/*<String, String>*/ extensionNameMap; + static final Map<String, String> functionNameMap; + static final Map<String, String> extensionNameMap; private boolean wglGetExtensionsStringEXTInitialized; private boolean wglGetExtensionsStringEXTAvailable; private boolean wglGLReadDrawableAvailableSet; @@ -70,11 +70,11 @@ public class WindowsWGLContext extends GLContextImpl { private WGLExtProcAddressTable wglExtProcAddressTable; static { - functionNameMap = new HashMap(); + functionNameMap = new HashMap<String, String>(); functionNameMap.put("glAllocateMemoryNV", "wglAllocateMemoryNV"); functionNameMap.put("glFreeMemoryNV", "wglFreeMemoryNV"); - extensionNameMap = new HashMap(); + extensionNameMap = new HashMap<String, String>(); extensionNameMap.put("GL_ARB_pbuffer", "WGL_ARB_pbuffer"); extensionNameMap.put("GL_ARB_pixel_format", "WGL_ARB_pixel_format"); } @@ -161,9 +161,9 @@ public class WindowsWGLContext extends GLContextImpl { return wglExtProcAddressTable; } - protected Map/*<String, String>*/ getFunctionNameMap() { return functionNameMap; } + protected Map<String, String> getFunctionNameMap() { return functionNameMap; } - protected Map/*<String, String>*/ getExtensionNameMap() { return extensionNameMap; } + protected Map<String, String> getExtensionNameMap() { return extensionNameMap; } protected void destroyContextARBImpl(long context) { WGL.wglMakeCurrent(0, 0); @@ -405,12 +405,12 @@ public class WindowsWGLContext extends GLContextImpl { wglGLReadDrawableAvailableSet=false; wglGLReadDrawableAvailable=false; - WGLExtProcAddressTable table = null; + ProcAddressTable table = null; synchronized(mappedContextTypeObjectLock) { - table = (WGLExtProcAddressTable) mappedGLXProcAddress.get( key ); + table = mappedGLXProcAddress.get( key ); } if(null != table) { - wglExtProcAddressTable = table; + wglExtProcAddressTable = (WGLExtProcAddressTable) table; if(DEBUG) { System.err.println(getThreadName() + ": !!! GLContext WGL ProcAddressTable reusing key("+key+") -> "+table.hashCode()); } |