Don't reset the ThreadLocal variable itself on GLContext.useContext(null)

This commit is contained in:
Elias Naur 2005-02-16 21:28:57 +00:00
parent 5d53187baa
commit 19a74460af
1 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ import java.util.*;
* @version $Revision$
*/
public final class GLContext {
private static ThreadLocal current_capabilities = new ThreadLocal();
private final static ThreadLocal current_capabilities = new ThreadLocal();
/** Map of classes that have native stubs loaded */
private static int gl_ref_count;
@ -181,9 +181,9 @@ public final class GLContext {
public static void useContext(Object context) throws LWJGLException {
if ( context == null ) {
ContextCapabilities.unloadAllStubs();
if ( did_auto_load )
setCapabilities(null);
if (did_auto_load)
unloadOpenGLLibrary();
current_capabilities = null;
BufferObjectTracker.setCurrent(null);
return;
}