I am actually surprised that the OpenGL Docs say that this is possible, since it doesn't give any information on how to actually call glGetTexImage for a cubemap texture array. Is this actually possible?
It looks like glGetTextureSubImage is built for this, but that is unfortunately not supported in OpenGL 4.3, which I'm using. Surely there most be a way to achieve this that's not such a recent addition to the API.
I am actually surprised that the OpenGL Docs say that this is possible
It does not say that. You can retrieve a mipmap level from a cubemap array, just like you can for a 2D array, or a 3D texture. But this means getting all faces of every layer for that mipmap level, just as it does for 2D arrays and 3D textures.
If you want only one face from only one layer (which you can do for a non-array cubemap by using one of the face targets), then you will need to isolate this layer/face from the cubemap array. Specifically, you need to create a 2D view texture of the cubemap array that includes only that layer/face. You can perform glGetTexImage
from that.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.