next up previous contents
Next: 6.19.1.1 3D Textures vs. Up: 6.19 3D Textures Previous: 6.19 3D Textures

6.19.1 Using 3D Textures

In OpenGL, 3D textures have much in common with 2D and 1D textures. Texture parameters and texture environment calls are the same, using the GL_TEXTURE_3D_EXT (GL_TEXTURE_3D in OpenGL 1.2) target in place of GL_TEXTURE_2D or GL_TEXTURE_1D.

Internal and external formats and types are the same, although a particular OpenGL implementation may limit the availability of 3D texture formats.

3D textures need to be accessed with s, t, and r texture coordinates instead of just s and t. The additional texture coordinate complexity, combined with the common uses for 3D textures, means texture coordinate generation is used more commonly for 3D textures than for 2D and 1D.

3D texture maps take up a large amount of texture memory, and are expensive to change dynamically. This can affect multipass algorithms that require multiple passes with different textures.

The texture matrix operates on 3D texture coordinates in the same way that it does for 2D and 1D textures. A 3D texture volume can be translated, rotated, scaled, or have other transforms applied to it. Applying a transformation to the texture matrix is a convenient and high performance way to manipulate a 3D texture when it is too expensive to alter the texel values directly.



 
next up previous contents
Next: 6.19.1.1 3D Textures vs. Up: 6.19 3D Textures Previous: 6.19 3D Textures
David Blythe
1999-08-06