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

Function ColorToVec4

trinity/Tr2Renderer.cpp:610–617  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

608}
609
610Vector4 ColorToVec4( uint32_t color )
611{
612 uint8_t r = ( color >> 16 ) & 0xffu;
613 uint8_t g = ( color >> 8 ) & 0xffu;
614 uint8_t b = ( color >> 0 ) & 0xffu;
615 uint8_t a = ( color >> 24 ) & 0xffu;
616 return Vector4( r, g, b, a ) / 255.0f;
617}
618
619void Tr2Renderer::Printf( int x, int y, uint32_t color, const char* msg, ... )
620{

Callers 4

PrintfMethod · 0.85
PrintfImmediateMethod · 0.85
ExecuteMethod · 0.85
PrintfMethod · 0.85

Calls 1

Vector4Class · 0.50

Tested by

no test coverage detected