MCPcopy Create free account
hub / github.com/defold/defold / IsTextureFormatCompressed

Function IsTextureFormatCompressed

engine/graphics/src/graphics.cpp:890–908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

888 }
889
890 bool IsTextureFormatCompressed(dmGraphics::TextureFormat format)
891 {
892 switch(format)
893 {
894 case dmGraphics::TEXTURE_FORMAT_RGB_PVRTC_4BPPV1:
895 case dmGraphics::TEXTURE_FORMAT_RGBA_PVRTC_4BPPV1:
896 case dmGraphics::TEXTURE_FORMAT_RGB_ETC1:
897 case dmGraphics::TEXTURE_FORMAT_RGBA_ETC2:
898 case dmGraphics::TEXTURE_FORMAT_RGB_BC1:
899 case dmGraphics::TEXTURE_FORMAT_RGBA_BC3:
900 case dmGraphics::TEXTURE_FORMAT_R_BC4:
901 case dmGraphics::TEXTURE_FORMAT_RG_BC5:
902 case dmGraphics::TEXTURE_FORMAT_RGBA_BC7:
903 return true;
904 default:
905 // Lastly check if it's one of the ASTC formats
906 return IsTextureFormatASTC(format);
907 }
908 }
909
910 static bool IsFormatRGBA(dmGraphics::TextureFormat format)
911 {

Callers 2

OpenGLSetTextureFunction · 0.85
WebGPUSetTextureInternalFunction · 0.85

Calls 1

IsTextureFormatASTCFunction · 0.85

Tested by

no test coverage detected