MCPcopy Create free account
hub / github.com/carbonengine/trinity / SwizzleColor

Function SwizzleColor

trinity/Tr2CurveLineSet.cpp:162–165  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------------ Description: Helper function to convert RGBA color to BGRA. Attributes: color - color in RGBA format Return value: color in ARGB ------------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

160// color in ARGB
161// ------------------------------------------------------------------------------------------------------
162inline unsigned SwizzleColor( unsigned color )
163{
164 return ( ( color & 0xff0000 ) >> 16 ) | ( color & 0xff00ff00 ) | ( ( color & 0xff ) << 16 );
165}
166
167// ------------------------------------------------------------------------------------------------------
168// Description:

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected