Support Forum G3D Web Page |
Represents a Color3 as a packed integer.
More...
Public Member Functions | |
Color3unorm8 () | |
Color3unorm8 (const unorm8 _r, const unorm8 _g, const unorm8 _b) | |
Color3unorm8 (const class Color3 &c) | |
Color3unorm8 (class BinaryInput &bi) | |
uint32 | asUInt32 () const |
Returns the color packed into a uint32 (the upper byte is 0xFF) More... | |
Color3unorm8 | bgr () const |
void | deserialize (class BinaryInput &bi) |
Color3unorm8 | max (const Color3unorm8 x) const |
Color3unorm8 | min (const Color3unorm8 x) const |
operator const unorm8 * () const | |
operator unorm8 * () | |
bool | operator!= (const Color3unorm8 other) const |
bool | operator== (const Color3unorm8 other) const |
unorm8 & | operator[] (int i) const |
void | serialize (class BinaryOutput &bo) const |
Static Public Member Functions | |
static Color3unorm8 | fromARGB (uint32 i) |
static Color3unorm8 | one () |
static Color3unorm8 | zero () |
Public Attributes | |
unorm8 | b |
unorm8 | g |
unorm8 | r |
Represents a Color3 as a packed integer.
Convenient for creating unsigned int vertex arrays. Used by G3D::GImage as the underlying format.
WARNING: Integer color formats are different than integer vertex formats. The color channels are automatically scaled by 255 (because OpenGL automatically scales integer colors back by this factor). So Color3(1,1,1) == Color3unorm8(255,255,255) but Vector3(1,1,1) == Vector3int16(1,1,1).
|
inline |
|
explicit |
|
explicit |
|
inline |
Returns the color packed into a uint32 (the upper byte is 0xFF)
|
inline |
void G3D::Color3unorm8::deserialize | ( | class BinaryInput & | bi | ) |
|
inlinestatic |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void G3D::Color3unorm8::serialize | ( | class BinaryOutput & | bo | ) | const |
|
inlinestatic |
unorm8 G3D::Color3unorm8::b |
Referenced by fromARGB(), max(), min(), and operator==().
unorm8 G3D::Color3unorm8::g |
Referenced by fromARGB(), max(), min(), and operator==().
unorm8 G3D::Color3unorm8::r |
Referenced by fromARGB(), max(), min(), and operator==().