1Name 2 3 EXT_swap_control 4 5Name Strings 6 7 WGL_EXT_swap_control 8 9Version 10 11 Date: 9/23/1999 Revision: 1.5 12 13Number 14 15 172 16 17Dependencies 18 19 WGL_EXT_extensions_string is required. 20 21Overview 22 23 This extension allows an application to specify a minimum periodicity 24 of color buffer swaps, measured in video frame periods. 25 26New Procedures and Functions 27 28 BOOL wglSwapIntervalEXT(int interval) 29 30 int wglGetSwapIntervalEXT(void) 31 32New Tokens 33 34 None 35 36Additions to Chapter 2 of the 1.2 GL Specification (OpenGL Operation) 37 38 None 39 40Additions to Chapter 3 of the 1.2 GL Specification (Rasterization) 41 42 None 43 44Additions to Chapter 4 of the 1.2 GL Specification (Per-Fragment Operations 45and the Framebuffer) 46 47 None 48 49Additions to Chapter 5 of the 1.2 GL Specification (Special Functions) 50 51 None 52 53Additions to Chapter 6 of the 1.2 GL Specification (State and State Requests) 54 55 None 56 57Additions to the WGL Specification 58 59 wglSwapIntervalEXT specifies the minimum number of video frame periods 60 per buffer swap for the window associated with the current context. 61 The interval takes effect when SwapBuffers or wglSwapLayerBuffer 62 is first called subsequent to the wglSwapIntervalEXT call. 63 64 The parameter <interval> specifies the minimum number of video frames 65 that are displayed before a buffer swap will occur. 66 67 A video frame period is the time required by the monitor to display a 68 full frame of video data. In the case of an interlaced monitor, 69 this is typically the time required to display both the even and odd 70 fields of a frame of video data. An interval set to a value of 2 71 means that the color buffers will be swapped at most every other video 72 frame. 73 74 If <interval> is set to a value of 0, buffer swaps are not synchron- 75 ized to a video frame. The <interval> value is silently clamped to 76 the maximum implementation-dependent value supported before being 77 stored. 78 79 The swap interval is not part of the render context state. It cannot 80 be pushed or popped. The current swap interval for the window 81 associated with the current context can be obtained by calling 82 wglGetSwapIntervalEXT. The default swap interval is 1. 83 84Dependencies on WGL_EXT_extensions_string 85 86 Because there is no way to extend wgl, these calls are defined in 87 the ICD and can be called by obtaining the address with 88 wglGetProcAddress. Because this extension is a WGL extension, it 89 is not included in the GL_EXTENSIONS string. Its existence can be 90 determined with the WGL_EXT_extensions_string extension. 91 92 For historical reasons, GL_EXT_SWAP_CONTROL is also included in the 93 GL_EXTENSIONS string as return from glGetString. 94 95Errors 96 97 If the function succeeds, the return value is TRUE. If the function 98 fails, the return value is FALSE. To get extended error information, 99 call GetLastError. 100 101 ERROR_INVALID_DATA The <interval> parameter is negative. 102 103 ERROR_DC_NOT_FOUND An RC was not current to the calling 104 thread; therefore, no DC could be 105 obtained. 106 107New State 108 109 None 110 111New Implementation Dependent State 112 113 None 114