mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
Merge branch 'alpha40vertcolorCorrection' of https://github.com/Azaezel/Torque3D into Preview4_0
This commit is contained in:
commit
210009e498
|
|
@ -40,6 +40,7 @@ public:
|
|||
|
||||
GFXVertexColor() : mPackedColorData( 0xFFFFFFFF ) {} // White with full alpha
|
||||
GFXVertexColor( const ColorI &color ) { set( color ); }
|
||||
GFXVertexColor( const LinearColorF &color) { set(color); }
|
||||
|
||||
void set( U8 red, U8 green, U8 blue, U8 alpha = 255 )
|
||||
{
|
||||
|
|
@ -57,7 +58,15 @@ public:
|
|||
mDeviceSwizzle->InPlace(&mPackedColorData, sizeof(mPackedColorData));
|
||||
}
|
||||
|
||||
void set(const LinearColorF &color)
|
||||
{
|
||||
mPackedColorData = color.getRGBAPack();
|
||||
mDeviceSwizzle->InPlace(&mPackedColorData, sizeof(mPackedColorData));
|
||||
}
|
||||
|
||||
GFXVertexColor &operator=( const ColorI &color ) { set( color ); return *this; }
|
||||
GFXVertexColor &operator=( const LinearColorF &color ) { set(color); return *this; }
|
||||
|
||||
operator const U32 *() const { return &mPackedColorData; }
|
||||
const U32& getPackedColorData() const { return mPackedColorData; }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue