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

Function GetAstcBlockSize

engine/dlib/src/dlib/image.cpp:176–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174 }
175
176 bool GetAstcBlockSize(const void* mem, uint32_t memsize, uint32_t* width, uint32_t* height, uint32_t* depth)
177 {
178 if (!IsAstc(mem, memsize))
179 return false;
180
181 AstcHeader* header = (AstcHeader*)mem;
182 *width = header->m_BlockSizes[0];
183 *height = header->m_BlockSizes[1];
184 *depth = header->m_BlockSizes[2];
185 return true;
186 }
187
188 bool GetAstcDimensions(const void* mem, uint32_t memsize, uint32_t* width, uint32_t* height, uint32_t* depth)
189 {

Callers 3

TESTFunction · 0.50
Image_GetAstcHeaderFunction · 0.50
GetAstcTextureFormatFunction · 0.50

Calls 1

IsAstcFunction · 0.85

Tested by 1

TESTFunction · 0.40