Why is GL_MAX_ARRAY_TEXTURE_LAYERS much smaller than GL_MAX_TEXTURE_SIZE?

Viewed 373

For texture sizes greater than GL_MAX_ARRAY_TEXTURE_LAYERS, I have to use an array of single textures instead of one texture array. No problem for me. I'm just wondering whats the reason behind making GL_MAX_ARRAY_TEXTURE_LAYERS so much smaller than GL_MAX_TEXTURE_SIZE?

edit: this can be deleted

1 Answers

For texture sizes greater than GL_MAX_ARRAY_TEXTURE_LAYERS

I believe you have mis-understood what this limitation means. This is not like GL_MAX_3D_TEXTURE_SIZE, which is a limitation on all axes of a 3D texture. It is a limitation on the number of array elements in a 2D array texture. When you call glTexImage3D/TexStorage3D, the limitation applies to the depth parameter only, not the "size".

The width/height limit is still governed by GL_MAX_TEXTURE_SIZE.

Related