2
0
Marko Pintera 13 жил өмнө
parent
commit
ea8e4aafbb

+ 1 - 1
CamelotRenderer/CamelotRenderer.cpp

@@ -5,7 +5,7 @@
 
 #include <string>
 
-#include "CmColourValue.h"
+#include "CmColor.h"
 #include "CmMath.h"
 #include "CmMatrix3.h"
 #include "CmMatrix4.h"

+ 1 - 1
CamelotRenderer/CmApplication.cpp

@@ -213,7 +213,7 @@ namespace CamelotEngine
 		Matrix4 viewProjMatrix = projMatrixCstm * viewMatrixCstm;
 
 		renderSystem->setInvertVertexWinding(true);
-		renderSystem->clearFrameBuffer(FBT_COLOUR | FBT_DEPTH, ColourValue::Blue);
+		renderSystem->clearFrameBuffer(FBT_COLOUR | FBT_DEPTH, Color::Blue);
 		renderSystem->_beginFrame();
 
 		mVertProg->getDefaultParameters()->setNamedConstant("matViewProjection", viewProjMatrix);

+ 3 - 3
CamelotRenderer/CmBlendMode.h

@@ -29,7 +29,7 @@ THE SOFTWARE.
 #define __BLENDMODE_H__
 
 #include "CmPrerequisites.h"
-#include "CmColourValue.h"
+#include "CmColor.h"
 
 namespace CamelotEngine {
 	/** \addtogroup Core
@@ -149,9 +149,9 @@ namespace CamelotEngine {
         LayerBlendSource source2;
 
         /// Manual colour value for manual source1
-        ColourValue colourArg1;
+        Color colourArg1;
         /// Manual colour value for manual source2
-        ColourValue colourArg2;
+        Color colourArg2;
         /// Manual alpha value for manual source1
         float alphaArg1;
         /// Manual alpha value for manual source2

+ 27 - 27
CamelotRenderer/CmColourValue.cpp

@@ -26,23 +26,23 @@ THE SOFTWARE.
 -----------------------------------------------------------------------------
 */
 
-#include "CmColourValue.h"
+#include "CmColor.h"
 #include "CmMath.h"
 
 namespace CamelotEngine {
 
-    const ColourValue ColourValue::ZERO = ColourValue(0.0,0.0,0.0,0.0);
-    const ColourValue ColourValue::Black = ColourValue(0.0,0.0,0.0);
-    const ColourValue ColourValue::White = ColourValue(1.0,1.0,1.0);
-    const ColourValue ColourValue::Red = ColourValue(1.0,0.0,0.0);
-    const ColourValue ColourValue::Green = ColourValue(0.0,1.0,0.0);
-    const ColourValue ColourValue::Blue = ColourValue(0.0,0.0,1.0);
+    const Color Color::ZERO = Color(0.0,0.0,0.0,0.0);
+    const Color Color::Black = Color(0.0,0.0,0.0);
+    const Color Color::White = Color(1.0,1.0,1.0);
+    const Color Color::Red = Color(1.0,0.0,0.0);
+    const Color Color::Green = Color(0.0,1.0,0.0);
+    const Color Color::Blue = Color(0.0,0.0,1.0);
 
     //---------------------------------------------------------------------
 #if OGRE_ENDIAN == OGRE_ENDIAN_BIG
-    ABGR ColourValue::getAsABGR(void) const
+    ABGR Color::getAsABGR(void) const
 #else
-    RGBA ColourValue::getAsRGBA(void) const
+    RGBA Color::getAsRGBA(void) const
 #endif
     {
         UINT8 val8;
@@ -71,9 +71,9 @@ namespace CamelotEngine {
     }
     //---------------------------------------------------------------------
 #if OGRE_ENDIAN == OGRE_ENDIAN_BIG
-    BGRA ColourValue::getAsBGRA(void) const
+    BGRA Color::getAsBGRA(void) const
 #else
-    ARGB ColourValue::getAsARGB(void) const
+    ARGB Color::getAsARGB(void) const
 #endif
     {
         UINT8 val8;
@@ -103,9 +103,9 @@ namespace CamelotEngine {
     }
 	//---------------------------------------------------------------------
 #if OGRE_ENDIAN == OGRE_ENDIAN_BIG
-	ARGB ColourValue::getAsARGB(void) const
+	ARGB Color::getAsARGB(void) const
 #else
-	BGRA ColourValue::getAsBGRA(void) const
+	BGRA Color::getAsBGRA(void) const
 #endif
 	{
 		UINT8 val8;
@@ -135,9 +135,9 @@ namespace CamelotEngine {
 	}
     //---------------------------------------------------------------------
 #if OGRE_ENDIAN == OGRE_ENDIAN_BIG
-    RGBA ColourValue::getAsRGBA(void) const
+    RGBA Color::getAsRGBA(void) const
 #else
-    ABGR ColourValue::getAsABGR(void) const
+    ABGR Color::getAsABGR(void) const
 #endif
     {
         UINT8 val8;
@@ -167,9 +167,9 @@ namespace CamelotEngine {
     }
     //---------------------------------------------------------------------
 #if OGRE_ENDIAN == OGRE_ENDIAN_BIG
-    void ColourValue::setAsABGR(const ABGR val)
+    void Color::setAsABGR(const ABGR val)
 #else
-    void ColourValue::setAsRGBA(const RGBA val)
+    void Color::setAsRGBA(const RGBA val)
 #endif
     {
         UINT32 val32 = val;
@@ -191,9 +191,9 @@ namespace CamelotEngine {
     }
     //---------------------------------------------------------------------
 #if OGRE_ENDIAN == OGRE_ENDIAN_BIG
-    void ColourValue::setAsBGRA(const BGRA val)
+    void Color::setAsBGRA(const BGRA val)
 #else
-    void ColourValue::setAsARGB(const ARGB val)
+    void Color::setAsARGB(const ARGB val)
 #endif
     {
         UINT32 val32 = val;
@@ -215,9 +215,9 @@ namespace CamelotEngine {
     }
 	//---------------------------------------------------------------------
 #if OGRE_ENDIAN == OGRE_ENDIAN_BIG
-	void ColourValue::setAsARGB(const ARGB val)
+	void Color::setAsARGB(const ARGB val)
 #else
-	void ColourValue::setAsBGRA(const BGRA val)
+	void Color::setAsBGRA(const BGRA val)
 #endif
 	{
 		UINT32 val32 = val;
@@ -239,9 +239,9 @@ namespace CamelotEngine {
 	}
     //---------------------------------------------------------------------
 #if OGRE_ENDIAN == OGRE_ENDIAN_BIG
-    void ColourValue::setAsRGBA(const RGBA val)
+    void Color::setAsRGBA(const RGBA val)
 #else
-    void ColourValue::setAsABGR(const ABGR val)
+    void Color::setAsABGR(const ABGR val)
 #endif
     {
         UINT32 val32 = val;
@@ -262,7 +262,7 @@ namespace CamelotEngine {
         r = (val32 & 0xFF) / 255.0f;
     }
     //---------------------------------------------------------------------
-    bool ColourValue::operator==(const ColourValue& rhs) const
+    bool Color::operator==(const Color& rhs) const
     {
         return (r == rhs.r &&
             g == rhs.g &&
@@ -270,12 +270,12 @@ namespace CamelotEngine {
             a == rhs.a);
     }
     //---------------------------------------------------------------------
-    bool ColourValue::operator!=(const ColourValue& rhs) const
+    bool Color::operator!=(const Color& rhs) const
     {
         return !(*this == rhs);
     }
 	//---------------------------------------------------------------------
-	void ColourValue::setHSB(float hue, float saturation, float brightness)
+	void Color::setHSB(float hue, float saturation, float brightness)
 	{
 		// wrap hue
 		if (hue > 1.0f)
@@ -362,7 +362,7 @@ namespace CamelotEngine {
 
 	}
 	//---------------------------------------------------------------------
-	void ColourValue::getHSB(float* hue, float* saturation, float* brightness) const
+	void Color::getHSB(float* hue, float* saturation, float* brightness) const
 	{
 
 		float vMin = std::min(r, std::min(g, b));

+ 32 - 32
CamelotRenderer/CmColourValue.h

@@ -54,24 +54,24 @@ namespace CamelotEngine {
 		    transparency. In this case, 0.0 is completely transparent and 1.0 is
 		    fully opaque.
     */
-    class CM_EXPORT ColourValue
+    class CM_EXPORT Color
     {
     public:
-        static const ColourValue ZERO;
-        static const ColourValue Black;
-        static const ColourValue White;
-        static const ColourValue Red;
-        static const ColourValue Green;
-        static const ColourValue Blue;
-
-	    explicit ColourValue( float red = 1.0f,
+        static const Color ZERO;
+        static const Color Black;
+        static const Color White;
+        static const Color Red;
+        static const Color Green;
+        static const Color Blue;
+
+	    explicit Color( float red = 1.0f,
 				    float green = 1.0f,
 				    float blue = 1.0f,
 				    float alpha = 1.0f ) : r(red), g(green), b(blue), a(alpha)
         { }
 
-	    bool operator==(const ColourValue& rhs) const;
-	    bool operator!=(const ColourValue& rhs) const;
+	    bool operator==(const Color& rhs) const;
+	    bool operator!=(const Color& rhs) const;
 
         float r,g,b,a;
 
@@ -133,9 +133,9 @@ namespace CamelotEngine {
 
         /** As saturate, except that this colour value is unaffected and
             the saturated colour value is returned as a copy. */
-        ColourValue saturateCopy(void) const
+        Color saturateCopy(void) const
         {
-            ColourValue ret = *this;
+            Color ret = *this;
             ret.saturate();
             return ret;
         }
@@ -169,9 +169,9 @@ namespace CamelotEngine {
 
 		
 		// arithmetic operations
-        inline ColourValue operator + ( const ColourValue& rkVector ) const
+        inline Color operator + ( const Color& rkVector ) const
         {
-            ColourValue kSum;
+            Color kSum;
 
             kSum.r = r + rkVector.r;
             kSum.g = g + rkVector.g;
@@ -181,9 +181,9 @@ namespace CamelotEngine {
             return kSum;
         }
 
-        inline ColourValue operator - ( const ColourValue& rkVector ) const
+        inline Color operator - ( const Color& rkVector ) const
         {
-            ColourValue kDiff;
+            Color kDiff;
 
             kDiff.r = r - rkVector.r;
             kDiff.g = g - rkVector.g;
@@ -193,9 +193,9 @@ namespace CamelotEngine {
             return kDiff;
         }
 
-        inline ColourValue operator * (const float fScalar ) const
+        inline Color operator * (const float fScalar ) const
         {
-            ColourValue kProd;
+            Color kProd;
 
             kProd.r = fScalar*r;
             kProd.g = fScalar*g;
@@ -205,9 +205,9 @@ namespace CamelotEngine {
             return kProd;
         }
 
-        inline ColourValue operator * ( const ColourValue& rhs) const
+        inline Color operator * ( const Color& rhs) const
         {
-            ColourValue kProd;
+            Color kProd;
 
             kProd.r = rhs.r * r;
             kProd.g = rhs.g * g;
@@ -217,9 +217,9 @@ namespace CamelotEngine {
             return kProd;
         }
 
-        inline ColourValue operator / ( const ColourValue& rhs) const
+        inline Color operator / ( const Color& rhs) const
         {
-            ColourValue kProd;
+            Color kProd;
 
             kProd.r = rhs.r / r;
             kProd.g = rhs.g / g;
@@ -229,11 +229,11 @@ namespace CamelotEngine {
             return kProd;
         }
 
-        inline ColourValue operator / (const float fScalar ) const
+        inline Color operator / (const float fScalar ) const
         {
             assert( fScalar != 0.0 );
 
-            ColourValue kDiv;
+            Color kDiv;
 
             float fInv = 1.0f / fScalar;
             kDiv.r = r * fInv;
@@ -244,9 +244,9 @@ namespace CamelotEngine {
             return kDiv;
         }
 
-        inline friend ColourValue operator * (const float fScalar, const ColourValue& rkVector )
+        inline friend Color operator * (const float fScalar, const Color& rkVector )
         {
-            ColourValue kProd;
+            Color kProd;
 
             kProd.r = fScalar * rkVector.r;
             kProd.g = fScalar * rkVector.g;
@@ -257,7 +257,7 @@ namespace CamelotEngine {
         }
 
         // arithmetic updates
-        inline ColourValue& operator += ( const ColourValue& rkVector )
+        inline Color& operator += ( const Color& rkVector )
         {
             r += rkVector.r;
             g += rkVector.g;
@@ -267,7 +267,7 @@ namespace CamelotEngine {
             return *this;
         }
 
-        inline ColourValue& operator -= ( const ColourValue& rkVector )
+        inline Color& operator -= ( const Color& rkVector )
         {
             r -= rkVector.r;
             g -= rkVector.g;
@@ -277,7 +277,7 @@ namespace CamelotEngine {
             return *this;
         }
 
-        inline ColourValue& operator *= (const float fScalar )
+        inline Color& operator *= (const float fScalar )
         {
             r *= fScalar;
             g *= fScalar;
@@ -286,7 +286,7 @@ namespace CamelotEngine {
             return *this;
         }
 
-        inline ColourValue& operator /= (const float fScalar )
+        inline Color& operator /= (const float fScalar )
         {
             assert( fScalar != 0.0 );
 
@@ -319,7 +319,7 @@ namespace CamelotEngine {
 		/** Function for writing to a stream.
 		*/
 		inline CM_EXPORT friend std::ostream& operator <<
-			( std::ostream& o, const ColourValue& c )
+			( std::ostream& o, const Color& c )
 		{
 			o << "ColourValue(" << c.r << ", " << c.g << ", " << c.b << ", " << c.a << ")";
 			return o;

+ 5 - 5
CamelotRenderer/CmD3D9RenderSystem.cpp

@@ -1618,8 +1618,8 @@ namespace CamelotEngine
 			OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Cannot set D3D9 world matrix", "D3D9RenderSystem::_setWorldMatrix" );
 	}
 	//---------------------------------------------------------------------
-	void D3D9RenderSystem::_setSurfaceParams( const ColourValue &ambient, const ColourValue &diffuse,
-		const ColourValue &specular, const ColourValue &emissive, float shininess,
+	void D3D9RenderSystem::_setSurfaceParams( const Color &ambient, const Color &diffuse,
+		const Color &specular, const Color &emissive, float shininess,
 		TrackVertexColourType tracking )
 	{
 
@@ -2055,7 +2055,7 @@ namespace CamelotEngine
 	}
 	//-----------------------------------------------------------------------------
 	void D3D9RenderSystem::_setTextureBorderColour(size_t stage,
-		const ColourValue& colour)
+		const Color& colour)
 	{
 		HRESULT hr;
 		if( FAILED( hr = __SetSamplerState( static_cast<DWORD>(stage), D3DSAMP_BORDERCOLOR, colour.getAsARGB()) ) )
@@ -2407,7 +2407,7 @@ namespace CamelotEngine
 			"D3D9RenderSystem::_setColourBufferWriteEnabled");
 	}
 	//---------------------------------------------------------------------
-	void D3D9RenderSystem::_setFog( FogMode mode, const ColourValue& colour, float densitiy, float start, float end )
+	void D3D9RenderSystem::_setFog( FogMode mode, const Color& colour, float densitiy, float start, float end )
 	{
 		HRESULT hr;
 
@@ -3367,7 +3367,7 @@ namespace CamelotEngine
 	}
 	//---------------------------------------------------------------------
 	void D3D9RenderSystem::clearFrameBuffer(unsigned int buffers, 
-		const ColourValue& colour, float depth, unsigned short stencil)
+		const Color& colour, float depth, unsigned short stencil)
 	{
 		DWORD flags = 0;
 		if (buffers & FBT_COLOUR)

+ 4 - 4
CamelotRenderer/CmD3D9RenderSystem.h

@@ -233,7 +233,7 @@ namespace CamelotEngine
 		void _setWorldMatrix( const Matrix4 &m );
 		void _setViewMatrix( const Matrix4 &m );
 		void _setProjectionMatrix( const Matrix4 &m );
-		void _setSurfaceParams( const ColourValue &ambient, const ColourValue &diffuse, const ColourValue &specular, const ColourValue &emissive, float shininess, TrackVertexColourType tracking );
+		void _setSurfaceParams( const Color &ambient, const Color &diffuse, const Color &specular, const Color &emissive, float shininess, TrackVertexColourType tracking );
 		void _setPointSpritesEnabled(bool enabled);
 		void _setPointParameters(float size, bool attenuationEnabled, 
 			float constant, float linear, float quadratic, float minSize, float maxSize);
@@ -245,7 +245,7 @@ namespace CamelotEngine
             const Frustum* frustum = 0);
 		void _setTextureBlendMode( size_t unit, const LayerBlendModeEx& bm );
         void _setTextureAddressingMode(size_t stage, const TextureState::UVWAddressingMode& uvw);
-        void _setTextureBorderColour(size_t stage, const ColourValue& colour);
+        void _setTextureBorderColour(size_t stage, const Color& colour);
 		void _setTextureMipmapBias(size_t unit, float bias);
 		void _setTextureMatrix( size_t unit, const Matrix4 &xform );
 		void _setSceneBlending( SceneBlendFactor sourceFactor, SceneBlendFactor destFactor, SceneBlendOperation op );
@@ -263,7 +263,7 @@ namespace CamelotEngine
 		void _setDepthBufferWriteEnabled(bool enabled = true);
 		void _setDepthBufferFunction( CompareFunction func = CMPF_LESS_EQUAL );
 		void _setDepthBias(float constantBias, float slopeScaleBias);
-		void _setFog( FogMode mode = FOG_NONE, const ColourValue& colour = ColourValue::White, float expDensity = 1.0, float linearStart = 0.0, float linearEnd = 1.0 );
+		void _setFog( FogMode mode = FOG_NONE, const Color& colour = Color::White, float expDensity = 1.0, float linearStart = 0.0, float linearEnd = 1.0 );
 		void _convertProjectionMatrix(const Matrix4& matrix,
             Matrix4& dest, bool forGpuProgram = false);
 		void _makeProjectionMatrix(const Radian& fovy, float aspect, float nearPlane, float farPlane, 
@@ -297,7 +297,7 @@ namespace CamelotEngine
 
         void setScissorTest(bool enabled, size_t left = 0, size_t top = 0, size_t right = 800, size_t bottom = 600);
         void clearFrameBuffer(unsigned int buffers, 
-            const ColourValue& colour = ColourValue::Black, 
+            const Color& colour = Color::Black, 
             float depth = 1.0f, unsigned short stencil = 0);
 		void setClipPlane (UINT16 index, float A, float B, float C, float D);
 		void enableClipPlane (UINT16 index, bool enable);

+ 4 - 4
CamelotRenderer/CmGpuProgramParams.cpp

@@ -425,7 +425,7 @@ namespace CamelotEngine
 
 	}
 	//---------------------------------------------------------------------
-	void GpuSharedParameters::setNamedConstant(const String& name, const ColourValue& colour)
+	void GpuSharedParameters::setNamedConstant(const String& name, const Color& colour)
 	{
 		setNamedConstant(name, colour.ptr(), 4);
 	}
@@ -711,7 +711,7 @@ namespace CamelotEngine
 
 	}
 	//-----------------------------------------------------------------------------
-	void GpuProgramParameters::setConstant(size_t index, const ColourValue& colour)
+	void GpuProgramParameters::setConstant(size_t index, const Color& colour)
 	{
 		setConstant(index, colour.ptr(), 1);
 	}
@@ -820,7 +820,7 @@ namespace CamelotEngine
 	}
 	//-----------------------------------------------------------------------------
 	void GpuProgramParameters::_writeRawConstant(size_t physicalIndex, 
-		const ColourValue& colour, size_t count)
+		const Color& colour, size_t count)
 	{
 		// write either the number requested (for packed types) or up to 4
 		_writeRawConstants(physicalIndex, colour.ptr(), std::min(count, (size_t)4));
@@ -1564,7 +1564,7 @@ namespace CamelotEngine
 			_writeRawConstants(def->physicalIndex, val, rawCount);
 	}
 	//---------------------------------------------------------------------------
-	void GpuProgramParameters::setNamedConstant(const String& name, const ColourValue& colour)
+	void GpuProgramParameters::setNamedConstant(const String& name, const Color& colour)
 	{
 		// look up, and throw an exception if we're not ignoring missing
 		const GpuConstantDefinition* def = 

+ 4 - 4
CamelotRenderer/CmGpuProgramParams.h

@@ -442,7 +442,7 @@ namespace CamelotEngine {
 		/** @copydoc GpuProgramParameters::setNamedConstant */
 		void setNamedConstant(const String& name, const double *val, size_t count);
 			/** @copydoc GpuProgramParameters::setNamedConstant */
-		void setNamedConstant(const String& name, const ColourValue& colour);
+		void setNamedConstant(const String& name, const Color& colour);
 		/** @copydoc GpuProgramParameters::setNamedConstant */
 		void setNamedConstant(const String& name, const int *val, size_t count);
 
@@ -1186,7 +1186,7 @@ namespace CamelotEngine {
 		a 4D float)
 		@param colour The value to set
 		*/
-		void setConstant(size_t index, const ColourValue& colour);
+		void setConstant(size_t index, const Color& colour);
 
 		/** Sets a multiple value constant integer parameter to the program.
 		@remarks
@@ -1302,7 +1302,7 @@ namespace CamelotEngine {
 		@param count The number of floats to write; if for example
 		the uniform constant 'slot' is smaller than a Vector4
 		*/
-		void _writeRawConstant(size_t physicalIndex, const ColourValue& colour, 
+		void _writeRawConstant(size_t physicalIndex, const Color& colour, 
 			size_t count = 4);
 
 
@@ -1571,7 +1571,7 @@ namespace CamelotEngine {
 		@param name The name of the parameter
 		@param colour The value to set
 		*/
-		void setNamedConstant(const String& name, const ColourValue& colour);
+		void setNamedConstant(const String& name, const Color& colour);
 
 		/** Sets a multiple value constant floating-point parameter to the program.
 		@par

+ 2 - 2
CamelotRenderer/CmHardwareVertexBuffer.cpp

@@ -27,7 +27,7 @@ THE SOFTWARE.
 */
 
 #include "CmHardwareVertexBuffer.h"
-#include "CmColourValue.h"
+#include "CmColor.h"
 #include "CmException.h"
 #include "CmHardwareBufferManager.h"
 #include "CmDefaultHardwareBufferManager.h"
@@ -215,7 +215,7 @@ namespace CamelotEngine {
 		   ((*ptr&0x00FF0000)>>16)|((*ptr&0x000000FF)<<16)|(*ptr&0xFF00FF00);				
 	}
 	//--------------------------------------------------------------------------
-	UINT32 VertexElement::convertColourValue(const ColourValue& src, 
+	UINT32 VertexElement::convertColourValue(const Color& src, 
 		VertexElementType dst)
 	{
 		switch(dst)

+ 2 - 2
CamelotRenderer/CmHardwareVertexBuffer.h

@@ -31,7 +31,7 @@ THE SOFTWARE.
 // Precompiler options
 #include "CmPrerequisites.h"
 #include "CmHardwareBuffer.h"
-#include "CmColourValue.h"
+#include "CmColor.h"
 
 namespace CamelotEngine {
 	class HardwareBufferManagerBase;
@@ -181,7 +181,7 @@ namespace CamelotEngine {
 		@param src source colour
 		@param dst The destination type
 		*/
-		static UINT32 convertColourValue(const ColourValue& src,
+		static UINT32 convertColourValue(const Color& src,
 			VertexElementType dst);
 
 		/** Utility method to get the most appropriate packed colour vertex element format. */

+ 3 - 3
CamelotRenderer/CmImageResampler.h

@@ -138,8 +138,8 @@ struct LinearResampler {
 					size_t sx2 = std::min(sx1+1,src.getWidth()-1);// src x #2
 					float sxf = (temp & 0xFFFF) / 65536.f; // weight of #2
 				
-					ColourValue x1y1z1, x2y1z1, x1y2z1, x2y2z1;
-					ColourValue x1y1z2, x2y1z2, x1y2z2, x2y2z2;
+					Color x1y1z1, x2y1z1, x1y2z1, x2y2z1;
+					Color x1y1z2, x2y1z2, x1y2z2, x2y2z2;
 
 #define UNPACK(dst,x,y,z) PixelUtil::unpackColour(&dst, src.format, \
 	srcdata + srcelemsize*((x)+(y)*src.rowPitch+(z)*src.slicePitch))
@@ -150,7 +150,7 @@ struct LinearResampler {
 					UNPACK(x1y2z2,sx1,sy2,sz2); UNPACK(x2y2z2,sx2,sy2,sz2);
 #undef UNPACK
 
-					ColourValue accum =
+					Color accum =
 						x1y1z1 * ((1.0f - sxf)*(1.0f - syf)*(1.0f - szf)) +
 						x2y1z1 * (        sxf *(1.0f - syf)*(1.0f - szf)) +
 						x1y2z1 * ((1.0f - sxf)*        syf *(1.0f - szf)) +

+ 6 - 6
CamelotRenderer/CmPixelFormat.cpp

@@ -28,7 +28,7 @@ THE SOFTWARE.
 
 #include "CmPixelFormat.h"
 #include "CmBitwise.h"
-#include "CmColourValue.h"
+#include "CmColor.h"
 #include "CmImageResampler.h"
 #include "CmException.h"
 
@@ -991,7 +991,7 @@ namespace CamelotEngine {
     /*************************************************************************
     * Pixel packing/unpacking utilities
     */
-    void PixelUtil::packColour(const ColourValue &colour, const PixelFormat pf,  void* dest)
+    void PixelUtil::packColour(const Color &colour, const PixelFormat pf,  void* dest)
     {
         packColour(colour.r, colour.g, colour.b, colour.a, pf, dest);
     }
@@ -1091,7 +1091,7 @@ namespace CamelotEngine {
         }
     }
     //-----------------------------------------------------------------------
-    void PixelUtil::unpackColour(ColourValue *colour, PixelFormat pf,  const void* src)
+    void PixelUtil::unpackColour(Color *colour, PixelFormat pf,  const void* src)
     {
         unpackColour(&colour->r, &colour->g, &colour->b, &colour->a, pf, src);
     }
@@ -1463,9 +1463,9 @@ namespace CamelotEngine {
 		}
 	}
 
-    ColourValue PixelBox::getColourAt(size_t x, size_t y, size_t z)
+    Color PixelBox::getColourAt(size_t x, size_t y, size_t z)
     {
-        ColourValue cv;
+        Color cv;
 
         unsigned char pixelSize = PixelUtil::getNumElemBytes(format);
         size_t pixelOffset = pixelSize * (z * slicePitch + y * rowPitch + x);
@@ -1474,7 +1474,7 @@ namespace CamelotEngine {
         return cv;
     }
 
-    void PixelBox::setColourAt(ColourValue const &cv, size_t x, size_t y, size_t z)
+    void PixelBox::setColourAt(Color const &cv, size_t x, size_t y, size_t z)
     {
         unsigned char pixelSize = PixelUtil::getNumElemBytes(format);
         size_t pixelOffset = pixelSize * (z * slicePitch + y * rowPitch + x);

+ 4 - 4
CamelotRenderer/CmPixelFormat.h

@@ -284,14 +284,14 @@ namespace CamelotEngine {
          * is only valid for cubemaps and volume textures. This uses the first (largest)
          * mipmap.
          */
-        ColourValue getColourAt(size_t x, size_t y, size_t z);
+        Color getColourAt(size_t x, size_t y, size_t z);
 
         /**
          * Set colour value at a certain location in the PixelBox. The z coordinate
          * is only valid for cubemaps and volume textures. This uses the first (largest)
          * mipmap.
          */
-        void setColourAt(ColourValue const &cv, size_t x, size_t y, size_t z);
+        void setColourAt(Color const &cv, size_t x, size_t y, size_t z);
     };
     
 
@@ -444,7 +444,7 @@ namespace CamelotEngine {
         	@param pf		Pixelformat in which to write the colour
         	@param dest		Destination memory location
         */
-        static void packColour(const ColourValue &colour, const PixelFormat pf,  void* dest);
+        static void packColour(const Color &colour, const PixelFormat pf,  void* dest);
         /** Pack a colour value to memory
         	@param r,g,b,a	The four colour components, range 0x00 to 0xFF
         	@param pf		Pixelformat in which to write the colour
@@ -465,7 +465,7 @@ namespace CamelotEngine {
         	@param pf		Pixelformat in which to read the colour
         	@param src		Source memory location
         */
-        static void unpackColour(ColourValue *colour, PixelFormat pf,  const void* src);
+        static void unpackColour(Color *colour, PixelFormat pf,  const void* src);
         /** Unpack a colour value from memory
         	@param r,g,b,a	The colour is returned here (as byte)
         	@param pf		Pixelformat in which to read the colour

+ 1 - 1
CamelotRenderer/CmPrerequisites.h

@@ -37,7 +37,7 @@ namespace CamelotEngine {
 // Allows use of pointers in header files without including individual .h
 // so decreases dependencies between files
     class Camera;
-    class ColourValue;
+    class Color;
     class Frustum;
     class GpuProgram;
     class GpuProgramManager;

+ 1 - 1
CamelotRenderer/CmRenderSystem.cpp

@@ -434,7 +434,7 @@ namespace CamelotEngine {
         return static_cast< unsigned int >( mVertexCount );
     }
     //-----------------------------------------------------------------------
-	void RenderSystem::convertColourValue(const ColourValue& colour, UINT32* pDest)
+	void RenderSystem::convertColourValue(const Color& colour, UINT32* pDest)
 	{
 		*pDest = VertexElement::convertColourValue(colour, getColourVertexElementType());
 

+ 8 - 8
CamelotRenderer/CmRenderSystem.h

@@ -583,9 +583,9 @@ namespace CamelotEngine
 		taken from shininess) and TVC_EMISSIVE. TVC_NONE means that there will be no material property
 		tracking the vertex colours.
 		*/
-		virtual void _setSurfaceParams(const ColourValue &ambient,
-			const ColourValue &diffuse, const ColourValue &specular,
-			const ColourValue &emissive, float shininess,
+		virtual void _setSurfaceParams(const Color &ambient,
+			const Color &diffuse, const Color &specular,
+			const Color &emissive, float shininess,
 			TrackVertexColourType tracking = TVC_NONE) = 0;
 
 		/** Sets whether or not rendering points using OT_POINT_LIST will 
@@ -687,7 +687,7 @@ namespace CamelotEngine
 		virtual void _setTextureAddressingMode(size_t unit, const TextureState::UVWAddressingMode& uvw) = 0;
 
 		/** Sets the texture border colour for a texture unit.*/
-		virtual void _setTextureBorderColour(size_t unit, const ColourValue& colour) = 0;
+		virtual void _setTextureBorderColour(size_t unit, const Color& colour) = 0;
 
 		/** Sets the mipmap bias value for a given texture unit.
 		@remarks
@@ -872,7 +872,7 @@ namespace CamelotEngine
 		@param linearEnd Distance at which linear fog becomes completely opaque.The distance must be passed
 		as a parametric value between 0 and 1, with 0 being the near clipping plane, and 1 being the far clipping plane. Only applicable if mode is FOG_LINEAR.
 		*/
-		virtual void _setFog(FogMode mode = FOG_NONE, const ColourValue& colour = ColourValue::White, float expDensity = 1.0, float linearStart = 0.0, float linearEnd = 1.0) = 0;
+		virtual void _setFog(FogMode mode = FOG_NONE, const Color& colour = Color::White, float expDensity = 1.0, float linearStart = 0.0, float linearEnd = 1.0) = 0;
 
 
 		/** The RenderSystem will keep a count of tris rendered, this resets the count. */
@@ -892,7 +892,7 @@ namespace CamelotEngine
 		@param colour The colour to convert
 		@param pDest Pointer to location to put the result.
 		*/
-		virtual void convertColourValue(const ColourValue& colour, UINT32* pDest);
+		virtual void convertColourValue(const Color& colour, UINT32* pDest);
 		/** Get the native VertexElementType for a compact 32-bit colour value
 		for this rendersystem.
 		*/
@@ -1146,7 +1146,7 @@ namespace CamelotEngine
 		@param stencil The value to initialise the stencil buffer with, if enabled.
 		*/
 		virtual void clearFrameBuffer(unsigned int buffers, 
-			const ColourValue& colour = ColourValue::Black, 
+			const Color& colour = Color::Black, 
 			float depth = 1.0f, unsigned short stencil = 0) = 0;
 		/** Returns the horizontal texel offset value required for mapping 
 		texel origins to pixel origins in this rendersystem.
@@ -1339,7 +1339,7 @@ namespace CamelotEngine
 		size_t mVertexCount;
 
 		/// Saved manual colour blends
-		ColourValue mManualBlendColours[CM_MAX_TEXTURE_LAYERS][2];
+		Color mManualBlendColours[CM_MAX_TEXTURE_LAYERS][2];
 
 		bool mInvertVertexWinding;
 

+ 4 - 4
CamelotRenderer/CmViewport.cpp

@@ -43,7 +43,7 @@ namespace CamelotEngine {
         , mRelHeight(height)
         // Actual dimensions will update later
         , mZOrder(ZOrder)
-        , mBackColour(ColourValue::Black)
+        , mBackColour(Color::Black)
         , mClearEveryFrame(true)
 		, mClearBuffers(FBT_COLOUR | FBT_DEPTH)
     {
@@ -131,12 +131,12 @@ namespace CamelotEngine {
 
     }
     //---------------------------------------------------------------------
-    void Viewport::setBackgroundColour(const ColourValue& colour)
+    void Viewport::setBackgroundColour(const Color& colour)
     {
         mBackColour = colour;
     }
     //---------------------------------------------------------------------
-    const ColourValue& Viewport::getBackgroundColour(void) const
+    const Color& Viewport::getBackgroundColour(void) const
     {
         return mBackColour;
     }
@@ -157,7 +157,7 @@ namespace CamelotEngine {
         return mClearBuffers;
     }
     //---------------------------------------------------------------------
-	void Viewport::clear(unsigned int buffers, const ColourValue& col,  
+	void Viewport::clear(unsigned int buffers, const Color& col,  
 						 float depth, unsigned short stencil)
 	{
 		RenderSystem* rs = CamelotEngine::RenderSystemManager::getActive();

+ 5 - 5
CamelotRenderer/CmViewport.h

@@ -30,7 +30,7 @@ THE SOFTWARE.
 
 #include "CmPrerequisites.h"
 #include "CmCommon.h"
-#include "CmColourValue.h"
+#include "CmColor.h"
 #include "CmFrustum.h"
 
 namespace CamelotEngine {
@@ -114,7 +114,7 @@ namespace CamelotEngine {
 		 @param stencil The stencil value to clear to, if FBT_STENCIL is included
 		*/
 		void clear(unsigned int buffers = FBT_COLOUR | FBT_DEPTH,
-				   const ColourValue& colour = ColourValue::Black, 
+				   const Color& colour = Color::Black, 
 				   float depth = 1.0f, unsigned short stencil = 0);
 
         /** Retrieves a pointer to the render target for this viewport.
@@ -180,11 +180,11 @@ namespace CamelotEngine {
         /** Sets the initial background colour of the viewport (before
             rendering).
         */
-        void setBackgroundColour(const ColourValue& colour);
+        void setBackgroundColour(const Color& colour);
 
         /** Gets the background colour.
         */
-        const ColourValue& getBackgroundColour(void) const;
+        const Color& getBackgroundColour(void) const;
 
         /** Determines whether to clear the viewport before rendering.
 		@remarks
@@ -218,7 +218,7 @@ namespace CamelotEngine {
         /// ZOrder
         int mZOrder;
         /// Background options
-        ColourValue mBackColour;
+        Color mBackColour;
         bool mClearEveryFrame;
 		unsigned int mClearBuffers;
     };

+ 6 - 6
CamelotRenderer/RenderSystemGL/Include/CmGLRenderSystem.h

@@ -250,9 +250,9 @@ namespace CamelotEngine {
         /** See
           RenderSystem
          */
-        void _setSurfaceParams(const ColourValue &ambient,
-            const ColourValue &diffuse, const ColourValue &specular,
-            const ColourValue &emissive, float shininess,
+        void _setSurfaceParams(const Color &ambient,
+            const Color &diffuse, const Color &specular,
+            const Color &emissive, float shininess,
             TrackVertexColourType tracking);
         /** See
           RenderSystem
@@ -287,7 +287,7 @@ namespace CamelotEngine {
         /** See
           RenderSystem
          */
-        void _setTextureBorderColour(size_t stage, const ColourValue& colour);
+        void _setTextureBorderColour(size_t stage, const Color& colour);
 		/** See
 		  RenderSystem
 		 */
@@ -359,7 +359,7 @@ namespace CamelotEngine {
 		/** See
           RenderSystem
          */
-        void _setFog(FogMode mode, const ColourValue& colour, float density, float start, float end);
+        void _setFog(FogMode mode, const Color& colour, float density, float start, float end);
         /** See
           RenderSystem
          */
@@ -452,7 +452,7 @@ namespace CamelotEngine {
          */
         void setScissorTest(bool enabled, size_t left = 0, size_t top = 0, size_t right = 800, size_t bottom = 600) ;
         void clearFrameBuffer(unsigned int buffers, 
-            const ColourValue& colour = ColourValue::Black, 
+            const Color& colour = Color::Black, 
             float depth = 1.0f, unsigned short stencil = 0);
         HardwareOcclusionQuery* createHardwareOcclusionQuery(void);
         float getHorizontalTexelOffset(void);

+ 6 - 6
CamelotRenderer/RenderSystemGL/Source/CmGLRenderSystem.cpp

@@ -1132,9 +1132,9 @@ namespace CamelotEngine {
 			mClipPlanesDirty = true;
 	}
 	//-----------------------------------------------------------------------------
-	void GLRenderSystem::_setSurfaceParams(const ColourValue &ambient,
-		const ColourValue &diffuse, const ColourValue &specular,
-		const ColourValue &emissive, float shininess,
+	void GLRenderSystem::_setSurfaceParams(const Color &ambient,
+		const Color &diffuse, const Color &specular,
+		const Color &emissive, float shininess,
 		TrackVertexColourType tracking)
 	{
 
@@ -1539,7 +1539,7 @@ namespace CamelotEngine {
 		activateGLTextureUnit(0);
 	}
 	//-----------------------------------------------------------------------------
-	void GLRenderSystem::_setTextureBorderColour(size_t stage, const ColourValue& colour)
+	void GLRenderSystem::_setTextureBorderColour(size_t stage, const Color& colour)
 	{
 		GLfloat border[4] = { colour.r, colour.g, colour.b, colour.a };
 		if (activateGLTextureUnit(stage))
@@ -1952,7 +1952,7 @@ namespace CamelotEngine {
         }
     }
     //-----------------------------------------------------------------------------
-    void GLRenderSystem::_setFog(FogMode mode, const ColourValue& colour, float density, float start, float end)
+    void GLRenderSystem::_setFog(FogMode mode, const Color& colour, float density, float start, float end)
     {
 
         GLint fogMode;
@@ -3058,7 +3058,7 @@ GL_RGB_SCALE : GL_ALPHA_SCALE, 1);
 	}
 	//---------------------------------------------------------------------
 	void GLRenderSystem::clearFrameBuffer(unsigned int buffers, 
-		const ColourValue& colour, float depth, unsigned short stencil)
+		const Color& colour, float depth, unsigned short stencil)
 	{
 		bool colourMask = !mColourWrite[0] || !mColourWrite[1] 
 		|| !mColourWrite[2] || !mColourWrite[3];