From 9a4619d5ab1c0441dfb273d057e288b4bf4c6dbc Mon Sep 17 00:00:00 2001 From: sg215889 Date: Thu, 30 Jul 2009 22:09:24 -0700 Subject: Fix SwapInterval (return value, check ctx current, egl), add getSwapInterval. --- src/jogl/classes/javax/media/opengl/GLBase.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/jogl/classes/javax/media/opengl/GLBase.java') diff --git a/src/jogl/classes/javax/media/opengl/GLBase.java b/src/jogl/classes/javax/media/opengl/GLBase.java index 7b59344cc..92498077b 100644 --- a/src/jogl/classes/javax/media/opengl/GLBase.java +++ b/src/jogl/classes/javax/media/opengl/GLBase.java @@ -227,9 +227,24 @@ public interface GLBase { until swapping buffers. The default, which is platform-specific, is usually either 0 or 1. This function is not guaranteed to have an effect, and in particular only affects heavyweight - onscreen components. */ + onscreen components. + + @see #getSwapInterval + @throws GLException if this context is not the current + */ public void setSwapInterval(int interval); + /** Provides a platform-independent way to get the swap + interval set by {@link #setSwapInterval}.
+ + If the interval is not set by {@link #setSwapInterval} yet, + -1 is returned, indicating that the platforms default + is being used. + + @see #setSwapInterval + */ + public int getSwapInterval(); + /** * Returns an object through which platform-specific OpenGL extensions * (EGL, GLX, WGL, etc.) may be accessed. The data type of the returned -- cgit v1.2.3