From 03b15ec0efc5af944da7d65aadab3a4bdf2e6c68 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 13 Feb 2012 12:37:52 +0100 Subject: 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 --- src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/x11') 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(); } } -- cgit v1.2.3