Irbis
Irbis

Reputation: 1491

GL_TEXTURE_3D - mipmaps dimensions

When I load a GL_TEXTURE_2D (512x256) mipmaps are defined this way:

I can load all mipmaps manually using glTexImage2D. How mipmaps are defined for GL_TEXTURE_3D, for example (512 x 256 x 4) ?

Upvotes: 2

Views: 137

Answers (1)

Nicol Bolas
Nicol Bolas

Reputation: 473322

They are defined in exactly the same way as a 2D texture: take each dimension and divide by 2 (rounded down), and keep going until all dimensions are 1.

Upvotes: 4

Related Questions