Hey guys. I’m working on doing a cube map that changes each frame.
Unfortunately, when I copy the newly rendered images to the cube map, they come out being on the wrong faces and with the wrong orientations! How is this possible? I cut and paste the code from my cube map creation, replacing the copyTexImage2d with a copyTexSubImage2d, but now the textures seem to end up in the wrong places.
The cube map is correct the first time, upon creation, so if I leave it alone it accurately reflects the first environment.
It’s also interesting to note that if I put the gentextures and teximage2d calls back in when I update the cube map, it changes correctly (before it quickly runs out of memory from creating new textures each frame).
Anyone have any idea what might be going on here?
Things I have checked include:
Texture Matrix - identity each time
Texture target - Same each time GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB + i