mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-27 16:19:34 +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
8780f83262
commit
25686ed4be
294 changed files with 3894 additions and 2813 deletions
|
|
@ -42,8 +42,8 @@ class GuiCrossHairHud : public GuiBitmapCtrl
|
|||
{
|
||||
typedef GuiBitmapCtrl Parent;
|
||||
|
||||
ColorF mDamageFillColor;
|
||||
ColorF mDamageFrameColor;
|
||||
LinearColorF mDamageFillColor;
|
||||
LinearColorF mDamageFrameColor;
|
||||
Point2I mDamageRectSize;
|
||||
Point2I mDamageOffset;
|
||||
|
||||
|
|
@ -178,7 +178,7 @@ void GuiCrossHairHud::drawDamage(Point2I offset, F32 damage, F32 opacity)
|
|||
rect.point.x -= mDamageRectSize.x / 2;
|
||||
|
||||
// Draw the border
|
||||
GFX->getDrawUtil()->drawRect(rect, mDamageFrameColor);
|
||||
GFX->getDrawUtil()->drawRect(rect, mDamageFrameColor.toColorI());
|
||||
|
||||
// Draw the damage % fill
|
||||
rect.point += Point2I(1, 1);
|
||||
|
|
@ -187,5 +187,5 @@ void GuiCrossHairHud::drawDamage(Point2I offset, F32 damage, F32 opacity)
|
|||
if (rect.extent.x == 1)
|
||||
rect.extent.x = 2;
|
||||
if (rect.extent.x > 0)
|
||||
GFX->getDrawUtil()->drawRectFill(rect, mDamageFillColor);
|
||||
GFX->getDrawUtil()->drawRectFill(rect, mDamageFillColor.toColorI());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue