blob: e05d515496f943b3be55fbb2b5f837a890239beb [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
11 Ian Romanick, IBM (idr 'at' us.ibm.com)
12
13Status
14
15 Deployed in DRI drivers post-XFree86 4.3.
16
17Version
18
19 Date: 3/17/2003 Revision: 1.0
20
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
37New Procedures and Functions
38
39 int glXSwapIntervalMESA(int interval)
40 int glXGetSwapIntervalMESA(void)
41
42New Tokens
43
44 None
45
46Additions to Chapter 2 of the 1.4 GL Specification (OpenGL Operation)
47
48 None
49
50Additions to Chapter 3 of the 1.4 GL Specification (Rasterization)
51
52 None
53
54Additions to Chapter 4 of the 1.4 GL Specification (Per-Fragment Operations
55and the Framebuffer)
56
57 None
58
59Additions to Chapter 5 of the 1.4 GL Specification (Special Functions)
60
61 None
62
63Additions to Chapter 6 of the 1.4 GL Specification (State and State Requests)
64
65 None
66
67Additions to the GLX 1.3 Specification
68
69 [Add the following to Section 3.3.10 of the GLX Specification (Double
70 Buffering)]
71
72 glXSwapIntervalMESA specifies the minimum number of video frame periods
73 per buffer swap. (e.g. a value of two means that the color buffers
74 will be swapped at most every other video frame.) A return value
75 of zero indicates success; otherwise an error occurred. The interval
76 takes effect when glXSwapBuffers is first called subsequent to the
77 glXSwapIntervalMESA call.
78
79 A video frame period is the time required by the monitor to display a
80 full frame of video data. In the case of an interlaced monitor,
81 this is typically the time required to display both the even and odd
82 fields of a frame of video data.
83
84 If <interval> is set to a value of 0, buffer swaps are not synchron-
85 ized to a video frame. The <interval> value is silently clamped to
86 the maximum implementation-dependent value supported before being
87 stored.
88
89 The swap interval is not part of the render context state. It cannot
90 be pushed or popped. The current swap interval for the window
91 associated with the current context can be obtained by calling
92 glXGetSwapIntervalMESA. The default swap interval is 1.
93
94 On XFree86, setting the environment variable LIBGL_NO_VSYNC sets the
95 swap interval to 0.
96
97Errors
98
99 glXSwapIntervalMESA returns GLX_BAD_VALUE if parameter <interval> is
100 less than zero.
101
102 glXSwapIntervalMESA returns GLX_BAD_CONTEXT if there is no current
103 GLXContext.
104
105GLX Protocol
106
107 None. This extension only extends to direct rendering contexts.
108
109New State
110
111 Get Value Get Command Type Initial Value
112 --------- ----------- ---- -------------
113 [swap interval] GetSwapInterval Z+ 1
114
115New Implementation Dependent State
116
117 None