[Feat] (MG_Impl/Texture): Decouple texture internal format and input format

This commit is contained in:
2025-12-15 14:16:36 +08:00
parent 02a2f4af4a
commit b220c8baab
7 changed files with 77 additions and 42 deletions
@@ -43,12 +43,10 @@ namespace MobileGL::MG_Util::PixelStoreProcessor {
}
}
void* ProcessTexturePixelsDataUnpack(const void* inputPixels, const PixelStoreParameters& params, SizeT pixelSize,
void* ProcessTexturePixelsDataUnpack(const void* inputPixels, const PixelStoreParameters& params,
TextureInternalFormat targetInternalFormat, TextureInputFormat textureInputFormat, TexturePixelDataType inputDataType,
IntVec3 dimension, Bool isBitmap, SizeT& outSize) {
if (pixelSize == 0) {
outSize = 0;
return nullptr;
}
const SizeT pixelSize = MG_Util::GetInputBytesPerPixel(textureInputFormat, inputDataType);
Int width = dimension.x();
Int height = dimension.y();