Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ glteximage4dext(3G) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought



glTexImage4DSGIS(3G)           OpenGL Reference           glTexImage4DSGIS(3G)



NAME
     glTexImage4DSGIS - specify a four-dimensional texture image


C SPECIFICATION
     void glTexImage4DSGIS( GLenum target,
                            GLint level,
                            GLenum internalformat,
                            GLsizei width,
                            GLsizei height,
                            GLsizei depth,
                            GLsizei size4d,
                            GLint border,
                            GLenum format,
                            GLenum type,
                            const GLvoid *pixels )


PARAMETERS
     target          Specifies the target texture.  Must be GLTEXTURE4DSGIS
                     or GLPROXYTEXTURE4DSGIS.

     level           Specifies the level-of-detail number.  Level 0 is the
                     base image level.  Level n is the nth mipmap reduction
                     image.

     internalformat  Specifies the internal storage format of the texture
                     image.  it must be one of the following symbolic
                     constants:  GLALPHA, GLALPHA4EXT, GLALPHA8EXT,
                     GLALPHA12EXT, GLALPHA16EXT, GLLUMINANCE,
                     GLLUMINANCE4EXT, GLLUMINANCE8EXT, GLLUMINANCE12EXT,
                     GLLUMINANCE16EXT, GLLUMINANCEALPHA,
                     GLLUMINANCE4ALPHA4EXT, GLLUMINANCE6ALPHA2EXT,
                     GLLUMINANCE8ALPHA8EXT, GLLUMINANCE12ALPHA4EXT,
                     GLLUMINANCE12ALPHA12EXT, GLLUMINANCE16ALPHA16EXT,
                     GLINTENSITYEXT, GLINTENSITY4EXT, GLINTENSITY8EXT,
                     GLINTENSITY12EXT, GLINTENSITY16EXT, GLRGB,
                     GLRGB2EXT, GLRGB4EXT, GLRGB5EXT, GLRGB8EXT,
                     GLRGB10EXT, GLRGB12EXT, GLRGB16EXT, GLRGBA,
                     GLRGBA2EXT, GLRGBA4EXT, GLRGB5A1EXT, GLRGBA8EXT,
                     GLRGB10A2EXT, GLRGBA12EXT, GLRGBA16EXT,
                     GLDUALALPHA4SGIS, GLDUALALPHA8SGIS,
                     GLDUALALPHA12SGIS, GLDUALALPHA16SGIS,
                     GLDUALLUMINANCE4SGIS, GLDUALLUMINANCE8SGIS,
                     GLDUALLUMINANCE12SGIS, GLDUALLUMINANCE16SGIS,
                     GLDUALINTENSITY4SGIS, GLDUALINTENSITY8SGIS,
                     GLDUALINTENSITY12SGIS, GLDUALINTENSITY16SGIS,
                     GLDUALLUMINANCEALPHA4SGIS,
                     GLDUALLUMINANCEALPHA8SGIS, GLQUADALPHA4SGIS,
                     GLQUADALPHA8SGIS, GLQUADLUMINANCE4SGIS,
                     GLQUADLUMINANCE8SGIS, GLQUADINTENSITY4SGIS, or
                     GLQUADINTENSITY8SGIS.



                                                                        Page 1





glTexImage4DSGIS(3G)           OpenGL Reference           glTexImage4DSGIS(3G)



     width           Specifies the width of the texture image.  Must be
                     2**n+2*border for some integer n.

     height          Specifies the height of the texture image.  Must be
                     2**m+I*border for some integer m, where I is 2 when
                     GLINTERLACESGIX is disabled, and 1 otherwise.

     depth           Specifies the depth of the texture image.  Must be
                     2**l+2*border for some integer l.

     size4d          Specifies the extent (4th dimension size) of the texture
                     image.  Must be 2**k+2*border for some integer l.

     border          Specifies the width of the border.  Must be either 0 or
                     1.

     format          Specifies the format of the pixel data.  The following
                     symbolic values are accepted:  GLCOLORINDEX, GLRED,
                     GLGREEN, GLBLUE, GLALPHA, GLRGB, GLRGBA,
                     GLABGREXT, GLLUMINANCE, and GLLUMINANCEALPHA.

     type            Specifies the data type of the pixel data.  The following
                     symbolic values are accepted:  GLUNSIGNEDBYTE, GLBYTE,
                     GLUNSIGNEDSHORT, GLSHORT, GLUNSIGNEDINT, GLINT,
                     GLFLOAT, GLUNSIGNEDBYTE332EXT,
                     GLUNSIGNEDSHORT4444EXT,
                     GLUNSIGNEDSHORT5551EXT,
                     GLUNSIGNEDINT8888EXT, and
                     GLUNSIGNEDINT1010102EXT.

     pixels          Specifies a pointer to the image data in memory.


DESCRIPTION
     Texturing maps a portion of a specified texture image onto each graphical
     primitive for which texturing is enabled.  Four-dimensional texturing is
     enabled and disabled using glEnable and glDisable with argument
     GLTEXTURE4DSGIS.

     Texture images are defined with glTexImage4DSGIS. The arguments describe
     the parameters of the texture image, such as height, width, depth, extent
     (the 4th dimension size), width of the border, level-of-detail number
     (see glTexParameter), and the internal resolution and format used to
     store the image.  The last four arguments describe the way the image is
     represented in memory, and they are identical to the pixel formats used
     for glDrawPixels.

     If target is GLPROXYTEXTURE4DSGIS no data is read from pixels,  but
     all of the texture image state is recalculated, checked for consistency,
     and checked against the implementation's capabilities.  If the
     implementation cannot handle a texture of the requested texture size, it
     will set all of the texture image state to 0 (GLTEXTUREWIDTH,



                                                                        Page 2





glTexImage4DSGIS(3G)           OpenGL Reference           glTexImage4DSGIS(3G)



     GLTEXTUREHEIGHT, GLTEXTUREBORDER, GLTEXTURECOMPONENTS,
     GLTEXTUREREDSIZEEXT, GLTEXTUREGREENSIZEEXT,
     GLTEXTUREBLUESIZEEXT, GLTEXTUREALPHASIZEEXT,
     GLTEXTURELUMINANCESIZEEXT, and GLTEXTUREINTENSITYSIZEEXT), but no
     error will be generated.

     If target is GLTEXTURE4DSGIS, data is read from pixels as a sequence
     of signed or unsigned bytes, shorts, or longs, or single-precision
     floating-point values, depending on type. These values are grouped into
     sets of one, two, three, or four values, depending on format, to form
     elements.  (Note that if type is set to GLUNSIGNEDBYTE332EXT,
     GLUNSIGNEDSHORT4444EXT, GLUNSIGNEDSHORT5551EXT,
     GLUNSIGNEDINT8888EXT, or GLUNSIGNEDINT1010102EXT then it is
     a special case in which all the elements of each group are packed into a
     single unsigned byte, unsigned short, or unsigned int. This is described
     in glDrawPixels.)

     Four-dimensional images consist of multiple (perhaps 1) 3D volumes of
     image data into a "hypervolume". The size in the 4th dimension can be
     called the "extent" of the hypervolume. Analogous to 3D volumes whose
     depth ranges from "rear" to "front", the extent of a hypervolume can be
     said to range from "near" to "far".

     With this in mind, the first element corresponds to the lower-left-rear-
     near corner of the texture hypervolume.  Subsequent elements progress
     left-to-right through the remaining texels in the lowest-rear-near row of
     the texture hypervolume, then in successively higher rows of the rear-
     near 2D slice of the texture hypervolume, then in successively frontal 2D
     slices and farther 3D volumes of the texture hypervolume.  The final
     element corresponds to the upper-right-front-far corner of the texture
     hypervolume.

     When GLINTERLACESGIX is enabled, only rows (0,2,4,...) of each S-T
     slice (where the border is considered part of the slice) are defined.
     Rows (1,3,5,...) are left undefined and can only be defined using
     glTexSubImage4DSGIS.  Note, that when GLINTERLACESGIX is enabled the
     total height (i.e., the height of interior texture image plus twice the
     border) of the defined texture is 2*height.

     Each element of pixels is converted to an RGBA element according to
     format, as detailed below.  Except for GLCOLORINDEX, after the
     conversion to RGBA, each component is multiplied by the signed scale
     factor GLcSCALE, added to the signed bias GLcBIAS, and clamped to the
     range [0,1], where c is RED, GREEN, BLUE, or ALPHA, respectively (see
     glPixelTransfer).

     According to format, the conversion to RGBA is as follows:

     GLCOLORINDEX
               Each element is a single value, a color index. It is converted
               to fixed point (with an unspecified number of zero bits to the
               right of the binary point), shifted left or right depending on



                                                                        Page 3





glTexImage4DSGIS(3G)           OpenGL Reference           glTexImage4DSGIS(3G)



               the value and sign of GLINDEXSHIFT, and added to
               GLINDEXOFFSET (see glPixelTransfer). The resulting index is
               converted to a set of color components using the
               GLPIXELMAPITOR, GLPIXELMAPITOG, GLPIXELMAPITOB,
               and GLPIXELMAPITOA tables, and clamped to the range [0,1].

     GLRED    Each element is a single red component. It is converted to
               floating point and assembled into an RGBA element by attaching
               0.0 for green and blue, and 1.0 for alpha.

     GLGREEN  Each element is a single green component. It is converted to
               floating point and assembled into an RGBA element by attaching
               0.0 for red and blue, and 1.0 for alpha.

     GLBLUE   Each element is a single blue component. It is converted to
               floating point and assembled into an RGBA element by attaching
               0.0 for red and green, and 1.0 for alpha.

     GLALPHA  Each element is a single alpha component. It is converted to
               floating point and assembled into an RGBA element by attaching
               0.0 for red, green, and blue.

     GLRGB    Each element is an RGB triple.  It is converted to floating
               point and assembled into an RGBA element by attaching 1.0 for
               alpha.  (see  glPixelTransfer).

     GLRGBA,

     GLABGREXT
               Each element contains all four components; for GLRGBA, the red
               component is first, followed by green, then blue, and then
               alpha; for GLABGREXT the order is alpha, blue, green, and
               then red.

     GLLUMINANCE
               Each element is a single luminance value.  It is converted to
               floating point, then assembled into an RGBA element by
               replicating the luminance value three times for red, green, and
               blue and attaching 1.0 for alpha.

     GLLUMINANCEALPHA
               Each element is a luminance/alpha pair.  It is converted to
               floating point, then assembled into an RGBA element by
               replicating the luminance value three times for red, green, and
               blue.

     Please refer to the glDrawPixels reference page for a description of the
     acceptable values for the type parameter.

     An application may desire that the texture be stored at a certain
     resolution, or that it be stored in a certain format. This resolution and
     format can be requested by internalformat, but the implementation may not



                                                                        Page 4





glTexImage4DSGIS(3G)           OpenGL Reference           glTexImage4DSGIS(3G)



     support that resolution (The formats of GLLUMINANCE, GLLUMINANCEALPHA,
     GLRGB, and GLRGBA must be supported.)  When a resolution and storage
     format is specified, the implementation will update the texture state to
     provide the best match to the requested resolution. The
     GLPROXYTEXTURE4DSGIS target can be used to try a resolution and
     format.  The implementation will compute its best match for the requested
     storage resolution and format; this state can then be queried using
     glGetTexLevelParameter.

     A one-component texture image uses only the red component of the RGBA
     color extracted from pixels. A two-component image uses the R and A
     values.  A three-component image uses the R, G, and B values.  A four-
     component image uses all of the RGBA components.

     The mapping of components from the canonical RGBA to the internal storage
     formats that begin with GLDUAL and GLQUAD needs to be clarified.
     There are three cases.  The first case is for the GLDUAL formats that
     are groups of GLALPHA, GLLUMINANCE, and GLINTENSITY.  The R value goes
     to the first group while the A value goes to the second group.  The
     second case is for the GLDUAL formats that are groups of
     GLLUMINANCEALPHA.  The R and G values go to the first group while the B
     and A values go to the second group.  The third case is for the GLQUAD
     formats.  The R value goes to the first group, the G value to the second
     group, the B value to the third group, and the A value to the fourth
     group.

NOTES
     Texturing has no effect in color index mode.

     The texture image can be represented by the same data formats and types
     as the pixels in a glDrawPixels command, except that formats
     GLSTENCILINDEX and GLDEPTHCOMPONENT cannot be used, and type
     GLBITMAP cannot be used.  glPixelStore and glPixelTransfer modes affect
     texture images in exactly the way they affect glDrawPixels.

     A texture image with zero height, width, depth, or extent indicates the
     null texture.  If the null texture is specified for level-of-detail 0, it
     is as if texturing were disabled.

     glTexImage4DSGIS is part of the EXTtexture3d extension.

     If type is set to GLUNSIGNEDBYTE332EXT,
     GLUNSIGNEDSHORT4444EXT, GLUNSIGNEDSHORT5551EXT,
     GLUNSIGNEDINT8888EXT, or GLUNSIGNEDINT1010102EXT and the
     EXTpackedpixels extension is not supported then a GLINVALIDENUM error
     is generated.

     See glIntro for more information on using extensions.







                                                                        Page 5





glTexImage4DSGIS(3G)           OpenGL Reference           glTexImage4DSGIS(3G)



ERRORS
     GLINVALIDENUM is generated when target is not an accepted value.

     GLINVALIDENUM is generated when format is not an accepted value.

     GLINVALIDENUM is generated when type is not an accepted value.

     GLINVALIDVALUE is generated if level is less than zero or greater than
     log (max), where max is the returned value of
        2
     GLMAX4DTEXTURESIZESGIS.

     GLINVALIDVALUE is generated if internalformat is not an accepted value.

     GLINVALIDVALUE is generated if width, height, depth, or size4d is less
     than zero or greater than GLMAX4DTEXTURESIZESGIS, when width, depth,
     or size4d cannot be represented as 2**k+2*border for some integer k, or
     when height cannot be represented as 2**k+I*border, where I is 2 when
     GLINTERLACESGIX is disabled and 1 otherwise.

     GLINVALIDVALUE is generated if border is not 0 or 1.

     GLINVALIDOPERATION is generated if glTexImage4DSGIS is executed between
     the execution of glBegin and the corresponding execution of glEnd.

     GLINVALIDVALUE is generated if the implementation cannot accomodate a
     texture of the size requested.

ASSOCIATED GETS
     glGetTexImage
     glIsEnabled with argument GLTEXTURE4DSGIS
     glGetTexLevelParameter with a first argument of GLPROXYTEXTURE4DSGIS
     and a third argument of GLTEXTUREREDSIZEEXT,
     GLTEXTUREGREENSIZEEXT, GLTEXTUREBLUESIZEEXT,
     GLTEXTUREALPHASIZEEXT, GLTEXTURELUMINANCESIZEEXT,
     GLTEXTUREINTENSITYSIZEEXT, GLTEXTUREWIDTH, GLTEXTUREHEIGHT,
     GLTEXTUREDEPTHEXT, GLTEXTUREBORDER, or GLTEXTURECOMPONENTS.



MACHINE DEPENDENCIES
     The EXTpackedpixels extension is not supported on RealityEngine,
     RealityEngine2, and VTX systems.

     On High Impact and Maximum Impact systems the number of bits per
     component, represented internally, is the same for all components and
     will be 4, 8, or 12 bits per component. All specified internal formats
     will receive an equal or greater representation in this scheme, up to the
     12-bit limit.  High Impact and Maximum Impact on Indigo2 systems do not
     support texture internal formats of the type GLINTENSITY or GLALPHA,
     although High Impact and Maximum Impact on Octane systems do support
     these types.




                                                                        Page 6





glTexImage4DSGIS(3G)           OpenGL Reference           glTexImage4DSGIS(3G)



     High Impact and Maximum Impact on Indigo2 systems without the TRAM option
     card support 4 bits per component for GLRGB and GLRGBA, 4/8 bits per
     component for GLLUMINANCEALPHA, and 4/8/12 bits per component for
     GLLUMINANCE.

     4D texture mapping is supported only on High Impact and Maximum Impact
     systems, but only for the SGIXpixeltexture extension (see
     glPixelTexGenSGIX).  Standard texture-mapping of triangles and other
     primitives is not supported.


SEE ALSO
     glDrawPixels, glFog, glPixelStore, glPixelTransfer, glTexEnv, glTexGen,
     glTexImage1D, glTexImage2D, glTexParameter,









































                                                                        Page 7


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026