1bf215546Sopenharmony_ciName 2bf215546Sopenharmony_ci 3bf215546Sopenharmony_ci MESA_swap_control 4bf215546Sopenharmony_ci 5bf215546Sopenharmony_ciName Strings 6bf215546Sopenharmony_ci 7bf215546Sopenharmony_ci GLX_MESA_swap_control 8bf215546Sopenharmony_ci 9bf215546Sopenharmony_ciContact 10bf215546Sopenharmony_ci 11bf215546Sopenharmony_ci Ian Romanick, IBM, idr at us.ibm.com 12bf215546Sopenharmony_ci 13bf215546Sopenharmony_ciStatus 14bf215546Sopenharmony_ci 15bf215546Sopenharmony_ci Deployed in DRI drivers post-XFree86 4.3. 16bf215546Sopenharmony_ci 17bf215546Sopenharmony_ciVersion 18bf215546Sopenharmony_ci 19bf215546Sopenharmony_ci Date: 5/1/2003 Revision: 1.1 20bf215546Sopenharmony_ci 21bf215546Sopenharmony_ciNumber 22bf215546Sopenharmony_ci 23bf215546Sopenharmony_ci ??? 24bf215546Sopenharmony_ci 25bf215546Sopenharmony_ciDependencies 26bf215546Sopenharmony_ci 27bf215546Sopenharmony_ci None 28bf215546Sopenharmony_ci 29bf215546Sopenharmony_ci Based on GLX_SGI_swap_control version 1.9 and WGL_EXT_swap_control 30bf215546Sopenharmony_ci version 1.5. 31bf215546Sopenharmony_ci 32bf215546Sopenharmony_ciOverview 33bf215546Sopenharmony_ci 34bf215546Sopenharmony_ci This extension allows an application to specify a minimum periodicity 35bf215546Sopenharmony_ci of color buffer swaps, measured in video frame periods. 36bf215546Sopenharmony_ci 37bf215546Sopenharmony_ciIssues 38bf215546Sopenharmony_ci 39bf215546Sopenharmony_ci * Should implementations that export GLX_MESA_swap_control also export 40bf215546Sopenharmony_ci GL_EXT_swap_control for compatibility with WGL_EXT_swap_control? 41bf215546Sopenharmony_ci 42bf215546Sopenharmony_ci UNRESOLVED. 43bf215546Sopenharmony_ci 44bf215546Sopenharmony_ciNew Procedures and Functions 45bf215546Sopenharmony_ci 46bf215546Sopenharmony_ci int glXSwapIntervalMESA(unsigned int interval) 47bf215546Sopenharmony_ci int glXGetSwapIntervalMESA(void) 48bf215546Sopenharmony_ci 49bf215546Sopenharmony_ciNew Tokens 50bf215546Sopenharmony_ci 51bf215546Sopenharmony_ci None 52bf215546Sopenharmony_ci 53bf215546Sopenharmony_ciAdditions to Chapter 2 of the 1.4 GL Specification (OpenGL Operation) 54bf215546Sopenharmony_ci 55bf215546Sopenharmony_ci None 56bf215546Sopenharmony_ci 57bf215546Sopenharmony_ciAdditions to Chapter 3 of the 1.4 GL Specification (Rasterization) 58bf215546Sopenharmony_ci 59bf215546Sopenharmony_ci None 60bf215546Sopenharmony_ci 61bf215546Sopenharmony_ciAdditions to Chapter 4 of the 1.4 GL Specification (Per-Fragment Operations 62bf215546Sopenharmony_ciand the Framebuffer) 63bf215546Sopenharmony_ci 64bf215546Sopenharmony_ci None 65bf215546Sopenharmony_ci 66bf215546Sopenharmony_ciAdditions to Chapter 5 of the 1.4 GL Specification (Special Functions) 67bf215546Sopenharmony_ci 68bf215546Sopenharmony_ci None 69bf215546Sopenharmony_ci 70bf215546Sopenharmony_ciAdditions to Chapter 6 of the 1.4 GL Specification (State and State Requests) 71bf215546Sopenharmony_ci 72bf215546Sopenharmony_ci None 73bf215546Sopenharmony_ci 74bf215546Sopenharmony_ciAdditions to the GLX 1.3 Specification 75bf215546Sopenharmony_ci 76bf215546Sopenharmony_ci [Add the following to Section 3.3.10 of the GLX Specification (Double 77bf215546Sopenharmony_ci Buffering)] 78bf215546Sopenharmony_ci 79bf215546Sopenharmony_ci glXSwapIntervalMESA specifies the minimum number of video frame periods 80bf215546Sopenharmony_ci per buffer swap. (e.g. a value of two means that the color buffers 81bf215546Sopenharmony_ci will be swapped at most every other video frame.) A return value 82bf215546Sopenharmony_ci of zero indicates success; otherwise an error occurred. The interval 83bf215546Sopenharmony_ci takes effect when glXSwapBuffers is first called subsequent to the 84bf215546Sopenharmony_ci glXSwapIntervalMESA call. 85bf215546Sopenharmony_ci 86bf215546Sopenharmony_ci A video frame period is the time required by the monitor to display a 87bf215546Sopenharmony_ci full frame of video data. In the case of an interlaced monitor, 88bf215546Sopenharmony_ci this is typically the time required to display both the even and odd 89bf215546Sopenharmony_ci fields of a frame of video data. 90bf215546Sopenharmony_ci 91bf215546Sopenharmony_ci If <interval> is set to a value of 0, buffer swaps are not synchro- 92bf215546Sopenharmony_ci nized to a video frame. The <interval> value is silently clamped to 93bf215546Sopenharmony_ci the maximum implementation-dependent value supported before being 94bf215546Sopenharmony_ci stored. 95bf215546Sopenharmony_ci 96bf215546Sopenharmony_ci The swap interval is not part of the render context state. It cannot 97bf215546Sopenharmony_ci be pushed or popped. The current swap interval for the window 98bf215546Sopenharmony_ci associated with the current context can be obtained by calling 99bf215546Sopenharmony_ci glXGetSwapIntervalMESA. The default swap interval is 0. 100bf215546Sopenharmony_ci 101bf215546Sopenharmony_ci On XFree86, setting the environment variable LIBGL_THROTTLE_REFRESH sets 102bf215546Sopenharmony_ci the swap interval to 1. 103bf215546Sopenharmony_ci 104bf215546Sopenharmony_ciErrors 105bf215546Sopenharmony_ci 106bf215546Sopenharmony_ci glXSwapIntervalMESA returns GLX_BAD_CONTEXT if there is no current 107bf215546Sopenharmony_ci GLXContext or if the current context is not a direct rendering context. 108bf215546Sopenharmony_ci 109bf215546Sopenharmony_ciGLX Protocol 110bf215546Sopenharmony_ci 111bf215546Sopenharmony_ci None. This extension only extends to direct rendering contexts. 112bf215546Sopenharmony_ci 113bf215546Sopenharmony_ciNew State 114bf215546Sopenharmony_ci 115bf215546Sopenharmony_ci Get Value Get Command Type Initial Value 116bf215546Sopenharmony_ci --------- ----------- ---- ------------- 117bf215546Sopenharmony_ci [swap interval] GetSwapInterval Z+ 0 118bf215546Sopenharmony_ci 119bf215546Sopenharmony_ciNew Implementation Dependent State 120bf215546Sopenharmony_ci 121bf215546Sopenharmony_ci None 122bf215546Sopenharmony_ci 123bf215546Sopenharmony_ci 124bf215546Sopenharmony_ciRevision History 125bf215546Sopenharmony_ci 126bf215546Sopenharmony_ci 1.1, 5/1/03 Added the issues section and contact information. 127bf215546Sopenharmony_ci Changed the default swap interval to 0. 128bf215546Sopenharmony_ci 1.0, 3/17/03 Initial version based on GLX_SGI_swap_control and 129bf215546Sopenharmony_ci WGL_EXT_swap_control. 130