I found a similar post concerning what I am about to ask. I’m just not certain I fully understood the response.
In this thread it was said we should treat the cube map as a 2D texture array with exactly 6 layers. I’m looking at the documentation for glTextureSubImage2D but it doesn’t seem to mention anything about layers. Should I treat level as the layer in this situation? If that is the case then how do you set up mips for the cube map?
[QUOTE=CornyKorn21;1280275]
In this thread it was said we should treat the cube map as a 2D texture array with exactly 6 layers. I’m looking at the documentation for glTextureSubImage2D but it doesn’t seem to mention anything about layers.[/QUOTE]
If you read the thread a bit more closely, you’ll find that you should be looking at the documentation for glTextureSubImage3D. Array textures have an extra dimension.
The documentation fails to list GL_TEXTURE_CUBE_MAP as a valid target (which is discussed in the latter part of that thread), but it is. When the texture is a cube map, zoffset and depth indicate the first face to modify and the number of faces respectively.