From 19a74460af0e29a66dde8f426455fc6f260abe8d Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Wed, 16 Feb 2005 21:28:57 +0000 Subject: [PATCH] Don't reset the ThreadLocal variable itself on GLContext.useContext(null) --- src/java/org/lwjgl/opengl/GLContext.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/java/org/lwjgl/opengl/GLContext.java b/src/java/org/lwjgl/opengl/GLContext.java index 9ce13344..6ad18ddc 100644 --- a/src/java/org/lwjgl/opengl/GLContext.java +++ b/src/java/org/lwjgl/opengl/GLContext.java @@ -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; }