Commits

Anonymous committed 115efbb

initial version

  • Participants

Comments (0)

Files changed (22)

File CMakeLists.txt

+# $Id: CMakeLists.txt 1181 2009-04-14 03:35:32Z patryn $
+
+add_definitions(-D_USRDLL)
+
+add_library (RenderSystem_NULL SHARED
+	NullGpuProgram.h
+	NullGpuProgramManager.cpp
+	NullGpuProgramManager.h
+	NullHardwareBufferManager.cpp
+	NullHardwareBufferManager.h
+	NullHardwareIndexBuffer.cpp
+	NullHardwareIndexBuffer.h
+	NullHardwareVertexBuffer.cpp
+	NullHardwareVertexBuffer.h
+	NullHlslProgramFactory.cpp	
+	NullHlslProgramFactory.h
+	NullRendererDll.cpp
+	NullRenderSystem.cpp
+	NullRenderSystem.h
+	NullRenderWindow.cpp
+	NullRenderWindow.h
+	NullTexture.h
+	NullTextureManager.cpp
+	NullTextureManager.h
+	stdafx.h
+)
+
+target_link_libraries(RenderSystem_NULL
+  OgreMain
+)
+
+# Build flags for the .DLL __declspec things, etc.
+SET_TARGET_PROPERTIES(RenderSystem_NULL PROPERTIES
+  DEFINE_SYMBOL "OPDELIB_DLL_TARGET"
+  LINK_INTERFACE_LIBRARIES ""
+)

File NullGpuProgram.h

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullGpuProgram.h 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#ifndef __NULLGPUPROGRAM_H
+#define __NULLGPUPROGRAM_H
+
+#include "stdafx.h"
+
+namespace Ogre {
+
+	class NULLGpuProgram : public GpuProgram
+	{
+    		protected:
+    		public:
+       			NULLGpuProgram(ResourceManager* creator, const String& name, ResourceHandle handle,
+		   		const String& group, bool isManual = false, ManualResourceLoader* loader = 0)  : GpuProgram(creator, name, handle, group, isManual, loader) {}
+		
+    		protected:
+        		/** @copydoc Resource::loadImpl */
+			void loadImpl(void) {}
+        		
+			/** Overridden from GpuProgram */
+			void loadFromSource(void) {}
+			
+			/** Internal method to load from microcode, must be overridden by subclasses. */
+			void unloadImpl(void) {}
+
+    };
+
+}
+
+#endif

File NullGpuProgramManager.cpp

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullGpuProgramManager.cpp 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#include "NullGpuProgramManager.h"
+#include "NullGpuProgram.h"
+
+namespace Ogre {
+
+//-----------------------------------------------------------------------------
+NULLGpuProgramManager::NULLGpuProgramManager() :
+	GpuProgramManager() {
+	// Superclass sets up members 
+
+	// Register with resource group manager
+	ResourceGroupManager::getSingleton()._registerResourceManager(
+			mResourceType, this);
+
+}
+//-----------------------------------------------------------------------------
+NULLGpuProgramManager::~NULLGpuProgramManager() {
+	// Unregister with resource group manager
+	ResourceGroupManager::getSingleton()._unregisterResourceManager(
+			mResourceType);
+
+}
+//-----------------------------------------------------------------------------
+GpuProgramParametersSharedPtr NULLGpuProgramManager::createParameters(void) {
+	return GpuProgramParametersSharedPtr(new GpuProgramParameters());
+}
+//-----------------------------------------------------------------------------
+Resource* NULLGpuProgramManager::createImpl(const String& name,
+		ResourceHandle handle, const String& group, bool isManual,
+		ManualResourceLoader* loader, const NameValuePairList* params) {
+	return new NULLGpuProgram(this, name, handle, group, isManual, loader);
+}
+
+//-----------------------------------------------------------------------------
+Resource* NULLGpuProgramManager::createImpl(const String& name,
+		ResourceHandle handle, const String& group, bool isManual,
+		ManualResourceLoader* loader, GpuProgramType gptype,
+		const String& syntaxCode) {
+	return new NULLGpuProgram(this, name, handle, group, isManual, loader);
+}
+
+}

File NullGpuProgramManager.h

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullGpuProgramManager.h 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#ifndef __NULLGPUPROGRAMMANAGER_H
+#define __NULLGPUPROGRAMMANAGER_H
+
+#include "stdafx.h"
+
+namespace Ogre {
+
+	class NULLGpuProgramManager: public GpuProgramManager {
+		protected:
+			/// @copydoc ResourceManager::createImpl
+			Resource* createImpl(const String& name, ResourceHandle handle,
+					const String& group, bool isManual, ManualResourceLoader* loader,
+					const NameValuePairList* params);
+			/// Specialised create method with specific parameters
+			Resource* createImpl(const String& name, ResourceHandle handle,
+					const String& group, bool isManual, ManualResourceLoader* loader,
+					GpuProgramType gptype, const String& syntaxCode);
+		
+		public:
+			NULLGpuProgramManager();
+			~NULLGpuProgramManager();
+			/// @copydoc GpuProgramManager::createParameters
+			GpuProgramParametersSharedPtr createParameters(void);
+	};
+}
+
+#endif

File NullHardwareBufferManager.cpp

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullHardwareBufferManager.cpp 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#include "stdafx.h"
+#include "NullHardwareBufferManager.h"
+#include "NullHardwareIndexBuffer.h"
+#include "NullHardwareVertexBuffer.h"
+#include "NullRenderToVertexBuffer.h"
+
+namespace Ogre {
+
+	HardwareVertexBufferSharedPtr NULLHardwareBufferManagerBase::createVertexBuffer(
+			size_t vertexSize, size_t numVerts, HardwareBuffer::Usage usage,
+			bool useShadowBuffer) {
+		HardwareVertexBuffer* vbuf = new NULLHardwareVertexBuffer(this, vertexSize,
+				numVerts, usage, false, false);
+		mVertexBuffers.insert(vbuf);
+	
+		return HardwareVertexBufferSharedPtr(vbuf);
+	}
+	
+	HardwareIndexBufferSharedPtr NULLHardwareBufferManagerBase::createIndexBuffer(
+			HardwareIndexBuffer::IndexType itype, size_t numIndexes,
+			HardwareBuffer::Usage usage, bool useShadowBuffer) {
+		NULLHardwareIndexBuffer* idx = new NULLHardwareIndexBuffer(this, itype,
+				numIndexes, usage, false, useShadowBuffer);
+		mIndexBuffers.insert(idx);
+	
+		return HardwareIndexBufferSharedPtr(idx);
+	
+	}
+	
+	RenderToVertexBufferSharedPtr NULLHardwareBufferManagerBase::createRenderToVertexBuffer() {
+		return RenderToVertexBufferSharedPtr(new NULLRenderToVertexBuffer());
+	}
+
+}
+

File NullHardwareBufferManager.h

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullHardwareBufferManager.h 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#ifndef __NULLGPUPROGRAM_H
+#define __NULLGPUPROGRAM_H
+
+#include "stdafx.h"
+
+namespace Ogre {
+
+	class NULLHardwareBufferManagerBase: public HardwareBufferManagerBase {
+	public:
+		HardwareVertexBufferSharedPtr createVertexBuffer(size_t vertexSize,
+				size_t numVerts, HardwareBuffer::Usage usage, bool useShadowBuffer =
+						false);
+		HardwareIndexBufferSharedPtr createIndexBuffer(
+				HardwareIndexBuffer::IndexType itype, size_t numIndexes,
+				HardwareBuffer::Usage usage, bool useShadowBuffer = false);
+	
+		RenderToVertexBufferSharedPtr createRenderToVertexBuffer();
+	};
+	
+		/// D3D9HardwareBufferManagerBase as a Singleton
+	class NULLHardwareBufferManager : public HardwareBufferManager
+	{
+	public:
+		NULLHardwareBufferManager()
+			: HardwareBufferManager(OGRE_NEW NULLHardwareBufferManagerBase()) 
+		{
+
+		}
+		~NULLHardwareBufferManager ()
+		{
+			OGRE_DELETE mImpl;
+		}
+	};
+	
+}
+
+#endif

File NullHardwareIndexBuffer.cpp

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullHardwareIndexBuffer.cpp 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#include "stdafx.h"
+#include "NullHardwareIndexBuffer.h"
+
+namespace Ogre {
+
+	NULLHardwareIndexBuffer::NULLHardwareIndexBuffer(HardwareBufferManagerBase* mgr, HardwareIndexBuffer::IndexType idxType, 
+        size_t numIndexes, HardwareBuffer::Usage usage, bool useSystemMemory, bool useShadowBuffer)
+        : HardwareIndexBuffer(mgr, idxType, numIndexes, usage, useSystemMemory, useShadowBuffer)
+    {
+		m_pBuffer = (char *)malloc(numIndexes * sizeof(Ogre::uint32));
+    }
+	//---------------------------------------------------------------------
+    NULLHardwareIndexBuffer::~NULLHardwareIndexBuffer()
+    {
+		free(m_pBuffer);
+    }
+	//---------------------------------------------------------------------
+    void* NULLHardwareIndexBuffer::lockImpl(size_t offset, 
+        size_t length, LockOptions options)
+    {
+        return &m_pBuffer[offset];
+    }
+	//---------------------------------------------------------------------
+	void NULLHardwareIndexBuffer::unlockImpl(void)
+    {
+    }
+	//---------------------------------------------------------------------
+    void NULLHardwareIndexBuffer::readData(size_t offset, size_t length, 
+        void* pDest)
+    {
+		memcpy(pDest, &m_pBuffer[offset], length);
+    }
+	//---------------------------------------------------------------------
+    void NULLHardwareIndexBuffer::writeData(size_t offset, size_t length, 
+            const void* pSource,
+			bool discardWholeBuffer)
+    {
+		memcpy(&m_pBuffer[offset],pSource, length);
+	}
+
+}

File NullHardwareIndexBuffer.h

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullHardwareIndexBuffer.h 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#ifndef __NULLHARDWAREINDEXBUFFER_H
+#define __NULLHARDWAREINDEXBUFFER_H
+
+#include "stdafx.h"
+
+namespace Ogre {
+
+	class NULLHardwareIndexBuffer: public HardwareIndexBuffer {
+	protected:
+		/** See HardwareBuffer. */
+		void* lockImpl(size_t offset, size_t length, LockOptions options);
+		/** See HardwareBuffer. */
+		void unlockImpl(void);
+	public:
+		NULLHardwareIndexBuffer(HardwareBufferManagerBase* mgr, IndexType idxType, size_t numIndexes,
+				HardwareBuffer::Usage usage, bool useSystemMem,
+				bool useShadowBuffer);
+		~NULLHardwareIndexBuffer();
+		/** See HardwareBuffer. */
+		void readData(size_t offset, size_t length, void* pDest);
+		/** See HardwareBuffer. */
+		void writeData(size_t offset, size_t length, const void* pSource,
+				bool discardWholeBuffer = false);
+	
+		char *m_pBuffer;
+	};
+
+}
+
+#endif

File NullHardwareVertexBuffer.cpp

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullHardwareVertexBuffer.cpp 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#include "stdafx.h"
+#include "NullHardwareVertexBuffer.h"
+
+namespace Ogre {
+
+	//---------------------------------------------------------------------
+    NULLHardwareVertexBuffer::NULLHardwareVertexBuffer(HardwareBufferManagerBase* mgr, size_t vertexSize, 
+        size_t numVertices, HardwareBuffer::Usage usage, 
+        bool useSystemMemory, bool useShadowBuffer)
+        : HardwareVertexBuffer(mgr, vertexSize, numVertices, usage, useSystemMemory, useShadowBuffer)
+    {
+        // Create the vertex buffer
+		m_pBuffer = (char *)malloc(vertexSize * numVertices);
+
+    }
+	//---------------------------------------------------------------------
+    NULLHardwareVertexBuffer::~NULLHardwareVertexBuffer()
+    {
+		free(m_pBuffer);
+    }
+	//---------------------------------------------------------------------
+
+//---------------------------------------------------------------------
+    void* NULLHardwareVertexBuffer::lockImpl(size_t offset, 
+        size_t length, LockOptions options)
+    {
+        return &m_pBuffer[offset];
+    }
+	//---------------------------------------------------------------------
+	void NULLHardwareVertexBuffer::unlockImpl(void)
+    {
+    }
+	//---------------------------------------------------------------------
+    void NULLHardwareVertexBuffer::readData(size_t offset, size_t length, 
+        void* pDest)
+    {
+		memcpy(pDest, &m_pBuffer[offset], length);
+    }
+	//---------------------------------------------------------------------
+    void NULLHardwareVertexBuffer::writeData(size_t offset, size_t length, 
+            const void* pSource,
+			bool discardWholeBuffer)
+    {
+		memcpy(&m_pBuffer[offset], pSource, length);
+    }
+	//---------------------------------------------------------------------
+
+}

File NullHardwareVertexBuffer.h

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullHardwareVertexBuffer.h 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#ifndef __NULLHARDWAREVERTEXBUFFER_H
+#define __NULLHARDWAREVERTEXBUFFER_H
+
+#include "stdafx.h"
+
+namespace Ogre {
+
+	class NULLHardwareVertexBuffer : public HardwareVertexBuffer 
+		{
+		protected:
+			/** See HardwareBuffer. */
+			virtual void* lockImpl(size_t offset, size_t length, LockOptions options);
+			/** See HardwareBuffer. */
+			virtual void unlockImpl(void);
+		public:
+			NULLHardwareVertexBuffer(HardwareBufferManagerBase* mgr, size_t vertexSize, size_t numVertices, 
+				HardwareBuffer::Usage usage, bool useSystemMem, bool useShadowBuffer);
+			~NULLHardwareVertexBuffer();
+			/** See HardwareBuffer. */
+			void readData(size_t offset, size_t length, void* pDest);
+			/** See HardwareBuffer. */
+			void writeData(size_t offset, size_t length, const void* pSource,
+					bool discardWholeBuffer = false);
+	
+			char *m_pBuffer;
+	
+		};
+}
+
+#endif

File NullHlslProgramFactory.cpp

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullHlslProgramFactory.cpp 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#include "stdafx.h"
+#include "NullHlslProgramFactory.h"
+
+namespace Ogre {
+	const String NULLHLSLProgramFactory::msLanguage = "NULLHLSL";
+
+	const String& NULLHLSLProgramFactory::getLanguage() const {
+		return msLanguage;
+	}
+	
+	HighLevelGpuProgram* NULLHLSLProgramFactory::create(ResourceManager* creator, const Ogre::String& name, ResourceHandle handle,
+			const Ogre::String& group, bool isManual, Ogre::ManualResourceLoader* loader) {
+		return NULL;	//Temporary return to fix the VC build
+	}
+	
+	void NULLHLSLProgramFactory::destroy(Ogre::HighLevelGpuProgram* prg) {
+	}
+};
+

File NullHlslProgramFactory.h

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullHlslProgramFactory.h 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#ifndef __NULLHLSLPROGRAMFACTORY_H
+#define __NULLHLSLPROGRAMFACTORY_H
+
+#include "stdafx.h"
+
+namespace Ogre {
+	class NULLHLSLProgramFactory : public Ogre::HighLevelGpuProgramFactory
+	{
+		public:
+			const String& getLanguage() const;
+			HighLevelGpuProgram* create(ResourceManager* creator, const Ogre::String& name, ResourceHandle handle,
+					const Ogre::String& group, bool isManual, Ogre::ManualResourceLoader* loader);
+			void destroy(Ogre::HighLevelGpuProgram*);
+			
+		protected:
+			static const String msLanguage;
+	};
+}
+
+#endif

File NullRenderSystem.cpp

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullRenderSystem.cpp 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#include "stdafx.h"
+#include "NullRenderSystem.h"
+#include "NullHardwareBufferManager.h"
+#include "NullTextureManager.h"
+#include "NullRenderWindow.h"
+
+namespace Ogre {
+	
+	//---------------------------------------------------------------------
+	NULLRenderSystem::NULLRenderSystem() {
+		m_pHardwareBufferManager = new NULLHardwareBufferManager();
+	}
+	//---------------------------------------------------------------------
+	NULLRenderSystem::~NULLRenderSystem() {
+		delete m_pHardwareBufferManager;
+	
+		shutdown();
+	}
+	//---------------------------------------------------------------------
+	const String& NULLRenderSystem::getName() const {
+		static String strName("NULL Rendering Subsystem");
+		return strName;
+	}
+	//---------------------------------------------------------------------
+	
+	void NULLRenderSystem::setConfigOption(const String &name, const String &value) {
+	
+	}
+	//---------------------------------------------------------------------
+	String NULLRenderSystem::validateConfigOptions() {
+		return StringUtil::BLANK;
+	}
+	//---------------------------------------------------------------------
+	ConfigOptionMap& NULLRenderSystem::getConfigOptions() {
+		return m_options;
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::reinitialise() {
+		this->shutdown();
+		this->_initialise(true);
+	}
+	//---------------------------------------------------------------------
+	RenderWindow* NULLRenderSystem::_createRenderWindow(const String &name,
+			unsigned int width, unsigned int height, bool fullScreen,
+			const NameValuePairList *miscParams) {
+	
+		mTextureManager = new NULLTextureManager();
+		mGpuProgramManager = new NULLGpuProgramManager();
+	
+		RenderWindow* win = new NULLRenderWindow();
+	
+		win->create(name, width, height, fullScreen, miscParams);
+	
+		attachRenderTarget(*win);
+		return win;
+	}
+	//-----------------------------------------------------------------------
+	MultiRenderTarget * NULLRenderSystem::createMultiRenderTarget(
+			const String & name) {
+		return NULL;
+	}
+	//---------------------------------------------------------------------
+	String NULLRenderSystem::getErrorDescription(long errorNumber) const {
+		const String errMsg = "Not implemented";
+		return errMsg;
+	}
+	//---------------------------------------------------------------------
+	VertexElementType NULLRenderSystem::getColourVertexElementType(void) const {
+		return VET_COLOUR_ARGB;
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_convertProjectionMatrix(const Matrix4& matrix,
+			Matrix4& dest, bool forGpuProgram) {
+		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 NULLRenderSystem::_makeProjectionMatrix(const Radian& fovy, Real aspect,
+			Real nearPlane, Real farPlane, Matrix4& dest, bool forGpuProgram) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_makeOrthoMatrix(const Radian& fovy, Real aspect,
+			Real nearPlane, Real farPlane, Matrix4& dest, bool forGpuProgram) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::setAmbientLight(float r, float g, float b) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_useLights(const LightList& lights, unsigned short limit) {
+	
+	}
+	
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::setShadingType(ShadeOptions so) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::setLightingEnabled(bool enabled) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setViewMatrix(const Matrix4 &m) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setProjectionMatrix(const Matrix4 &m) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setWorldMatrix(const Matrix4 &m) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setSurfaceParams(const ColourValue &ambient,
+			const ColourValue &diffuse, const ColourValue &specular,
+			const ColourValue &emissive, Real shininess,
+			TrackVertexColourType tracking) {
+	
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setPointParameters(Real size, bool attenuationEnabled,
+			Real constant, Real linear, Real quadratic, Real minSize, Real maxSize) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setPointSpritesEnabled(bool enabled) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setTexture(size_t stage, bool enabled,
+			const TexturePtr& tex) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setTextureCoordSet(size_t stage, size_t index) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setTextureCoordCalculation(size_t stage,
+			TexCoordCalcMethod m, const Frustum* frustum) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setTextureMipmapBias(size_t unit, float bias) {
+		
+	}
+	
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setTextureMatrix(size_t stage, const Matrix4& xForm) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setTextureAddressingMode(size_t stage,
+			const TextureUnitState::UVWAddressingMode& uvw) {
+	}
+	//-----------------------------------------------------------------------------
+	void NULLRenderSystem::_setTextureBorderColour(size_t stage,
+			const ColourValue& colour) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setTextureBlendMode(size_t stage,
+			const LayerBlendModeEx& bm) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setSceneBlending( SceneBlendFactor sourceFactor, SceneBlendFactor destFactor, SceneBlendOperation op /*= SBO_ADD */ )
+	{
+	}
+	
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setSeparateSceneBlending( SceneBlendFactor sourceFactor, SceneBlendFactor destFactor, SceneBlendFactor sourceFactorAlpha, SceneBlendFactor destFactorAlpha, SceneBlendOperation op /*= SBO_ADD*/, SceneBlendOperation alphaOp /*= SBO_ADD*/ )
+	{
+		
+	}
+	
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setAlphaRejectSettings(CompareFunction func,
+			unsigned char value, bool alphaToCoverage) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setCullingMode(CullingMode mode) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setDepthBufferParams(bool depthTest, bool depthWrite,
+			CompareFunction depthFunction) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setDepthBufferCheckEnabled(bool enabled) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setDepthBufferWriteEnabled(bool enabled) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setDepthBufferFunction(CompareFunction func) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setDepthBias(float bias, float slopeScaleBias) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setColourBufferWriteEnabled(bool red, bool green,
+			bool blue, bool alpha) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setFog(FogMode mode, const ColourValue& colour,
+			Real densitiy, Real start, Real end) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setPolygonMode(PolygonMode level) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::setStencilCheckEnabled(bool enabled) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::setStencilBufferParams(CompareFunction func,
+			uint32 refValue, uint32 mask, StencilOperation stencilFailOp,
+			StencilOperation depthFailOp, StencilOperation passOp,
+			bool twoSidedOperation) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setTextureUnitFiltering(size_t unit, FilterType ftype,
+			FilterOptions filter) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setTextureLayerAnisotropy(size_t unit,
+			unsigned int maxAnisotropy) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_setViewport(Viewport *vp) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_beginFrame() {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_endFrame() {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::setVertexDeclaration(VertexDeclaration* decl) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::setVertexBufferBinding(VertexBufferBinding* binding) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_render(const RenderOperation& op) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::setNormaliseNormals(bool normalise) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::bindGpuProgram(GpuProgram* prg) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::unbindGpuProgram(GpuProgramType gptype) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::bindGpuProgramParameters( GpuProgramType gptype, GpuProgramParametersSharedPtr params, uint16 variabilityMask )
+	{
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::bindGpuProgramPassIterationParameters(
+			GpuProgramType gptype) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::setClipPlanesImpl(const PlaneList& clipPlanes) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::setScissorTest(bool enabled, size_t left, size_t top,
+			size_t right, size_t bottom) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::clearFrameBuffer(unsigned int buffers,
+			const ColourValue& colour, Real depth, unsigned short stencil) {
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_makeProjectionMatrix(Real left, Real right,
+			Real bottom, Real top, Real nearPlane, Real farPlane, Matrix4& dest,
+			bool forGpuProgram) {
+	}
+	
+	// ------------------------------------------------------------------
+	void NULLRenderSystem::setClipPlane(ushort index, Real A, Real B, Real C,
+			Real D) {
+	}
+	
+	// ------------------------------------------------------------------
+	void NULLRenderSystem::enableClipPlane(ushort index, bool enable) {
+	}
+	//---------------------------------------------------------------------
+	HardwareOcclusionQuery* NULLRenderSystem::createHardwareOcclusionQuery(void) {
+		return NULL;
+	}
+	//---------------------------------------------------------------------
+	Real NULLRenderSystem::getHorizontalTexelOffset(void) {
+		return -0.5f;
+	}
+	//---------------------------------------------------------------------
+	Real NULLRenderSystem::getVerticalTexelOffset(void) {
+		return -0.5f;
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::_applyObliqueDepthProjection(Matrix4& matrix,
+			const Plane& plane, bool forGpuProgram) {
+	}
+	//---------------------------------------------------------------------
+	Real NULLRenderSystem::getMinimumDepthInputValue(void) {
+		return 0.0f;
+	}
+	
+	//---------------------------------------------------------------------
+	Real NULLRenderSystem::getMaximumDepthInputValue(void) {
+		return -1.0f;
+	}
+	
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::preExtraThreadsStarted() {
+		
+	}
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::postExtraThreadsStarted() {
+		
+	}
+	//---------------------------------------------------------------------	
+	void NULLRenderSystem::registerThread() {
+		
+	}
+	//---------------------------------------------------------------------	
+	void NULLRenderSystem::unregisterThread() {
+		
+	}
+	
+	//---------------------------------------------------------------------
+	RenderSystemCapabilities* NULLRenderSystem::createRenderSystemCapabilities() const {
+		mRealCapabilities->setCapability(RSC_HWSTENCIL);
+		mRealCapabilities->setStencilBufferBitDepth(8);
+		mRealCapabilities->setNumTextureUnits(16);
+		mRealCapabilities->setCapability(RSC_ANISOTROPY);
+		mRealCapabilities->setCapability(RSC_AUTOMIPMAP);
+		mRealCapabilities->setCapability(RSC_BLENDING);
+		mRealCapabilities->setCapability(RSC_DOT3);
+		mRealCapabilities->setCapability(RSC_CUBEMAPPING);
+		mRealCapabilities->setCapability(RSC_TEXTURE_COMPRESSION);
+		mRealCapabilities->setCapability(RSC_TEXTURE_COMPRESSION_DXT);
+		mRealCapabilities->setCapability(RSC_VBO);
+		mRealCapabilities->setCapability(RSC_SCISSOR_TEST);
+		mRealCapabilities->setCapability(RSC_TWO_SIDED_STENCIL);
+		mRealCapabilities->setCapability(RSC_STENCIL_WRAP);
+		mRealCapabilities->setCapability(RSC_HWOCCLUSION);
+		mRealCapabilities->setCapability(RSC_USER_CLIP_PLANES);
+		mRealCapabilities->setCapability(RSC_VERTEX_FORMAT_UBYTE4);
+		mRealCapabilities->setCapability(RSC_INFINITE_FAR_PLANE);
+		mRealCapabilities->setCapability(RSC_TEXTURE_3D);
+		mRealCapabilities->setCapability(RSC_NON_POWER_OF_2_TEXTURES);
+		mRealCapabilities->setCapability(RSC_NON_POWER_OF_2_TEXTURES);
+		mRealCapabilities->setNonPOW2TexturesLimited(true);
+		mRealCapabilities->setCapability(RSC_HWRENDER_TO_TEXTURE);
+		mRealCapabilities->setCapability(RSC_TEXTURE_FLOAT);
+		mRealCapabilities->setCapability(RSC_POINT_SPRITES);
+		mRealCapabilities->setCapability(RSC_POINT_EXTENDED_PARAMETERS);
+		mRealCapabilities->setMaxPointSize(256);
+
+		return mRealCapabilities;
+	}
+	
+	//---------------------------------------------------------------------
+	void NULLRenderSystem::initialiseFromRenderSystemCapabilities(RenderSystemCapabilities* caps, RenderTarget* primary) {
+		mRealCapabilities = caps;
+	}
+	
+	RenderWindow* NULLRenderSystem::_initialise(bool autoCreateWindow,
+			const String& windowTitle) {
+		RenderWindow* autoWindow = NULL;
+	
+		// Init using current settings
+		if (autoCreateWindow) {
+			autoWindow = this->_createRenderWindow(windowTitle, 640, 480, false,
+					NULL);
+		}
+	
+		// call superclass method
+		RenderSystem::_initialise(autoCreateWindow);
+	
+		return autoWindow;
+	}
+
+	void NULLRenderSystem::_setRenderTarget( RenderTarget *target )
+	{
+
+	}
+
+	unsigned int NULLRenderSystem::getDisplayMonitorCount() const
+	{
+		return 1;
+	}
+
+}
+

File NullRenderSystem.h

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullRenderSystem.h 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#ifndef __NULLRENDERSYSTEM_H
+#define __NULLRENDERSYSTEM_H
+
+#include "stdafx.h"
+#include "NullHardwareBufferManager.h"
+#include "NullGpuProgramManager.h"
+
+namespace Ogre {
+
+class NULLRenderSystem: public RenderSystem {
+public:
+	NULLRenderSystem();
+	~NULLRenderSystem();
+
+	ConfigOptionMap m_options;
+
+	virtual const String& getName(void) const;
+	virtual ConfigOptionMap& getConfigOptions(void);
+	virtual void setConfigOption(const String &name, const String &value);
+	virtual HardwareOcclusionQuery* createHardwareOcclusionQuery(void);
+
+	virtual String validateConfigOptions(void);
+
+	virtual void reinitialise(void);
+
+	virtual void setAmbientLight(float r, float g, float b);
+
+	virtual void setShadingType(ShadeOptions so);
+
+	virtual void setLightingEnabled(bool enabled);
+
+	virtual MultiRenderTarget * createMultiRenderTarget(const String & name);
+
+	virtual String getErrorDescription(long errorNumber) const;
+
+	// ------------------------------------------------------------------------
+	//                     Internal Rendering Access
+	// All methods below here are normally only called by other OGRE classes
+	// They can be called by library user if required
+	// ------------------------------------------------------------------------
+
+
+	virtual void _useLights(const LightList& lights, unsigned short limit);
+	virtual void _setWorldMatrix(const Matrix4 &m);
+	virtual void _setViewMatrix(const Matrix4 &m);
+	virtual void _setProjectionMatrix(const Matrix4 &m);
+	virtual void _setSurfaceParams(const ColourValue &ambient,
+			const ColourValue &diffuse, const ColourValue &specular,
+			const ColourValue &emissive, Real shininess,
+			TrackVertexColourType tracking = TVC_NONE);
+
+	virtual void _setPointSpritesEnabled(bool enabled);
+	virtual void _setPointParameters(Real size, bool attenuationEnabled,
+			Real constant, Real linear, Real quadratic, Real minSize,
+			Real maxSize);
+
+	virtual void _setTexture(size_t unit, bool enabled, const TexturePtr& tex);
+
+	virtual void _setTextureCoordSet(size_t unit, size_t index);
+
+	virtual void _setTextureCoordCalculation(size_t unit, TexCoordCalcMethod m,
+			const Frustum* frustum = 0);
+
+	virtual void _setTextureBlendMode(size_t unit, const LayerBlendModeEx& bm);
+
+	virtual void _setTextureMipmapBias(size_t unit, float bias);
+	
+	virtual void _setTextureUnitFiltering(size_t unit, FilterType ftype,
+			FilterOptions filter);
+
+	virtual void _setTextureLayerAnisotropy(size_t unit,
+			unsigned int maxAnisotropy);
+
+	virtual void _setTextureAddressingMode(size_t unit,
+			const TextureUnitState::UVWAddressingMode& uvw);
+
+	virtual void
+			_setTextureBorderColour(size_t unit, const ColourValue& colour);
+
+	virtual void _setTextureMatrix(size_t unit, const Matrix4& xform);
+
+	virtual void _setSceneBlending(SceneBlendFactor sourceFactor, SceneBlendFactor destFactor, SceneBlendOperation op = SBO_ADD );
+
+	virtual void _setSeparateSceneBlending(SceneBlendFactor sourceFactor, SceneBlendFactor destFactor, SceneBlendFactor sourceFactorAlpha, SceneBlendFactor destFactorAlpha, SceneBlendOperation op = SBO_ADD, SceneBlendOperation alphaOp = SBO_ADD);
+	
+	virtual void _setAlphaRejectSettings(CompareFunction func,
+			unsigned char value, bool alphaToCoverage);
+	virtual void _beginFrame(void);
+
+	virtual void _endFrame(void);
+	virtual void _setViewport(Viewport *vp);
+	virtual void _setCullingMode(CullingMode mode);
+
+	virtual void _setDepthBufferParams(bool depthTest = true, bool depthWrite =
+			true, CompareFunction depthFunction = CMPF_LESS_EQUAL);
+	virtual void _setDepthBufferCheckEnabled(bool enabled = true);
+	virtual void _setDepthBufferWriteEnabled(bool enabled = true);
+	virtual void
+			_setDepthBufferFunction(CompareFunction func = CMPF_LESS_EQUAL);
+	virtual void _setColourBufferWriteEnabled(bool red, bool green, bool blue,
+			bool alpha);
+	virtual void _setDepthBias(float bias, float slopeScaleBias);
+	virtual void _setFog(FogMode mode = FOG_NONE, const ColourValue& colour =
+			ColourValue::White, Real expDensity = 1.0, Real linearStart = 0.0,
+			Real linearEnd = 1.0);
+
+	virtual VertexElementType getColourVertexElementType(void) const;
+	virtual void _convertProjectionMatrix(const Matrix4& matrix, Matrix4& dest,
+			bool forGpuProgram = false);
+
+	virtual void _makeProjectionMatrix(const Radian& fovy, Real aspect,
+			Real nearPlane, Real farPlane, Matrix4& dest, bool forGpuProgram =
+					false);
+
+	virtual void _makeProjectionMatrix(Real left, Real right, Real bottom,
+			Real top, Real nearPlane, Real farPlane, Matrix4& dest,
+			bool forGpuProgram = false);
+	virtual void _makeOrthoMatrix(const Radian& fovy, Real aspect,
+			Real nearPlane, Real farPlane, Matrix4& dest, bool forGpuProgram =
+					false);
+
+	virtual void _applyObliqueDepthProjection(Matrix4& matrix,
+			const Plane& plane, bool forGpuProgram);
+
+	virtual void _setPolygonMode(PolygonMode level);
+
+	virtual void setStencilCheckEnabled(bool enabled);
+	virtual void setStencilBufferParams(
+			CompareFunction func = CMPF_ALWAYS_PASS, uint32 refValue = 0,
+			uint32 mask = 0xFFFFFFFF,
+			StencilOperation stencilFailOp = SOP_KEEP,
+			StencilOperation depthFailOp = SOP_KEEP, StencilOperation passOp =
+					SOP_KEEP, bool twoSidedOperation = false);
+
+	virtual void setVertexDeclaration(VertexDeclaration* decl);
+	virtual void setVertexBufferBinding(VertexBufferBinding* binding);
+	virtual void setNormaliseNormals(bool normalise);
+
+	virtual void _render(const RenderOperation& op);
+	const RenderSystemCapabilities* getCapabilities(void) const {
+		return mRealCapabilities;
+	}
+	virtual void bindGpuProgram(GpuProgram* prg);
+	virtual void bindGpuProgramParameters(GpuProgramType gptype, GpuProgramParametersSharedPtr params, uint16 variabilityMask );
+	virtual void bindGpuProgramPassIterationParameters(GpuProgramType gptype);
+	virtual void unbindGpuProgram(GpuProgramType gptype);
+
+	virtual void setClipPlanesImpl(const PlaneList& clipPlanes);
+	virtual void enableClipPlane(Ogre::ushort index, bool enable);
+	virtual void setScissorTest(bool enabled, size_t left = 0, size_t top = 0,
+			size_t right = 800, size_t bottom = 600);
+	virtual void clearFrameBuffer(unsigned int buffers,
+			const ColourValue& colour = ColourValue::Black, Real depth = 1.0f,
+			unsigned short stencil = 0);
+	virtual Real getHorizontalTexelOffset(void);
+	virtual Real getVerticalTexelOffset(void);
+	virtual Real getMinimumDepthInputValue(void);
+	virtual Real getMaximumDepthInputValue(void);
+	
+	virtual void preExtraThreadsStarted();
+	virtual void postExtraThreadsStarted();
+	virtual void registerThread();
+	virtual void unregisterThread();
+	
+	void setCurrentPassIterationCount(const size_t count) {
+		mCurrentPassIterationCount = count;
+	}
+
+    virtual void _setRenderTarget(RenderTarget *target);
+
+	virtual RenderSystemCapabilities* createRenderSystemCapabilities() const;
+	
+	virtual void initialiseFromRenderSystemCapabilities(RenderSystemCapabilities* caps, RenderTarget* primary);
+
+	class _OgreExport Listener {
+	public:
+		Listener() {
+		}
+		virtual ~Listener() {
+		}
+
+		virtual void eventOccurred(const String& eventName,
+				const NameValuePairList* parameters = 0);
+	};
+	virtual const StringVector& getRenderSystemEvents(void) const {
+		return mEventNames;
+	}
+	void setClipPlane(Ogre::ushort index, Real A, Real B, Real C, Real D);
+
+	virtual RenderWindow* _initialise(bool autoCreateWindow,
+			const String& windowTitle = "null render window");
+	
+	RenderWindow* _createRenderWindow(const String &name,
+			unsigned int width, unsigned int height, bool fullScreen,
+			const NameValuePairList *miscParams = 0);
+	
+    virtual unsigned int getDisplayMonitorCount() const;
+	NULLHardwareBufferManager * m_pHardwareBufferManager;
+	NULLGpuProgramManager* mGpuProgramManager;
+};
+
+}
+#endif

File NullRenderToVertexBuffer.h

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullRenderToVertexBuffer.h 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#ifndef __NULLRENDERTOVERTEXBUFFER_H
+#define __NULLRENDERTOVERTEXBUFFER_H
+
+#include "stdafx.h"
+
+namespace Ogre {
+
+	class NULLRenderToVertexBuffer : public RenderToVertexBuffer {
+		public:
+			NULLRenderToVertexBuffer() {};
+			
+		
+			virtual void getRenderOperation(Ogre::RenderOperation& op) {};
+			virtual void update(Ogre::SceneManager*) {};
+	};
+
+}
+
+#endif

File NullRenderWindow.cpp

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullRenderWindow.cpp 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#include "stdafx.h"
+#include "NullRenderWindow.h"
+
+namespace Ogre {
+
+	unsigned int NULLRenderWindow::mWindowHandle = 1;
+
+	NULLRenderWindow::NULLRenderWindow() 
+	{
+		mIsFullScreen = false;
+		mIsExternal = false;
+		mSizing = false;
+		mClosed = false;
+	}
+
+	NULLRenderWindow::~NULLRenderWindow()
+	{
+		destroy();
+	}
+
+
+	void NULLRenderWindow::create(const String& name, unsigned int width, unsigned int height,
+		bool fullScreen, const NameValuePairList *miscParams)
+	{
+		mWindowHandle++;
+
+	}
+
+	void NULLRenderWindow::destroy()
+	{
+		
+	}
+
+	void NULLRenderWindow::reposition(int top, int left)
+	{
+	}
+
+	void NULLRenderWindow::resize(unsigned int width, unsigned int height)
+	{
+	}
+
+	//-----------------------------------------------------------------------------
+	void NULLRenderWindow::update(bool swap)
+	{
+		RenderWindow::update(swap);
+	}
+
+}

File NullRenderWindow.h

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullRenderWindow.h 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#ifndef __NULLRENDERWINDOW_H
+#define __NULLRENDERWINDOW_H
+
+#include "stdafx.h"
+
+namespace Ogre {
+	
+	class NULLRenderWindow : public RenderWindow
+	{
+		public:
+			NULLRenderWindow();
+			~NULLRenderWindow();
+			void create(const String& name, unsigned int width, unsigned int height,
+					bool fullScreen, const NameValuePairList *miscParams);
+			void destroy(void);
+			bool isClosed() const { return mClosed; }
+			void reposition(int left, int top);
+			void resize(unsigned int width, unsigned int height);
+			void swapBuffers( bool waitForVSync = true ) {};
+			int getWindowHandle() const { return mWindowHandle; }
+			virtual void writeContentsToFile(const String& filename) {}
+			virtual void copyContentsToMemory(const PixelBox &dst, FrameBuffer buffer=FB_AUTO) {};
+			virtual bool requiresTextureFlipping() const { return false;}
+	
+			/// @copydoc RenderTarget::update
+			void update(bool swap);
+		protected:
+			bool	mIsExternal;			// window not created by Ogre
+			bool	mSizing;
+			bool	mClosed;
+			bool	mIsSwapChain;			// Is this a secondary window?
+			static	unsigned int mWindowHandle;
+	
+	};
+}
+
+#endif

File NullRendererDll.cpp

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullRendererDll.cpp 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#include "stdafx.h"
+#include "NullRenderSystem.h"
+#include "NullHlslProgramFactory.h"
+
+namespace Ogre {
+
+	NULLRenderSystem* nullRendPlugin;
+	NULLHLSLProgramFactory* hlslProgramFactory;
+
+	extern "C" void dllStartPlugin(void) throw()
+	{
+		nullRendPlugin = new NULLRenderSystem();
+		Ogre::Root::getSingleton().addRenderSystem( (Ogre::RenderSystem *)nullRendPlugin );
+
+        // create & register HLSL factory
+        hlslProgramFactory = new NULLHLSLProgramFactory();
+		Ogre::HighLevelGpuProgramManager::getSingleton().addFactory(hlslProgramFactory);
+	}
+
+	extern "C" void dllStopPlugin(void)
+	{
+		delete nullRendPlugin;
+		delete hlslProgramFactory;
+	}
+
+}

File NullTexture.h

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullTexture.h 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#ifndef __NULLTEXTURE_H
+#define __NULLTEXTURE_H
+
+#include "stdafx.h"
+
+using namespace Ogre;
+
+class NULLTexture : public Texture
+{
+public:
+	NULLTexture(ResourceManager* creator, const String& name, ResourceHandle handle,
+		const String& group, bool isManual = false, ManualResourceLoader* loader = 0) : Texture(creator, name, handle, group, isManual, loader) { }
+	~NULLTexture() {}
+	void loadImpl(void) {}
+	void loadImage (const Ogre::Image &) {}
+	HardwarePixelBufferSharedPtr getBuffer(size_t face=0, size_t mipmap=0) { return HardwarePixelBufferSharedPtr(NULL); }
+	void createInternalResourcesImpl() {}
+	void freeInternalResourcesImpl() {}
+};
+
+#endif

File NullTextureManager.cpp

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullTextureManager.cpp 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#include "stdafx.h"
+#include "NullTextureManager.h"
+#include "NullTexture.h"
+
+namespace Ogre {
+
+	NULLTextureManager::NULLTextureManager(  ) : TextureManager()
+	{
+        ResourceGroupManager::getSingleton()._registerResourceManager(mResourceType, this);
+	}
+
+	NULLTextureManager::~NULLTextureManager()
+	{
+        // unregister with group manager
+        ResourceGroupManager::getSingleton()._unregisterResourceManager(mResourceType);
+
+	}
+
+    Resource* NULLTextureManager::createImpl(const String& name, 
+        ResourceHandle handle, const String& group, bool isManual, 
+        ManualResourceLoader* loader, const NameValuePairList* createParams)
+    {
+        return new NULLTexture(this, name, handle, group, isManual, loader); 
+    }
+
+
+	PixelFormat NULLTextureManager::getNativeFormat(TextureType ttype, PixelFormat format, int usage)
+	{
+		return PF_A8;
+	}
+	
+	bool NULLTextureManager::isHardwareFilteringSupported(TextureType ttype, PixelFormat format, int usage, bool preciseFormatOnly) {
+		return true;
+	}
+
+}

File NullTextureManager.h

+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: NullTextureManager.h 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#ifndef __NULLTEXTUREMANAGER_H
+#define __NULLTEXTUREMANAGER_H
+
+#include "stdafx.h"
+
+namespace Ogre {
+
+	class NULLTextureManager : public TextureManager
+	{
+		protected:
+			/// @copydoc ResourceManager::createImpl
+			Resource* createImpl(const String& name, ResourceHandle handle, 
+				const String& group, bool isManual, ManualResourceLoader* loader, 
+				const NameValuePairList* createParams);
+	
+		public:
+			NULLTextureManager();
+			~NULLTextureManager();
+	
+			/// @copydoc TextureManager::getNativeFormat
+			PixelFormat getNativeFormat(TextureType ttype, PixelFormat format, int usage);
+	
+			virtual bool isHardwareFilteringSupported (TextureType ttype, PixelFormat format, int usage, bool preciseFormatOnly=false);
+	};
+
+}
+
+#endif
+/******************************************************************************
+ *
+ *    This file is part of openDarkEngine project
+ *    Copyright (C) 2009 openDarkEngine team
+ *
+ *    This program is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ *	  $Id: stdafx.h 1182 2009-04-17 15:56:42Z volca $
+ *
+ *****************************************************************************/
+
+// This source code is a fixed and maintained version of the Null render system written by xyzzy@ogre3d.org forum
+
+#include <OgreRoot.h>
+#include <OgreRenderSystem.h>
+#include <OgreHardwareBufferManager.h>
+#include <OgreTextureManager.h>
+#include <OgreTexture.h>
+#include <OgreHardwarePixelBuffer.h>
+#include <OgreRenderWindow.h>
+#include <OgreGpuProgramManager.h>
+#include <OgreHighLevelGpuProgramManager.h>
+#include <OgreGpuProgram.h>
+#include <OgreStringConverter.h>
+#include <OgreString.h>
+#include <OgreResourceManager.h>
+#include <OgreRenderSystemCapabilities.h>