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



Reply With Quote