summaryrefslogtreecommitdiff
path: root/docs/specs/MESA_swap_control.spec
blob: a002563c9dc9a6472bcfd624d07be92dc015bf19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
Name

    MESA_swap_control

Name Strings

    GLX_MESA_swap_control

Contact

    Ian Romanick, IBM, idr at us.ibm.com

Status

    Deployed in DRI drivers post-XFree86 4.3.

Version

    Date: 5/1/2003   Revision: 1.1

Number

    ???

Dependencies

    None

    Based on GLX_SGI_swap_control version 1.9 and WGL_EXT_swap_control
    version 1.5.

Overview

    This extension allows an application to specify a minimum periodicity
    of color buffer swaps, measured in video frame periods.

Issues

    * Should implementations that export GLX_MESA_swap_control also export
      GL_EXT_swap_control for compatibility with WGL_EXT_swap_control?

    UNRESOLVED.

New Procedures and Functions

    int glXSwapIntervalMESA(unsigned int interval)
    int glXGetSwapIntervalMESA(void)

New Tokens

    None

Additions to Chapter 2 of the 1.4 GL Specification (OpenGL Operation)

    None

Additions to Chapter 3 of the 1.4 GL Specification (Rasterization)

    None

Additions to Chapter 4 of the 1.4 GL Specification (Per-Fragment Operations
and the Framebuffer)

    None

Additions to Chapter 5 of the 1.4 GL Specification (Special Functions)

    None

Additions to Chapter 6 of the 1.4 GL Specification (State and State Requests)

    None

Additions to the GLX 1.3 Specification

    [Add the following to Section 3.3.10 of the GLX Specification (Double
     Buffering)]

    glXSwapIntervalMESA specifies the minimum number of video frame periods
    per buffer swap.  (e.g. a value of two means that the color buffers
    will be swapped at most every other video frame.)  A return value
    of zero indicates success; otherwise an error occurred.  The interval
    takes effect when glXSwapBuffers is first called subsequent to the
    glXSwapIntervalMESA call.

    A video frame period is the time required by the monitor to display a 
    full frame of video data.  In the case of an interlaced monitor,
    this is typically the time required to display both the even and odd 
    fields of a frame of video data.

    If <interval> is set to a value of 0, buffer swaps are not synchro-
    nized to a video frame.  The <interval> value is silently clamped to
    the maximum implementation-dependent value supported before being
    stored.

    The swap interval is not part of the render context state.  It cannot
    be pushed or popped.  The current swap interval for the window
    associated with the current context can be obtained by calling
    glXGetSwapIntervalMESA.  The default swap interval is 0.

    On XFree86, setting the environment variable LIBGL_THROTTLE_REFRESH sets
    the swap interval to 1.

Errors

    glXSwapIntervalMESA returns GLX_BAD_CONTEXT if there is no current
    GLXContext or if the current context is not a direct rendering context.

GLX Protocol

    None.  This extension only extends to direct rendering contexts.

New State

    Get Value		Get Command	Type	    Initial Value
    ---------		-----------	----	    -------------
    [swap interval]	GetSwapInterval	Z+	    0

New Implementation Dependent State

    None


Revision History

    1.1,  5/1/03   Added the issues section and contact information.
    	  	   Changed the default swap interval to 0.
    1.0,  3/17/03  Initial version based on GLX_SGI_swap_control and
                   WGL_EXT_swap_control.