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