From 4ef07dc20a3d867feb1c51b4ce22ae3d06094781 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 21 Sep 2013 05:19:32 +0200 Subject: Fix Bug 839: Clarify whether resetStates(..) shall clearStates() - Pass 'isInit' flag. --- src/jogl/classes/javax/media/opengl/GLContext.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/javax/media') diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java index 854d96807..2dca2a685 100644 --- a/src/jogl/classes/javax/media/opengl/GLContext.java +++ b/src/jogl/classes/javax/media/opengl/GLContext.java @@ -208,7 +208,7 @@ public abstract class GLContext { protected long contextHandle; protected GLContext() { - resetStates(); + resetStates(true); } protected VersionNumber ctxVersion; @@ -222,9 +222,12 @@ public abstract class GLContext { /** Did the drawable association changed ? see {@link GLRendererQuirks#NoSetSwapIntervalPostRetarget} */ protected boolean drawableRetargeted; - protected void resetStates() { + /** + * @param isInit true if called for class initialization, otherwise false (re-init or destruction). + */ + protected void resetStates(boolean isInit) { if (DEBUG) { - System.err.println(getThreadName() + ": GLContext.resetStates()"); + System.err.println(getThreadName() + ": GLContext.resetStates(isInit "+isInit+")"); // Thread.dumpStack(); } ctxVersion = VersionNumberString.zeroVersion; -- cgit v1.2.3