MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / MipmapSizeGL33

Function MipmapSizeGL33

engine/PoseidonGL33/TextureGL33_Init.cpp:21–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19#include <glad/gl.h>
20
21int MipmapSizeGL33(PacFormat format, int w, int h)
22{
23 switch (format)
24 {
25 case PacDXT1:
26 return ((w + 3) / 4) * ((h + 3) / 4) * 8;
27 case PacDXT2:
28 case PacDXT3:
29 case PacDXT4:
30 case PacDXT5:
31 return ((w + 3) / 4) * ((h + 3) / 4) * 16;
32 case PacARGB8888:
33 return w * h * 4;
34 default:
35 return w * h * 2; // 16-bit formats
36 }
37}
38
39static PacFormat BasicFormat(const char* name)
40{

Callers 3

AUTO_STATIC_ARRAYFunction · 0.85
TotalSizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected