diff options
Diffstat (limited to 'src/jake2/render/opengl/JoglDummyDriver.java')
-rw-r--r-- | src/jake2/render/opengl/JoglDummyDriver.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/jake2/render/opengl/JoglDummyDriver.java b/src/jake2/render/opengl/JoglDummyDriver.java index 5b65ecf..fb41bf7 100644 --- a/src/jake2/render/opengl/JoglDummyDriver.java +++ b/src/jake2/render/opengl/JoglDummyDriver.java @@ -71,6 +71,7 @@ public abstract class JoglDummyDriver extends DummyGL implements GLDriver { } public void shutdown() { + deactivate(); if(null != newtWin) { newtWin.shutdown(); } @@ -102,11 +103,7 @@ public abstract class JoglDummyDriver extends DummyGL implements GLDriver { public void endFrame() { // newtWin.window.swapBuffers(); - /* - final GLContext ctx = newtWin.window.getContext(); - if ( null != ctx && GLContext.getCurrent() == ctx) { - ctx.release(); - } */ + // deactivate(); newtWin.fpsCounter.tickFPS(); } @@ -136,5 +133,12 @@ public abstract class JoglDummyDriver extends DummyGL implements GLDriver { } } + protected void deactivate() { + final GLContext ctx = newtWin.window.getContext(); + if ( null != ctx && GLContext.getCurrent() == ctx) { + ctx.release(); + } + } + // -------------------------------------------------------------------------- } |