mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-09 20:58:31 +09:00
[Feat] (MG_State/TextureState|MG_Impl/Texture): Add hasData mark for MipmapLevelInternal.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user