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