MCPcopy Create free account
hub / github.com/axmolengine/axmol / testFormatForPvr3TCSupport

Function testFormatForPvr3TCSupport

core/platform/Image.cpp:543–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541}
542
543bool testFormatForPvr3TCSupport(PVR3TexturePixelFormat format)
544{
545 switch (format)
546 {
547 case PVR3TexturePixelFormat::ETC2_RGBA:
548 case PVR3TexturePixelFormat::ETC2_RGB:
549 return Configuration::getInstance()->supportsETC2();
550 case PVR3TexturePixelFormat::DXT1:
551 case PVR3TexturePixelFormat::DXT3:
552 case PVR3TexturePixelFormat::DXT5:
553 return Configuration::getInstance()->supportsS3TC();
554
555 case PVR3TexturePixelFormat::BGRA8888:
556 return Configuration::getInstance()->supportsBGRA8888();
557
558 case PVR3TexturePixelFormat::PVRTC2BPP_RGB:
559 case PVR3TexturePixelFormat::PVRTC2BPP_RGBA:
560 case PVR3TexturePixelFormat::PVRTC4BPP_RGB:
561 case PVR3TexturePixelFormat::PVRTC4BPP_RGBA:
562 case PVR3TexturePixelFormat::ETC1:
563 case PVR3TexturePixelFormat::RGBA8888:
564 case PVR3TexturePixelFormat::RGBA4444:
565 case PVR3TexturePixelFormat::RGBA5551:
566 case PVR3TexturePixelFormat::RGB565:
567 case PVR3TexturePixelFormat::RGB888:
568 case PVR3TexturePixelFormat::A8:
569 case PVR3TexturePixelFormat::L8:
570 case PVR3TexturePixelFormat::LA88:
571 return true;
572
573 case PVR3TexturePixelFormat::ASTC_4x4:
574 case PVR3TexturePixelFormat::ASTC_5x4:
575 case PVR3TexturePixelFormat::ASTC_5x5:
576 case PVR3TexturePixelFormat::ASTC_6x5:
577 case PVR3TexturePixelFormat::ASTC_6x6:
578 case PVR3TexturePixelFormat::ASTC_8x5:
579 case PVR3TexturePixelFormat::ASTC_8x6:
580 case PVR3TexturePixelFormat::ASTC_8x8:
581 case PVR3TexturePixelFormat::ASTC_10x5:
582 case PVR3TexturePixelFormat::ASTC_10x6:
583 case PVR3TexturePixelFormat::ASTC_10x8:
584 case PVR3TexturePixelFormat::ASTC_10x10:
585 case PVR3TexturePixelFormat::ASTC_12x10:
586 case PVR3TexturePixelFormat::ASTC_12x12:
587 return true;
588
589 default:
590 return false;
591 }
592}
593} // namespace
594
595namespace

Callers 1

initWithPVRv3DataMethod · 0.85

Calls 4

getInstanceFunction · 0.85
supportsETC2Method · 0.80
supportsS3TCMethod · 0.80
supportsBGRA8888Method · 0.80

Tested by

no test coverage detected