mirror of https://github.com/axmolengine/axmol.git
ETC2 Metal support
This commit is contained in:
parent
b12068e1c8
commit
258dfc5b4a
|
@ -199,7 +199,7 @@ namespace
|
||||||
{
|
{
|
||||||
bytesPerRow = 0;
|
bytesPerRow = 0;
|
||||||
}
|
}
|
||||||
else if (textureFormat == PixelFormat::ETC)
|
else if (textureFormat == PixelFormat::ETC || textureFormat == PixelFormat::ETC2_RGBA || textureFormat == PixelFormat::ETC2_RGB)
|
||||||
{
|
{
|
||||||
bytesPerRow = getBytesPerRowETC(pixelFormat, width);
|
bytesPerRow = getBytesPerRowETC(pixelFormat, width);
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,7 +122,10 @@ MTLPixelFormat Utils::toMTLPixelFormat(PixelFormat textureFormat)
|
||||||
case PixelFormat::PVRTC2:
|
case PixelFormat::PVRTC2:
|
||||||
return MTLPixelFormatPVRTC_RGB_2BPP;
|
return MTLPixelFormatPVRTC_RGB_2BPP;
|
||||||
case PixelFormat::ETC:
|
case PixelFormat::ETC:
|
||||||
|
case PixelFormat::ETC2_RGB:
|
||||||
return MTLPixelFormatETC2_RGB8;
|
return MTLPixelFormatETC2_RGB8;
|
||||||
|
case PixelFormat::ETC2_RGBA:
|
||||||
|
return MTLPixelFormatEAC_RGBA8;
|
||||||
case PixelFormat::ASTC4:
|
case PixelFormat::ASTC4:
|
||||||
return MTLPixelFormatASTC_4x4_LDR;
|
return MTLPixelFormatASTC_4x4_LDR;
|
||||||
case PixelFormat::ASTC8:
|
case PixelFormat::ASTC8:
|
||||||
|
|
Loading…
Reference in New Issue