2004-05-29 13:56:24 -07:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Name: Color.h
|
|
|
|
|
// Author: Rich Cross
|
|
|
|
|
// Contact: rich@wildfiregames.com
|
|
|
|
|
//
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#ifndef _COLOR_H
|
|
|
|
|
#define _COLOR_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.
|
2005-10-02 20:41:42 -07:00
|
|
|
extern u32 (*ConvertRGBColorTo4ub)(const RGBColor& src);
|
|
|
|
|
|
2006-04-13 23:32:05 -07:00
|
|
|
// call once ia32_init has run; detects CPU caps and activates the best
|
|
|
|
|
// possible codepath.
|
|
|
|
|
extern void ColorActivateFastImpl();
|
|
|
|
|
|
2004-05-29 13:56:24 -07:00
|
|
|
#endif
|