1Name
2
3    SGI_video_sync
4
5Name Strings
6
7    GLX_SGI_video_sync
8
9Number
10
11    41
12
13Dependencies
14
15    None
16
17Overview
18
19    This extension provides a means for synchronization with the video 
20    frame rate of a monitor.  (In the case of an interlaced monitor, 
21    this is typically the rate of displaying both the even and odd 
22    fields of a frame.) The kernel maintains a video sync counter for 
23    each physical hardware pipe in a system; the counter is incremented 
24    upon the completion of the display of each full frame of video data. An
25    OpenGL context always corresponds to a pipe.  When an OpenGL process
26    has a current context, it can put itself to sleep until the counter of
27    that pipe reaches a desired value.  The process can also query the
28    value of the counter.
29
30    The counter runs as long as the graphics subsystem is running; it is
31    initialized via the /usr/gfx/gfxinit command.  However, a process can
32    query or sleep on the counter only when a direct context is current.
33    Each of the procedures described below will fail and return an error
34    code if the current context is not a direct one.
35
36    The counter is an unsigned 32-bit integer.
37
38Interaction with {ARB,OES}_framebuffer_object
39
40    If the current context does not have a default framebuffer there may be
41    no "frame rate" to refer to, since there is no Window or GLXWindow to map
42    to an output device. If the client API context is in this state, all
43    interaction with this extension is undefined.
44
45Issues
46
47    Should glXWaitVideoSyncSGI return GLX_BAD_VALUE if <remainder> is
48    greater than or equal to <divisor>? (No.)
49
50New Procedures and Functions
51
52    int glXGetVideoSyncSGI(uint *count);
53
54    int glXWaitVideoSyncSGI(int divisor, 
55			    int remainder, 
56			    unsigned int *count);
57
58New Tokens
59
60    None
61
62Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
63
64    None
65
66Additions to Chapter 3 of the 1.0 Specification (Rasterization)
67
68    None
69
70Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations and
71the Framebuffer)
72
73    None
74
75Additions to Chapter 5 of the 1.0 Specification (Special Functions)
76
77    None
78
79Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
80
81    None
82
83Additions to the GLX Specification
84	
85    [Add to Section 3.2.5 of the 1.0 GLX Specification (Synchronization
86     Primititives)]
87
88    In addition to its current functions, /usr/gfx/gfxinit also initializes
89    the video sync counter to zero.  After that time the video sync counter
90    is incremented by one at the completion of the display of each full
91    frame of video data.  The counter value wraps to zero after it reaches
92    its maximum value.  The single video sync counter is shared by all
93    GLXContexts.
94
95    glXGetVideoSyncSGI returns the value of the video sync counter in
96    <count>.  Zero is returned if the call is successful.
97
98    glXWaitVideoSyncSGI puts the calling process to sleep until
99
100	(C mod D) = R
101
102    where C is the video sync counter, D is specified by the <divisor>
103    parameter of glXWaitVideoSyncSGI, and R is specified by the <remainder>
104    parameter of glXWaitVideoSyncSGI.  glXWaitVideoSyncSGI returns the
105    current video sync counter value in <count>.  Zero is returned by
106    glXWaitVideoSyncSGI if it is successful.
107
108    glXWaitVideoSyncSGI is supported only by direct GLXContexts.
109
110Errors
111
112    glXGetVideoSyncSGI returns GLX_BAD_CONTEXT if there is no current
113    GLXContext.
114
115    glXWaitVideoSyncSGI returns GLX_BAD_CONTEXT if the current context is
116    not direct, or if there is no current context.
117
118    glXWaitVideoSyncSGI returns GLX_BAD_VALUE if parameter <divisor> is less
119    than or equal to zero, or if parameter <remainder> is less than zero.
120
121New State
122
123    Get Value			Get Command		Type	Initial Value
124    ---------			-----------		----	-------------
125    [video sync counter]	glXGetVideoSyncSGI	Z+	unknown
126
127New Implementation Dependent State
128
129    None
130
131Version
132
133    $Date: 1995/09/15 01:22:58 $ $Revision: 1.8 $
134
135    Khronos revision 2:
136    - Note ARB_framebuffer_object interaction (ajax)
137