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:
Areloch 2017-06-23 11:36:20 -05:00
parent 8943c673fb
commit 0801a3cca8
294 changed files with 3894 additions and 2813 deletions

View file

@ -1871,7 +1871,7 @@ bool GuiTreeViewCtrl::buildIconTable(const char * icons)
dStrncpy( buf, start, getMin( sizeof( buf ) / sizeof( buf[ 0 ] ) - 1, len ) );
buf[ len ] = '\0';
mIconTable[ numIcons ] = GFXTexHandle( buf, &GFXDefaultPersistentProfile, avar( "%s() - mIconTable[%d] (line %d)", __FUNCTION__, numIcons, __LINE__ ) );
mIconTable[ numIcons ] = GFXTexHandle( buf, &GFXTexturePersistentProfile, avar( "%s() - mIconTable[%d] (line %d)", __FUNCTION__, numIcons, __LINE__ ) );
}
else
mIconTable[ numIcons ] = GFXTexHandle();
@ -3942,7 +3942,7 @@ void GuiTreeViewCtrl::onRender(Point2I offset, const RectI &updateRect)
if (mDragMidPoint == NomDragMidPoint || !mSupportMouseDragging )
return;
ColorF greyLine(0.5,0.5,0.5,1);
ColorI greyLine(128,128,128);
Point2F squarePt;
// CodeReview: LineWidth is not supported in Direct3D. This is lame. [5/10/2007 Pat]
@ -4257,7 +4257,6 @@ bool GuiTreeViewCtrl::renderTooltip( const Point2I &hoverPos, const Point2I& cur
{
Item* item;
BitSet32 flags = 0;
char buf[ 2048 ];
if( _hitTest( cursorPos, item, flags ) && (!item->mTooltip.isEmpty() || mUseInspectorTooltips) )
{
bool render = true;
@ -4302,6 +4301,7 @@ bool GuiTreeViewCtrl::renderTooltip( const Point2I &hoverPos, const Point2I& cur
{
if( mUseInspectorTooltips )
{
char buf[2048];
item->getTooltipText( sizeof( buf ), buf );
tipText = buf;
}