Просмотр исходного кода

Removed unused methods from DX9 and GL render system

Marko Pintera 13 лет назад
Родитель
Сommit
0b7ea14ec7

+ 27 - 26
CamelotD3D11RenderSystem/Include/CmD3D11RenderSystem.h

@@ -13,45 +13,46 @@ namespace CamelotEngine
 		void determineFSAASettings(UINT32 fsaa, const String& fsaaHint, DXGI_FORMAT format, DXGI_SAMPLE_DESC* outFSAASettings);
 		bool checkTextureFilteringSupported(TextureType ttype, PixelFormat format, int usage);
 
-		virtual const String& getName() const;
+		const String& getName() const;
 
-		virtual void setSamplerState(UINT16 texUnit, const SamplerState& samplerState);
-		virtual void setBlendState(const BlendState& blendState);
-		virtual void setRasterizerState(const RasterizerState& rasterizerState);
-		virtual void setDepthStencilState(const DepthStencilState& depthStencilState);
+		void setSamplerState(UINT16 texUnit, const SamplerState& samplerState);
+		void setBlendState(const BlendState& blendState);
+		void setRasterizerState(const RasterizerState& rasterizerState);
+		void setDepthStencilState(const DepthStencilState& depthStencilState);
 
-		virtual void setTexture(UINT16 unit, bool enabled, const TexturePtr &texPtr );
+		void setTexture(UINT16 unit, bool enabled, const TexturePtr &texPtr );
+		void disableTextureUnit(UINT16 texUnit);
 
-		virtual void setStencilRefValue(UINT32 refValue);
+		void setStencilRefValue(UINT32 refValue);
 
-		virtual void beginFrame();
-		virtual void endFrame();
-		virtual void clearFrameBuffer(unsigned int buffers, const Color& color = Color::Black, float depth = 1.0f, unsigned short stencil = 0);
+		void beginFrame();
+		void endFrame();
+		void clearFrameBuffer(unsigned int buffers, const Color& color = Color::Black, float depth = 1.0f, unsigned short stencil = 0);
 
-		virtual void setRenderTarget(RenderTarget* target);
-		virtual void setViewport(const Viewport& vp);
-		virtual void setScissorRect(UINT32 left = 0, UINT32 top = 0, UINT32 right = 800, UINT32 bottom = 600);
+		void setRenderTarget(RenderTarget* target);
+		void setViewport(const Viewport& vp);
+		void setScissorRect(UINT32 left = 0, UINT32 top = 0, UINT32 right = 800, UINT32 bottom = 600);
 
 		virtual void setVertexDeclaration(VertexDeclarationPtr decl);
 		virtual void setVertexBufferBinding(VertexBufferBinding* binding);
 
-		virtual void bindGpuProgramParameters(GpuProgramType gptype, GpuProgramParametersSharedPtr params, UINT16 variabilityMask);
-
+		void bindGpuProgram(GpuProgramHandle prg);
+		void unbindGpuProgram(GpuProgramType gptype);
+		void bindGpuProgramParameters(GpuProgramType gptype, GpuProgramParametersSharedPtr params, UINT16 variabilityMask);
 		
-		virtual void setClipPlanesImpl(const PlaneList& clipPlanes);
-
-		virtual RenderSystemCapabilities* createRenderSystemCapabilities() const;
-		virtual void initialiseFromRenderSystemCapabilities(RenderSystemCapabilities* caps);
+		void setClipPlanesImpl(const PlaneList& clipPlanes);
 
-		virtual String getErrorDescription(long errorNumber) const;
+		RenderSystemCapabilities* createRenderSystemCapabilities() const;
+		void initialiseFromRenderSystemCapabilities(RenderSystemCapabilities* caps);
 
-		virtual void convertProjectionMatrix(const Matrix4& matrix, Matrix4& dest, bool forGpuProgram = false);
-		virtual VertexElementType getColorVertexElementType() const;
-		virtual float getHorizontalTexelOffset();
-		virtual float getVerticalTexelOffset();
-		virtual float getMinimumDepthInputValue();
-		virtual float getMaximumDepthInputValue();
+		String getErrorDescription(long errorNumber) const;
 
+		void convertProjectionMatrix(const Matrix4& matrix, Matrix4& dest, bool forGpuProgram = false);
+		VertexElementType getColorVertexElementType() const;
+		float getHorizontalTexelOffset();
+		float getVerticalTexelOffset();
+		float getMinimumDepthInputValue();
+		float getMaximumDepthInputValue();
 	protected:
 
 	private:

+ 3 - 3
CamelotD3D11RenderSystem/Source/CmD3D11Mappings.cpp

@@ -338,9 +338,9 @@ namespace CamelotEngine
 	{
 		switch (vType)
 		{
-		case VET_COLOUR:
-		case VET_COLOUR_ABGR:
-		case VET_COLOUR_ARGB:
+		case VET_COLOR:
+		case VET_COLOR_ABGR:
+		case VET_COLOR_ARGB:
 			return DXGI_FORMAT_R8G8B8A8_UNORM;
 			break;
 		case VET_FLOAT1:

+ 50 - 18
CamelotD3D11RenderSystem/Source/CmD3D11RenderSystem.cpp

@@ -1,5 +1,6 @@
 #include "CmD3D11RenderSystem.h"
 #include "CmRenderSystem.h"
+#include "CmDebug.h"
 #include "CmException.h"
 
 namespace CamelotEngine
@@ -125,7 +126,8 @@ namespace CamelotEngine
 
 	const String& D3D11RenderSystem::getName() const
 	{
-		throw std::exception("The method or operation is not implemented.");
+		static String strName("D3D11RenderSystem");
+		return strName;
 	}
 
 	void D3D11RenderSystem::setSamplerState(UINT16 texUnit, const SamplerState& samplerState)
@@ -158,6 +160,11 @@ namespace CamelotEngine
 		throw std::exception("The method or operation is not implemented.");
 	}
 
+	void D3D11RenderSystem::disableTextureUnit(UINT16 texUnit)
+	{
+		throw std::exception("The method or operation is not implemented.");
+	}
+
 	void D3D11RenderSystem::beginFrame()
 	{
 		throw std::exception("The method or operation is not implemented.");
@@ -183,6 +190,16 @@ namespace CamelotEngine
 		throw std::exception("The method or operation is not implemented.");
 	}
 
+	void D3D11RenderSystem::bindGpuProgram(GpuProgramHandle prg)
+	{
+		throw std::exception("The method or operation is not implemented.");
+	}
+
+	void D3D11RenderSystem::unbindGpuProgram(GpuProgramType gptype)
+	{
+		throw std::exception("The method or operation is not implemented.");
+	}
+
 	void D3D11RenderSystem::bindGpuProgramParameters(GpuProgramType gptype, GpuProgramParametersSharedPtr params, UINT16 variabilityMask)
 	{
 		throw std::exception("The method or operation is not implemented.");
@@ -203,53 +220,68 @@ namespace CamelotEngine
 		throw std::exception("The method or operation is not implemented.");
 	}
 
-	CamelotEngine::VertexElementType D3D11RenderSystem::getColorVertexElementType() const
+	void D3D11RenderSystem::setClipPlanesImpl(const PlaneList& clipPlanes)
 	{
-		throw std::exception("The method or operation is not implemented.");
+		LOGWRN("This call will be ignored. DX11 uses shaders for setting clip planes.");
 	}
 
-	void D3D11RenderSystem::convertProjectionMatrix(const Matrix4& matrix, Matrix4& dest, bool forGpuProgram /*= false */)
+	RenderSystemCapabilities* D3D11RenderSystem::createRenderSystemCapabilities() const
 	{
 		throw std::exception("The method or operation is not implemented.");
 	}
 
-	float D3D11RenderSystem::getHorizontalTexelOffset()
+	void D3D11RenderSystem::initialiseFromRenderSystemCapabilities(RenderSystemCapabilities* caps)
 	{
 		throw std::exception("The method or operation is not implemented.");
 	}
 
-	float D3D11RenderSystem::getVerticalTexelOffset()
+	CamelotEngine::String D3D11RenderSystem::getErrorDescription(long errorNumber) const
 	{
 		throw std::exception("The method or operation is not implemented.");
 	}
 
-	float D3D11RenderSystem::getMinimumDepthInputValue()
+	CamelotEngine::VertexElementType D3D11RenderSystem::getColorVertexElementType() const
 	{
-		throw std::exception("The method or operation is not implemented.");
+		return VET_COLOR_ABGR;
 	}
 
-	float D3D11RenderSystem::getMaximumDepthInputValue()
+	void D3D11RenderSystem::convertProjectionMatrix(const Matrix4& matrix, Matrix4& dest, bool forGpuProgram /*= false */)
 	{
-		throw std::exception("The method or operation is not implemented.");
+		dest = matrix;
+
+		// Convert depth range from [-1,+1] to [0,1]
+		dest[2][0] = (dest[2][0] + dest[3][0]) / 2;
+		dest[2][1] = (dest[2][1] + dest[3][1]) / 2;
+		dest[2][2] = (dest[2][2] + dest[3][2]) / 2;
+		dest[2][3] = (dest[2][3] + dest[3][3]) / 2;
+
+		if (!forGpuProgram)
+		{
+			// Convert right-handed to left-handed
+			dest[0][2] = -dest[0][2];
+			dest[1][2] = -dest[1][2];
+			dest[2][2] = -dest[2][2];
+			dest[3][2] = -dest[3][2];
+		}
 	}
 
-	void D3D11RenderSystem::setClipPlanesImpl(const PlaneList& clipPlanes)
+	float D3D11RenderSystem::getHorizontalTexelOffset()
 	{
-		throw std::exception("The method or operation is not implemented.");
+		return 0.0f;
 	}
 
-	RenderSystemCapabilities* D3D11RenderSystem::createRenderSystemCapabilities() const
+	float D3D11RenderSystem::getVerticalTexelOffset()
 	{
-		throw std::exception("The method or operation is not implemented.");
+		return 0.0f;
 	}
 
-	void D3D11RenderSystem::initialiseFromRenderSystemCapabilities(RenderSystemCapabilities* caps)
+	float D3D11RenderSystem::getMinimumDepthInputValue()
 	{
-		throw std::exception("The method or operation is not implemented.");
+		return 0.0f;
 	}
 
-	CamelotEngine::String D3D11RenderSystem::getErrorDescription(long errorNumber) const
+	float D3D11RenderSystem::getMaximumDepthInputValue()
 	{
-		throw std::exception("The method or operation is not implemented.");
+		return -1.0f;
 	}
 }

+ 0 - 7
CamelotD3D9Renderer/Include/CmD3D9RenderSystem.h

@@ -125,10 +125,6 @@ namespace CamelotEngine
 	private:
 		/// Direct3D
 		IDirect3D9*	 mpD3D;		
-		// Stored options
-		ConfigOptionMap mOptions;
-		size_t mFSAASamples;
-		String mFSAAHint;
 
 		/// instance
 		HINSTANCE mhInstance;
@@ -160,8 +156,6 @@ namespace CamelotEngine
 		} mTexStageDesc[CM_MAX_TEXTURE_LAYERS];
 
 		D3D9DriverList* getDirect3DDrivers();
-		void refreshD3DSettings();
-        void refreshFSAAOptions();
 				
 		// state management methods, very primitive !!!
 		HRESULT __SetRenderState(D3DRENDERSTATETYPE state, DWORD value);
@@ -217,7 +211,6 @@ namespace CamelotEngine
 
 		String getErrorDescription( long errorNumber ) const;
 
-		void initConfigOptions();
 		void setClipPlane (UINT16 index, float A, float B, float C, float D);
 		void enableClipPlane (UINT16 index, bool enable);
 

+ 3 - 3
CamelotD3D9Renderer/Source/CmD3D9Mappings.cpp

@@ -387,9 +387,9 @@ namespace CamelotEngine
 	{
 		switch (vType)
 		{
-		case VET_COLOUR:
-		case VET_COLOUR_ABGR:
-		case VET_COLOUR_ARGB:
+		case VET_COLOR:
+		case VET_COLOR_ABGR:
+		case VET_COLOR_ARGB:
 			return D3DDECLTYPE_D3DCOLOR;
 			break;
 		case VET_FLOAT1:

+ 4 - 230
CamelotD3D9Renderer/Source/CmD3D9RenderSystem.cpp

@@ -149,13 +149,6 @@ namespace CamelotEngine
 		if( NULL == (mpD3D = Direct3DCreate9(D3D_SDK_VERSION)) )
 			CM_EXCEPT(InternalErrorException, "Failed to create Direct3D9 object");
 
-		// set config options defaults
-		initConfigOptions();
-
-		// fsaa options
-		mFSAAHint = "";
-		mFSAASamples = 0;
-
 		// set stages desc. to defaults
 		for (size_t n = 0; n < CM_MAX_TEXTURE_LAYERS; n++)
 		{
@@ -170,16 +163,7 @@ namespace CamelotEngine
 		RenderWindow* autoWindow = NULL;
 
 		// Init using current settings
-		mActiveD3DDriver = NULL;
-		ConfigOptionMap::iterator opt = mOptions.find( "Rendering Device" );
-		for( UINT32 j=0; j < getDirect3DDrivers()->count(); j++ )
-		{
-			if( getDirect3DDrivers()->item(j)->DriverDescription() == opt->second.currentValue )
-			{
-				mActiveD3DDriver = getDirect3DDrivers()->item(j);
-				break;
-			}
-		}
+		mActiveD3DDriver = getDirect3DDrivers()->item(0); // TODO - We always use the first driver
 
 		if( !mActiveD3DDriver )
 			CM_EXCEPT(InvalidParametersException, "Problems finding requested Direct3D driver!" );
@@ -226,7 +210,8 @@ namespace CamelotEngine
 
 		TextureManager::shutDown();
 		HardwareBufferManager::shutDown();
-		GpuProgramManager::shutDown();		
+		GpuProgramManager::shutDown();	
+		RenderWindowManager::shutDown();
 	}
 	//--------------------------------------------------------------------
 	void D3D9RenderSystem::registerRenderWindow(D3D9RenderWindowPtr renderWindow)
@@ -1569,7 +1554,7 @@ namespace CamelotEngine
 	//---------------------------------------------------------------------
 	VertexElementType D3D9RenderSystem::getColorVertexElementType() const
 	{
-		return VET_COLOUR_ARGB;
+		return VET_COLOR_ARGB;
 	}
 	//---------------------------------------------------------------------
 	void D3D9RenderSystem::convertProjectionMatrix(const Matrix4& matrix,
@@ -1623,217 +1608,6 @@ namespace CamelotEngine
 			return false;
 	}
 	//---------------------------------------------------------------------
-	void D3D9RenderSystem::initConfigOptions()
-	{
-		D3D9DriverList* driverList;
-		D3D9Driver* driver;
-
-		ConfigOption optDevice;
-		ConfigOption optVideoMode;
-		ConfigOption optFullScreen;
-		ConfigOption optVSync;
-		ConfigOption optVSyncInterval;
-		ConfigOption optAA;
-		ConfigOption optFPUMode;
-		ConfigOption optNVPerfHUD;
-		ConfigOption optSRGB;
-		ConfigOption optResourceCeationPolicy;
-
-		driverList = this->getDirect3DDrivers();
-
-		optDevice.name = "Rendering Device";
-		optDevice.currentValue.clear();
-		optDevice.possibleValues.clear();
-		optDevice.immutable = false;
-
-		optVideoMode.name = "Video Mode";
-		optVideoMode.currentValue = "800 x 600 @ 32-bit colour";
-		optVideoMode.immutable = false;
-
-		optFullScreen.name = "Full Screen";
-		optFullScreen.possibleValues.push_back( "Yes" );
-		optFullScreen.possibleValues.push_back( "No" );
-		optFullScreen.currentValue = "Yes";
-		optFullScreen.immutable = false;
-
-		optResourceCeationPolicy.name = "Resource Creation Policy";		
-		optResourceCeationPolicy.possibleValues.push_back( "Create on all devices" );
-		optResourceCeationPolicy.possibleValues.push_back( "Create on active device" );
-
-		if (mResourceManager->getCreationPolicy() == RCP_CREATE_ON_ACTIVE_DEVICE)
-			optResourceCeationPolicy.currentValue = "Create on active device";			
-		else if (mResourceManager->getCreationPolicy() == RCP_CREATE_ON_ALL_DEVICES)
-			optResourceCeationPolicy.currentValue = "Create on all devices";
-		else
-			optResourceCeationPolicy.currentValue = "N/A";
-		optResourceCeationPolicy.immutable = false;
-
-		for( unsigned j=0; j < driverList->count(); j++ )
-		{
-			driver = driverList->item(j);
-			optDevice.possibleValues.push_back( driver->DriverDescription() );
-			// Make first one default
-			if( j==0 )
-				optDevice.currentValue = driver->DriverDescription();
-		}
-
-		optVSync.name = "VSync";
-		optVSync.immutable = false;
-		optVSync.possibleValues.push_back( "Yes" );
-		optVSync.possibleValues.push_back( "No" );
-		optVSync.currentValue = "No";
-
-		optVSyncInterval.name = "VSync Interval";
-		optVSyncInterval.immutable = false;
-		optVSyncInterval.possibleValues.push_back( "1" );
-		optVSyncInterval.possibleValues.push_back( "2" );
-		optVSyncInterval.possibleValues.push_back( "3" );
-		optVSyncInterval.possibleValues.push_back( "4" );
-		optVSyncInterval.currentValue = "1";
-
-		optAA.name = "FSAA";
-		optAA.immutable = false;
-		optAA.possibleValues.push_back( "None" );
-		optAA.currentValue = "None";
-
-		optFPUMode.name = "Floating-point mode";
-#if OGRE_DOUBLE_PRECISION
-		optFPUMode.currentValue = "Consistent";
-#else
-		optFPUMode.currentValue = "Fastest";
-#endif
-		optFPUMode.possibleValues.clear();
-		optFPUMode.possibleValues.push_back("Fastest");
-		optFPUMode.possibleValues.push_back("Consistent");
-		optFPUMode.immutable = false;
-
-		optNVPerfHUD.currentValue = "No";
-		optNVPerfHUD.immutable = false;
-		optNVPerfHUD.name = "Allow NVPerfHUD";
-		optNVPerfHUD.possibleValues.push_back( "Yes" );
-		optNVPerfHUD.possibleValues.push_back( "No" );
-
-
-		// SRGB on auto window
-		optSRGB.name = "sRGB Gamma Conversion";
-		optSRGB.possibleValues.push_back("Yes");
-		optSRGB.possibleValues.push_back("No");
-		optSRGB.currentValue = "No";
-		optSRGB.immutable = false;
-
-		mOptions[optDevice.name] = optDevice;
-		mOptions[optVideoMode.name] = optVideoMode;
-		mOptions[optFullScreen.name] = optFullScreen;
-		mOptions[optVSync.name] = optVSync;
-		mOptions[optVSyncInterval.name] = optVSyncInterval;
-		mOptions[optAA.name] = optAA;
-		mOptions[optFPUMode.name] = optFPUMode;
-		mOptions[optNVPerfHUD.name] = optNVPerfHUD;
-		mOptions[optSRGB.name] = optSRGB;
-		mOptions[optResourceCeationPolicy.name] = optResourceCeationPolicy;
-
-		refreshD3DSettings();
-
-	}
-	//---------------------------------------------------------------------
-	void D3D9RenderSystem::refreshD3DSettings()
-	{
-		ConfigOption* optVideoMode;
-		D3D9Driver* driver = 0;
-		D3D9VideoMode* videoMode;
-
-		ConfigOptionMap::iterator opt = mOptions.find( "Rendering Device" );
-		if( opt != mOptions.end() )
-		{
-			for( unsigned j=0; j < getDirect3DDrivers()->count(); j++ )
-			{
-				D3D9Driver* curDriver = getDirect3DDrivers()->item(j);
-				if( curDriver->DriverDescription() == opt->second.currentValue )
-				{
-					driver = curDriver;
-					break;
-				}
-			}
-
-			if (driver)
-			{
-				opt = mOptions.find( "Video Mode" );
-				optVideoMode = &opt->second;
-				optVideoMode->possibleValues.clear();
-				// get vide modes for this device
-				for( unsigned k=0; k < driver->getVideoModeList()->count(); k++ )
-				{
-					videoMode = driver->getVideoModeList()->item( k );
-					optVideoMode->possibleValues.push_back( videoMode->getDescription() );
-				}
-
-				// Reset video mode to default if previous doesn't avail in new possible values
-				std::vector<CamelotEngine::String>::const_iterator itValue =
-					std::find(optVideoMode->possibleValues.begin(),
-					optVideoMode->possibleValues.end(),
-					optVideoMode->currentValue);
-				if (itValue == optVideoMode->possibleValues.end())
-				{
-					optVideoMode->currentValue = "800 x 600 @ 32-bit colour";
-				}
-
-				// Also refresh FSAA options
-				refreshFSAAOptions();
-			}
-		}
-
-	}
-	//---------------------------------------------------------------------
-	void D3D9RenderSystem::refreshFSAAOptions()
-	{
-		ConfigOptionMap::iterator it = mOptions.find( "FSAA" );
-		ConfigOption* optFSAA = &it->second;
-		optFSAA->possibleValues.clear();
-		optFSAA->possibleValues.push_back("0");
-
-		it = mOptions.find("Rendering Device");
-		D3D9Driver *driver = getDirect3DDrivers()->item(it->second.currentValue);
-		if (driver)
-		{
-			it = mOptions.find("Video Mode");
-			D3D9VideoMode *videoMode = driver->getVideoModeList()->item(it->second.currentValue);
-			if (videoMode)
-			{
-				DWORD numLevels = 0;
-				bool bOK;
-
-				for (unsigned int n = 2; n < 25; n++)
-				{
-					bOK = this->_checkMultiSampleQuality(
-						(D3DMULTISAMPLE_TYPE)n, 
-						&numLevels, 
-						videoMode->getFormat(), 
-						driver->getAdapterNumber(),
-						D3DDEVTYPE_HAL,
-						TRUE);
-					if (bOK)
-					{
-						optFSAA->possibleValues.push_back(toString(n));
-						if (n >= 8)
-							optFSAA->possibleValues.push_back(toString(n) + " [Quality]");
-					}
-				}
-
-			}
-		}
-
-		// Reset FSAA to none if previous doesn't avail in new possible values
-		std::vector<CamelotEngine::String>::const_iterator itValue =
-			std::find(optFSAA->possibleValues.begin(),
-			optFSAA->possibleValues.end(),
-			optFSAA->currentValue);
-		if (itValue == optFSAA->possibleValues.end())
-		{
-			optFSAA->currentValue = "0";
-		}
-
-	}
-	//---------------------------------------------------------------------
 	RenderSystemCapabilities* D3D9RenderSystem::updateRenderSystemCapabilities(D3D9RenderWindow* renderWindow)
 	{			
 		RenderSystemCapabilities* rsc = mCurrentCapabilities;

+ 2 - 2
CamelotFBXImporter/Source/CmFBXImporter.cpp

@@ -594,8 +594,8 @@ namespace CamelotEngine
 
 		if(vertexData->color)
 		{
-			meshData->declaration->addElement(0, offset, VET_COLOUR, VES_DIFFUSE, 0);
-			offset += VertexElement::getTypeSize(VET_COLOUR);
+			meshData->declaration->addElement(0, offset, VET_COLOR, VES_DIFFUSE, 0);
+			offset += VertexElement::getTypeSize(VET_COLOR);
 		}
 
 		if(vertexData->normal)

+ 34 - 36
CamelotGLRenderer/Include/CmGLRenderSystem.h

@@ -58,19 +58,18 @@ namespace CamelotEngine {
         void setRenderTarget(RenderTarget *target);
 
 		/**
-		 * @copydoc RenderSystem::bindGpuProgram()
+		 * @copydoc RenderSystem::setVertexDeclaration()
 		 */
-		void bindGpuProgram(GpuProgramHandle prg);
-
-		/**
-		 * @copydoc RenderSystem::unbindGpuProgram()
+		void setVertexDeclaration(VertexDeclarationPtr decl);
+        /**
+		 * @copydoc RenderSystem::setVertexBufferBinding()
 		 */
-		void unbindGpuProgram(GpuProgramType gptype);
+		void setVertexBufferBinding(VertexBufferBinding* binding);
 
-		/**
-		 * @copydoc RenderSystem::bindGpuProgramParameters()
+        /**
+		 * @copydoc RenderSystem::setScissorRect()
 		 */
-		void bindGpuProgramParameters(GpuProgramType gptype, GpuProgramParametersSharedPtr params, UINT16 mask);
+        void setScissorRect(UINT32 left = 0, UINT32 top = 0, UINT32 right = 800, UINT32 bottom = 600) ;
 
 		/**
 		 * @copydoc RenderSystem::setTexture()
@@ -107,6 +106,21 @@ namespace CamelotEngine {
 		 */
         void setViewport(const Viewport& vp);
 
+		/**
+		 * @copydoc RenderSystem::bindGpuProgram()
+		 */
+		void bindGpuProgram(GpuProgramHandle prg);
+
+		/**
+		 * @copydoc RenderSystem::unbindGpuProgram()
+		 */
+		void unbindGpuProgram(GpuProgramType gptype);
+
+		/**
+		 * @copydoc RenderSystem::bindGpuProgramParameters()
+		 */
+		void bindGpuProgramParameters(GpuProgramType gptype, GpuProgramParametersSharedPtr params, UINT16 mask);
+
 		/**
 		 * @copydoc RenderSystem::beginFrame()
 		 */
@@ -117,29 +131,11 @@ namespace CamelotEngine {
 		 */
         void endFrame(void);
 
-        /**
-		 * @copydoc RenderSystem::convertProjectionMatrix()
-		 */
-        void convertProjectionMatrix(const Matrix4& matrix,
-            Matrix4& dest, bool forGpuProgram = false);
-        /**
-		 * @copydoc RenderSystem::setVertexDeclaration()
-		 */
-		void setVertexDeclaration(VertexDeclarationPtr decl);
-        /**
-		 * @copydoc RenderSystem::setVertexBufferBinding()
-		 */
-		void setVertexBufferBinding(VertexBufferBinding* binding);
-        /**
+		/**
 		 * @copydoc RenderSystem::render()
 		 */
         void render(const RenderOperation& op);
 
-        /**
-		 * @copydoc RenderSystem::setScissorRect()
-		 */
-        void setScissorRect(UINT32 left = 0, UINT32 top = 0, UINT32 right = 800, UINT32 bottom = 600) ;
-
 		/**
 		 * @copydoc RenderSystem::clearFrameBuffer()
 		 */
@@ -172,6 +168,16 @@ namespace CamelotEngine {
 		 */
         float getMaximumDepthInputValue(void);
 
+		/**
+		 * @copydoc RenderSystem::convertProjectionMatrix()
+		 */
+        void convertProjectionMatrix(const Matrix4& matrix,
+            Matrix4& dest, bool forGpuProgram = false);
+
+		/************************************************************************/
+		/* 				Internal use by OpenGL RenderSystem only                */
+		/************************************************************************/
+
         void unregisterContext(GLContext *context);
 		void registerContext(GLContext* context);
 
@@ -192,8 +198,6 @@ namespace CamelotEngine {
 
         /// View matrix to set world against
         Matrix4 mViewMatrix;
-        Matrix4 mWorldMatrix;
-        Matrix4 mTextureMatrix;
 
         /// Last min & mip filtering options, so we can combine them
         FilterOptions mMinFilter;
@@ -208,7 +212,6 @@ namespace CamelotEngine {
 		/// Number of fixed-function texture units
 		unsigned short mFixedFunctionTextureUnits;
 
-        void initConfigOptions(void);
         void initInputDevices(void);
         void processInputDevices(void);
 
@@ -241,17 +244,12 @@ namespace CamelotEngine {
         /// GL support class, used for creating windows etc.
         GLSupport* mGLSupport;
 
-        bool mUseAutoTextureMatrix;
-        GLfloat mAutoTextureMatrix[16];
-
         /// Check if the GL system has already been initialised
         bool mGLInitialised;
 
 		GLSLProgramFactory* mGLSLProgramFactory;
 		CgProgramFactory* mCgProgramFactory;
 
-        unsigned short mCurrentLights;
-
         GLuint getCombinedMinMipFilter(void) const;
 
         GLGpuProgram* mCurrentVertexProgram;

+ 0 - 19
CamelotGLRenderer/Include/CmGLSupport.h

@@ -43,23 +43,6 @@ public:
     GLSupport() { }
     virtual ~GLSupport() { }
 
-    /**
-    * Add any special config values to the system.
-    * Must have a "Full Screen" value that is a bool and a "Video Mode" value
-    * that is a string in the form of wxh
-    */
-    virtual void addConfig() = 0;
-
-	virtual void setConfigOption(const String &name, const String &value);
-
-    /**
-    * Make sure all the extra options are valid
-    * @return string with error message
-    */
-    virtual String validateConfig() = 0;
-
-	virtual ConfigOptionMap& getConfigOptions(void);
-
 	virtual RenderWindow* newWindow(const String &name, unsigned int width, unsigned int height, 
 		bool fullScreen, const NameValuePairList *miscParams = 0) = 0;
 
@@ -116,8 +99,6 @@ public:
 	}
 
 protected:
-	// Stored options
-    ConfigOptionMap mOptions;
 
 	// This contains the complete list of supported extensions
     set<String>::type extensionList;

+ 0 - 15
CamelotGLRenderer/Include/CmWin32GLSupport.h

@@ -12,25 +12,11 @@ namespace CamelotEngine
 	{
 	public:
         Win32GLSupport();
-		/**
-		* Add any special config values to the system.
-		* Must have a "Full Screen" value that is a bool and a "Video Mode" value
-		* that is a string in the form of wxhxb
-		*/
-		void addConfig();
-
-		void setConfigOption(const String &name, const String &value);
-
-		/**
-		* Make sure all the extra options are valid
-		*/
-		String validateConfig();
 
 		/// @copydoc RenderSystem::_createRenderWindow
 		virtual RenderWindow* newWindow(const String &name, unsigned int width, unsigned int height, 
 			bool fullScreen, const NameValuePairList *miscParams = 0);
 
-		
 		/**
 		* Start anything special
 		*/
@@ -75,7 +61,6 @@ namespace CamelotEngine
 
 		DisplayMonitorInfoList mMonitorInfoList;
 
-		void refreshConfig();
 		void initialiseWGL();
 		static LRESULT CALLBACK dummyWndProc(HWND hwnd, UINT umsg, WPARAM wp, LPARAM lp);
 		static BOOL CALLBACK sCreateMonitorsInfoEnumProc(HMONITOR hMonitor, HDC hdcMonitor, 

+ 3 - 3
CamelotGLRenderer/Source/CmGLHardwareBufferManager.cpp

@@ -140,9 +140,9 @@ namespace CamelotEngine {
             case VET_SHORT3:
             case VET_SHORT4:
                 return GL_SHORT;
-            case VET_COLOUR:
-			case VET_COLOUR_ABGR:
-			case VET_COLOUR_ARGB:
+            case VET_COLOR:
+			case VET_COLOR_ABGR:
+			case VET_COLOR_ARGB:
             case VET_UBYTE4:
                 return GL_UNSIGNED_BYTE;
             default:

+ 5 - 16
CamelotGLRenderer/Source/CmGLRenderSystem.cpp

@@ -100,11 +100,8 @@ namespace CamelotEngine {
 		// Get our GLSupport
 		mGLSupport = CamelotEngine::getGLSupport();
 
-		mWorldMatrix = Matrix4::IDENTITY;
 		mViewMatrix = Matrix4::IDENTITY;
 
-		initConfigOptions();
-
 		mColourWrite[0] = mColourWrite[1] = mColourWrite[2] = mColourWrite[3] = true;
 
 		for (i = 0; i < CM_MAX_TEXTURE_LAYERS; i++)
@@ -120,7 +117,6 @@ namespace CamelotEngine {
 
 		mGLInitialised = false;
 
-		mCurrentLights = 0;
 		mMinFilter = FO_LINEAR;
 		mMipFilter = FO_POINT;
 		mCurrentVertexProgram = 0;
@@ -204,6 +200,7 @@ namespace CamelotEngine {
 		mStopRendering = true;
 
 		TextureManager::shutDown();
+		RenderWindowManager::shutDown();
 
 		// There will be a new initial window and so forth, thus any call to test
 		//  some params will access an invalid pointer, so it is best to reset
@@ -648,9 +645,9 @@ namespace CamelotEngine {
 				GLboolean normalised = GL_FALSE;
 				switch(elem->getType())
 				{
-				case VET_COLOUR:
-				case VET_COLOUR_ABGR:
-				case VET_COLOUR_ARGB:
+				case VET_COLOR:
+				case VET_COLOR_ABGR:
+				case VET_COLOR_ARGB:
 					// Because GL takes these as a sequence of single unsigned bytes, count needs to be 4
 					// VertexElement::getTypeCount treats them as 1 (RGBA)
 					// Also need to normalise the fixed-point data
@@ -1496,9 +1493,6 @@ namespace CamelotEngine {
 		if (mCurrentFragmentProgram)
 			mCurrentFragmentProgram->unbindProgram();
 
-		// Disable lights
-		mCurrentLights = 0;
-
 		// Disable textures
 		disableTextureUnitsFrom(0);
 
@@ -1606,11 +1600,6 @@ namespace CamelotEngine {
 		}
 	}
 	//---------------------------------------------------------------------
-	void GLRenderSystem::initConfigOptions(void)
-	{
-		mGLSupport->addConfig();
-	}
-	//---------------------------------------------------------------------
 	GLfloat GLRenderSystem::_getCurrentAnisotropy(UINT16 unit)
 	{
 		GLfloat curAniso = 0;
@@ -2478,7 +2467,7 @@ namespace CamelotEngine {
 	}
 	VertexElementType GLRenderSystem::getColorVertexElementType(void) const
 	{
-		return VET_COLOUR_ABGR;
+		return VET_COLOR_ABGR;
 	}
 	//---------------------------------------------------------------------
 	void GLRenderSystem::convertProjectionMatrix(const Matrix4& matrix,

+ 2 - 15
CamelotGLRenderer/Source/CmGLSupport.cpp

@@ -31,21 +31,8 @@ THE SOFTWARE.
 #include "CmGLSupport.h"
 #include "CmGLTexture.h"
 
-namespace CamelotEngine {
-
-	void GLSupport::setConfigOption(const String &name, const String &value)
-	{
-		ConfigOptionMap::iterator it = mOptions.find(name);
-
-        if (it != mOptions.end())
-            it->second.currentValue = value;
-	}
-
-	ConfigOptionMap& GLSupport::getConfigOptions(void)
-	{
-		return mOptions;
-	}
-
+namespace CamelotEngine
+{
     void GLSupport::initialiseExtensions(void)
     {
         // Set version string

+ 2 - 188
CamelotGLRenderer/Source/CmWin32GLSupport.cpp

@@ -13,7 +13,8 @@ using namespace CamelotEngine;
 GLenum wglewContextInit (CamelotEngine::GLSupport *glSupport);
 #endif
 
-namespace CamelotEngine {
+namespace CamelotEngine 
+{
 	Win32GLSupport::Win32GLSupport()
         : mInitialWindow(0)
         , mHasPixelFormatARB(false)
@@ -32,192 +33,6 @@ namespace CamelotEngine {
 		c.erase(p, c.end());
 	}
 
-	void Win32GLSupport::addConfig()
-	{
-		//TODO: EnumDisplayDevices http://msdn.microsoft.com/library/en-us/gdi/devcons_2303.asp
-		/*vector<string> DisplayDevices;
-		DISPLAY_DEVICE DisplayDevice;
-		DisplayDevice.cb = sizeof(DISPLAY_DEVICE);
-		DWORD i=0;
-		while (EnumDisplayDevices(NULL, i++, &DisplayDevice, 0) {
-			DisplayDevices.push_back(DisplayDevice.DeviceName);
-		}*/
-		  
-		ConfigOption optFullScreen;
-		ConfigOption optVideoMode;
-		ConfigOption optColourDepth;
-		ConfigOption optDisplayFrequency;
-		ConfigOption optVSync;
-		ConfigOption optVSyncInterval;
-		ConfigOption optFSAA;
-		ConfigOption optRTTMode;
-		ConfigOption optSRGB;
-
-		// FS setting possiblities
-		optFullScreen.name = "Full Screen";
-		optFullScreen.possibleValues.push_back("Yes");
-		optFullScreen.possibleValues.push_back("No");
-		optFullScreen.currentValue = "Yes";
-		optFullScreen.immutable = false;
-
-		// Video mode possiblities
-		DEVMODE DevMode;
-		DevMode.dmSize = sizeof(DEVMODE);
-		optVideoMode.name = "Video Mode";
-		optVideoMode.immutable = false;
-		for (DWORD i = 0; EnumDisplaySettings(NULL, i, &DevMode); ++i)
-		{
-			if (DevMode.dmBitsPerPel < 16 || DevMode.dmPelsHeight < 480)
-				continue;
-			mDevModes.push_back(DevMode);
-			StringUtil::StrStreamType str;
-			str << DevMode.dmPelsWidth << " x " << DevMode.dmPelsHeight;
-			optVideoMode.possibleValues.push_back(str.str());
-		}
-		remove_duplicates(optVideoMode.possibleValues);
-		optVideoMode.currentValue = optVideoMode.possibleValues.front();
-
-		optColourDepth.name = "Colour Depth";
-		optColourDepth.immutable = false;
-		optColourDepth.currentValue.clear();
-
-		optDisplayFrequency.name = "Display Frequency";
-		optDisplayFrequency.immutable = false;
-        optDisplayFrequency.currentValue.clear();
-
-		optVSync.name = "VSync";
-		optVSync.immutable = false;
-		optVSync.possibleValues.push_back("No");
-		optVSync.possibleValues.push_back("Yes");
-		optVSync.currentValue = "No";
-
-		optVSyncInterval.name = "VSync Interval";
-		optVSyncInterval.immutable = false;
-		optVSyncInterval.possibleValues.push_back( "1" );
-		optVSyncInterval.possibleValues.push_back( "2" );
-		optVSyncInterval.possibleValues.push_back( "3" );
-		optVSyncInterval.possibleValues.push_back( "4" );
-		optVSyncInterval.currentValue = "1";
-
-		optFSAA.name = "FSAA";
-		optFSAA.immutable = false;
-		optFSAA.possibleValues.push_back("0");
-		for (vector<int>::type::iterator it = mFSAALevels.begin(); it != mFSAALevels.end(); ++it)
-		{
-			String val = toString(*it);
-			optFSAA.possibleValues.push_back(val);
-			/* not implementing CSAA in GL for now
-			if (*it >= 8)
-				optFSAA.possibleValues.push_back(val + " [Quality]");
-			*/
-
-		}
-		optFSAA.currentValue = "0";
-
-		optRTTMode.name = "RTT Preferred Mode";
-		optRTTMode.possibleValues.push_back("FBO");
-		optRTTMode.possibleValues.push_back("PBuffer");
-		optRTTMode.possibleValues.push_back("Copy");
-		optRTTMode.currentValue = "FBO";
-		optRTTMode.immutable = false;
-
-
-		// SRGB on auto window
-		optSRGB.name = "sRGB Gamma Conversion";
-		optSRGB.possibleValues.push_back("Yes");
-		optSRGB.possibleValues.push_back("No");
-		optSRGB.currentValue = "No";
-		optSRGB.immutable = false;
-
-
-		mOptions[optFullScreen.name] = optFullScreen;
-		mOptions[optVideoMode.name] = optVideoMode;
-		mOptions[optColourDepth.name] = optColourDepth;
-		mOptions[optDisplayFrequency.name] = optDisplayFrequency;
-		mOptions[optVSync.name] = optVSync;
-		mOptions[optVSyncInterval.name] = optVSyncInterval;
-		mOptions[optFSAA.name] = optFSAA;
-		mOptions[optRTTMode.name] = optRTTMode;
-		mOptions[optSRGB.name] = optSRGB;
-
-		refreshConfig();
-	}
-
-	void Win32GLSupport::refreshConfig()
-	{
-		ConfigOptionMap::iterator optVideoMode = mOptions.find("Video Mode");
-		ConfigOptionMap::iterator moptColourDepth = mOptions.find("Colour Depth");
-		ConfigOptionMap::iterator moptDisplayFrequency = mOptions.find("Display Frequency");
-		if(optVideoMode == mOptions.end() || moptColourDepth == mOptions.end() || moptDisplayFrequency == mOptions.end())
-			CM_EXCEPT(InvalidParametersException, "Can't find mOptions!");
-		ConfigOption* optColourDepth = &moptColourDepth->second;
-		ConfigOption* optDisplayFrequency = &moptDisplayFrequency->second;
-
-		const String& val = optVideoMode->second.currentValue;
-		String::size_type pos = val.find('x');
-		if (pos == String::npos)
-			CM_EXCEPT(InvalidParametersException, "Invalid Video Mode provided");
-		DWORD width = parseUnsignedInt(val.substr(0, pos));
-		DWORD height = parseUnsignedInt(val.substr(pos+1, String::npos));
-
-		for(vector<DEVMODE>::type::const_iterator i = mDevModes.begin(); i != mDevModes.end(); ++i)
-		{
-			if (i->dmPelsWidth != width || i->dmPelsHeight != height)
-				continue;
-			optColourDepth->possibleValues.push_back(toString((unsigned int)i->dmBitsPerPel));
-			optDisplayFrequency->possibleValues.push_back(toString((unsigned int)i->dmDisplayFrequency));
-		}
-		remove_duplicates(optColourDepth->possibleValues);
-		remove_duplicates(optDisplayFrequency->possibleValues);
-		optColourDepth->currentValue = optColourDepth->possibleValues.back();
-		bool freqValid = std::find(optDisplayFrequency->possibleValues.begin(),
-			optDisplayFrequency->possibleValues.end(),
-			optDisplayFrequency->currentValue) != optDisplayFrequency->possibleValues.end();
-
-		if ( (optDisplayFrequency->currentValue != "N/A") && !freqValid )			
-			optDisplayFrequency->currentValue = optDisplayFrequency->possibleValues.front();
-	}
-
-	void Win32GLSupport::setConfigOption(const String &name, const String &value)
-	{
-		ConfigOptionMap::iterator it = mOptions.find(name);
-
-		// Update
-		if(it != mOptions.end())
-			it->second.currentValue = value;
-		else
-		{
-            StringUtil::StrStreamType str;
-            str << "Option named '" << name << "' does not exist.";
-			CM_EXCEPT(InvalidParametersException, str.str());
-		}
-
-		if( name == "Video Mode" )
-			refreshConfig();
-
-		if( name == "Full Screen" )
-		{
-			it = mOptions.find( "Display Frequency" );
-			if( value == "No" )
-			{
-				it->second.currentValue = "N/A";
-				it->second.immutable = true;
-			}
-			else
-			{
-				if (it->second.currentValue.empty() || it->second.currentValue == "N/A")
-					it->second.currentValue = it->second.possibleValues.front();
-				it->second.immutable = false;
-			}
-		}
-	}
-
-	String Win32GLSupport::validateConfig()
-	{
-		// TODO, DX9
-		return StringUtil::BLANK;
-	}
-
 	BOOL CALLBACK Win32GLSupport::sCreateMonitorsInfoEnumProc(
 		HMONITOR hMonitor,  // handle to display monitor
 		HDC hdcMonitor,     // handle to monitor DC
@@ -241,7 +56,6 @@ namespace CamelotEngine {
 		return TRUE;
 	}
 
-
 	RenderWindow* Win32GLSupport::newWindow(const String &name, unsigned int width, 
 		unsigned int height, bool fullScreen, const NameValuePairList *miscParams)
 	{		

+ 6 - 6
CamelotRenderer/Include/CmHardwareVertexBuffer.h

@@ -99,17 +99,17 @@ namespace CamelotEngine {
         VET_FLOAT2 = 1,
         VET_FLOAT3 = 2,
         VET_FLOAT4 = 3,
-        /// alias to more specific colour type - use the current rendersystem's colour packing
-		VET_COLOUR = 4,
+        /// alias to more specific color type - use the current rendersystem's color packing
+		VET_COLOR = 4,
 		VET_SHORT1 = 5,
 		VET_SHORT2 = 6,
 		VET_SHORT3 = 7,
 		VET_SHORT4 = 8,
         VET_UBYTE4 = 9,
-        /// D3D style compact colour
-        VET_COLOUR_ARGB = 10,
-        /// GL style compact colour
-        VET_COLOUR_ABGR = 11
+        /// D3D style compact color
+        VET_COLOR_ARGB = 10,
+        /// GL style compact color
+        VET_COLOR_ABGR = 11
     };
 
     /** This class declares the usage of a single vertex buffer as a component

+ 17 - 17
CamelotRenderer/Source/CmHardwareVertexBuffer.cpp

@@ -74,9 +74,9 @@ namespace CamelotEngine {
 	{
 		switch(etype)
 		{
-		case VET_COLOUR:
-		case VET_COLOUR_ABGR:
-		case VET_COLOUR_ARGB:
+		case VET_COLOR:
+		case VET_COLOR_ABGR:
+		case VET_COLOR_ARGB:
 			return sizeof(RGBA);
 		case VET_FLOAT1:
 			return sizeof(float);
@@ -104,9 +104,9 @@ namespace CamelotEngine {
 	{
 		switch (etype)
 		{
-		case VET_COLOUR:
-		case VET_COLOUR_ABGR:
-		case VET_COLOUR_ARGB:
+		case VET_COLOR:
+		case VET_COLOR_ABGR:
+		case VET_COLOR_ARGB:
 			return 1;
 		case VET_FLOAT1:
 			return 1;
@@ -183,9 +183,9 @@ namespace CamelotEngine {
 			// We can't know the specific type right now, so pick a type
 			// based on platform
 #if CM_PLATFORM == CM_PLATFORM_WIN32
-			return VET_COLOUR_ARGB; // prefer D3D format on windows
+			return VET_COLOR_ARGB; // prefer D3D format on windows
 #else
-			return VET_COLOUR_ABGR; // prefer GL format on everything else
+			return VET_COLOR_ABGR; // prefer GL format on everything else
 #endif
 
 		}
@@ -210,12 +210,12 @@ namespace CamelotEngine {
 #if CM_PLATFORM == CM_PLATFORM_WIN32
         default:
 #endif
-		case VET_COLOUR_ARGB:
+		case VET_COLOR_ARGB:
 			return src.getAsARGB();
 #if CM_PLATFORM != CM_PLATFORM_WIN32
         default:
 #endif
-		case VET_COLOUR_ABGR: 
+		case VET_COLOR_ABGR: 
 			return src.getAsABGR();
 		};
 
@@ -230,12 +230,12 @@ namespace CamelotEngine {
 			case VET_FLOAT3:
 			case VET_FLOAT4:
 				return VET_FLOAT1;
-			case VET_COLOUR:
-				return VET_COLOUR;
-			case VET_COLOUR_ABGR:
-				return VET_COLOUR_ABGR;
-			case VET_COLOUR_ARGB:
-				return VET_COLOUR_ARGB;
+			case VET_COLOR:
+				return VET_COLOR;
+			case VET_COLOR_ABGR:
+				return VET_COLOR_ABGR;
+			case VET_COLOR_ARGB:
+				return VET_COLOR_ARGB;
 			case VET_SHORT1:
 			case VET_SHORT2:
 			case VET_SHORT3:
@@ -266,7 +266,7 @@ namespace CamelotEngine {
         VertexElementSemantic semantic, unsigned short index)
     {
 		// Refine colour type to a specific type
-		if (theType == VET_COLOUR)
+		if (theType == VET_COLOR)
 		{
 			theType = VertexElement::getBestColourVertexElementType();
 		}

+ 9 - 9
CamelotRenderer/Source/CmVertexIndexData.cpp

@@ -380,12 +380,12 @@ namespace CamelotEngine {
 	void VertexData::convertPackedColour(
 		VertexElementType srcType, VertexElementType destType)
 	{
-		if (destType != VET_COLOUR_ABGR && destType != VET_COLOUR_ARGB)
+		if (destType != VET_COLOR_ABGR && destType != VET_COLOR_ARGB)
 		{
 			CM_EXCEPT(InvalidParametersException,
 				"Invalid destType parameter");
 		}
-		if (srcType != VET_COLOUR_ABGR && srcType != VET_COLOUR_ARGB)
+		if (srcType != VET_COLOR_ABGR && srcType != VET_COLOR_ARGB)
 		{
 			CM_EXCEPT(InvalidParametersException,
 				"Invalid srcType parameter");
@@ -403,8 +403,8 @@ namespace CamelotEngine {
 			for (elemi = elems.begin(); elemi != elems.end(); ++elemi)
 			{
 				VertexElement& elem = *elemi;
-				if (elem.getType() == VET_COLOUR || 
-					((elem.getType() == VET_COLOUR_ABGR || elem.getType() == VET_COLOUR_ARGB) 
+				if (elem.getType() == VET_COLOR || 
+					((elem.getType() == VET_COLOR_ABGR || elem.getType() == VET_COLOR_ARGB) 
 					&& elem.getType() != destType))
 				{
 					conversionNeeded = true;
@@ -421,10 +421,10 @@ namespace CamelotEngine {
 					for (elemi = elems.begin(); elemi != elems.end(); ++elemi)
 					{
 						VertexElement& elem = *elemi;
-						VertexElementType currType = (elem.getType() == VET_COLOUR) ?
+						VertexElementType currType = (elem.getType() == VET_COLOR) ?
 							srcType : elem.getType();
-						if (elem.getType() == VET_COLOUR || 
-							((elem.getType() == VET_COLOUR_ABGR || elem.getType() == VET_COLOUR_ARGB) 
+						if (elem.getType() == VET_COLOR || 
+							((elem.getType() == VET_COLOR_ABGR || elem.getType() == VET_COLOR_ARGB) 
 							&& elem.getType() != destType))
 						{
 							UINT32* pRGBA;
@@ -445,8 +445,8 @@ namespace CamelotEngine {
 				for (ai = allelems.begin(); ai != allelems.end(); ++ai, ++elemIndex)
 				{
 					const VertexElement& elem = *ai;
-					if (elem.getType() == VET_COLOUR || 
-						((elem.getType() == VET_COLOUR_ABGR || elem.getType() == VET_COLOUR_ARGB) 
+					if (elem.getType() == VET_COLOR || 
+						((elem.getType() == VET_COLOR_ABGR || elem.getType() == VET_COLOR_ARGB) 
 						&& elem.getType() != destType))
 					{
 						vertexDeclaration->modifyElement(elemIndex, 

+ 18 - 4
CamelotRenderer/TODO.txt

@@ -17,9 +17,21 @@
 
 
 /////
+Write a shader preprocessor?
+ - Handles #include files, exposing parameters, and defining HLSL/GLSL blocks
+ - Either that or provide UI support for those things?
+ - I think UI actually sounds better...
+ - Just writing out some thoughts, delete this in a few days
 
-Add support for MultiRenderTexture
-Enhance TextureManager so it creates RenderTextures and MultiRenderTextures
+Creating a primary window and initializing the render system should probably be one step
+ - OpenGL requires it anyway in order to get context (Make sure to update GLRenderWindowManager if I change how this works)
+ - I can't imagine much use for a render system without a window. (Windowless client is a possibility, but in that case entire render system would not be needed)
+ - And if just rendering to texture (or similar) is needed, a hidden window may be used
+
+Don't forget to check out Unity DX11 documentation on how to implement DX11 features (http://docs.unity3d.com/Documentation/Manual/DirectX11.html)
+
+Unity has a common class for both RenderTexture and DepthStencilBuffer
+ - Maybe rename DepthStencilBuffer to DepthStencilTexture?
 
 waitForVsync can probably be moved somewhere other than being directly in RenderSystem? (where is it in DX11?)
 Drop OpenGL support for low level shaders? (See if cg can translate to GLSL)
@@ -34,10 +46,12 @@ Make sure that the simulation can't run faster then the render thread! (Block th
 Figure out how to handle accessing texture from a non-render thread?
 /////
 
+
+
 RenderSystem needed modifications
  - Right now HLSL11 CANNOT SPECIFY TEXTURE PARAMETERS! (Pass needs to be extended)
  - Generic buffers (Normal/Structured/Raw/Append/Consume/Indirect)
- - Unordered access view for OM and CS stages
+ - Unordered access view for OM and CS stages (this should probably just be a flag .enableRandomWrite on Texture & Buffer classes)
  - Ability to bind buffers and texture with different type of view (SHADER_RESOURCE & UNORDERED_ACCESS primarily, major others too)
  - Pass needs to be modified
   - Needs to support bool/double/texture1D/textue3D/textureCUBE/texture arrays/MS textures/all types of buffers/structs
@@ -51,7 +65,7 @@ RenderSystem needed modifications
  - Dynamic shader linkage (Interfaces and similar)
  - Append/Consume buffer
  - 1D/2D/Cube texture arrays
- - Rendertargets that aren't just 2D
+ - Rendertargets that aren't just 2D (Volumetric (3D) render targets in particular)
  - Readable DepthStencil (needs to be assignable to a shader)
  - Multisampled texture resources
  - Multiple adapters (multi gpu)