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

Function DstFormat

engine/PoseidonGL33/TextureGL33_Init.cpp:49–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49static PacFormat DstFormat(PacFormat srcFormat, int dxt)
50{
51 switch (srcFormat)
52 {
53 case PacARGB1555:
54 case PacRGB565:
55 case PacARGB4444:
56 return srcFormat;
57 case PacP8:
58 return PacARGB1555;
59 case PacAI88:
60 if (static_cast<EngineGL33*>(GEngine)->Can88())
61 return srcFormat;
62 if (static_cast<EngineGL33*>(GEngine)->Can8888())
63 return PacARGB8888;
64 return PacARGB4444;
65 case PacDXT1:
66 if (static_cast<EngineGL33*>(GEngine)->CanDXT(1))
67 return srcFormat;
68 return PacARGB1555;
69 default:
70 LOG_DEBUG(Graphics, "Unsupported source format {}", (int)srcFormat);
71 return srcFormat;
72 }
73}
74
75void InitGLPixelFormat(TextureDescGL33& desc, PacFormat format, bool enableDXT)
76{

Callers 1

DoLoadHeadersMethod · 0.70

Calls 3

Can88Method · 0.80
Can8888Method · 0.80
CanDXTMethod · 0.80

Tested by

no test coverage detected