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

Function SwizzleColor

trinity/TriLineSet.cpp:18–21  ·  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

16// color in ARGB
17// ------------------------------------------------------------------------------------------------------
18inline unsigned SwizzleColor( unsigned color )
19{
20 return ( ( color & 0xff0000 ) >> 16 ) | ( color & 0xff00ff00 ) | ( ( color & 0xff ) << 16 );
21}
22
23TriLineSet::TriLineSet( IRoot* lockobj ) :
24 m_defaultColor( 0xffffffff ),

Callers 3

AddDefaultColorMethod · 0.70
AddMethod · 0.70
SetCurrentColorMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected