Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: glCopyImageSubData issue

Threaded View

  1. #1
    Newbie Newbie
    Join Date
    Jan 2013
    Posts
    2

    glCopyImageSubData issue

    Hello, everyone!

    I've experienced a problem with glCopyImageSubData. I try to copy a compressed DXT1 2D texture array to another compressed DXT1 2D texture array with the same dimensionality. All mip levels copied except the two smallest (1x1 and 2x2) - they stay unchanged (in the destination texture) after copying.
    Why does it happen?

    Code :
    for (int level = 0; level < levelCount; ++ level)
    {
        int mipWidth  = GetTextureMipWidth(srcTex, level);
        int mipHeight = GetTextureMipHeight(srcTex, level);
     
        glCopyImageSubData(srcTex, GL_TEXTURE_2D_ARRAY, level, 0, 0, 0, dstTex, GL_TEXTURE_2D_ARRAY, level, 0, 0, 0, mipWidth, mipHeight, arraySize);
     
        glBindTexture(GL_TEXTURE_2D_ARRAY, dstTex);
        glGetCompressedTexImage(GL_TEXTURE_2D_ARRAY, level, dstData);
        glBindTexture(GL_TEXTURE_2D_ARRAY, 0);
    }

    Thanks
    Last edited by mode89; 01-15-2013 at 09:54 AM.

Posting Permissions

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