Bladeren bron

clean up more texture profile refs to kill spam

AzaezelX 3 jaren geleden
bovenliggende
commit
0dcd272b87

+ 1 - 1
Engine/source/gui/buttons/guiIconButtonCtrl.h

@@ -42,7 +42,7 @@ private:
 
 protected:
 
-   DECLARE_IMAGEASSET(GuiIconButtonCtrl, Bitmap, onImageChanged, GFXTexturePersistentSRGBProfile);
+   DECLARE_IMAGEASSET(GuiIconButtonCtrl, Bitmap, onImageChanged, GFXDefaultGUIProfile);
    DECLARE_ASSET_SETGET(GuiIconButtonCtrl, Bitmap);
 
    S32               mIconLocation;

+ 3 - 3
Engine/source/gui/buttons/guiToolboxButtonCtrl.h

@@ -39,11 +39,11 @@ private:
 
 protected:
 
-   DECLARE_IMAGEASSET(GuiToolboxButtonCtrl, NormalBitmap, onNormalImageChanged, GFXTexturePersistentSRGBProfile);
+   DECLARE_IMAGEASSET(GuiToolboxButtonCtrl, NormalBitmap, onNormalImageChanged, GFXDefaultGUIProfile);
    DECLARE_ASSET_SETGET(GuiToolboxButtonCtrl, NormalBitmap);
-   DECLARE_IMAGEASSET(GuiToolboxButtonCtrl, LoweredBitmap, onLoweredImageChanged, GFXTexturePersistentSRGBProfile);
+   DECLARE_IMAGEASSET(GuiToolboxButtonCtrl, LoweredBitmap, onLoweredImageChanged, GFXDefaultGUIProfile);
    DECLARE_ASSET_SETGET(GuiToolboxButtonCtrl, LoweredBitmap);
-   DECLARE_IMAGEASSET(GuiToolboxButtonCtrl, HoverBitmap, onHoverImageChanged, GFXTexturePersistentSRGBProfile);
+   DECLARE_IMAGEASSET(GuiToolboxButtonCtrl, HoverBitmap, onHoverImageChanged, GFXDefaultGUIProfile);
    DECLARE_ASSET_SETGET(GuiToolboxButtonCtrl, HoverBitmap);
 
    void renderButton(GFXTexHandle &texture, Point2I &offset, const RectI& updateRect);

+ 1 - 1
Engine/source/gui/controls/guiTreeViewCtrl.cpp

@@ -1880,7 +1880,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, &GFXTexturePersistentProfile, avar( "%s() - mIconTable[%d] (line %d)", __FUNCTION__, numIcons, __LINE__ ) );
+         mIconTable[ numIcons ] = GFXTexHandle( buf, &GFXDefaultGUIProfile, avar( "%s() - mIconTable[%d] (line %d)", __FUNCTION__, numIcons, __LINE__ ) );
       }
       else
          mIconTable[ numIcons ] = GFXTexHandle();

+ 1 - 1
Engine/source/gui/core/guiTypes.cpp

@@ -68,7 +68,7 @@ GFX_ImplementTextureProfile(GFXGuiCursorProfile,
 GFX_ImplementTextureProfile(GFXDefaultGUIProfile,
                             GFXTextureProfile::DiffuseMap, 
                             GFXTextureProfile::PreserveSize |
-                            GFXTextureProfile::Static | GFXTextureProfile::SRGB |
+                            GFXTextureProfile::Static | GFXTextureProfile::KeepBitmap | GFXTextureProfile::SRGB |
                             GFXTextureProfile::NoPadding, 
                             GFXTextureProfile::NONE);
 

+ 1 - 1
Engine/source/gui/core/guiTypes.h

@@ -455,7 +455,7 @@ public:
    StringTableEntry mBitmapName; 
    StringTableEntry mBitmapAssetId; 
    AssetPtr<ImageAsset>  mBitmapAsset; 
-   GFXTextureProfile* mBitmapProfile = &GFXTexturePersistentSRGBProfile; 
+   GFXTextureProfile* mBitmapProfile = &GFXDefaultGUIProfile;
 public: 
    const StringTableEntry getBitmapFile() const { return mBitmapName; }
    void setBitmapFile(const FileName& _in) { mBitmapName = StringTable->insert(_in.c_str()); }

+ 3 - 3
Engine/source/gui/worldEditor/editorIconRegistry.cpp

@@ -25,7 +25,7 @@
 
 #include "console/engineAPI.h"
 #include "console/simBase.h"
-
+#include "gui/core/guiTypes.h"
 
 EditorIconRegistry gEditorIcons;
 
@@ -60,7 +60,7 @@ void EditorIconRegistry::loadFromPath( const String &path, bool overwrite )
    String defaultIconFile = path + "default";
 
    mDefaultIcon.set( defaultIconFile,
-                     &GFXTexturePersistentSRGBProfile,
+                     &GFXDefaultGUIProfile,
                      avar("%s() - mIcons[] (line %d)", 
                      __FUNCTION__, __LINE__) );
 }
@@ -68,7 +68,7 @@ void EditorIconRegistry::loadFromPath( const String &path, bool overwrite )
 void EditorIconRegistry::add( const String &className, const String &imageFile, bool overwrite )
 {
    // First see if we can load the image.
-   GFXTexHandle icon(   imageFile, &GFXTexturePersistentSRGBProfile,
+   GFXTexHandle icon(   imageFile, &GFXDefaultGUIProfile,
                         avar("%s() - mIcons[] (line %d)", __FUNCTION__, __LINE__) );
    if ( icon.isNull() )
       return;

+ 1 - 1
Engine/source/gui/worldEditor/guiMissionArea.h

@@ -63,7 +63,7 @@ protected:
    GFXStateBlockRef  mBlendStateBlock;
    GFXStateBlockRef  mSolidStateBlock;
 
-   DECLARE_IMAGEASSET(GuiMissionAreaCtrl, HandleBitmap, onHandleBitmapChanged, GFXTexturePersistentSRGBProfile);
+   DECLARE_IMAGEASSET(GuiMissionAreaCtrl, HandleBitmap, onHandleBitmapChanged, GFXDefaultGUIProfile);
    DECLARE_ASSET_SETGET(GuiMissionAreaCtrl, HandleBitmap);
 
    Point2I           mHandleTextureSize;