• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    ATI_render_texture_rectangle
4
5Name Strings
6
7    WGL_ATI_render_texture_rectangle
8
9Contact
10
11    Rob Mace, ATI Research (mace 'at' ati.com)
12
13Status
14
15    Complete.
16
17Version
18
19    Last Modified Date: September 27, 2018
20    Revision: 3
21
22Number
23
24    OpenGL Extension #532
25
26Dependencies
27
28    OpenGL 1.1 is required.
29    WGL_ARB_render_texture is required.
30    GL_ARB_texture_rectangle or GL_EXT_texture_rectangle is required.
31
32    The extension is written against the OpenGL 1.5 Specification
33    and the WGL_ARB_render_texture 7/16/01 Specification.
34
35Overview
36
37    This extension builds upon WGL_ARB_render_texture and allows a
38    pbuffer to be bound to a texture rectangle target.
39
40
41Issues
42
43    1. Are separate BIND_TO_TEXTURE_RECTANGLE enums needed, or are the
44       BIND_TO_TEXTURE enums defined in WGL_ARB_render_texture
45       sufficient?
46
47       RESOLUTION: The BIND_TO_TEXTURE enums defined in
48       WGL_ARB_render_texture are sufficient.  WGL_ARB_render_texture
49       does not have BIND_TO_TEXTURE_2D, BIND_TO_TEXTURE_CUBE_MAP, etc.
50       enums.  It just has the BIND_TO_TEXTURE enums.
51
52
53New Procedures and Functions
54
55   None
56
57
58New Tokens
59
60    Accepted as a value in the <piAttribList> parameter of
61    wglCreatePbufferARB and returned in the value parameter of
62    wglQueryPbufferARB when <iAttribute> is WGL_TEXTURE_TARGET_ARB:
63
64        WGL_TEXTURE_RECTANGLE_ATI       0x21A5
65
66
67Additions to Chapter 2 of the OpenGL 1.5 Specification (OpenGL
68Operation)
69
70    None
71
72
73Additions to Chapter 3 of the OpenGL 1.5 Specification (Rasterization)
74
75    None
76
77
78Additions to Chapter 4 of the OpenGL 1.5 Specification (Per-Fragment
79Operations and the Frame Buffer)
80
81    None
82
83
84Additions to Chapter 5 of the OpenGL 1.5 Specification (Special
85Functions)
86
87    None
88
89
90Additions to Chapter 6 of the OpenGL 1.5 Specification (State and
91State Requests)
92
93    None
94
95
96Additions to the WGL Specification
97
98    Modify wglCreatePbufferARB:
99
100        HPBUFFERARB wglCreatePbufferARB (HDC hDC, int iPixelFormat,
101            int iWidth, int iHeight, const int *piAttribList);
102
103        ...
104
105        WGL_TEXTURE_TARGET_ARB
106
107        This attribute indicates the target for the texture that will be
108        created when the pbuffer is created with a texture format of
109        WGL_TEXTURE_RGB_ARB or WGL_TEXTURE_RGBA_ARB.  This attribute can
110        be set to WGL_NO_TEXTURE_ARB, WGL_TEXTURE_1D_ARB,
111        WGL_TEXTURE_2D_ARB, WGL_TEXTURE_CUBE_MAP_ARB, or
112        WGL_TEXTURE_RECTANGLE_ATI.  The default value is
113        WGL_NO_TEXTURE_ARB.
114
115        ...
116
117        WGL_PBUFFER_LARGEST_ARB
118
119        If this attribute is set to a non-zero value, the largest
120        available pbuffer is allocated when the allocation of the
121        pbuffer would otherwise fail due to insufficient resources.  The
122        width or height of the allocated pbuffer never exceeds <iWidth>
123        and <iHeight>, respectively.  Also, if the pbuffer will be used
124        as a texture (i.e., the value of the WGL_TEXTURE_TARGET_ARB
125        attribute is WGL_TEXTURE_1D_ARB, WGL_TEXTURE_2D_ARB,
126        WGL_TEXTURE_CUBE_MAP_ARB, or WGL_TEXTURE_RECTANGLE_ATI and
127        texture format is WGL_TEXTURE_RGB_ARB or WGL_TEXTURE_RGBA_ARB),
128        then the aspect ratio will be preserved and the new width and
129        height will be valid sizes for the corresponding texture target.
130        (e.g. Both the width and height will be a power of 2 if the
131        implementation only supports power of 2 textures.  Similarly,
132        the width and height will be equal for a cube map texture).  Use
133        wglQueryPbufferARB to retrieve the dimensions of the allocated
134        pbuffer.  The default value for this attribute is FALSE.
135
136        ...
137
138        ERROR_INVALID_DATA          The pixel format attribute
139                                    WGL_TEXTURE_FORMAT_ARB is
140                                    WGL_TEXTURE_RGB_ARB or
141                                    WGL_TEXTURE_RGBA_ARB
142                                    and WGL_PBUFFER_WIDTH and/or
143                                    WGL_PBUFFER_HEIGHT specify an
144                                    invalid size for the implementation
145                                    (e.g., the texture size is not a
146                                    power of 2 and
147                                    WGL_TEXTURE_TARGET_ARB is
148                                    WGL_TEXTURE_1D_ARB,
149                                    WGL_TEXTURE_2D_ARB, or
150                                    WGL_TEXTURE_CUBE_MAP_ARB).
151
152        ERROR_INVALID_DATA          WGL_TEXTURE_TARGET_ARB is
153                                    WGL_TEXTURE_RECTANGLE_ATI
154                                    and WGL_MIPMAP_TEXTURE_ARB is
155                                    non-zero.
156
157        ....
158
159    Modify wglBindTexImageARB
160
161        The command
162
163        BOOL wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer)
164
165        defines a one-dimensional texture image, two-dimensional
166        texture image, rectangle texture image, or a set of
167        two-dimensional cube map texture images.  The texture image or
168        images consist of the image data in <iBuffer> for the specified
169        pbuffer, <hPbuffer>, and need not be copied.  The texture
170        target, the texture format and the size of the texture
171        components are derived from attributes of pbuffer specified by
172        <hPbuffer>.
173
174        ...
175
176        The texture targets are derived from the WGL_TEXTURE_TARGET_ARB
177        attribute of <hPbuffer>.  If the texture target for the pbuffer
178        is WGL_TEXTURE_CUBE_MAP_ARB then <iBuffer> defines a set of
179        cubemap images for the cube map texture objects which are bound
180        to the current context (hereafter referred to as the current
181        texture object).  Note that when the texture target is
182        WGL_TEXTURE_CUBE_MAP_ARB, all cube map texture targets are
183        defined by a single call to wglBindTexImageARB. If the texture
184        target is WGL_TEXTURE_2D_ARB, then <iBuffer> defines a 2D
185        texture for the current 2D texture object.  If the texture
186        target is WGL_TEXTURE_1D_ARB, then <iBuffer> defines a 1D
187        texture for the current 1D texture object.  If the texture
188        target is WGL_TEXTURE_RECTANGLE_ATI, then <iBuffer> defines a
189        rectangle texture for the current rectangle texture object.
190
191        ....
192
193
194Errors
195
196    None
197
198
199New State
200
201    None
202
203
204New Implementation Dependent State
205
206    None
207
208
209Revision History
210
211   Date: 09/27/2018
212   Revision: 3
213      - Assigned extension number & registered the spec (see
214        github.com/KhronosGroup/OpenGL-Registry/issues/192)
215      - For reasons lost to history, the enum value 0x21A5 duplicates the
216        entirely unrelated WGL_GPU_NUM_PIPES_AMD.
217      - This will probably set the alltime record for the time between an
218        extension being created and being registered.
219
220   Date: 10/11/2004
221   Revision: 2
222      - Minor cleanup.
223      - Changed status to Complete.
224
225   Date: 8/16/2004
226   Revision: 1
227      - First draft.
228