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/x11 | |
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/x11')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java index c86001969..9b154af95 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java @@ -450,17 +450,15 @@ public abstract class X11GLXContext extends GLContextImpl { if(null != table) { glXExtProcAddressTable = (GLXExtProcAddressTable) table; if(DEBUG) { - System.err.println(getThreadName() + ": !!! GLContext GLX ProcAddressTable reusing key("+key+") -> "+table.hashCode()); + System.err.println(getThreadName() + ": !!! GLContext GLX ProcAddressTable reusing key("+key+") -> "+toHexString(table.hashCode())); } } else { - if (glXExtProcAddressTable == null) { - glXExtProcAddressTable = new GLXExtProcAddressTable(new GLProcAddressResolver()); - } + glXExtProcAddressTable = new GLXExtProcAddressTable(new GLProcAddressResolver()); resetProcAddressTable(getGLXExtProcAddressTable()); synchronized(mappedContextTypeObjectLock) { mappedGLXProcAddress.put(key, getGLXExtProcAddressTable()); if(DEBUG) { - System.err.println(getThreadName() + ": !!! GLContext GLX ProcAddressTable mapping key("+key+") -> "+getGLXExtProcAddressTable().hashCode()); + System.err.println(getThreadName() + ": !!! GLContext GLX ProcAddressTable mapping key("+key+") -> "+toHexString(getGLXExtProcAddressTable().hashCode())); Thread.dumpStack(); } } |