2007-05-07 09:33:24 -07:00
|
|
|
/**
|
|
|
|
|
* =========================================================================
|
|
|
|
|
* File : Color.h
|
|
|
|
|
* Project : 0 A.D.
|
|
|
|
|
* Description : Convert float RGB(A) colors to unsigned byte
|
|
|
|
|
* =========================================================================
|
|
|
|
|
*/
|
2004-05-29 13:56:24 -07:00
|
|
|
|
2007-05-07 09:33:24 -07:00
|
|
|
#ifndef INCLUDED_COLOR
|
|
|
|
|
#define INCLUDED_COLOR
|
2004-05-29 13:56:24 -07:00
|
|
|
|
2008-06-30 12:08:29 -07:00
|
|
|
#include "SColor.h"
|
2006-06-01 19:10:27 -07:00
|
|
|
#include "maths/Vector3D.h"
|
|
|
|
|
#include "maths/Vector4D.h"
|
2004-05-29 13:56:24 -07:00
|
|
|
|
2006-02-13 06:18:20 -08:00
|
|
|
// simple defines for 3 and 4 component floating point colors - just map to
|
2004-05-29 13:56:24 -07:00
|
|
|
// corresponding vector types
|
|
|
|
|
typedef CVector3D RGBColor;
|
|
|
|
|
typedef CVector4D RGBAColor;
|
|
|
|
|
|
2006-04-13 23:32:05 -07:00
|
|
|
// exposed as function pointer because it is set at init-time to
|
|
|
|
|
// one of several implementations depending on CPU caps.
|
2008-06-30 12:08:29 -07:00
|
|
|
extern SColor4ub (*ConvertRGBColorTo4ub)(const RGBColor& src);
|
2005-10-02 20:41:42 -07:00
|
|
|
|
2007-05-02 05:07:08 -07:00
|
|
|
// call once ia32_Init has run; detects CPU caps and activates the best
|
2006-04-13 23:32:05 -07:00
|
|
|
// possible codepath.
|
|
|
|
|
extern void ColorActivateFastImpl();
|
|
|
|
|
|
2004-05-29 13:56:24 -07:00
|
|
|
#endif
|