March 2013
Intermediate to advanced
984 pages
26h 18m
English
A 3D texture can be thought of as a volume of texels arranged in a 3D grid. To create a 3D texture, generate a texture object name and bind it initially to the GL_TEXTURE_3D target. Once bound, you may use glTexStorage3D() or glTexImage3D() to create the storage for the texture object. The 3D texture has not only a width and a height but also a depth. The maximum width and height of a 3D texture is the same as that of a 2D texture and may be found by retrieving the value of GL_MAX_TEXTURE_SIZE. The maximum depth of a 3D texture supported by your OpenGL implementation is found by retrieving the value of GL_MAX_3D_TEXTURE_SIZE, and this may be different than the maximum width and height of the texture.
3D textures are read in shaders ...