Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Kill off cube map face targets already

  1. #1
    Senior Member OpenGL Lord
    Join Date
    May 2009

    Kill off cube map face targets already

    It's terrible how we have to use these 2D cube map face targets to upload cube map texture images, but only for non-array cubemaps. If you've got a cube map array with an array length of 1, you get to treat it just like an array texture of 6 layers. This is nice, neat and simple; you use glTex*3D with them, and you can upload/download an entire mipmap level all at once.

    Of course, because it's a different texture type, it has a different sampler and a different set of texture coordinates. So it's high time that this nonsense was put to bed.

    The most effective way to do this is to simply do what modern texturing APIs do with cube maps. glCopyImageSubData considered GL_TEXTURE_CUBE_MAP to be no different from a 1-element CUBE_MAP_ARRAY. So does glInvalidateTexSubImage​.

    Since we're not going to get another round of deprecation+removal ever again, the best solution is to simply allow glTexImage3D, glTexSubImage3D, glCompressedTexImage3D, glCompressedTexSubImage3D, glCopyTexSubImage3D, and glGetTexImage to take GL_TEXTURE_CUBE_MAP. They will treat it in the same way they do CUBE_MAP_ARRAYs, just with one layer of 6 faces.

    This would break no existing code, nor would it have an adverse effect on existing code. It would simply make it possible to completely avoid using those silly face targets ever again.

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Dec 2007
    . +1
    Disclaimer: This is my personal profile. Whatever I write here is my personal opinion and none of my statements or speculations are anyhow related to my employer and as such should not be treated as accurate or valid and in no case should those be considered to represent the opinions of my employer.
    Technical Blog:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts