• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2Name
3    SUNX_constant_data
4
5Name Strings
6
7    GL_SUNX_constant_data
8
9Contact
10
11    Ron Bielaski, Sun (Ron.Bielaski 'at' eng.sun.com)
12    Jack Middleton, Sun (Jack.Middleton 'at' eng.sun.com)
13
14Status
15
16    Shipping
17
18Version
19
20    $Date: 1999/12/28 01:40:37 $ $Revision: 1.5 $
21    SUN Date: 99/06/25 15:06:46  Revision: 1.2
22
23Number
24
25    163
26
27Dependencies
28
29   None
30
31Overview
32
33   This extension allows the pixel data specified by the
34   application to be used internally without making a second copy.
35   This extension affects how the pixel data in client memory is
36   interpreted and therefore affects DrawPixels, Bitmap,
37   PolygonStipple, TexImage1D, TexImage2D, TexImage3DEXT,
38   ColorTableSGI.
39
40New Procedures and Functions
41
42    void FinishTextureSUNX(void)
43
44New Tokens
45
46   Accepted by the <pname> parameter PixelStore*()
47
48	UNPACK_CONSTANT_DATA_SUNX		0x81D5
49
50   Accepted by <pname> parameter of GetTexLevelParameter()
51
52	TEXTURE_CONSTANT_DATA_SUNX		0x81D6
53
54
55Additions to Chapter 2 of the GL Specification (OpenGL Operation)
56
57When TexImage1D(), TexImage2D(), TexImage3DEXT() is called,
58specifying PixelStore*() with pname UNPACK_CONSTANT_DATA_SUNX set to
59TRUE will allow the implementation to use the application provided data
60pointer internally thereby avoiding a second copy. If pixel transfer is
61enabled when using this pixel store mode or if the constant directive
62cannot be honored , then the constant directive will be ignored and a
63copy will be made internally. Thus, specifying "constant" data
64directive does not prohibit the implementation from making a copy,
65rather it is treated as a hint by the implementation to avoid making a
66second copy if possible. Note that if UNPACK_CONSTANT_DATA_SUNX is set
67to TRUE, and all the pixel store values are not default values then the
68constant hint will not be honored.
69
70
71A TexSubImage*() will always make a copy of the existing texture
72image before updating the subimage except when the scenario given below
73is true.
74
75If a TexSubImage1D(), TexSubImage2D(), TexSubImage3DEXT() is
76called with PixelStore pname UNPACK_CONSTANT_DATA_SUNX set to TRUE on a
77constant texture, then the address of the start of the texture image is
78computed using the specified xoffset, yoffset, zoffset. If this
79computed address matches the start address of the currently used
80constant texture then no action is taken. If the addresses do not match
81then a copy is first made of the entire texture and then the subimage
82is updated in this copy. A texture is a "constant texture" if at the
83time of the specification of the texture no copy was made. This
84attribute can be queried as described later.
85
86Before an application changes a part or all of the texture image that
87has been specified as a constant texture image, it is necessary to
88call FinishTextureSUNX() to ensure that the library has completed all
89its processing with the currently specified constant texture image
90before the changes are applied to this constant texture image by the
91application.
92
93If a CopyTexImage[1/2/3]D or CopyTexSubImage[1/2/3]D is made and
94the existing texture image is constant, then a copy is made
95internally before executing the CopyTex* calls.
96
97
98In immediate mode, for DrawPixels()/Bitmap(), specifying constant data
99is not meaningful since data does not have a life beyond the call
100itself.
101
102A texture image/raster image or bitmap could be specified as constant
103at the time of the creation of the display list. If pixelmap/pixel
104transfer is enabled before calling the display list, then a copy is
105made internally and the data is no longer constant.
106
107It is invalid to specify a texture subimage as constant in a display
108list. Doing so, will result in an INVALID_OPERATION error.
109
110Query support
111-------------
112The pixel store value for the constant data that has been set can be
113inquired using Get() with pname set to UNPACK_CONSTANT_DATA_SUNX.
114
115When TexImage*D() is executed with target PROXY_TEXTURE_[1,2,3]D then
116the state value of TEXTURE_CONSTANT_DATA_SUNX will be set to 0 if
117the texture data cannot be stored as constant, otherwise the value
118will be 1.
119
120The constant nature of the texture data can be inquired using
121GetTexLevelParameter*() with pname TEXTURE_CONSTANT_DATA_SUNX and
122target PROXY_TEXTURE_[1,2,3]D . If the target is TEXTURE_[1,2,3]D and
123pname is TEXTURE_CONSTANT_DATA_SUNX, then the value returned is TRUE
124if the the texture image defined at this level is currently
125constant.
126
127Note that a texture image may become non-constant (that is an internal
128copy may be made) at the time when the texture is used rather than at a
129time when the texture is specified. If interested, an application could
130inquire the constant nature of the texture data after the texture has
131been used for rendering.
132
133Additions to the GLX / WGL / AGL Specifications
134
135    None
136
137GLX Protocol
138
139    None
140
141Errors
142
143    None
144
145New State
146
147    ???
148    (will affect both pixel pack/unpack and texture state)
149
150New Implementation Dependent State
151
152    None
153
154Revision History
155
156    6/24/99 - Updated name string to SUNX instead of SUN.
157    Added fields from the new extension template.
158
159
160