diff options
author | Sven Gothel <[email protected]> | 2012-02-13 12:37:52 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-02-13 12:37:52 +0100 |
commit | 03b15ec0efc5af944da7d65aadab3a4bdf2e6c68 (patch) | |
tree | 5de9e1a688b1842e6461d304def24622f4528950 /src/jogl/classes/jogamp/opengl/windows/wgl | |
parent | e213836e39a1c0a909dbe47a25ec5bc10de06196 (diff) |
Fix JOGL GLContextImpl ProcAddressTable and Extension Caching
Bug caused using wrong extension cache and probably the wrong procAddress table.
- do not reuse local field value if not cached
- issue resetState() after each createContextARBMapVersionsAvailable(..) query
- remove cache entry for extension (copy/paste bug)
- resetState() shall clean platform extProcAddressTable in specializations
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/windows/wgl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java index ff59e1518..b2be87f4f 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java @@ -407,19 +407,15 @@ public class WindowsWGLContext extends GLContextImpl { if(null != table) { wglExtProcAddressTable = (WGLExtProcAddressTable) table; if(DEBUG) { - System.err.println(getThreadName() + ": !!! GLContext WGL ProcAddressTable reusing key("+key+") -> "+table.hashCode()); + System.err.println(getThreadName() + ": !!! GLContext WGL ProcAddressTable reusing key("+key+") -> "+toHexString(table.hashCode())); } } else { - if (wglExtProcAddressTable == null) { - // FIXME: cache ProcAddressTables by OpenGL context type bits so we can - // share them among contexts classes (GL4, GL4bc, GL3, GL3bc, ..) - wglExtProcAddressTable = new WGLExtProcAddressTable(new GLProcAddressResolver()); - } + wglExtProcAddressTable = new WGLExtProcAddressTable(new GLProcAddressResolver()); resetProcAddressTable(wglExtProcAddressTable); synchronized(mappedContextTypeObjectLock) { mappedGLXProcAddress.put(key, getWGLExtProcAddressTable()); if(DEBUG) { - System.err.println(getThreadName() + ": !!! GLContext WGL ProcAddressTable mapping key("+key+") -> "+getWGLExtProcAddressTable().hashCode()); + System.err.println(getThreadName() + ": !!! GLContext WGL ProcAddressTable mapping key("+key+") -> "+toHexString(getWGLExtProcAddressTable().hashCode())); } } } |