diff options
author | Sven Gothel <[email protected]> | 2013-09-20 11:37:38 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-09-20 11:37:38 +0200 |
commit | 51df3f354a700454498371c0565bfcd6c0d3bf5f (patch) | |
tree | 9492a71383c2cbe83c410e0a2474cbe68dd98580 /src/jogl/classes/jogamp/opengl/GLContextImpl.java | |
parent | b1db882abfe6166abb5f06df8ff2d386e5f8f842 (diff) |
Bug 839: Clarifying GLStateTracker.clearStates(..) remove 'enable' change - Part 1
TODO: Only disable state tracker at GLContext.destroy()
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLContextImpl.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLContextImpl.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 22240c246..ff90966cd 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -148,8 +148,7 @@ public abstract class GLContextImpl extends GLContext { this.glDebugHandler = new GLDebugMessageHandler(this); } - @Override - protected void resetStates() { + private final void clearStates() { // Because we don't know how many other contexts we might be // sharing with (and it seems too complicated to implement the // GLObjectTracker's ref/unref scheme for the buffer-related @@ -158,14 +157,18 @@ public abstract class GLContextImpl extends GLContext { if (bufferSizeTracker != null) { bufferSizeTracker.clearCachedBufferSizes(); } - if (bufferStateTracker != null) { // <init> bufferStateTracker.clearBufferObjectState(); } - if (glStateTracker != null) { // <init> - glStateTracker.clearStates(false); + glStateTracker.setEnabled(false); + glStateTracker.clearStates(); } + } + + @Override + protected void resetStates() { + clearStates(); extensionAvailability = null; glProcAddressTable = null; |