aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/GLContextImpl.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-09-20 11:37:38 +0200
committerSven Gothel <[email protected]>2013-09-20 11:37:38 +0200
commit51df3f354a700454498371c0565bfcd6c0d3bf5f (patch)
tree9492a71383c2cbe83c410e0a2474cbe68dd98580 /src/jogl/classes/jogamp/opengl/GLContextImpl.java
parentb1db882abfe6166abb5f06df8ff2d386e5f8f842 (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.java13
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;