[Feat] (MG_State/TextureState|MG_Impl/Texture): Add hasData mark for MipmapLevelInternal.

This commit is contained in:
BZLZHH
2025-11-15 23:17:01 +08:00
parent 8b39e3c8a9
commit 784b53344c
2 changed files with 8 additions and 5 deletions
@@ -200,12 +200,14 @@ namespace MobileGL {
struct MipmapLevelInternal : MipmapLevelBase {
Data data;
Bool dirty = true;
Bool hasData = false;
MipmapLevelInternal(const MipmapLevelInput& input) : MipmapLevelBase(input) {
data.resize(input.inputData.size);
data.resize(input.inputData.size, 0);
if (input.inputData.data && input.inputData.size > 0) {
const Uint8* src = static_cast<const Uint8*>(input.inputData.data);
Memcpy(data.data(), src, input.inputData.size);
hasData = true;
}
}
};