Marko Pintera před 13 roky
rodič
revize
fbf6fa6b0a
27 změnil soubory, kde provedl 511 přidání a 105 odebrání
  1. 2 0
      CamelotRenderer/CamelotRenderer.vcxproj
  2. 6 0
      CamelotRenderer/CamelotRenderer.vcxproj.filters
  3. 7 11
      CamelotRenderer/OgreD3D9Device.cpp
  4. 2 4
      CamelotRenderer/OgreD3D9DeviceManager.cpp
  5. 5 6
      CamelotRenderer/OgreD3D9GpuProgram.cpp
  6. 3 7
      CamelotRenderer/OgreD3D9RenderSystem.cpp
  7. 1 1
      CamelotRenderer/OgreD3D9RenderWindow.cpp
  8. 4 4
      CamelotRenderer/OgreD3D9Resource.cpp
  9. 3 3
      CamelotRenderer/OgreD3D9TextureManager.cpp
  10. 5 6
      CamelotRenderer/OgreD3D9TextureManager.h
  11. 0 36
      CamelotRenderer/OgreGpuProgramParams.h
  12. 1 1
      CamelotRenderer/OgreHardwareBufferManager.cpp
  13. 0 3
      CamelotRenderer/OgreHardwareBufferManager.h
  14. 122 0
      CamelotRenderer/OgreTextureManager.cpp
  15. 327 0
      CamelotRenderer/OgreTextureManager.h
  16. 3 2
      CamelotRenderer/RenderSystemGL/Include/OgreGLTextureManager.h
  17. 1 1
      CamelotRenderer/RenderSystemGL/Source/GLSL/src/OgreGLSLExtSupport.cpp
  18. 1 1
      CamelotRenderer/RenderSystemGL/Source/GLSL/src/OgreGLSLLinkProgramManager.cpp
  19. 1 1
      CamelotRenderer/RenderSystemGL/Source/GLSL/src/OgreGLSLPreprocessor.cpp
  20. 1 1
      CamelotRenderer/RenderSystemGL/Source/OgreGLFBORenderTexture.cpp
  21. 1 1
      CamelotRenderer/RenderSystemGL/Source/OgreGLGpuNvparseProgram.cpp
  22. 1 1
      CamelotRenderer/RenderSystemGL/Source/OgreGLGpuProgram.cpp
  23. 5 6
      CamelotRenderer/RenderSystemGL/Source/OgreGLRenderSystem.cpp
  24. 2 2
      CamelotRenderer/RenderSystemGL/Source/OgreGLTexture.cpp
  25. 2 2
      CamelotRenderer/RenderSystemGL/Source/OgreGLTextureManager.cpp
  26. 4 4
      CamelotRenderer/RenderSystemGL/Source/OgreWin32Window.cpp
  27. 1 1
      CamelotRenderer/RenderSystemGL/Source/atifs/src/ATI_FS_GLGpuProgram.cpp

+ 2 - 0
CamelotRenderer/CamelotRenderer.vcxproj

@@ -171,6 +171,7 @@
     <ClInclude Include="OgreStringInterface.h" />
     <ClInclude Include="OgreStringVector.h" />
     <ClInclude Include="OgreTexture.h" />
+    <ClInclude Include="OgreTextureManager.h" />
     <ClInclude Include="OgreTextureUnitState.h" />
     <ClInclude Include="OgreThreadDefines.h" />
     <ClInclude Include="OgreVector2.h" />
@@ -300,6 +301,7 @@
     <ClCompile Include="OgreStringConverter.cpp" />
     <ClCompile Include="OgreStringInterface.cpp" />
     <ClCompile Include="OgreTexture.cpp" />
+    <ClCompile Include="OgreTextureManager.cpp" />
     <ClCompile Include="OgreTextureUnitState.cpp" />
     <ClCompile Include="OgreVector2.cpp" />
     <ClCompile Include="OgreVector3.cpp" />

+ 6 - 0
CamelotRenderer/CamelotRenderer.vcxproj.filters

@@ -514,6 +514,9 @@
     <ClInclude Include="RenderSystemGL\Include\CmGLRenderSystemFactory.h">
       <Filter>RenderSystemGL\Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="OgreTextureManager.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="stdafx.cpp">
@@ -897,5 +900,8 @@
     <ClCompile Include="RenderSystemGL\Source\CmGLRenderSystemFactory.cpp">
       <Filter>RenderSystemGL\Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="OgreTextureManager.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
 </Project>

+ 7 - 11
CamelotRenderer/OgreD3D9Device.cpp

@@ -375,9 +375,8 @@ namespace Ogre
 		// Inform all resources that device lost.
 		D3D9RenderSystem::getResourceManager()->notifyOnDeviceLost(mpDevice);
 
-		// TODO PORT - Make sure to call this once rendersystem is active
 		// Notify all listener before device is rested
-		//renderSystem->notifyOnDeviceLost(this);
+		renderSystem->notifyOnDeviceLost(this);
 
 		// Release all automatic temporary buffers and free unused
 		// temporary buffers, so we doesn't need to recreate them,
@@ -386,9 +385,8 @@ namespace Ogre
 		// wasn't need at all.
 		HardwareBufferManager::getSingleton()._releaseBufferCopies(true);
 
-		// TODO PORT - Make sure to call this once rendersystem is active
 		// Cleanup depth stencils surfaces.
-		//renderSystem->_cleanupDepthStencils(mpDevice);
+		renderSystem->_cleanupDepthStencils(mpDevice);
 
 		updatePresentationParameters();
 
@@ -446,8 +444,7 @@ namespace Ogre
 
 		mpDeviceManager->setActiveDevice(pCurActiveDevice);
 		
-		// TODO PORT - Make sure to call this once rendersystem is active
-		//renderSystem->notifyOnDeviceReset(this);
+		renderSystem->notifyOnDeviceReset(this);
 
 		// UnLock access to rendering device.
 		D3D9RenderSystem::getResourceManager()->unlockDeviceAccess();
@@ -623,12 +620,11 @@ namespace Ogre
 				}
 			}			
 		
-			// TODO PORT - Make sure to call this once rendersystem is active
 			// set stage desc. to defaults
-			//renderSystem->mTexStageDesc[stage].pTex = 0;
-			//renderSystem->mTexStageDesc[stage].autoTexCoordType = TEXCALC_NONE;
-			//renderSystem->mTexStageDesc[stage].coordIndex = 0;
-			//renderSystem->mTexStageDesc[stage].texType = D3D9Mappings::D3D_TEX_TYPE_NORMAL;
+			renderSystem->mTexStageDesc[stage].pTex = 0;
+			renderSystem->mTexStageDesc[stage].autoTexCoordType = TEXCALC_NONE;
+			renderSystem->mTexStageDesc[stage].coordIndex = 0;
+			renderSystem->mTexStageDesc[stage].texType = D3D9Mappings::D3D_TEX_TYPE_NORMAL;
 		}
 
 		// Unbind any vertex streams to avoid memory leaks				

+ 2 - 4
CamelotRenderer/OgreD3D9DeviceManager.cpp

@@ -154,8 +154,6 @@ namespace Ogre
 	//---------------------------------------------------------------------
 	D3D9Device* D3D9DeviceManager::selectDevice(D3D9RenderWindow* renderWindow, D3D9RenderWindowList& renderWindowsGroup)
 	{
-		// TODO PORT - Make sure to enable once rendersystem is active
-		
 		D3D9RenderSystem*		renderSystem	 = static_cast<D3D9RenderSystem*>(CamelotEngine::RenderSystemManager::getActive());
 		D3D9Device*				renderDevice	 = NULL;	
 		IDirect3D9*				direct3D9	     = D3D9RenderSystem::getDirect3D9();
@@ -218,7 +216,7 @@ namespace Ogre
 				if (osVersionInfo.dwMajorVersion <= 5 && renderWindow->isVSync())
 				{
 					bTryUsingMultiheadDevice = FALSE;
-					// TODO PORT - Log this somewhere
+					// TODO LOG PORT - Log this somewhere
 					//LogManager::getSingleton().logMessage("D3D9 : Multi head disabled. It causes horizontal line when used in XP + VSync combination");
 				}		
 
@@ -229,7 +227,7 @@ namespace Ogre
 
 				{
 					bTryUsingMultiheadDevice = FALSE;
-					// TODO PORT - Log this somewhere
+					// TODO LOG PORT - Log this somewhere
 					//LogManager::getSingleton().logMessage("D3D9 : Multi head disabled. It causes application run time crashes when used in Vista + SP 1 or 2 combination");
 				}				
 			}

+ 5 - 6
CamelotRenderer/OgreD3D9GpuProgram.cpp

@@ -183,10 +183,9 @@ namespace Ogre {
 
 		if (FAILED(hr))
 		{
-			// TODO PORT - Not printing out errors yet
-			//String message = "Cannot assemble D3D9 shader. Errors:\n" +
-			//	static_cast<const char*>(errors->GetBufferPointer());
-			String message = "Cannot assemble D3D9 shader. Errors:\n NoErrorsPort";
+			String message = "Cannot assemble D3D9 shader. Errors:\n";
+			message += static_cast<const char*>(errors->GetBufferPointer());
+
 			errors->Release();
 			OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, message,
 				"D3D9GpuProgram::loadFromSource");
@@ -252,7 +251,7 @@ namespace Ogre {
 				"Specified D3D9 vertex shader is not supported!",
 				"D3D9GpuVertexProgram::loadFromMicrocode");
 
-			// TODO PORT - Log this error somewhere
+			// TODO LOG PORT - Log this error somewhere
 			//LogManager::getSingleton().logMessage(
 			//	"Unsupported D3D9 vertex shader '" + mName + "' was not loaded.");
 
@@ -359,7 +358,7 @@ namespace Ogre {
 		}
 		else
 		{
-			// TODO PORT - Log this somewhere
+			// TODO LOG PORT - Log this somewhere
 			//LogManager::getSingleton().logMessage(
 			//	"Unsupported D3D9 pixel shader was not loaded.");
 

+ 3 - 7
CamelotRenderer/OgreD3D9RenderSystem.cpp

@@ -78,7 +78,6 @@ namespace Ogre
 		// Create the resource manager.
 		mResourceManager = new D3D9ResourceManager();
 
-		
 		// init lights
 		for(int i = 0; i < MAX_LIGHTS; i++ )
 			mLights[i] = 0;
@@ -120,10 +119,8 @@ namespace Ogre
 		// Deleting the HLSL program factory
 		if (mHLSLProgramFactory)
 		{
-			// TODO PORT - If i'll be supporting factories in this way, enable this
-			//// Remove from manager safely
-			//if (HighLevelGpuProgramManager::getSingletonPtr())
-			//	HighLevelGpuProgramManager::getSingleton().removeFactory(mHLSLProgramFactory);
+			if (HighLevelGpuProgramManager::getSingletonPtr())
+				HighLevelGpuProgramManager::getSingleton().removeFactory(mHLSLProgramFactory);
 			delete mHLSLProgramFactory;
 			mHLSLProgramFactory = 0;
 		}
@@ -519,8 +516,7 @@ namespace Ogre
 		mDeviceManager = new D3D9DeviceManager();
 
 		// Create the texture manager for use by others		
-		// TODO PORT - Texture manager is null! This is bound to cause problems but I need to get this compiling
-		//mTextureManager = new D3D9TextureManager();
+		mTextureManager = new D3D9TextureManager();
 
 		// Also create hardware buffer manager		
 		mHardwareBufferManager = new D3D9HardwareBufferManager();

+ 1 - 1
CamelotRenderer/OgreD3D9RenderWindow.cpp

@@ -556,7 +556,7 @@ namespace Ogre
 			// low is < 200fps in this context
 			if (!mIsFullScreen)
 			{
-				// TODO PORT - Enable this warning later?
+				// TODO LOG PORT - Enable this warning later?
 				//LogManager::getSingleton().logMessage("D3D9 : WARNING - "
 				//	"disabling VSync in windowed mode can cause timing issues at lower "
 				//	"frame rates, turn VSync on if you observe this problem.");

+ 4 - 4
CamelotRenderer/OgreD3D9Resource.cpp

@@ -26,6 +26,8 @@ THE SOFTWARE.
 -----------------------------------------------------------------------------
 */
 #include "OgreD3D9Resource.h"
+#include "OgreD3D9ResourceManager.h"
+#include "OgreD3D9RenderSystem.h"
 
 namespace Ogre
 {
@@ -33,14 +35,12 @@ namespace Ogre
 
 	D3D9Resource::D3D9Resource()
 	{				
-		// TODO PORT - Ignored temporarily until I get resource manager set up
-		// D3D9RenderSystem::getResourceManager()->_notifyResourceCreated(static_cast<D3D9Resource*>(this));		
+		D3D9RenderSystem::getResourceManager()->_notifyResourceCreated(static_cast<D3D9Resource*>(this));		
 	}
 
 	D3D9Resource::~D3D9Resource()
 	{		
-		// TODO PORT - Ignored temporarily until I get resource manager set up
-		//D3D9RenderSystem::getResourceManager()->_notifyResourceDestroyed(static_cast<D3D9Resource*>(this));
+		D3D9RenderSystem::getResourceManager()->_notifyResourceDestroyed(static_cast<D3D9Resource*>(this));
 	}
 	
 	void D3D9Resource::lockDeviceAccess()

+ 3 - 3
CamelotRenderer/OgreD3D9TextureManager.cpp

@@ -36,6 +36,7 @@ THE SOFTWARE.
 namespace Ogre 
 {
 	D3D9TextureManager::D3D9TextureManager()
+		:TextureManager()
 	{		
 	}
 	
@@ -44,10 +45,9 @@ namespace Ogre
 
 	}
 
-    D3D9Texture* D3D9TextureManager::create(const NameValuePairList* createParams)
+    D3D9Texture* D3D9TextureManager::createImpl()
     {
-        D3D9Texture* ret = new D3D9Texture(); 		
-		return ret;
+		return new D3D9Texture();
     }
 
 	PixelFormat D3D9TextureManager::getNativeFormat(TextureType ttype, PixelFormat format, int usage)

+ 5 - 6
CamelotRenderer/OgreD3D9TextureManager.h

@@ -30,26 +30,25 @@ THE SOFTWARE.
 
 #include "OgreD3D9Prerequisites.h"
 #include "OgreD3D9Texture.h"
+#include "OgreTextureManager.h"
 
 namespace Ogre 
 {
-	class _OgreD3D9Export D3D9TextureManager
+	class _OgreD3D9Export D3D9TextureManager : public TextureManager
 	{
-	public:		
-        /// @copydoc ResourceManager::create
-        static D3D9Texture* create(const NameValuePairList* createParams);
-
 	public:
 		D3D9TextureManager();
 		~D3D9TextureManager();
 
-
 		/// @copydoc TextureManager::getNativeFormat
 		PixelFormat getNativeFormat(TextureType ttype, PixelFormat format, int usage);
 
         /// @copydoc TextureManager::isHardwareFilteringSupported
         bool isHardwareFilteringSupported(TextureType ttype, PixelFormat format, int usage,
             bool preciseFormatOnly = false);		
+
+	protected:		
+		D3D9Texture* createImpl();
 	};
 }
 #endif

+ 0 - 36
CamelotRenderer/OgreGpuProgramParams.h

@@ -369,10 +369,6 @@ namespace Ogre {
 		IntConstantList mIntConstants;
 		String mName;
 
-		// Optional data the rendersystem might want to store
-		// TODO PORT - Commented out because I don't think anything uses this and it requires an extra include 
-		//mutable Any mRenderSystemData;
-
 		/// Not used when copying data, but might be useful to RS using shared buffers
 		size_t mFrameLastUpdated;
 
@@ -459,14 +455,6 @@ namespace Ogre {
 		int* getIntPointer(size_t pos) { _markDirty(); return &mIntConstants[pos]; }
 		/// Get a pointer to the 'nth' item in the int buffer
 		const int* getIntPointer(size_t pos) const { return &mIntConstants[pos]; }
-
-
-		// TODO PORT - Commented out for the same reason as mRenderSystemData (see above)
-		///** Internal method that the RenderSystem might use to store optional data. */
-		//void _setRenderSystemData(const Any& data) const { mRenderSystemData = data; }
-		///** Internal method that the RenderSystem might use to store optional data. */
-		//const Any& _getRenderSystemData() const { return mRenderSystemData; }
-
 	};
 
 	/// Shared pointer used to hold references to GpuProgramParameters instances
@@ -493,10 +481,6 @@ namespace Ogre {
 
 		CopyDataList mCopyDataList;
 
-		// Optional data the rendersystem might want to store
-		// TODO PORT - Commented out because I don't think its used
-		//mutable Any mRenderSystemData;
-
 		/// Version of shared params we based the copydata on
 		unsigned long mCopyDataVersion;
 
@@ -522,14 +506,6 @@ namespace Ogre {
 
 		GpuSharedParametersPtr getSharedParams() const { return mSharedParams; }
 		GpuProgramParameters* getTargetParams() const { return mParams; }
-
-		// TODO PORT - Commented out for the same reason as mRenderSystemData (see above)
-		///** Internal method that the RenderSystem might use to store optional data. */
-		//void _setRenderSystemData(const Any& data) const { mRenderSystemData = data; }
-		///** Internal method that the RenderSystem might use to store optional data. */
-		//const Any& _getRenderSystemData() const { return mRenderSystemData; }
-
-
 	};
 
 	/** Collects together the program parameters used for a GpuProgram.
@@ -1129,12 +1105,6 @@ namespace Ogre {
 
 		GpuSharedParamUsageList mSharedParamSets;
 
-		//// Optional data the rendersystem might want to store
-		// TODO PORT - Commented out because I dont think its used
-		//mutable Any mRenderSystemData;
-
-
-
 	public:
 		GpuProgramParameters();
 		~GpuProgramParameters() {}
@@ -1777,12 +1747,6 @@ namespace Ogre {
 		/** Get the list of shared parameter sets. */
 		const GpuSharedParamUsageList& getSharedParameters() const;
 
-		// TODO PORT - Commented out for the same reason as mRenderSystemData (see above)
-		///** Internal method that the RenderSystem might use to store optional data. */
-		//void _setRenderSystemData(const Any& data) const { mRenderSystemData = data; }
-		///** Internal method that the RenderSystem might use to store optional data. */
-		//const Any& _getRenderSystemData() const { return mRenderSystemData; }
-
 		/** Update the parameters by copying the data from the shared
 		parameters.
 		@note This method  may not actually be called if the RenderSystem

+ 1 - 1
CamelotRenderer/OgreHardwareBufferManager.cpp

@@ -265,7 +265,7 @@ namespace Ogre {
             }
         }
 
-		// TODO PORT - Log ignored
+		// TODO LOG PORT - Log ignored
         //StringUtil::StrStreamType str;
         //if (numFreed)
         //{

+ 0 - 3
CamelotRenderer/OgreHardwareBufferManager.h

@@ -35,9 +35,6 @@ THE SOFTWARE.
 #include "OgreHardwareVertexBuffer.h"
 #include "OgreHardwareIndexBuffer.h"
 
-// TODO PORT - Removed this include because I don't think it's implemented, nor do I need it for default funcionality
-//#include "OgreRenderToVertexBuffer.h"
-
 namespace Ogre {
 	/** \addtogroup Core
 	*  @{

+ 122 - 0
CamelotRenderer/OgreTextureManager.cpp

@@ -0,0 +1,122 @@
+/*
+-----------------------------------------------------------------------------
+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 "OgreTextureManager.h"
+#include "OgreException.h"
+#include "OgrePixelFormat.h"
+
+namespace Ogre {
+    //-----------------------------------------------------------------------
+    template<> TextureManager* Singleton<TextureManager>::ms_Singleton = 0;
+    TextureManager* TextureManager::getSingletonPtr(void)
+    {
+        return ms_Singleton;
+    }
+    TextureManager& TextureManager::getSingleton(void)
+    {  
+        assert( ms_Singleton );  return ( *ms_Singleton );  
+    }
+    //-----------------------------------------------------------------------
+    TextureManager::TextureManager(void)
+         : mPreferredIntegerBitDepth(0)
+         , mPreferredFloatBitDepth(0)
+         , mDefaultNumMipmaps(MIP_UNLIMITED)
+    {
+
+        // Subclasses should register (when this is fully constructed)
+    }
+    //-----------------------------------------------------------------------
+    TextureManager::~TextureManager()
+    {
+        // subclasses should unregister with resource group manager
+
+    }
+    //-----------------------------------------------------------------------
+    TexturePtr TextureManager::create(TextureType texType, uint width, uint height, uint depth, int numMipmaps,
+        PixelFormat format, int usage, ManualResourceLoader* loader, bool hwGamma, 
+		uint fsaa, const String& fsaaHint)
+    {
+        TexturePtr ret = TexturePtr(createImpl());
+        ret->setTextureType(texType);
+        ret->setWidth(width);
+        ret->setHeight(height);
+		ret->setDepth(depth);
+        ret->setNumMipmaps((numMipmaps == MIP_DEFAULT)? mDefaultNumMipmaps :
+			static_cast<size_t>(numMipmaps));
+        ret->setFormat(format);
+        ret->setUsage(usage);
+		ret->setHardwareGammaEnabled(hwGamma);
+		ret->setFSAA(fsaa, fsaaHint);
+		ret->createInternalResources();
+		return ret;
+    }
+    //-----------------------------------------------------------------------
+    void TextureManager::setPreferredIntegerBitDepth(ushort bits)
+    {
+        mPreferredIntegerBitDepth = bits;
+    }
+    //-----------------------------------------------------------------------
+    ushort TextureManager::getPreferredIntegerBitDepth(void) const
+    {
+        return mPreferredIntegerBitDepth;
+    }
+    //-----------------------------------------------------------------------
+    void TextureManager::setPreferredFloatBitDepth(ushort bits)
+    {
+        mPreferredFloatBitDepth = bits;
+    }
+    //-----------------------------------------------------------------------
+    ushort TextureManager::getPreferredFloatBitDepth(void) const
+    {
+        return mPreferredFloatBitDepth;
+    }
+    //-----------------------------------------------------------------------
+    void TextureManager::setPreferredBitDepths(ushort integerBits, ushort floatBits)
+    {
+        mPreferredIntegerBitDepth = integerBits;
+        mPreferredFloatBitDepth = floatBits;
+    }
+    //-----------------------------------------------------------------------
+    void TextureManager::setDefaultNumMipmaps( size_t num )
+    {
+        mDefaultNumMipmaps = num;
+    }
+    //-----------------------------------------------------------------------
+	bool TextureManager::isFormatSupported(TextureType ttype, PixelFormat format, int usage)
+	{
+		return getNativeFormat(ttype, format, usage) == format;
+	}
+    //-----------------------------------------------------------------------
+	bool TextureManager::isEquivalentFormatSupported(TextureType ttype, PixelFormat format, int usage)
+	{
+		PixelFormat supportedFormat = getNativeFormat(ttype, format, usage);
+
+		// Assume that same or greater number of bits means quality not degraded
+		return PixelUtil::getNumElemBits(supportedFormat) >= PixelUtil::getNumElemBits(format);
+		
+	}
+}

+ 327 - 0
CamelotRenderer/OgreTextureManager.h

@@ -0,0 +1,327 @@
+/*
+-----------------------------------------------------------------------------
+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 _TextureManager_H__
+#define _TextureManager_H__
+
+
+#include "OgrePrerequisites.h"
+
+#include "OgreTexture.h"
+#include "OgreSingleton.h"
+
+
+namespace Ogre {
+
+	/** \addtogroup Core
+	*  @{
+	*/
+	/** \addtogroup Resources
+	*  @{
+	*/
+	/** Class for loading & managing textures.
+        @remarks
+            Note that this class is abstract - the particular
+            RenderSystem that is in use at the time will create
+            a concrete subclass of this. Note that the concrete
+            class will be available via the abstract singleton
+            obtained from TextureManager::getSingleton(), but
+            you should not assume that it is available until you
+            have a) initialised Ogre (after selecting a RenderSystem
+            and calling initialise from the Root object), and b)
+            created at least one window - this may be done at the
+            same time as part a if you allow Ogre to autocreate one.
+     */
+    class _OgreExport TextureManager : public Singleton<TextureManager>
+    {
+		protected:
+			virtual Texture* createImpl() = 0;
+
+    public:
+
+        TextureManager(void);
+        virtual ~TextureManager();
+
+		/** Create a manual texture with specified width, height and depth (not loaded from a file).
+            @param
+                name The name to give the resulting texture
+            @param
+                group The name of the resource group to assign the texture to
+            @param
+                texType The type of texture to load/create, defaults to normal 2D textures
+            @param
+                width, height, depth The dimensions of the texture
+            @param
+                numMipmaps The number of pre-filtered mipmaps to generate. If left to MIP_DEFAULT then
+                the TextureManager's default number of mipmaps will be used (see setDefaultNumMipmaps())
+				If set to MIP_UNLIMITED mipmaps will be generated until the lowest possible
+				level, 1x1x1.
+            @param
+                format The internal format you wish to request; the manager reserves
+                the right to create a different format if the one you select is
+                not available in this context.
+			@param 
+				usage The kind of usage this texture is intended for. It 
+				is a combination of TU_STATIC, TU_DYNAMIC, TU_WRITE_ONLY, 
+				TU_AUTOMIPMAP and TU_RENDERTARGET (see TextureUsage enum). You are
+            	strongly advised to use HBU_STATIC_WRITE_ONLY wherever possible, if you need to 
+            	update regularly, consider HBU_DYNAMIC_WRITE_ONLY.
+            @param
+                loader If you intend the contents of the manual texture to be 
+                regularly updated, to the extent that you don't need to recover 
+                the contents if the texture content is lost somehow, you can leave
+                this parameter as 0. However, if you intend to populate the
+                texture only once, then you should implement ManualResourceLoader
+                and pass a pointer to it in this parameter; this means that if the
+                manual texture ever needs to be reloaded, the ManualResourceLoader
+                will be called to do it.
+			@param hwGammaCorrection Pass 'true' to enable hardware gamma correction
+				(sRGB) on this texture. The hardware will convert from gamma space
+				to linear space when reading from this texture. Only applicable for 
+				8-bits per channel textures, will be ignored for other types. Has the advantage
+				over pre-applied gamma that the texture precision is maintained.
+			@param fsaa The level of multisampling to use if this is a render target. Ignored
+				if usage does not include TU_RENDERTARGET or if the device does
+				not support it.
+        */
+        TexturePtr create(TextureType texType, uint width, uint height, uint depth, 
+			int num_mips, PixelFormat format, int usage = TU_DEFAULT, ManualResourceLoader* loader = 0,
+			bool hwGammaCorrection = false, uint fsaa = 0, const String& fsaaHint = StringUtil::BLANK);
+			
+        /** Create a manual texture with a depth of 1 (not loaded from a file).
+            @param
+                name The name to give the resulting texture
+            @param
+                group The name of the resource group to assign the texture to
+            @param
+                texType The type of texture to load/create, defaults to normal 2D textures
+            @param
+                width, height The dimensions of the texture
+            @param
+                numMipmaps The number of pre-filtered mipmaps to generate. If left to MIP_DEFAULT then
+                the TextureManager's default number of mipmaps will be used (see setDefaultNumMipmaps()).
+				If set to MIP_UNLIMITED mipmaps will be generated until the lowest possible
+				level, 1x1x1.
+            @param
+                format The internal format you wish to request; the manager reserves
+                the right to create a different format if the one you select is
+                not available in this context.
+			@param 
+				usage The kind of usage this texture is intended for. It 
+				is a combination of TU_STATIC, TU_DYNAMIC, TU_WRITE_ONLY, 
+				TU_AUTOMIPMAP and TU_RENDERTARGET (see TextureUsage enum). You are
+            	strongly advised to use HBU_STATIC_WRITE_ONLY wherever possible, if you need to 
+            	update regularly, consider HBU_DYNAMIC_WRITE_ONLY.
+            @param
+                loader If you intend the contents of the manual texture to be 
+                regularly updated, to the extent that you don't need to recover 
+                the contents if the texture content is lost somehow, you can leave
+                this parameter as 0. However, if you intend to populate the
+                texture only once, then you should implement ManualResourceLoader
+                and pass a pointer to it in this parameter; this means that if the
+                manual texture ever needs to be reloaded, the ManualResourceLoader
+                will be called to do it.
+			 @param hwGammaCorrection Pass 'true' to enable hardware gamma correction
+				 (sRGB) on this texture. The hardware will convert from gamma space
+				 to linear space when reading from this texture. Only applicable for 
+				 8-bits per channel textures, will be ignored for other types. Has the advantage
+				 over pre-applied gamma that the texture precision is maintained.
+			@param fsaa The level of multisampling to use if this is a render target. Ignored
+				if usage does not include TU_RENDERTARGET or if the device does
+				not support it.
+        */
+        TexturePtr create(TextureType texType, uint width, uint height, int num_mips,
+            PixelFormat format, int usage = TU_DEFAULT, ManualResourceLoader* loader = 0,
+			bool hwGammaCorrection = false, uint fsaa = 0, const String& fsaaHint = StringUtil::BLANK)
+		{
+			return create(texType, width, height, 1, 
+				num_mips, format, usage, loader, hwGammaCorrection, fsaa, fsaaHint);
+		}
+
+        /** Sets preferred bit depth for integer pixel format textures.
+        @param
+            bits Number of bits. Available values: 0, 16 and 32, where 0 (the default) means keep
+            original format as it is. This value is number of bits for the pixel.
+        */
+        virtual void setPreferredIntegerBitDepth(ushort bits);
+
+        /** gets preferred bit depth for integer pixel format textures.
+        */
+        virtual ushort getPreferredIntegerBitDepth(void) const;
+
+        /** Sets preferred bit depth for float pixel format textures.
+        @param
+            bits Number of bits. Available values: 0, 16 and 32, where 0 (the default) means keep
+            original format as it is. This value is number of bits for a channel of the pixel.
+        */
+        virtual void setPreferredFloatBitDepth(ushort bits);
+
+        /** gets preferred bit depth for float pixel format textures.
+        */
+        virtual ushort getPreferredFloatBitDepth(void) const;
+
+        /** Sets preferred bit depth for integer and float pixel format.
+        @param
+            integerBits Number of bits. Available values: 0, 16 and 32, where 0 (the default) means keep
+            original format as it is. This value is number of bits for the pixel.
+        @param
+            floatBits Number of bits. Available values: 0, 16 and 32, where 0 (the default) means keep
+            original format as it is. This value is number of bits for a channel of the pixel.
+        */
+        virtual void setPreferredBitDepths(ushort integerBits, ushort floatBits);
+
+		/** Returns whether this render system can natively support the precise texture 
+			format requested with the given usage options.
+		@remarks
+			You can still create textures with this format even if this method returns
+			false; the texture format will just be altered to one which the device does
+			support.
+		@note
+			Sometimes the device may just slightly change the format, such as reordering the 
+			channels or packing the channels differently, without it making and qualitative 
+			differences to the texture. If you want to just detect whether the quality of a
+			given texture will be reduced, use isEquivalentFormatSupport instead.
+		@param format The pixel format requested
+		@param usage The kind of usage this texture is intended for, a combination of 
+			the TextureUsage flags.
+		@returns true if the format is natively supported, false if a fallback would be used.
+		*/
+		virtual bool isFormatSupported(TextureType ttype, PixelFormat format, int usage);
+
+		/** Returns whether this render system can support the texture format requested
+			with the given usage options, or another format with no quality reduction.
+		*/
+		virtual bool isEquivalentFormatSupported(TextureType ttype, PixelFormat format, int usage);
+
+		/** Gets the format which will be natively used for a requested format given the
+			constraints of the current device.
+		*/
+		virtual PixelFormat getNativeFormat(TextureType ttype, PixelFormat format, int usage) = 0;
+
+        /** Returns whether this render system has hardware filtering supported for the
+            texture format requested with the given usage options.
+        @remarks
+            Not all texture format are supports filtering by the hardware, i.e. some
+            cards support floating point format, but it doesn't supports filtering on
+            the floating point texture at all, or only a subset floating point formats
+            have flitering supported.
+        @par
+            In the case you want to write shader to work with floating point texture, and
+            you want to produce better visual quality, it's necessary to flitering the
+            texture manually in shader (potential requires four or more texture fetch
+            instructions, plus several arithmetic instructions) if filtering doesn't
+            supported by hardware. But in case on the hardware that supports floating
+            point filtering natively, it had better to adopt this capability for
+            performance (because only one texture fetch instruction are required) and
+            doesn't loss visual quality.
+        @par
+            This method allow you queries hardware texture filtering capability to deciding
+            which verion of the shader to be used. Note it's up to you to write multi-version
+            shaders for support various hardware, internal engine can't do that for you
+            automatically.
+        @note
+            Under GL, texture filtering are always supported by driver, but if it's not
+            supported by hardware natively, software simulation will be used, and you
+            will end up with very slow speed (less than 0.1 fps for example). To slove
+            this performance problem, you must disable filtering manually (by use
+            <b>filtering none</b> in the material script's texture_unit section, or
+            call TextureUnitState::setTextureFiltering with TFO_NONE if populate
+            material in code).
+		@param ttype The texture type requested
+		@param format The pixel format requested
+		@param usage The kind of usage this texture is intended for, a combination of 
+			the TextureUsage flags.
+        @param preciseFormatOnly Whether precise or fallback format mode is used to detecting.
+            In case the pixel format doesn't supported by device, false will be returned
+            if in precise mode, and natively used pixel format will be actually use to
+            check if in fallback mode.
+		@returns true if the texture filtering is supported.
+        */
+        virtual bool isHardwareFilteringSupported(TextureType ttype, PixelFormat format, int usage,
+            bool preciseFormatOnly = false) = 0;
+
+        /** Sets the default number of mipmaps to be used for loaded textures, for when textures are
+            loaded automatically (e.g. by Material class) or when 'load' is called with the default
+            parameters by the application.
+			If set to MIP_UNLIMITED mipmaps will be generated until the lowest possible
+				level, 1x1x1.
+            @note
+                The default value is 0.
+        */
+        virtual void setDefaultNumMipmaps(size_t num);
+
+        /** Gets the default number of mipmaps to be used for loaded textures.
+        */
+        virtual size_t getDefaultNumMipmaps()
+        {
+            return mDefaultNumMipmaps;
+        }
+
+        /** 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 TextureManager& 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 TextureManager* getSingletonPtr(void);
+
+    protected:
+
+        ushort mPreferredIntegerBitDepth;
+        ushort mPreferredFloatBitDepth;
+        size_t mDefaultNumMipmaps;
+    };
+	/** @} */
+	/** @} */
+}// Namespace
+
+#endif

+ 3 - 2
CamelotRenderer/RenderSystemGL/Include/OgreGLTextureManager.h

@@ -32,10 +32,11 @@ THE SOFTWARE.
 #include "OgreGLPrerequisites.h"
 #include "OgreGLTexture.h"
 #include "OgreGLSupport.h"
+#include "OgreTextureManager.h"
 
 namespace Ogre {
     /** GL-specific implementation of a TextureManager */
-    class _OgreGLExport GLTextureManager
+    class _OgreGLExport GLTextureManager : public TextureManager
     {
     public:
         GLTextureManager(GLSupport& support);
@@ -52,7 +53,7 @@ namespace Ogre {
 
     protected:
         /// @copydoc ResourceManager::createImpl
-        Texture* createImpl(const NameValuePairList* createParams);
+        Texture* createImpl();
 
 		/// Internal method to create a warning texture (bound when a texture unit is blank)
 		void createWarningTexture();

+ 1 - 1
CamelotRenderer/RenderSystemGL/Source/GLSL/src/OgreGLSLExtSupport.cpp

@@ -85,7 +85,7 @@ namespace Ogre
 
 				glGetInfoLogARB(obj, infologLength, &charsWritten, infoLog);
 				logMessage += String(infoLog);
-				// TODO PORT - Log this somewhere
+				// TODO LOG PORT - Log this somewhere
 				//LogManager::getSingleton().logMessage(logMessage);
 
 				delete [] infoLog;

+ 1 - 1
CamelotRenderer/RenderSystemGL/Source/GLSL/src/OgreGLSLLinkProgramManager.cpp

@@ -486,7 +486,7 @@ namespace Ogre {
 						// this part once for each name mentioned 
 						if (def.constType == GCT_UNKNOWN)
 						{
-							// TODO PORT - Log this somewhere?
+							// TODO LOG PORT - Log this somewhere?
 							//LogManager::getSingleton().logMessage(
 							//	"Problem parsing the following GLSL Uniform: '"
 							//	+ line + "' in file " + filename);

+ 1 - 1
CamelotRenderer/RenderSystemGL/Source/GLSL/src/OgreGLSLPreprocessor.cpp

@@ -235,7 +235,7 @@ static void DefaultError (void *iData, int iLine, const char *iError,
     else
         snprintf (line, sizeof (line), "line %d: %s\n", iLine, iError);
 
-	// TODO PORT - Log this somewhere?
+	// TODO LOG PORT - Log this somewhere?
     //LogManager::getSingleton ().logMessage (line);
 }
 

+ 1 - 1
CamelotRenderer/RenderSystemGL/Source/OgreGLFBORenderTexture.cpp

@@ -112,7 +112,7 @@ static const size_t depthBits[] =
 	{
 		if(!mRenderBufferMap.empty())
 		{
-			// TODO PORT - Log this somewhere
+			// TODO LOG PORT - Log this somewhere
 			//LogManager::getSingleton().logMessage("GL: Warning! GLFBOManager destructor called, but not all renderbuffers were released.");
 		}
         

+ 1 - 1
CamelotRenderer/RenderSystemGL/Source/OgreGLGpuNvparseProgram.cpp

@@ -100,7 +100,7 @@ void GLGpuNvparseProgram::loadFromSource(void)
 
         for (char* const * errors= nvparse_get_errors(); *errors; errors++)
         {
-			// TODO PORT - Log this somewhere
+			// TODO LOG PORT - Log this somewhere
             //LogManager::getSingleton().logMessage("Warning: nvparse reported the following errors:");
             //LogManager::getSingleton().logMessage("\t" + String(*errors));
         }

+ 1 - 1
CamelotRenderer/RenderSystemGL/Source/OgreGLGpuProgram.cpp

@@ -215,7 +215,7 @@ void GLArbGpuProgram::unloadImpl(void)
 void GLArbGpuProgram::loadFromSource(void)
 {
     if (GL_INVALID_OPERATION == glGetError()) {
-		// TODO PORT LOG - Log this somewhere
+		// TODO LOG PORT LOG - Log this somewhere
         //LogManager::getSingleton().logMessage("Invalid Operation before loading program "+mName);
 
     }

+ 5 - 6
CamelotRenderer/RenderSystemGL/Source/OgreGLRenderSystem.cpp

@@ -815,7 +815,7 @@ namespace Ogre {
 			if(caps->hasCapability(RSC_HWRENDER_TO_TEXTURE))
 			{
 				// Create FBO manager
-				// TODO PORT - Log this somewhere?
+				// TODO LOG PORT - Log this somewhere?
 				//LogManager::getSingleton().logMessage("GL: Using GL_EXT_framebuffer_object for rendering to textures (best)");
 				mRTTManager = new GLFBOManager(false);
 			}
@@ -831,7 +831,7 @@ namespace Ogre {
 					// Use PBuffers
 					mRTTManager = new GLPBRTTManager(mGLSupport, primary);
 
-					// TODO PORT - Log this somewhere?
+					// TODO LOG PORT - Log this somewhere?
 					//LogManager::getSingleton().logMessage("GL: Using PBuffers for rendering to textures");
 				}
 			}
@@ -839,7 +839,7 @@ namespace Ogre {
 			{
 				// No pbuffer support either -- fallback to simplest copying from framebuffer
 				mRTTManager = new GLCopyingRTTManager();
-				// TODO PORT - Log this somewhere?
+				// TODO LOG PORT - Log this somewhere?
 				//LogManager::getSingleton().logMessage("GL: Using framebuffer copy for rendering to textures (worst)");
 				//LogManager::getSingleton().logMessage("GL: Warning: RenderTexture size is restricted to size of framebuffer. If you are on Linux, consider using GLX instead of SDL.");
 			}
@@ -849,7 +849,7 @@ namespace Ogre {
 		}
 
 		/// Create the texture manager        
-		//mTextureManager = new GLTextureManager(*mGLSupport); 
+		mTextureManager = new GLTextureManager(*mGLSupport); 
 
 		mGLInitialised = true;
 	}
@@ -1352,8 +1352,7 @@ namespace Ogre {
 				glBindTexture( mTextureTypes[stage], tex->getGLID() );
 			else
 			{
-				// TODO PORT - IMPORTANT - This is broken until I add proper TextureManager
-				//glBindTexture( mTextureTypes[stage], static_cast<GLTextureManager*>(mTextureManager)->getWarningTextureID() );
+				glBindTexture( mTextureTypes[stage], static_cast<GLTextureManager*>(mTextureManager)->getWarningTextureID() );
 			}
 		}
 		else

+ 2 - 2
CamelotRenderer/RenderSystemGL/Source/OgreGLTexture.cpp

@@ -36,6 +36,7 @@ THE SOFTWARE.
 #include "OgreException.h"
 #include "OgreStringConverter.h"
 #include "OgreBitwise.h"
+#include "OgreTextureManager.h"
 #include "CmRenderSystemManager.h"
 
 #include "OgreGLFBORenderTexture.h"
@@ -97,8 +98,7 @@ namespace Ogre {
 		
 
 		// Adjust format if required
-		// TODO PORT - Enable this when I have TextureManager set up
-		//mFormat = TextureManager::getSingleton().getNativeFormat(mTextureType, mFormat, mUsage);
+		mFormat = TextureManager::getSingleton().getNativeFormat(mTextureType, mFormat, mUsage);
 		
 		// Check requested number of mipmaps
 		size_t maxMips = GLPixelUtil::getMaxMipmaps(mWidth, mHeight, mDepth, mFormat);

+ 2 - 2
CamelotRenderer/RenderSystemGL/Source/OgreGLTextureManager.cpp

@@ -34,7 +34,7 @@ THE SOFTWARE.
 namespace Ogre {
     //-----------------------------------------------------------------------------
     GLTextureManager::GLTextureManager(GLSupport& support)
-        : mGLSupport(support), mWarningTextureID(0)
+        :TextureManager(), mGLSupport(support), mWarningTextureID(0)
     {
 		createWarningTexture();
     }
@@ -45,7 +45,7 @@ namespace Ogre {
 		glDeleteTextures(1, &mWarningTextureID);
     }
     //-----------------------------------------------------------------------------
-    Texture* GLTextureManager::createImpl(const NameValuePairList* createParams)
+    Texture* GLTextureManager::createImpl()
     {
         return new GLTexture(mGLSupport);
     }

+ 4 - 4
CamelotRenderer/RenderSystemGL/Source/OgreWin32Window.cpp

@@ -331,14 +331,14 @@ namespace Ogre {
 					displayDeviceMode.dmFields |= DM_DISPLAYFREQUENCY;
 					if (ChangeDisplaySettingsEx(mDeviceName, &displayDeviceMode, NULL, CDS_FULLSCREEN | CDS_TEST, NULL) != DISP_CHANGE_SUCCESSFUL)
 					{
-						// TODO PORT - Log this somewhere
+						// TODO LOG PORT - Log this somewhere
 						//LogManager::getSingleton().logMessage(LML_NORMAL, "ChangeDisplaySettings with user display frequency failed");
 						//displayDeviceMode.dmFields ^= DM_DISPLAYFREQUENCY;
 					}
 				}
 				if (ChangeDisplaySettingsEx(mDeviceName, &displayDeviceMode, NULL, CDS_FULLSCREEN, NULL) != DISP_CHANGE_SUCCESSFUL)
 				{
-					// TODO PORT - Log this somewhere
+					// TODO LOG PORT - Log this somewhere
 					//LogManager::getSingleton().logMessage(LML_CRITICAL, "ChangeDisplaySettings failed");
 				}
 			}
@@ -498,7 +498,7 @@ namespace Ogre {
 					if (ChangeDisplaySettingsEx(mDeviceName, &displayDeviceMode, NULL, 
 						CDS_FULLSCREEN | CDS_TEST, NULL) != DISP_CHANGE_SUCCESSFUL)					
 					{
-						// TODO PORT - Log this somewhere
+						// TODO LOG PORT - Log this somewhere
 						//LogManager::getSingleton().logMessage(LML_NORMAL, "ChangeDisplaySettings with user display frequency failed");
 						displayDeviceMode.dmFields ^= DM_DISPLAYFREQUENCY;
 					}
@@ -525,7 +525,7 @@ namespace Ogre {
 
 				if (ChangeDisplaySettingsEx(mDeviceName, &displayDeviceMode, NULL, CDS_FULLSCREEN, NULL) != DISP_CHANGE_SUCCESSFUL)				
 				{
-					// TODO PORT - Log this somewhere
+					// TODO LOG PORT - Log this somewhere
 					//LogManager::getSingleton().logMessage(LML_CRITICAL, "ChangeDisplaySettings failed");
 				}
 

+ 1 - 1
CamelotRenderer/RenderSystemGL/Source/atifs/src/ATI_FS_GLGpuProgram.cpp

@@ -136,7 +136,7 @@ void ATI_FS_GLGpuProgram::loadFromSource(void)
 		char buff[50];
         sprintf(buff,"error on line %d in pixel shader source\n", PS1_4Assembler.mCurrentLine);
 
-		// TODO PORT - Log this somewhere
+		// TODO LOG PORT - Log this somewhere
 		//LogManager::getSingleton().logMessage("Warning: atifs compiler reported the following errors:");
 		//LogManager::getSingleton().logMessage(buff + mName);