[Feat] (MG_Backend/DirectGLES): implement glCopyTexImage2D/CopyTexSubImage2D

This commit is contained in:
2025-11-16 12:44:41 +08:00
parent 131c9a2db6
commit 95e086442c
8 changed files with 188 additions and 8 deletions
@@ -0,0 +1,32 @@
#include "TextureEnumClassifier.h"
namespace MobileGL {
namespace MG_Util {
bool IsDepthFormatInternalFormat(TextureInternalFormat internalformat) {
switch (internalformat) {
case TextureInternalFormat::DepthComponent16:
case TextureInternalFormat::DepthComponent24:
case TextureInternalFormat::DepthComponent32:
case TextureInternalFormat::DepthComponent32F:
case TextureInternalFormat::Depth24Stencil8:
case TextureInternalFormat::Depth32FStencil8:
case TextureInternalFormat::DepthComponent:
case TextureInternalFormat::DepthStencil:
return true;
default:
return false;
}
}
bool IsStencilFormatInternalFormat(TextureInternalFormat internalformat) {
switch (internalformat) {
case TextureInternalFormat::Depth24Stencil8:
case TextureInternalFormat::Depth32FStencil8:
case TextureInternalFormat::DepthStencil:
return true;
default:
return false;
}
}
} // namespace MG_Util
} // namespace MobileGL
@@ -0,0 +1,10 @@
#pragma once
#include <Includes.h>
#include <MG_State/GLState/TextureState/TextureObject.h>
namespace MobileGL {
namespace MG_Util {
bool IsDepthFormatInternalFormat(TextureInternalFormat internalformat);
bool IsStencilFormatInternalFormat(TextureInternalFormat internalformat);
} // namespace MG_Util
} // namespace MobileGL