MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / FixFlags

Function FixFlags

Engine/lib/squish/squish.cpp:37–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35namespace squish {
36
37static int FixFlags( int flags )
38{
39 // grab the flag bits
40 int method = flags & ( kDxt1 | kDxt3 | kDxt5 | kBc4 | kBc5 );
41 int fit = flags & ( kColourIterativeClusterFit | kColourClusterFit | kColourRangeFit );
42 int extra = flags & kWeightColourByAlpha;
43
44 // set defaults
45 if ( method != kDxt3
46 && method != kDxt5
47 && method != kBc4
48 && method != kBc5 )
49 {
50 method = kDxt1;
51 }
52 if( fit != kColourRangeFit && fit != kColourIterativeClusterFit )
53 fit = kColourClusterFit;
54
55 // done
56 return method | fit | extra;
57}
58
59void CompressMasked( u8 const* rgba, int mask, void* block, int flags, float* metric )
60{

Callers 5

CompressMaskedFunction · 0.85
DecompressFunction · 0.85
GetStorageRequirementsFunction · 0.85
CompressImageFunction · 0.85
DecompressImageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected