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

Function IsTextureFormatSupportedForType

engine/graphics/src/graphics.cpp:749–759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

747 }
748
749 bool IsTextureFormatSupportedForType(HContext context, TextureType type, TextureFormat format)
750 {
751 if ((type == TEXTURE_TYPE_2D_ARRAY || type == TEXTURE_TYPE_3D) && IsTextureFormatASTC(format))
752 {
753 if (!IsContextFeatureSupported(context, CONTEXT_FEATURE_ASTC_ARRAY_TEXTURES))
754 {
755 return false;
756 }
757 }
758 return IsTextureFormatSupported(context, format);
759 }
760
761 // For estimating resource size
762 uint32_t GetTextureFormatBitsPerPixel(TextureFormat format)

Callers 3

CreateImageFunction · 0.85
SetTextureFunction · 0.85

Calls 3

IsTextureFormatASTCFunction · 0.85
IsTextureFormatSupportedFunction · 0.70

Tested by

no test coverage detected