[Fix] (MG_Backend/DirectGLES): fix bad texture binding in CopyTexImage2D

This commit is contained in:
2026-01-08 14:07:51 +08:00
parent d7139894da
commit 39182f3a5e
2 changed files with 49 additions and 1 deletions
@@ -679,6 +679,9 @@ namespace MobileGL {
const SizeT internalBpp = MG_Util::GetInternalBytesPerPixel(textureInternalFormat, texturePixelDataType);
const SizeT internalBytes = width * height * internalBpp;
MGLOG_D("%s: texture object had internal format %s, new format %s", __func__,
MG_Util::ConvertTextureInternalFormatToString(textureObject->GetFormat()).c_str(),
MG_Util::ConvertTextureInternalFormatToString(textureInternalFormat).c_str());
textureObject->SetInternalFormat(textureInternalFormat);
// if isProxy, no more pixel transfer needed below