Make sure VBOTracker reset the current tracker when GLContext.useContext(null) is called
This commit is contained in:
parent
20537ab57e
commit
6330f8e001
|
@ -234,6 +234,7 @@ public final class GLContext {
|
|||
if (did_auto_load)
|
||||
unloadOpenGLLibrary();
|
||||
currentContext = null;
|
||||
VBOTracker.setCurrent(null);
|
||||
return;
|
||||
}
|
||||
// Is this the same as last time?
|
||||
|
|
|
@ -71,7 +71,11 @@ class VBOTracker {
|
|||
* @param context
|
||||
*/
|
||||
static synchronized void setCurrent(Object context) {
|
||||
current_tracker = (VBOTracker) contextToTracker.get(context);
|
||||
if (context == null) {
|
||||
current_tracker = null;
|
||||
return;
|
||||
}
|
||||
current_tracker = (VBOTracker)contextToTracker.get(context);
|
||||
if (current_tracker == null) {
|
||||
current_tracker = new VBOTracker();
|
||||
contextToTracker.put(context, current_tracker);
|
||||
|
|
Loading…
Reference in New Issue