15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci EXT_swap_control 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci WGL_EXT_swap_control 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciVersion 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Date: 9/23/1999 Revision: 1.5 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNumber 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci 172 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciDependencies 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci WGL_EXT_extensions_string is required. 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ciOverview 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ci This extension allows an application to specify a minimum periodicity 245bd8deadSopenharmony_ci of color buffer swaps, measured in video frame periods. 255bd8deadSopenharmony_ci 265bd8deadSopenharmony_ciNew Procedures and Functions 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ci BOOL wglSwapIntervalEXT(int interval) 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ci int wglGetSwapIntervalEXT(void) 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciNew Tokens 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci None 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.2 GL Specification (OpenGL Operation) 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ci None 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.2 GL Specification (Rasterization) 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci None 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.2 GL Specification (Per-Fragment Operations 455bd8deadSopenharmony_ciand the Framebuffer) 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci None 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.2 GL Specification (Special Functions) 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci None 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.2 GL Specification (State and State Requests) 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ci None 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ciAdditions to the WGL Specification 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci wglSwapIntervalEXT specifies the minimum number of video frame periods 605bd8deadSopenharmony_ci per buffer swap for the window associated with the current context. 615bd8deadSopenharmony_ci The interval takes effect when SwapBuffers or wglSwapLayerBuffer 625bd8deadSopenharmony_ci is first called subsequent to the wglSwapIntervalEXT call. 635bd8deadSopenharmony_ci 645bd8deadSopenharmony_ci The parameter <interval> specifies the minimum number of video frames 655bd8deadSopenharmony_ci that are displayed before a buffer swap will occur. 665bd8deadSopenharmony_ci 675bd8deadSopenharmony_ci A video frame period is the time required by the monitor to display a 685bd8deadSopenharmony_ci full frame of video data. In the case of an interlaced monitor, 695bd8deadSopenharmony_ci this is typically the time required to display both the even and odd 705bd8deadSopenharmony_ci fields of a frame of video data. An interval set to a value of 2 715bd8deadSopenharmony_ci means that the color buffers will be swapped at most every other video 725bd8deadSopenharmony_ci frame. 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ci If <interval> is set to a value of 0, buffer swaps are not synchron- 755bd8deadSopenharmony_ci ized to a video frame. The <interval> value is silently clamped to 765bd8deadSopenharmony_ci the maximum implementation-dependent value supported before being 775bd8deadSopenharmony_ci stored. 785bd8deadSopenharmony_ci 795bd8deadSopenharmony_ci The swap interval is not part of the render context state. It cannot 805bd8deadSopenharmony_ci be pushed or popped. The current swap interval for the window 815bd8deadSopenharmony_ci associated with the current context can be obtained by calling 825bd8deadSopenharmony_ci wglGetSwapIntervalEXT. The default swap interval is 1. 835bd8deadSopenharmony_ci 845bd8deadSopenharmony_ciDependencies on WGL_EXT_extensions_string 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ci Because there is no way to extend wgl, these calls are defined in 875bd8deadSopenharmony_ci the ICD and can be called by obtaining the address with 885bd8deadSopenharmony_ci wglGetProcAddress. Because this extension is a WGL extension, it 895bd8deadSopenharmony_ci is not included in the GL_EXTENSIONS string. Its existence can be 905bd8deadSopenharmony_ci determined with the WGL_EXT_extensions_string extension. 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci For historical reasons, GL_EXT_SWAP_CONTROL is also included in the 935bd8deadSopenharmony_ci GL_EXTENSIONS string as return from glGetString. 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ciErrors 965bd8deadSopenharmony_ci 975bd8deadSopenharmony_ci If the function succeeds, the return value is TRUE. If the function 985bd8deadSopenharmony_ci fails, the return value is FALSE. To get extended error information, 995bd8deadSopenharmony_ci call GetLastError. 1005bd8deadSopenharmony_ci 1015bd8deadSopenharmony_ci ERROR_INVALID_DATA The <interval> parameter is negative. 1025bd8deadSopenharmony_ci 1035bd8deadSopenharmony_ci ERROR_DC_NOT_FOUND An RC was not current to the calling 1045bd8deadSopenharmony_ci thread; therefore, no DC could be 1055bd8deadSopenharmony_ci obtained. 1065bd8deadSopenharmony_ci 1075bd8deadSopenharmony_ciNew State 1085bd8deadSopenharmony_ci 1095bd8deadSopenharmony_ci None 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ciNew Implementation Dependent State 1125bd8deadSopenharmony_ci 1135bd8deadSopenharmony_ci None 114