Quellcode durchsuchen

GpuProgramManager

Marko Pintera vor 13 Jahren
Ursprung
Commit
f9fb224857

+ 2 - 0
CamelotRenderer/CamelotRenderer.vcxproj

@@ -131,6 +131,7 @@
     <ClInclude Include="OgreException.h" />
     <ClInclude Include="OgreFrustum.h" />
     <ClInclude Include="OgreGpuProgram.h" />
+    <ClInclude Include="OgreGpuProgramManager.h" />
     <ClInclude Include="OgreGpuProgramParams.h" />
     <ClInclude Include="OgreHardwareBuffer.h" />
     <ClInclude Include="OgreHardwareBufferManager.h" />
@@ -216,6 +217,7 @@
     <ClCompile Include="OgreException.cpp" />
     <ClCompile Include="OgreFrustum.cpp" />
     <ClCompile Include="OgreGpuProgram.cpp" />
+    <ClCompile Include="OgreGpuProgramManager.cpp" />
     <ClCompile Include="OgreGpuProgramParams.cpp" />
     <ClCompile Include="OgreHardwareBufferManager.cpp" />
     <ClCompile Include="OgreHardwareIndexBuffer.cpp" />

+ 6 - 0
CamelotRenderer/CamelotRenderer.vcxproj.filters

@@ -316,6 +316,9 @@
     <ClInclude Include="OgreCamera.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="OgreGpuProgramManager.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="stdafx.cpp">
@@ -516,5 +519,8 @@
     <ClCompile Include="OgreCamera.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="OgreGpuProgramManager.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
 </Project>

+ 4 - 0
CamelotRenderer/CmApplication.cpp

@@ -21,8 +21,12 @@ namespace CamelotEngine
 		
 		Ogre::RenderSystem* renderSystem = RenderSystemManager::getActive();
 		renderSystem->_initialise(false, "Camelot Renderer");
+
 		mRenderWindow = renderSystem->_createRenderWindow("Camelot Renderer", 800, 600, false);
 
+		//renderSystem->setAmbientLight(1.0f, 1.0f, 1.0f);
+		renderSystem->setLightingEnabled(false);
+
 		mCamera = new Ogre::Camera("SimpleCam", nullptr);
 		mCamera->setPosition(Ogre::Vector3(0,0,80));
 		mCamera->lookAt(Ogre::Vector3(0,0,-300));

+ 8 - 8
CamelotRenderer/OgreD3D9GpuProgram.cpp

@@ -114,7 +114,7 @@ namespace Ogre {
 	}
 
 	//-----------------------------------------------------------------------------
-    void D3D9GpuProgram::loadImpl(void)
+    void D3D9GpuProgram::load(void)
     {
 		D3D9_DEVICE_ACCESS_CRITICAL_SECTION
 
@@ -122,12 +122,12 @@ namespace Ogre {
 		{
 			IDirect3DDevice9* d3d9Device = D3D9RenderSystem::getResourceCreationDevice(i);
 
-			loadImpl(d3d9Device);
+			load(d3d9Device);
 		}		       
     }
 
 	//-----------------------------------------------------------------------------
-	void D3D9GpuProgram::loadImpl(IDirect3DDevice9* d3d9Device)
+	void D3D9GpuProgram::load(IDirect3DDevice9* d3d9Device)
 	{
 		D3D9_DEVICE_ACCESS_CRITICAL_SECTION
 
@@ -152,7 +152,7 @@ namespace Ogre {
 		}
 	}
 	//-----------------------------------------------------------------------------
-	void D3D9GpuProgram::unloadImpl(void)
+	void D3D9GpuProgram::unload(void)
 	{
 		SAFE_RELEASE(mpExternalMicrocode);
 	}
@@ -278,7 +278,7 @@ namespace Ogre {
 			++it;
 		}
 		mMapDeviceToVertexShader.clear();		
-		D3D9GpuProgram::unloadImpl();
+		D3D9GpuProgram::unload();
     }
 
 	//-----------------------------------------------------------------------------
@@ -317,7 +317,7 @@ namespace Ogre {
 		// Shader was not found -> load it.
 		if (it == mMapDeviceToVertexShader.end())		
 		{
-			loadImpl(d3d9Device);		
+			load(d3d9Device);		
 			it = mMapDeviceToVertexShader.find(d3d9Device);
 		}
 	
@@ -385,7 +385,7 @@ namespace Ogre {
 			++it;
 		}
 		mMapDeviceToPixelShader.clear();	
-		D3D9GpuProgram::unloadImpl();
+		D3D9GpuProgram::unload();
     }
 	//-----------------------------------------------------------------------------
 	void D3D9GpuFragmentProgram::notifyOnDeviceCreate(IDirect3DDevice9* d3d9Device)
@@ -423,7 +423,7 @@ namespace Ogre {
 		// Shader was not found -> load it.
 		if (it == mMapDeviceToPixelShader.end())		
 		{
-			loadImpl(d3d9Device);			
+			load(d3d9Device);			
 			it = mMapDeviceToPixelShader.find(d3d9Device);
 		}
 

+ 5 - 6
CamelotRenderer/OgreD3D9GpuProgram.h

@@ -60,6 +60,11 @@ namespace Ogre {
         D3D9GpuProgram();
         ~D3D9GpuProgram();
 
+		void load(void);
+		/** Loads this program to specified device */
+		void load(IDirect3DDevice9* d3d9Device);
+		/** Overridden from GpuProgram */
+		void unload(void);
 
         /** Sets whether matrix packing in column-major order. */ 
         void setColumnMajorMatrices(bool columnMajor) { mColumnMajorMatrices = columnMajor; }
@@ -77,12 +82,6 @@ namespace Ogre {
         /** Gets the external microcode buffer, if any. */
         LPD3DXBUFFER getExternalMicrocode(void);
     protected:
-        /** @copydoc Resource::loadImpl */
-        void loadImpl(void);
-		/** Loads this program to specified device */
-		void loadImpl(IDirect3DDevice9* d3d9Device);
-		/** Overridden from GpuProgram */
-		void unloadImpl(void);
         /** Overridden from GpuProgram */
         void loadFromSource(void);
 		/** Loads this program from source to specified device */

+ 2 - 22
CamelotRenderer/OgreD3D9GpuProgramManager.cpp

@@ -32,6 +32,7 @@ THE SOFTWARE.
 namespace Ogre {
     //-----------------------------------------------------------------------------
     D3D9GpuProgramManager::D3D9GpuProgramManager()
+		:GpuProgramManager()
     {
 
     }
@@ -39,27 +40,6 @@ namespace Ogre {
     D3D9GpuProgramManager::~D3D9GpuProgramManager()
     {
 
-    }
-    //-----------------------------------------------------------------------------
-    GpuProgram* D3D9GpuProgramManager::create(const NameValuePairList* params)
-    {
-        NameValuePairList::const_iterator paramIt;
-
-        if (!params || (paramIt = params->find("type")) == params->end())
-        {
-            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, 
-                "You must supply a 'type' parameter",
-                "D3D9GpuProgramManager::createImpl");
-        }
-
-        if (paramIt->second == "vertex_program")
-        {
-            return new D3D9GpuVertexProgram();
-        }
-        else
-        {
-            return new D3D9GpuFragmentProgram();
-        }
     }
     //-----------------------------------------------------------------------------
     GpuProgram* D3D9GpuProgramManager::create(GpuProgramType gptype, const String& syntaxCode)
@@ -74,7 +54,7 @@ namespace Ogre {
         }
     }
 
-	GpuProgramPtr D3D9GpuProgramManager::createProgramFromString(const String& code, GpuProgramType gptype, const String& syntaxCode)
+	GpuProgramPtr D3D9GpuProgramManager::createProgram(const String& code, GpuProgramType gptype, const String& syntaxCode)
     {
 		GpuProgramPtr prg = GpuProgramPtr(create(gptype, syntaxCode));
         // Set all prarmeters (create does not set, just determines factory)

+ 6 - 7
CamelotRenderer/OgreD3D9GpuProgramManager.h

@@ -30,21 +30,20 @@ THE SOFTWARE.
 
 #include "OgreD3D9Prerequisites.h"
 #include "OgreGpuProgram.h"
+#include "OgreGpuProgramManager.h"
 
 namespace Ogre {
 
-    class _OgreD3D9Export D3D9GpuProgramManager 
+    class _OgreD3D9Export D3D9GpuProgramManager : public GpuProgramManager
     {
     public:
-        /// @copydoc ResourceManager::createImpl
-        static GpuProgram* create(const NameValuePairList* params);
-        /// Specialised create method with specific parameters
-        static GpuProgram* create( GpuProgramType gptype, const String& syntaxCode);
-
-		static GpuProgramPtr createProgramFromString(const String& code, GpuProgramType gptype, const String& syntaxCode);
+		GpuProgramPtr createProgram(const String& code, GpuProgramType gptype, const String& syntaxCode);
     public:
         D3D9GpuProgramManager();
 		~D3D9GpuProgramManager();
+
+	protected:
+		GpuProgram* create( GpuProgramType gptype, const String& syntaxCode);
     };
 
 }

+ 5 - 3
CamelotRenderer/OgreD3D9HLSLProgram.cpp

@@ -26,7 +26,7 @@ THE SOFTWARE.
 -----------------------------------------------------------------------------
 */
 #include "OgreD3D9HLSLProgram.h"
-#include "OgreD3D9GpuProgramManager.h"
+#include "OgreGpuProgramManager.h"
 #include "OgreStringConverter.h"
 #include "OgreD3D9GpuProgram.h"
 #include "OgreException.h"
@@ -59,7 +59,7 @@ namespace Ogre {
 		{
 			// TODO PORT - I'm not sure what to do with this. It will probably break something in its current state.
 
-			// find & load source code
+			//// find & load source code
 			//DataStreamPtr stream = 
 			//	ResourceGroupManager::getSingleton().openResource(
 			//	String(pFileName), mProgram->getGroup(), true, mProgram);
@@ -73,6 +73,8 @@ namespace Ogre {
 			//memcpy(pChar, source.c_str(), *pByteLen);
 			//*ppData = pChar;
 
+			assert(false); // TODO - Include files not supported until I can figure out how to handle them
+
 			return S_OK;
 		}
 
@@ -242,7 +244,7 @@ namespace Ogre {
 		{
 			// Create a low-level program, give it the same name as us
 			mAssemblerProgram = 
-				D3D9GpuProgramManager::createProgramFromString(
+				GpuProgramManager::getSingleton().createProgram(
 					"",// dummy source, since we'll be using microcode
 					mType, 
 					mTarget);

+ 1 - 1
CamelotRenderer/OgreGpuProgram.cpp

@@ -86,7 +86,7 @@ namespace Ogre
 		
 
     //-----------------------------------------------------------------------------
-    void GpuProgram::loadImpl(void)
+    void GpuProgram::load(void)
     {
         // Call polymorphic load
 		try 

+ 2 - 3
CamelotRenderer/OgreGpuProgram.h

@@ -186,9 +186,6 @@ namespace Ogre {
 		/// @copydoc Resource::calculateSize
 		size_t calculateSize(void) const { return 0; } // TODO 
 
-		/// @copydoc Resource::loadImpl
-		void loadImpl(void);
-
 		/// Create the internal params logical & named mapping structures
 		void createParameterMappingStructures(bool recreateIfExists = true) const;
 		/// Create the internal params logical mapping structures
@@ -202,6 +199,8 @@ namespace Ogre {
 
 		virtual ~GpuProgram() {}
 
+		void load(void);
+
         /** Sets the filename of the source assembly for this program.
         @remarks
             Setting this will have no effect until you (re)load the program.

+ 135 - 0
CamelotRenderer/OgreGpuProgramManager.cpp

@@ -0,0 +1,135 @@
+/*
+-----------------------------------------------------------------------------
+This source file is part of OGRE
+    (Object-oriented Graphics Rendering Engine)
+For the latest info, see http://www.ogre3d.org/
+
+Copyright (c) 2000-2011 Torus Knot Software Ltd
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+-----------------------------------------------------------------------------
+*/
+#include "OgreGpuProgramManager.h"
+//#include "OgreHighLevelGpuProgramManager.h"
+#include "OgreRenderSystem.h"
+#include "CmRenderSystemManager.h"
+
+
+namespace Ogre {
+    //-----------------------------------------------------------------------
+    template<> GpuProgramManager* Singleton<GpuProgramManager>::ms_Singleton = 0;
+    GpuProgramManager* GpuProgramManager::getSingletonPtr(void)
+    {
+        return ms_Singleton;
+    }
+    GpuProgramManager& GpuProgramManager::getSingleton(void)
+    {  
+        assert( ms_Singleton );  return ( *ms_Singleton );  
+    }
+	//---------------------------------------------------------------------------
+	GpuProgramManager::GpuProgramManager()
+	{
+		// subclasses should register with resource group manager
+	}
+	//---------------------------------------------------------------------------
+	GpuProgramManager::~GpuProgramManager()
+	{
+		// subclasses should unregister with resource group manager
+	}
+    //---------------------------------------------------------------------------
+	GpuProgramPtr GpuProgramManager::load(const String& code, 
+        GpuProgramType gptype, const String& syntaxCode)
+    {
+		GpuProgramPtr prg;
+		{
+			OGRE_LOCK_AUTO_MUTEX
+			prg = createProgram( code, gptype, syntaxCode);
+		}
+        prg->load();
+        return prg;
+    }
+    //---------------------------------------------------------------------------
+	GpuProgramPtr GpuProgramManager::createProgram(const String& code, GpuProgramType gptype, 
+		const String& syntaxCode)
+    {
+		GpuProgramPtr prg = GpuProgramPtr(create(gptype, syntaxCode));
+        // Set all prarmeters (create does not set, just determines factory)
+		prg->setType(gptype);
+		prg->setSyntaxCode(syntaxCode);
+		prg->setSource(code);
+        return prg;
+    }
+    //---------------------------------------------------------------------------
+		const GpuProgramManager::SyntaxCodes& GpuProgramManager::getSupportedSyntax(void) const
+        {
+			// Use the current render system
+			RenderSystem* rs = CamelotEngine::RenderSystemManager::getActive();
+
+			// Get the supported syntaxed from RenderSystemCapabilities 
+			return rs->getCapabilities()->getSupportedShaderProfiles();
+        }
+
+    //---------------------------------------------------------------------------
+    bool GpuProgramManager::isSyntaxSupported(const String& syntaxCode) const
+        {
+			// Use the current render system
+			RenderSystem* rs = CamelotEngine::RenderSystemManager::getActive();
+
+			// Get the supported syntaxed from RenderSystemCapabilities 
+			return rs->getCapabilities()->isShaderProfileSupported(syntaxCode);
+		}
+	//-----------------------------------------------------------------------------
+	GpuProgramParametersSharedPtr GpuProgramManager::createParameters(void)
+	{
+		return GpuProgramParametersSharedPtr(OGRE_NEW GpuProgramParameters());
+	}
+	//---------------------------------------------------------------------
+	GpuSharedParametersPtr GpuProgramManager::createSharedParameters(const String& name)
+	{
+		if (mSharedParametersMap.find(name) != mSharedParametersMap.end())
+		{
+			OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, 
+				"The shared parameter set '" + name + "' already exists!", 
+				"GpuProgramManager::createSharedParameters");
+		}
+		GpuSharedParametersPtr ret(OGRE_NEW GpuSharedParameters(name));
+		mSharedParametersMap[name] = ret;
+		return ret;
+	}
+	//---------------------------------------------------------------------
+	GpuSharedParametersPtr GpuProgramManager::getSharedParameters(const String& name) const
+	{
+		SharedParametersMap::const_iterator i = mSharedParametersMap.find(name);
+		if (i == mSharedParametersMap.end())
+		{
+			OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, 
+				"No shared parameter set with name '" + name + "'!", 
+				"GpuProgramManager::createSharedParameters");
+		}
+		return i->second;
+	}
+	//---------------------------------------------------------------------
+	const GpuProgramManager::SharedParametersMap& 
+	GpuProgramManager::getAvailableSharedParameters() const
+	{
+		return mSharedParametersMap;
+	}
+	//---------------------------------------------------------------------
+
+}

+ 167 - 0
CamelotRenderer/OgreGpuProgramManager.h

@@ -0,0 +1,167 @@
+/*
+-----------------------------------------------------------------------------
+This source file is part of OGRE
+    (Object-oriented Graphics Rendering Engine)
+For the latest info, see http://www.ogre3d.org/
+
+Copyright (c) 2000-2011 Torus Knot Software Ltd
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+-----------------------------------------------------------------------------
+*/
+#ifndef __GpuProgramManager_H_
+#define __GpuProgramManager_H_
+
+// Precompiler options
+#include "OgrePrerequisites.h"
+#include "OgreException.h"
+#include "OgreGpuProgram.h"
+#include "OgreSingleton.h"
+
+namespace Ogre {
+
+	/** \addtogroup Core
+	*  @{
+	*/
+	/** \addtogroup Resources
+	*  @{
+	*/
+	class _OgreExport GpuProgramManager : public Singleton<GpuProgramManager>
+	{
+	public:
+
+		typedef set<String>::type SyntaxCodes;
+		typedef map<String, GpuSharedParametersPtr>::type SharedParametersMap;
+
+
+	protected:
+
+		SharedParametersMap mSharedParametersMap;
+
+		/** General create method
+        */
+        virtual GpuProgram* create(GpuProgramType gptype, const String& syntaxCode) = 0;
+
+	public:
+		GpuProgramManager();
+		virtual ~GpuProgramManager();
+
+		/** Loads a GPU program from a string of assembly code.
+		@remarks
+			The assembly code must be compatible with this manager - call the 
+			getSupportedSyntax method for details of the supported syntaxes 
+		@param name The identifying name to give this program, which can be used to
+			retrieve this program later with getByName.
+		@param groupName The name of the resource group
+		@param code A string of assembly code which will form the program to run
+		@param gptype The type of program to create.
+        @param syntaxCode The name of the syntax to be used for this program e.g. arbvp1, vs_1_1
+		*/
+		virtual GpuProgramPtr load(const String& code, GpuProgramType gptype,
+            const String& syntaxCode);
+
+		/** Returns the syntaxes that this manager supports. */
+		virtual const SyntaxCodes& getSupportedSyntax(void) const;
+		 
+
+        /** Returns whether a given syntax code (e.g. "ps_1_3", "fp20", "arbvp1") is supported. */
+        virtual bool isSyntaxSupported(const String& syntaxCode) const;
+		
+		/** Creates a new GpuProgramParameters instance which can be used to bind
+            parameters to your programs.
+        @remarks
+            Program parameters can be shared between multiple programs if you wish.
+        */
+        virtual GpuProgramParametersSharedPtr createParameters(void);
+        
+		/** Create a GPU program from a string of assembly code.
+        @remarks    
+            Use this method in preference to the 'load' methods if you wish to define
+            a GpuProgram, but not load it yet; useful for saving memory.
+		@par
+			The assembly code must be compatible with this manager - call the 
+			getSupportedSyntax method for details of the supported syntaxes 
+		@param name The identifying name to give this program, which can be used to
+			retrieve this program later with getByName.
+		@param groupName The name of the resource group
+		@param code A string of assembly code which will form the program to run
+		@param gptype The type of program to create.
+        @param syntaxCode The name of the syntax to be used for this program e.g. arbvp1, vs_1_1
+		*/
+		virtual GpuProgramPtr createProgram(const String& code, 
+            GpuProgramType gptype, const String& syntaxCode);
+
+		/** Create a new set of shared parameters, which can be used across many 
+			GpuProgramParameters objects of different structures.
+		@param name The name to give the shared parameters so you can refer to them
+			later.
+		*/
+		virtual GpuSharedParametersPtr createSharedParameters(const String& name);
+
+		/** Retrieve a set of shared parameters, which can be used across many 
+		GpuProgramParameters objects of different structures.
+		*/
+		virtual GpuSharedParametersPtr getSharedParameters(const String& name) const;
+
+		/** Get (const) access to the available shared parameter sets. 
+		*/
+		virtual const SharedParametersMap& getAvailableSharedParameters() const;
+
+        /** Override standard Singleton retrieval.
+        @remarks
+        Why do we do this? Well, it's because the Singleton
+        implementation is in a .h file, which means it gets compiled
+        into anybody who includes it. This is needed for the
+        Singleton template to work, but we actually only want it
+        compiled into the implementation of the class based on the
+        Singleton, not all of them. If we don't change this, we get
+        link errors when trying to use the Singleton-based class from
+        an outside dll.
+        @par
+        This method just delegates to the template version anyway,
+        but the implementation stays in this single compilation unit,
+        preventing link errors.
+        */
+        static GpuProgramManager& getSingleton(void);
+        /** Override standard Singleton retrieval.
+        @remarks
+        Why do we do this? Well, it's because the Singleton
+        implementation is in a .h file, which means it gets compiled
+        into anybody who includes it. This is needed for the
+        Singleton template to work, but we actually only want it
+        compiled into the implementation of the class based on the
+        Singleton, not all of them. If we don't change this, we get
+        link errors when trying to use the Singleton-based class from
+        an outside dll.
+        @par
+        This method just delegates to the template version anyway,
+        but the implementation stays in this single compilation unit,
+        preventing link errors.
+        */
+        static GpuProgramManager* getSingletonPtr(void);
+    
+
+
+	};
+
+	/** @} */
+	/** @} */
+}
+
+#endif

+ 2 - 2
CamelotRenderer/OgreHighLevelGpuProgram.cpp

@@ -37,7 +37,7 @@ namespace Ogre
     {
     }
     //---------------------------------------------------------------------------
-    void HighLevelGpuProgram::loadImpl()
+    void HighLevelGpuProgram::load()
     {
 		if (isSupported())
 		{
@@ -50,7 +50,7 @@ namespace Ogre
 		}
     }
     //---------------------------------------------------------------------------
-    void HighLevelGpuProgram::unloadImpl()
+    void HighLevelGpuProgram::unload()
     {   
         if (!mAssemblerProgram.isNull() && mAssemblerProgram.getPointer() != this)
         {

+ 2 - 4
CamelotRenderer/OgreHighLevelGpuProgram.h

@@ -93,15 +93,13 @@ namespace Ogre {
 		*/
 		virtual void buildConstantDefinitions() const = 0;
 
-        /** @copydoc Resource::loadImpl */
-        void loadImpl();
-        /** @copydoc Resource::unloadImpl */
-        void unloadImpl();
     public:
         /** Constructor, should be used only by factory classes. */
         HighLevelGpuProgram();
         ~HighLevelGpuProgram();
 
+		void load();
+		void unload();
 
         /** Creates a new parameters object compatible with this program definition. 
         @remarks

+ 2 - 1
CamelotRenderer/TODO.txt

@@ -96,4 +96,5 @@ Other notes:
  
 After everything is polished:
  - Make sure the renderer can run on a separate thread
- - Get 64bit version working
+ - Get 64bit version working
+ - Add Unified shader so I can easily switch between HLSL and GLSL shaders (they need same parameters usually, just different code)