mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-27 08:09:31 +00:00
Implementation of sRGB image support. Overhauls the linearization setup to utilize the sRGB image types, as well as refactors the use of ColorF and ColorI to be properly internally consistent. ColorIs are used only for front-facing/editing/UI settings, and ColorFs, now renamed to LinearColorF to reduce confusion of purpose, are used for color info in the engine itself. This avoids confusing and expensive conversions back and forth between types and avoids botches with linearity. Majority work done by @rextimmy
This commit is contained in:
parent
8943c673fb
commit
0801a3cca8
294 changed files with 3894 additions and 2813 deletions
|
|
@ -45,9 +45,9 @@ class GuiHealthBarHud : public GuiControl
|
|||
bool mDisplayEnergy;
|
||||
bool mFlip;
|
||||
|
||||
ColorF mFillColor;
|
||||
ColorF mFrameColor;
|
||||
ColorF mDamageFillColor;
|
||||
LinearColorF mFillColor;
|
||||
LinearColorF mFrameColor;
|
||||
LinearColorF mDamageFillColor;
|
||||
|
||||
S32 mPulseRate;
|
||||
F32 mPulseThreshold;
|
||||
|
|
@ -163,7 +163,7 @@ void GuiHealthBarHud::onRender(Point2I offset, const RectI &updateRect)
|
|||
|
||||
// Background first
|
||||
if (mShowFill)
|
||||
GFX->getDrawUtil()->drawRectFill(updateRect, mFillColor);
|
||||
GFX->getDrawUtil()->drawRectFill(updateRect, mFillColor.toColorI());
|
||||
|
||||
// Pulse the damage fill if it's below the threshold
|
||||
if (mPulseRate != 0)
|
||||
|
|
@ -196,9 +196,9 @@ void GuiHealthBarHud::onRender(Point2I offset, const RectI &updateRect)
|
|||
else
|
||||
rect.point.y = bottomY - rect.extent.y;
|
||||
}
|
||||
GFX->getDrawUtil()->drawRectFill(rect, mDamageFillColor);
|
||||
GFX->getDrawUtil()->drawRectFill(rect, mDamageFillColor.toColorI());
|
||||
|
||||
// Border last
|
||||
if (mShowFrame)
|
||||
GFX->getDrawUtil()->drawRect(updateRect, mFrameColor);
|
||||
GFX->getDrawUtil()->drawRect(updateRect, mFrameColor.toColorI());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue