Browse Source

Fixed & improved comments regarding integer colors in Color & Image classes.

Lasse Öörni 11 years ago
parent
commit
b69682217d
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Source/Engine/Math/Color.h
  2. 1 1
      Source/Engine/Resource/Image.h

+ 1 - 1
Source/Engine/Math/Color.h

@@ -114,7 +114,7 @@ public:
     /// Return float data.
     /// Return float data.
     const float* Data() const { return &r_; }
     const float* Data() const { return &r_; }
 
 
-    /// Return color packed to a 32-bit integer. Components are clamped to [0, 1] range.
+    /// Return color packed to a 32-bit integer, with R component in the lowest 8 bits. Components are clamped to [0, 1] range.
     unsigned ToUInt() const;
     unsigned ToUInt() const;
     /// Return HSL color-space representation as a Vector3; the RGB values are clipped before conversion but not changed in the process.
     /// Return HSL color-space representation as a Vector3; the RGB values are clipped before conversion but not changed in the process.
     Vector3 ToHSL() const;
     Vector3 ToHSL() const;

+ 1 - 1
Source/Engine/Resource/Image.h

@@ -113,7 +113,7 @@ public:
     void SetPixel(int x, int y, int z, const Color& color);
     void SetPixel(int x, int y, int z, const Color& color);
     /// Set a 2D pixel with an integer color. R component is in the 8 lowest bits.
     /// Set a 2D pixel with an integer color. R component is in the 8 lowest bits.
     void SetPixelInt(int x, int y, unsigned uintColor);
     void SetPixelInt(int x, int y, unsigned uintColor);
-    /// Set a 2D pixel with an integer color. R component is in the 8 lowest bits.
+    /// Set a 3D pixel with an integer color. R component is in the 8 lowest bits.
     void SetPixelInt(int x, int y, int z, unsigned uintColor);
     void SetPixelInt(int x, int y, int z, unsigned uintColor);
     /// Load as color LUT. Return true if successful.
     /// Load as color LUT. Return true if successful.
     bool LoadColorLUT(Deserializer& source);
     bool LoadColorLUT(Deserializer& source);