aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-08-27 14:01:10 +0200
committerSven Gothel <[email protected]>2015-08-27 14:01:10 +0200
commit6ab634654f58afcf4549fcd1a796a0f9fd13298c (patch)
tree46d33fd038d042a466d354d851ffb53911d8e8c4 /src/jogl/classes/jogamp
parentdeff49c901915e007f43a1df1a0d217a786e9f06 (diff)
Bug 1202 - Move GLContextImpl.*SwapInterval* into its own section
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextImpl.java60
1 files changed, 32 insertions, 28 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index 39c5796f3..4ec9a5f21 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -1113,34 +1113,6 @@ public abstract class GLContextImpl extends GLContext {
}
}
- @Override
- public final boolean setSwapInterval(final int interval) throws GLException {
- validateCurrent();
- return setSwapIntervalNC(interval);
- }
- protected final boolean setSwapIntervalNC(final int interval) throws GLException {
- if( drawable.getChosenGLCapabilities().isOnscreen() &&
- ( !drawableRetargeted || !hasRendererQuirk(GLRendererQuirks.NoSetSwapIntervalPostRetarget) )
- )
- {
- final Integer usedInterval = setSwapIntervalImpl(interval);
- if( null != usedInterval ) {
- currentSwapInterval = usedInterval.intValue();
- return true;
- }
- }
- return false;
- }
- protected abstract Integer setSwapIntervalImpl(final int interval);
-
- public final int getSwapInterval() {
- return currentSwapInterval;
- }
- protected final void setDefaultSwapInterval() {
- currentSwapInterval = 0;
- setSwapIntervalNC(1);
- }
-
/**
* Note: Since context creation is temporary, caller need to issue {@link #resetStates(boolean)}, if creation was successful, i.e. returns true.
* This method does not reset the states, allowing the caller to utilize the state variables.
@@ -2395,6 +2367,38 @@ public abstract class GLContextImpl extends GLContext {
}
//----------------------------------------------------------------------
+ // SwapBuffer
+
+ @Override
+ public final boolean setSwapInterval(final int interval) throws GLException {
+ validateCurrent();
+ return setSwapIntervalNC(interval);
+ }
+ protected final boolean setSwapIntervalNC(final int interval) throws GLException {
+ if( drawable.getChosenGLCapabilities().isOnscreen() &&
+ ( !drawableRetargeted || !hasRendererQuirk(GLRendererQuirks.NoSetSwapIntervalPostRetarget) )
+ )
+ {
+ final Integer usedInterval = setSwapIntervalImpl(interval);
+ if( null != usedInterval ) {
+ currentSwapInterval = usedInterval.intValue();
+ return true;
+ }
+ }
+ return false;
+ }
+ protected abstract Integer setSwapIntervalImpl(final int interval);
+
+ public final int getSwapInterval() {
+ return currentSwapInterval;
+ }
+ protected final void setDefaultSwapInterval() {
+ currentSwapInterval = 0;
+ setSwapIntervalNC(1);
+ }
+
+
+ //----------------------------------------------------------------------
// Helpers for buffer object optimizations
public final GLBufferObjectTracker getBufferObjectTracker() {