• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    EXT_scene_marker
4
5Name Strings
6
7    GL_EXT_scene_marker
8    GLX_EXT_scene_marker
9
10Version
11
12    $Date: 1997/09/08 21:31:59 $ $Revision: 1.4 $
13
14Number
15
16    120
17
18Dependencies
19
20    OpenGL 1.1 is required.
21
22Overview
23
24    This extension provides BeginScene/EndScene markers to allow buffering
25    and sorting of the OpenGL command sequence needed to construct and
26    entire frame. Scene markers are useful for region (aka tile) rendering
27    architectures, in which all of the geometry for a region a window must
28    be known before any can be rasterized. It may also be applicable to
29    other architectures requiring a scene database, such as scanline depth
30    buffers.
31
32Issues
33
34    *  Region architectures usually generate only a color buffer. Depth,
35       stencil, and other ancillary buffers, if they exist, are instantiated
36       only for the screen region being rasterized at any given time, and
37       are not retained after all geometry for that region has been
38       processed. As a consequence, ancillary buffers are usually
39       inaccessible via Read/Copy/Draw operations. Implementations may
40       choose to relax this restriction.
41
42    *  State changes affecting primitives are buffered and may need to be
43       processed for every screen region. This makes "large" state changes,
44       such as DrawPixels or TexImage2D, likely to be prohibitively
45       expensive within a scene.
46
47    *  State queries within a scene may also be very expensive, if they are
48       deferred to hardware which normally would not process them until
49       EndSceneEXT. As with large state changes, it seems preferable to
50       allow state queries within a scene, but document that they may be
51       costly.
52
53    *  Initial buffer state after BeginSceneEXT is undefined, forcing the
54       application to overwrite all pixels. This implies that multiple
55       scenes may not be merged into a single visible frame without software
56       intervention to read back and combine scenes.
57
58    *  SCENE_REQUIRED_EXT is a property of the visual or pixel format,
59       rather than an Enable. Making it an Enable would probably force a
60       switch between hardware and software paths.
61
62    *  2D (X or GDI or Quickdraw) rendering is probably only allowed after
63       EndSceneEXT, to prevent synchronization issues. It's unclear how to
64       phrase this in the spec, however.
65
66    *  Reads and copies between BeginSceneEXT and EndSceneEXT are made
67       illegal, since there are many sensible interpretations of what the
68       buffer contents might be during this period.
69
70    *  Add mechanism to allow out-of-order rendering, etc.
71
72        No.
73
74New Procedures and Functions
75
76    void BeginSceneEXT(void);
77    void EndSceneEXT(void);
78
79New Tokens
80
81    Accepted by the <attribList> parameter of glXChooseVisual, and by the
82    <attrib> parameter of glXGetConfig:
83
84        GLX_SCENE_REQUIRED_EXT
85
86    Accepted by the <pname> parameters of GetBooleanv, GetIntegerv,
87    GetFloatv, and GetDoublev:
88
89        SCENE_REQUIRED_EXT
90
91Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
92
93    None
94
95Additions to Chapter 3 of the 1.1 Specification (Rasterization)
96
97    None
98
99Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
100and the Frame buffer)
101
102Additions to Chapter 5 of the 1.1 Specification (Special Functions)
103
104    <Insert before Section 5.6 Hints>
105
106    5.5.5 Scene Markers
107
108    Some OpenGL implementations may benefit from having delimiters which
109    mark the start and end of a command sequence which draws an entire
110    scene. These implementations may process commands in such a way that it
111    is impractical to allow certain commands such as reading the color
112    buffer to occur during the course of rendering the scene. When
113    SCENE_REQUIRED_EXT is TRUE, OpenGL command processing is modified as
114    follows:
115
116    A scene is started by issuing the command BeginSceneEXT; the contents of
117    the selected color, stencil, and depth buffers are undefined after
118    BeginSceneEXT. A scene is marked complete by issuing the command
119    EndSceneEXT. BeginSceneEXT and EndSceneEXT must be matched and do not
120    nest.
121
122    When issued between BeginSceneEXT and the corresponding EndSceneEXT, the
123    commands ReadPixels, CopyPixels, CopyTexImage, CopyTexSubImage,
124    DrawBuffer, Accum, Flush, and Finish generate an INVALID_OPERATION
125    error.
126
127    A ReadPixels or CopyPixels call requesting stencil, alpha, or depth
128    values may generate an INVALID_OPERATION error if the implementation
129    does not store those buffers in a form visible to the application.
130
131    When outside of a BeginSceneEXT/EndSceneEXT sequence, the fragments
132    generated from the command DrawPixels and from geometry issued during a
133    Begin/End sequence have an undefined effect on the color and ancillary
134    buffers, but their changes to OpenGL state are processed as normal. All
135    other commands are unaffected.
136
137    When SCENE_REQUIRED_EXT is FALSE, BeginSceneEXT and EndSceneEXT have no
138    effect, and none of the restrictions above are in force.
139
140Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
141
142    None
143
144Additions to the GLX Specification
145
146    The parameter GLX_SCENE_REQUIRED_EXT is added to glXGetConfig. When
147    queried, by calling glXGetConfig with <attrib> set to
148    GLX_SCENE_REQUIRED_EXT, it returns True if the visual requires scene
149    markers. For a normal visual, the return value is False.
150
151    glXChooseVisual accepts GLX_SCENE_REQUIRED_EXT in <attribList>. Visuals
152    that require scene markers are preferred.
153
154GLX Protocol
155
156    XXX - not done yet
157
158Additions to WGL
159
160    The flag PFD_SCENE_REQUIRED_EXT is added to ChoosePixelFormat, to allow
161    selecting a pixel format which requires scene markers.
162
163    XXX - not done yet (no extension query mechanism for WGL at present).
164
165Errors
166
167    INVALID_OPERATION if BeginSceneEXT or EndSceneEXT is issued between
168    execution of Begin and the corresponding execution of End.
169
170    INVALID_OPERATION if BeginSceneEXT is issued between execution of
171    BeginSceneEXT and the corresponding execution of EndSceneEXT or
172    EndSceneEXT is issued when no BeginSceneEXT preceded it.
173
174    INVALID_OPERATION if ReadPixels, CopyPixels, CopyTexImage,
175    CopyTexSubImage, DrawBuffer, Accum, Flush, or Finish is issued between
176    execution of BeginSceneEXT and the corresponding execution of
177    EndSceneEXT.
178
179    INVALID_OPERATION if ReadPixels or CopyPixels is issued requesting
180    alpha, stencil, or depth components, and the implementation does not
181    store those buffers in a form visible to the application.
182
183New State
184
185    Get Value           Get Command     Type    Initial Value   Attribute
186    ---------           -----------     ----    -------------   ---------
187    SCENE_REQUIRED_EXT  GetBooleanv     B       -               -
188
189New Implementation Dependent State
190
191    None
192
193Revision History
194
195Changes due to IHV feedback, revision 1.3, September 2, 1997 (ljp)
196
197    Made scene_marker a property of the visual or pixel format, rather than
198    an enable. Made DrawBuffer within a scene, or ReadPixels/CopyPixels of
199    depth or stencil, illegal.
200