summaryrefslogtreecommitdiffstats
path: root/docs/MESA_swap_control.spec
blob: e05d515496f943b3be55fbb2b5f837a890239beb (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
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: 3/17/2003   Revision: 1.0

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.

New Procedures and Functions

    int glXSwapIntervalMESA(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 synchron-
    ized 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 1.

    On XFree86, setting the environment variable LIBGL_NO_VSYNC sets the
    swap interval to 0.

Errors

    glXSwapIntervalMESA returns GLX_BAD_VALUE if parameter <interval> is
    less than zero.

    glXSwapIntervalMESA returns GLX_BAD_CONTEXT if there is no current
    GLXContext.

GLX Protocol

    None.  This extension only extends to direct rendering contexts.

New State

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

New Implementation Dependent State

    None