1XXX - not complete yet! 2 3Name 4 5 SGIS_texture4D 6 7Name Strings 8 9 GL_SGIS_texture4D 10 11Version 12 13 $Date: 1997/03/15 02:52:10 $ $Revision: 1.25 $ 14 15Number 16 17 16 18 19Dependencies 20 21 EXT_abgr affects the definition of this extension 22 EXT_texture is required 23 EXT_texture3D is required 24 EXT_subtexture affects the definition of this extension 25 26Overview 27 28 This extension defines 4-dimensional texture mapping. If EXT_subtexture 29 is supported, this extension also defines a mechanism to redefine a 30 portion of an existing 4-dimensional texture image. Because 31 EXT_texture3D is required, this extension utilizes the 3-dimensional 32 image support defined in by EXT_texture3D as a base for 4-dimensional 33 image manipulation. 34 35 The 4th dimension has an abstract, rather than physical, reference 36 and will be called "extent", since the definition of extent is "that which 37 specifies the range or magnitude of an area or volume." 38 39 Four-dimensional texture mapping is more constrained than its one, two, 40 and three-dimensional counterparts. Mipmapping is not supported, so 41 only the level-zero 4-dimensional texture image can be defined. Cubic 42 filtering is not supported, so the border width must be either zero or 43 one. 44 45 Four-dimensional textures are used primarily as color lookup tables for 46 color conversion. 47 48New Procedures and Functions 49 50 void TexImage4DSGIS(enum target, 51 int level, 52 enum internalformat, 53 sizei width, 54 sizei height, 55 sizei depth, 56 sizei extent, 57 int border, 58 enum format, 59 enum type, 60 const void* pixels); 61 62 void TexSubImage4DSGIS(enum target, 63 int level, 64 int xoffset, 65 int yoffset, 66 int zoffset, 67 int woffset, 68 sizei width, 69 sizei height, 70 sizei depth, 71 sizei extent, 72 enum format, 73 enum type, 74 const void* pixels); 75 76New Tokens 77 78 Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, 79 GetFloatv, and GetDoublev, and by the <pname> parameter of PixelStore: 80 81 PACK_SKIP_VOLUMES_SGIS 82 PACK_IMAGE_DEPTH_SGIS 83 UNPACK_SKIP_VOLUMES_SGIS 84 UNPACK_IMAGE_DEPTH_SGIS 85 86 Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by 87 the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and 88 GetDoublev, and by the <target> parameter of TexImage4DSGIS, GetTexImage, 89 GetTexLevelParameteriv, GetTexLevelParameterfv, GetTexParameteriv, and 90 GetTexParameterfv: 91 92 TEXTURE_4D_SGIS 93 94 Accepted by the <target> parameter of TexImage4DSGIS, 95 GetTexLevelParameteriv, and GetTexLevelParameterfv: 96 97 PROXY_TEXTURE_4D_SGIS 98 99 Accepted by the <pname> parameter of GetTexLevelParameteriv and 100 GetTexLevelParameterfv: 101 102 TEXTURE_4DSIZE_SGIS 103 104 Accepted by the <pname> parameter of TexParameteriv, TexParameterfv, 105 GetTexParameteriv, and GetTexParameterfv: 106 107 TEXTURE_WRAP_Q_SGIS 108 109 Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, 110 GetFloatv, and GetDoublev: 111 112 MAX_4D_TEXTURE_SIZE_SGIS 113 TEXTURE_4D_BINDING_SGIS 114 115 116 117Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation) 118 119 None 120 121Additions to Chapter 3 of the 1.0 Specification (Rasterization) 122 123 XXX - not written yet. Be sure to handle the null image case. 124 125Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations 126and the Framebuffer) 127 128 None 129 130Additions to Chapter 5 of the 1.0 Specification (Special Functions) 131 132 TexImage4DSGIS with a proxy target is not included in display 133 lists, but is instead executed immediately. 134 135Additions to Chapter 6 of the 1.0 Specification (State and State Requests) 136 137 4-dimensional texture images are queried using GetTexImage with its 138 <target> parameter set to TEXTURE_4D_SGIS. The assignment of texel 139 component values to the initial R, G, B, and A components of a pixel 140 group is described in EXT_texture. Pixel transfer and pixel storage 141 operations are applied as if the image were 3-dimensional, except that 142 the additional pixel storage state values PACK_IMAGE_DEPTH_SGIS and 143 PACK_SKIP_VOLUMES_SGIS affect the storage of the image into memory. The 144 correspondence of texels to memory locations is as defined for 145 TexImage4DSGIS above, substituting PACK* state for UNPACK* state in all 146 occurrences. 147 148Additions to the GLX Specification 149 150 None 151 152GLX Protocol 153 154 A new GL rendering command is added. This command contains pixel data; 155 thus it is sent to the server either as part of a glXRender request 156 or as part of a glXRenderLarge request: 157 158 TexImage4DSGIS 159 2 84+n+p rendering command length 160 2 2057 rendering command opcode 161 1 BOOL swap_bytes 162 1 BOOL lsb_first 163 2 unused 164 4 CARD32 row_length 165 4 CARD32 image_height 166 4 CARD32 image_depth 167 4 CARD32 skip_rows 168 4 CARD32 skip_images 169 4 CARD32 skip_volumes 170 4 CARD32 skip_pixels 171 4 CARD32 alignment 172 4 ENUM target 173 4 INT32 level 174 4 ENUM internalformat 175 4 INT32 width 176 4 INT32 height 177 4 INT32 depth 178 4 INT32 size4d 179 4 INT32 border 180 4 ENUM format 181 4 ENUM type 182 4 CARD32 null_image 183 n LISTofBYTE pixels 184 p unused, p=pad(n) 185 186 If the command is encoded in a glXRenderLarge request, the command 187 opcode and command length fields above are expanded to 4 bytes each: 188 189 4 88+n+p rendering command length 190 4 2057 rendering command opcode 191 192 If <width> < 0, <height> < 0, <depth> < 0, <size4d> < 0, <format> is invalid i 193 or <type> is invalid, then the command is erroneous and n=0. 194 195 <pixels> is arranged as a sequence of adjacent volumes. Each volume is a 196 3-dimensional image, whose structure is determined by the image depth and the 197 parameters <image_height>, <swap_bytes>, <lsb_first>, <row_length>, <skip_rows>, 198 <skip_pixels>, <alignment>, <width>, <format>, and <type> given in the request. 199 If <image_depth> is not positive then the number of images (i.e., the image 200 depth) is <depth>; otherwise the number of images is <image_depth>. 201 202 <skip_volumes> allows a sub-piece of the 4-dimensional image to be selected. 203 If <skip_volumes> is positive, then the pointer is advanced by <skip_volumes> 204 times the number of elements in one 3-dimensional image. Then <size4d> 205 3-dimensional images are read, each having a subimage extracted in the 206 manner described in Appendix A of the GLX Protocol Specification. 207 208 TexSubImage4DSGIS 209 2 88+n+p rendering command length 210 2 2058 rendering command opcode 211 1 BOOL swap_bytes 212 1 BOOL lsb_first 213 2 unused 214 4 CARD32 row_length 215 4 CARD32 image_height 216 4 CARD32 image_depth 217 4 CARD32 skip_rows 218 4 CARD32 skip_images 219 4 CARD32 skip_volumes 220 4 CARD32 skip_pixels 221 4 CARD32 alignment 222 4 ENUM target 223 4 INT32 level 224 4 INT32 xoffset 225 4 INT32 yoffset 226 4 INT32 zoffset 227 4 INT32 woffset 228 4 INT32 width 229 4 INT32 height 230 4 INT32 depth 231 4 INT32 size4d 232 4 ENUM format 233 4 ENUM type 234 4 CARD32 unused 235 n LISTofBYTE image 236 p unused, p=pad(n) 237 238 If the command is encoded in a glXRenderLarge request, the command 239 opcode and command length fields above are expanded to 4 bytes each: 240 241 4 92+n+p rendering command length 242 4 2058 rendering command opcode 243 244 If <width> < 0, <height> < 0, <depth> < 0, <size4d>, <format> is invalid 245 or <type> is invalid, then the command is erroneous and n=0. 246 247 <pixels> is arranged as a sequence of adjacent volumes. Each volume is a 248 3-dimensional image, whose structure is determined by the image height, image 249 depth and the parameters <swap_bytes>, <lsb_first>, <row_length>, <skip_rows>, 250 <skip_pixels>, <alignment>, <width>, <format>, and <type> given in the request. 251 If <image_depth> is not positive then the number of 2Dimages (i.e., the volume 252 depth) is <depth>; otherwise the number of 2Dimages is <image_depth>. 253 254 <skip_volumes> allows a sub-volume of the 4-dimensional image to be selected. 255 If <skip_volumes> is positive, then the pointer is advanced by <skip_volumes> 256 times the number of elements in one 3-dimensional image. Then <size4d> 257 3-dimensional images are read, each having a subimage extracted in the 258 manner described in Appendix A of the GLX Protocol Specification. 259 260Dependencies on EXT_abgr 261 262 If EXT_abgr is supported, the <format> parameter of TexImage4DSGIS 263 accepts ABGR_EXT. Otherwise it does not. 264 265Dependencies on EXT_texture 266 267 EXT_texture is required. All of the <components> tokens defined by 268 EXT_texture are accepted by the <internalformat> parameter of 269 TexImage4DSGIS, with the same semantics that are defined by EXT_texture. 270 271 The query and error extensions defined by EXT_texture are extended in 272 this document. 273 274Dependencies on EXT_texture3D 275 276 EXT_texture3D is required, because the 3-dimensional image support that 277 it defines is used by this extension, and because it doesn't make sense 278 to support 4D textures if 3D textures are not supported. 279 280Dependencies on EXT_subtexture 281 282 If EXT_subtexture is not supported, this extension does not define 283 TexSubImage4DSGIS. All discussion of replacing a subset of the image of 284 an existing 4-dimensional texture is void. 285 286Errors 287 288 INVALID_ENUM is generated if TexImage4DSGIS parameter <target> is not 289 TEXTURE_4D_SGIS. 290 291 INVALID_VALUE is generated if TexImage4DSGIS parameter <level> is less 292 than zero. 293 294 INVALID_ENUM is generated if TexImage4DSGIS parameter <internalformat> is 295 not ALPHA, RGB, RGBA, LUMINANCE, LUMINANCE_ALPHA, or one of the tokens 296 defined by the EXT_texture extension. (Values 1, 2, 3, and 4 are not 297 accepted as internal formats by TexImage4DSGIS). 298 299 INVALID_VALUE is generated if TexImage4DSGIS parameter <width>, <height>, 300 or <depth> is less than zero, or cannot be represented as 301 2**k + 2*border for some integer k. 302 303 INVALID_VALUE is generated if TexImage4DSGIS parameter <border> is not 0 304 or 1. 305 306 INVALID_ENUM is generated if TexImage4DSGIS parameter <format> is not 307 COLOR_INDEX, RED, GREEN, BLUE, ALPHA, RGB, RGBA, LUMINANCE, or 308 LUMINANCE_ALPHA (or ABGR_EXT if EXT_abgr is supported). 309 310 INVALID_ENUM is generated if TexImage4DSGIS parameter <type> is not 311 UNSIGNED_BYTE, BYTE, UNSIGNED_SHORT, SHORT, UNSIGNED_INT, INT, or FLOAT. 312 313 INVALID_OPERATION is generated if TexImage4DSGIS is called between 314 execution of Begin and the corresponding execution of End. 315 316 TEXTURE_TOO_LARGE_SGI is generated if the texture as specified cannot be 317 accommodated by the implementation. This error will not occur if none 318 of <width>, <height>, or <depth> is greater than MAX_4D_TEXTURE_SIZE_SGIS. 319 320 INVALID_ENUM is generated by TexSubImage4DSGIS if its <target> parameter 321 is not TEXTURE_4D_SGIS. 322 323 INVALID_VALUE is generated by TexSubImage4DSGIS if the specified texture 324 array has not been defined by a previous TexImage4DSGIS operation. 325 326 INVALID_VALUE is generated if TexSubImage4DSGIS parameter <level> is not 327 equal to zero. 328 329 INVALID_VALUE is generated if TexSubImage4DSGIS parameter <width>, 330 <height>, <depth>, or <extent> is negative. 331 332 INVALID_VALUE is generated if TexSubImage4DSGIS parameter <xoffset>, 333 <yoffset>, <zoffset>, or <woffset> is less than -TEXTURE_BORDER. 334 335 INVALID_VALUE is generated by TexSubImage4DSGIS if 336 (xoffset + width) > (TEXTURE_WIDTH - TEXTURE_BORDER), or if 337 (yoffset + height) > (TEXTURE_HEIGHT - TEXTURE_BORDER), or if 338 (zoffset + depth) > (TEXTURE_DEPTH_EXT - TEXTURE_BORDER), or if 339 (woffset + extent) > (TEXTURE_4DSIZE_SGIS - TEXTURE_BORDER). 340 341 INVALID_ENUM is generated if TexSubImage4DSGIS parameter <format> is not 342 COLOR_INDEX, RED, GREEN, BLUE, ALPHA, RGB, RGBA, LUMINANCE, or 343 LUMINANCE_ALPHA (or ABGR_EXT if EXT_abgr is supported). 344 345 INVALID_ENUM is generated if TexSubImage4DSGIS parameter <type> is not 346 UNSIGNED_BYTE, BYTE, UNSIGNED_SHORT, SHORT, UNSIGNED_INT, INT, or FLOAT. 347 348 INVALID_OPERATION is generated if TexSubImage4DSGIS is called between 349 execution of Begin and the corresponding execution of End. 350 351New State 352 353 Get Value Get Command Type Initial Value Attribute 354 --------- ----------- ---- ------------- --------- 355 UNPACK_SKIP_VOLUMES_SGIS GetIntegerv Z+ 0 - 356 UNPACK_IMAGE_DEPTH_SGIS GetIntegerv Z+ 0 - 357 PACK_SKIP_VOLUMES_SGIS GetIntegerv Z+ 0 - 358 PACK_IMAGE_DEPTH_SGIS GetIntegerv Z+ 0 - 359 TEXTURE_4D_SGIS IsEnabled B FALSE texture/enable 360 TEXTURE_WRAP_Q_SGIS GetTexParameteriv 1 x Z2 REPEAT texture 361 TEXTURE_4DSIZE_SGIS GetTexLevelParameteriv 1 x 2 x Z+ 0 - 362 363 TEXTURE GetTexImage 4 x 1 x levels x I null - 364 TEXTURE_RED_SIZE_EXT GetTexLevelParameteriv 4 x 2 x levels x Z+ 0 - 365 TEXTURE_GREEN_SIZE_EXT GetTexLevelParameteriv 4 x 2 x levels x Z+ 0 - 366 TEXTURE_BLUE_SIZE_EXT GetTexLevelParameteriv 4 x 2 x levels x Z+ 0 - 367 TEXTURE_ALPHA_SIZE_EXT GetTexLevelParameteriv 4 x 2 x levels x Z+ 0 - 368 TEXTURE_LUMINANCE_SIZE_EXT GetTexLevelParameteriv 4 x 2 x levels x Z+ 0 - 369 TEXTURE_INTENSITY_SIZE_EXT GetTexLevelParameteriv 4 x 2 x levels x Z+ 0 - 370 TEXTURE_WIDTH GetTexLevelParameteriv 4 x 2 x levels x Z+ 0 - 371 TEXTURE_HEIGHT GetTexLevelParameteriv 3 x 2 x levels x Z+ 0 - 372 TEXTURE_DEPTH_EXT GetTexLevelParameteriv 2 x 2 x levels x Z+ 0 - 373 TEXTURE_BORDER GetTexLevelParameteriv 4 x 2 x levels x Z+ 0 - 374 TEXTURE_COMPONENTS (1D and 2D) GetTexLevelParameteriv 2 x 2 x levels x Z42 1 - 375 TEXTURE_COMPONENTS (3D and 4D) GetTexLevelParameteriv 2 x 2 x levels x Z38 LUMINANCE - 376 TEXTURE_BORDER_COLOR GetTexParameteriv 4 x C 0, 0, 0, 0 texture 377 TEXTURE_MIN_FILTER GetTexParameteriv 4 x Z7 NEAREST_MIPMAP_LINEAR texture 378 TEXTURE_MAG_FILTER GetTexParameteriv 4 x Z3 LINEAR texture 379 TEXTURE_WRAP_S GetTexParameteriv 4 x Z2 REPEAT texture 380 TEXTURE_WRAP_T GetTexParameteriv 3 x Z2 REPEAT texture 381 TEXTURE_WRAP_R_EXT GetTexParameteriv 2 x Z2 REPEAT texture 382 383New Implementation Dependent State 384 385 Get Value Get Command Type Minimum Value 386 --------- ----------- ---- ------------- 387 MAX_4D_TEXTURE_SIZE_SGIS GetIntegerv Z+ 16 388