1848b8605SmrgName 2848b8605Smrg 3848b8605Smrg MESA_swap_control 4848b8605Smrg 5848b8605SmrgName Strings 6848b8605Smrg 7848b8605Smrg GLX_MESA_swap_control 8848b8605Smrg 9848b8605SmrgContact 10848b8605Smrg 11848b8605Smrg Ian Romanick, IBM, idr at us.ibm.com 12848b8605Smrg 13848b8605SmrgStatus 14848b8605Smrg 15848b8605Smrg Deployed in DRI drivers post-XFree86 4.3. 16848b8605Smrg 17848b8605SmrgVersion 18848b8605Smrg 19848b8605Smrg Date: 5/1/2003 Revision: 1.1 20848b8605Smrg 21848b8605SmrgNumber 22848b8605Smrg 23848b8605Smrg ??? 24848b8605Smrg 25848b8605SmrgDependencies 26848b8605Smrg 27848b8605Smrg None 28848b8605Smrg 29848b8605Smrg Based on GLX_SGI_swap_control version 1.9 and WGL_EXT_swap_control 30848b8605Smrg version 1.5. 31848b8605Smrg 32848b8605SmrgOverview 33848b8605Smrg 34848b8605Smrg This extension allows an application to specify a minimum periodicity 35848b8605Smrg of color buffer swaps, measured in video frame periods. 36848b8605Smrg 37848b8605SmrgIssues 38848b8605Smrg 39848b8605Smrg * Should implementations that export GLX_MESA_swap_control also export 40848b8605Smrg GL_EXT_swap_control for compatibility with WGL_EXT_swap_control? 41848b8605Smrg 42848b8605Smrg UNRESOLVED. 43848b8605Smrg 44848b8605SmrgNew Procedures and Functions 45848b8605Smrg 46848b8605Smrg int glXSwapIntervalMESA(unsigned int interval) 47848b8605Smrg int glXGetSwapIntervalMESA(void) 48848b8605Smrg 49848b8605SmrgNew Tokens 50848b8605Smrg 51848b8605Smrg None 52848b8605Smrg 53848b8605SmrgAdditions to Chapter 2 of the 1.4 GL Specification (OpenGL Operation) 54848b8605Smrg 55848b8605Smrg None 56848b8605Smrg 57848b8605SmrgAdditions to Chapter 3 of the 1.4 GL Specification (Rasterization) 58848b8605Smrg 59848b8605Smrg None 60848b8605Smrg 61848b8605SmrgAdditions to Chapter 4 of the 1.4 GL Specification (Per-Fragment Operations 62848b8605Smrgand the Framebuffer) 63848b8605Smrg 64848b8605Smrg None 65848b8605Smrg 66848b8605SmrgAdditions to Chapter 5 of the 1.4 GL Specification (Special Functions) 67848b8605Smrg 68848b8605Smrg None 69848b8605Smrg 70848b8605SmrgAdditions to Chapter 6 of the 1.4 GL Specification (State and State Requests) 71848b8605Smrg 72848b8605Smrg None 73848b8605Smrg 74848b8605SmrgAdditions to the GLX 1.3 Specification 75848b8605Smrg 76848b8605Smrg [Add the following to Section 3.3.10 of the GLX Specification (Double 77848b8605Smrg Buffering)] 78848b8605Smrg 79848b8605Smrg glXSwapIntervalMESA specifies the minimum number of video frame periods 80848b8605Smrg per buffer swap. (e.g. a value of two means that the color buffers 81848b8605Smrg will be swapped at most every other video frame.) A return value 82848b8605Smrg of zero indicates success; otherwise an error occurred. The interval 83848b8605Smrg takes effect when glXSwapBuffers is first called subsequent to the 84848b8605Smrg glXSwapIntervalMESA call. 85848b8605Smrg 86848b8605Smrg A video frame period is the time required by the monitor to display a 87848b8605Smrg full frame of video data. In the case of an interlaced monitor, 88848b8605Smrg this is typically the time required to display both the even and odd 89848b8605Smrg fields of a frame of video data. 90848b8605Smrg 91848b8605Smrg If <interval> is set to a value of 0, buffer swaps are not synchro- 92848b8605Smrg nized to a video frame. The <interval> value is silently clamped to 93848b8605Smrg the maximum implementation-dependent value supported before being 94848b8605Smrg stored. 95848b8605Smrg 96848b8605Smrg The swap interval is not part of the render context state. It cannot 97848b8605Smrg be pushed or popped. The current swap interval for the window 98848b8605Smrg associated with the current context can be obtained by calling 99848b8605Smrg glXGetSwapIntervalMESA. The default swap interval is 0. 100848b8605Smrg 101848b8605Smrg On XFree86, setting the environment variable LIBGL_THROTTLE_REFRESH sets 102848b8605Smrg the swap interval to 1. 103848b8605Smrg 104848b8605SmrgErrors 105848b8605Smrg 106848b8605Smrg glXSwapIntervalMESA returns GLX_BAD_CONTEXT if there is no current 107848b8605Smrg GLXContext or if the current context is not a direct rendering context. 108848b8605Smrg 109848b8605SmrgGLX Protocol 110848b8605Smrg 111848b8605Smrg None. This extension only extends to direct rendering contexts. 112848b8605Smrg 113848b8605SmrgNew State 114848b8605Smrg 115848b8605Smrg Get Value Get Command Type Initial Value 116848b8605Smrg --------- ----------- ---- ------------- 117848b8605Smrg [swap interval] GetSwapInterval Z+ 0 118848b8605Smrg 119848b8605SmrgNew Implementation Dependent State 120848b8605Smrg 121848b8605Smrg None 122848b8605Smrg 123848b8605Smrg 124848b8605SmrgRevision History 125848b8605Smrg 126848b8605Smrg 1.1, 5/1/03 Added the issues section and contact information. 127848b8605Smrg Changed the default swap interval to 0. 128848b8605Smrg 1.0, 3/17/03 Initial version based on GLX_SGI_swap_control and 129848b8605Smrg WGL_EXT_swap_control. 130