Jelajahi Sumber

DX11 project added

Marko Pintera 13 tahun lalu
induk
melakukan
1ed4b591b5

+ 154 - 0
CamelotD3D11RenderSystem/CamelotD3D11RenderSystem.vcxproj

@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{1437BB4E-DDB3-4307-AA41-8C035DA3014B}</ProjectGuid>
+    <RootNamespace>CamelotD3D11RenderSystem</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v110</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v110</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <OutDir>..\bin\$(Configuration)\</OutDir>
+    <IntDir>.\Intermediate\$(Platform)\$(Configuration)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <IntDir>.\Intermediate\$(Platform)\$(Configuration)\</IntDir>
+    <OutDir>..\bin\$(Platform)\$(Configuration)\</OutDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <OutDir>..\bin\$(Configuration)\</OutDir>
+    <IntDir>.\Intermediate\$(Platform)\$(Configuration)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <IntDir>.\Intermediate\$(Platform)\$(Configuration)\</IntDir>
+    <OutDir>..\bin\$(Platform)\$(Configuration)\</OutDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;.\Include;..\CamelotRenderer\Include;..\CamelotUtility\Include;..\Dependencies\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>CM_RSD3D11_EXPORTS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>CamelotRenderer.lib;CamelotUtility.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;..\lib\$(Configuration);..\Dependencies\lib\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <ImportLibrary>..\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;.\Include;..\CamelotRenderer\Include;..\CamelotUtility\Include;..\Dependencies\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>CM_RSD3D11_EXPORTS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>CamelotRenderer.lib;CamelotUtility.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x64;..\lib\$(Platform)\$(Configuration);..\Dependencies\lib\x64\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <ImportLibrary>..\lib\$(Platform)\$(Configuration)\$(TargetName).lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <AdditionalIncludeDirectories>C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;.\Include;..\CamelotRenderer\Include;..\CamelotUtility\Include;..\Dependencies\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>CM_RSD3D11_EXPORTS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>CamelotRenderer.lib;CamelotUtility.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;..\lib\$(Configuration);..\Dependencies\lib\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <ImportLibrary>..\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <AdditionalIncludeDirectories>C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;.\Include;..\CamelotRenderer\Include;..\CamelotUtility\Include;..\Dependencies\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>CM_RSD3D11_EXPORTS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>CamelotRenderer.lib;CamelotUtility.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x64;..\lib\$(Platform)\$(Configuration);..\Dependencies\lib\x64\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <ImportLibrary>..\lib\$(Platform)\$(Configuration)\$(TargetName).lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="Include\CmD3D11Prerequisites.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 22 - 0
CamelotD3D11RenderSystem/CamelotD3D11RenderSystem.vcxproj.filters

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="Include\CmD3D11Prerequisites.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+</Project>

+ 73 - 0
CamelotD3D11RenderSystem/Include/CmD3D11Prerequisites.h

@@ -0,0 +1,73 @@
+#pragma once
+
+#include "CmPrerequisites.h"
+
+// some D3D commonly used macros
+#define SAFE_DELETE(p)       { if(p) { delete (p);     (p)=NULL; } }
+#define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p);   (p)=NULL; } }
+#define SAFE_RELEASE(p)      { if(p) { (p)->Release(); (p)=NULL; } }
+
+// enable extended d3d debug 
+#if CM_DEBUG_MODE
+#	define D3D_DEBUG_INFO
+#endif
+
+#define WIN32_LEAN_AND_MEAN
+#if !defined(NOMINMAX) && defined(_MSC_VER)
+#	define NOMINMAX // required to stop windows.h messing up std::min
+#endif
+
+#include <d3d11.h>
+#include <d3d11shader.h>
+#include <D3Dcompiler.h>
+
+namespace CamelotEngine
+{
+	// Predefine classes
+	class D3D11RenderSystem;
+	class D3D11RenderWindowBase;
+	class D3D11Texture;
+	class D3D11TextureManager;
+	class D3D11DepthBuffer;
+	class D3D11Driver;
+	class D3D11DriverList;
+	class D3D11VideoMode;
+	class D3D11VideoModeList;
+	class D3D11GpuProgram;
+	class D3D11GpuProgramManager;
+	class D3D11HardwareBufferManager;
+	class D3D11HardwareIndexBuffer;
+	class D3D11HLSLProgramFactory;
+	class D3D11HLSLProgram;
+	class D3D11VertexDeclaration;
+	class D3D11Device;
+	class D3D11HardwareBuffer;
+	class D3D11HardwarePixelBuffer;
+
+	enum TypeID_D3D9
+	{
+		TID_D3D9_HLSLProgram = 12000
+	};
+
+// Should we ask D3D to manage vertex/index buffers automatically?
+// Doing so avoids lost devices, but also has a performance impact
+// which is unacceptably bad when using very large buffers
+#define CM_D3D_MANAGE_BUFFERS 1 // TODO - Keep this on or off? I'll probably want to turn it off at some point
+
+    //-------------------------------------------
+	// Windows setttings
+	//-------------------------------------------
+#if (CM_PLATFORM == CM_PLATFORM_WIN32) && !defined(CM_STATIC_LIB)
+#	ifdef CM_RSD3D11_EXPORTS
+#		define CM_D3D11_EXPORT __declspec(dllexport)
+#	else
+#       if defined( __MINGW32__ )
+#           define CM_D3D11_EXPORT
+#       else
+#    		define CM_D3D11_EXPORT __declspec(dllimport)
+#       endif
+#	endif
+#else
+#	define CM_D3D11_EXPORT
+#endif	// CM_PLATFORM_WIN32
+}

+ 4 - 19
CamelotD3D9Renderer/Include/CmD3D9Prerequisites.h

@@ -29,28 +29,13 @@ THE SOFTWARE.
 #define __D3D9PREREQUISITES_H__
 #define __D3D9PREREQUISITES_H__
 
 
 #include "CmPrerequisites.h"
 #include "CmPrerequisites.h"
-#ifdef __MINGW32__
-#  include "WIN32/OgreMinGWSupport.h" // extra defines for MinGW to deal with DX SDK
-#endif
-
-#if CM_THREAD_SUPPORT
-#define OGRE_LOCK_RECURSIVE_MUTEX(name)   name.lock();
-#define OGRE_UNLOCK_RECURSIVE_MUTEX(name) name.unlock();
-#else
-#define OGRE_LOCK_RECURSIVE_MUTEX(name) 
-#define OGRE_UNLOCK_RECURSIVE_MUTEX(name)
-#endif
 
 
+#define CM_LOCK_RECURSIVE_MUTEX(name) 
+#define CM_UNLOCK_RECURSIVE_MUTEX(name)
 
 
-#if CM_THREAD_SUPPORT == 1
-#define D3D9_DEVICE_ACCESS_LOCK				OGRE_LOCK_RECURSIVE_MUTEX(msDeviceAccessMutex);
-#define D3D9_DEVICE_ACCESS_UNLOCK			OGRE_UNLOCK_RECURSIVE_MUTEX(msDeviceAccessMutex);
-#define D3D9_DEVICE_ACCESS_CRITICAL_SECTION	CM_LOCK_MUTEX(msDeviceAccessMutex)
-#else
 #define D3D9_DEVICE_ACCESS_LOCK	
 #define D3D9_DEVICE_ACCESS_LOCK	
 #define D3D9_DEVICE_ACCESS_UNLOCK
 #define D3D9_DEVICE_ACCESS_UNLOCK
 #define D3D9_DEVICE_ACCESS_CRITICAL_SECTION
 #define D3D9_DEVICE_ACCESS_CRITICAL_SECTION
-#endif
 
 
 // Define versions for if DirectX is in use (Win32 only)
 // Define versions for if DirectX is in use (Win32 only)
 #define DIRECT3D_VERSION 0x0900
 #define DIRECT3D_VERSION 0x0900
@@ -102,7 +87,7 @@ namespace CamelotEngine
 // Should we ask D3D to manage vertex/index buffers automatically?
 // Should we ask D3D to manage vertex/index buffers automatically?
 // Doing so avoids lost devices, but also has a performance impact
 // Doing so avoids lost devices, but also has a performance impact
 // which is unacceptably bad when using very large buffers
 // which is unacceptably bad when using very large buffers
-#define OGRE_D3D_MANAGE_BUFFERS 1 // TODO - Keep this on or off? I'll probably want to turn it off at some point
+#define CM_D3D_MANAGE_BUFFERS 1 // TODO - Keep this on or off? I'll probably want to turn it off at some point
 
 
     //-------------------------------------------
     //-------------------------------------------
 	// Windows setttings
 	// Windows setttings
@@ -119,6 +104,6 @@ namespace CamelotEngine
 #	endif
 #	endif
 #else
 #else
 #	define CM_D3D9_EXPORT
 #	define CM_D3D9_EXPORT
-#endif	// OGRE_WIN32
+#endif	// CM_PLATFORM_WIN32
 }
 }
 #endif
 #endif

+ 2 - 2
CamelotD3D9Renderer/Source/CmD3D9HardwareBufferManager.cpp

@@ -48,7 +48,7 @@ namespace CamelotEngine {
 		bool useShadowBuffer)
 		bool useShadowBuffer)
     {
     {
 		assert (numVerts > 0);
 		assert (numVerts > 0);
-#if OGRE_D3D_MANAGE_BUFFERS
+#if CM_D3D_MANAGE_BUFFERS
         // Override shadow buffer setting; managed buffers are automatically
         // Override shadow buffer setting; managed buffers are automatically
         // backed by system memory
         // backed by system memory
         // Don't override shadow buffer if discardable, since then we use
         // Don't override shadow buffer if discardable, since then we use
@@ -82,7 +82,7 @@ namespace CamelotEngine {
         HardwareBuffer::Usage usage, bool useShadowBuffer)
         HardwareBuffer::Usage usage, bool useShadowBuffer)
     {
     {
 		assert (numIndexes > 0);
 		assert (numIndexes > 0);
-#if OGRE_D3D_MANAGE_BUFFERS
+#if CM_D3D_MANAGE_BUFFERS
         // Override shadow buffer setting; managed buffers are automatically
         // Override shadow buffer setting; managed buffers are automatically
         // backed by system memory
         // backed by system memory
         if (useShadowBuffer)
         if (useShadowBuffer)

+ 1 - 1
CamelotD3D9Renderer/Source/CmD3D9HardwareIndexBuffer.cpp

@@ -45,7 +45,7 @@ namespace CamelotEngine {
 
 
 		D3DPOOL eResourcePool;
 		D3DPOOL eResourcePool;
 
 
-#if OGRE_D3D_MANAGE_BUFFERS
+#if CM_D3D_MANAGE_BUFFERS
 		eResourcePool = useSystemMemory? D3DPOOL_SYSTEMMEM : 
 		eResourcePool = useSystemMemory? D3DPOOL_SYSTEMMEM : 
 			// If not system mem, use managed pool UNLESS buffer is discardable
 			// If not system mem, use managed pool UNLESS buffer is discardable
 			// if discardable, keeping the software backing is expensive
 			// if discardable, keeping the software backing is expensive

+ 1 - 1
CamelotD3D9Renderer/Source/CmD3D9HardwareVertexBuffer.cpp

@@ -45,7 +45,7 @@ namespace CamelotEngine {
 
 
 		D3DPOOL eResourcePool;
 		D3DPOOL eResourcePool;
 		       
 		       
-#if OGRE_D3D_MANAGE_BUFFERS
+#if CM_D3D_MANAGE_BUFFERS
 		eResourcePool = useSystemMemory? D3DPOOL_SYSTEMMEM : 
 		eResourcePool = useSystemMemory? D3DPOOL_SYSTEMMEM : 
 			// If not system mem, use managed pool UNLESS buffer is discardable
 			// If not system mem, use managed pool UNLESS buffer is discardable
 			// if discardable, keeping the software backing is expensive
 			// if discardable, keeping the software backing is expensive

+ 3 - 3
CamelotD3D9Renderer/Source/CmD3D9Mappings.cpp

@@ -378,7 +378,7 @@ namespace CamelotEngine
         DWORD ret = 0;
         DWORD ret = 0;
         if (usage & HardwareBuffer::HBU_DYNAMIC)
         if (usage & HardwareBuffer::HBU_DYNAMIC)
         {
         {
-#if OGRE_D3D_MANAGE_BUFFERS
+#if CM_D3D_MANAGE_BUFFERS
             // Only add the dynamic flag for default pool, and
             // Only add the dynamic flag for default pool, and
             // we use default pool when buffer is discardable
             // we use default pool when buffer is discardable
             if (usage & HardwareBuffer::HBU_DISCARDABLE)
             if (usage & HardwareBuffer::HBU_DISCARDABLE)
@@ -399,7 +399,7 @@ namespace CamelotEngine
         DWORD ret = 0;
         DWORD ret = 0;
         if (options == HardwareBuffer::HBL_DISCARD)
         if (options == HardwareBuffer::HBL_DISCARD)
         {
         {
-#if OGRE_D3D_MANAGE_BUFFERS
+#if CM_D3D_MANAGE_BUFFERS
             // Only add the discard flag for dynamic usgae and default pool
             // Only add the discard flag for dynamic usgae and default pool
             if ((usage & HardwareBuffer::HBU_DYNAMIC) &&
             if ((usage & HardwareBuffer::HBU_DYNAMIC) &&
                 (usage & HardwareBuffer::HBU_DISCARDABLE))
                 (usage & HardwareBuffer::HBU_DISCARDABLE))
@@ -421,7 +421,7 @@ namespace CamelotEngine
         }
         }
         if (options == HardwareBuffer::HBL_NO_OVERWRITE)
         if (options == HardwareBuffer::HBL_NO_OVERWRITE)
         {
         {
-#if OGRE_D3D_MANAGE_BUFFERS
+#if CM_D3D_MANAGE_BUFFERS
             // Only add the nooverwrite flag for dynamic usgae and default pool
             // Only add the nooverwrite flag for dynamic usgae and default pool
             if ((usage & HardwareBuffer::HBU_DYNAMIC) &&
             if ((usage & HardwareBuffer::HBU_DYNAMIC) &&
                 (usage & HardwareBuffer::HBU_DISCARDABLE))
                 (usage & HardwareBuffer::HBU_DISCARDABLE))

+ 2 - 2
CamelotD3D9Renderer/Source/CmD3D9ResourceManager.cpp

@@ -141,7 +141,7 @@ namespace CamelotEngine
 		mDeviceAccessLockCount++;
 		mDeviceAccessLockCount++;
 		if (mDeviceAccessLockCount == 1)
 		if (mDeviceAccessLockCount == 1)
 		{					
 		{					
-			OGRE_LOCK_RECURSIVE_MUTEX(mResourcesMutex);		
+			CM_LOCK_RECURSIVE_MUTEX(mResourcesMutex);		
 			D3D9Resource::lockDeviceAccess();
 			D3D9Resource::lockDeviceAccess();
 			D3D9HardwarePixelBuffer::lockDeviceAccess();
 			D3D9HardwarePixelBuffer::lockDeviceAccess();
 		}
 		}
@@ -156,7 +156,7 @@ namespace CamelotEngine
 		{						
 		{						
 			D3D9HardwarePixelBuffer::unlockDeviceAccess();
 			D3D9HardwarePixelBuffer::unlockDeviceAccess();
 			D3D9Resource::unlockDeviceAccess();			
 			D3D9Resource::unlockDeviceAccess();			
-			OGRE_UNLOCK_RECURSIVE_MUTEX(mResourcesMutex);			
+			CM_UNLOCK_RECURSIVE_MUTEX(mResourcesMutex);			
 		}
 		}
 	}
 	}
 }
 }

+ 18 - 0
CamelotRenderer.sln

@@ -56,6 +56,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CamelotForwardRenderer", "C
 		{CC7F9445-71C9-4559-9976-FF0A64DCB582} = {CC7F9445-71C9-4559-9976-FF0A64DCB582}
 		{CC7F9445-71C9-4559-9976-FF0A64DCB582} = {CC7F9445-71C9-4559-9976-FF0A64DCB582}
 	EndProjectSection
 	EndProjectSection
 EndProject
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CamelotD3D11RenderSystem", "CamelotD3D11RenderSystem\CamelotD3D11RenderSystem.vcxproj", "{1437BB4E-DDB3-4307-AA41-8C035DA3014B}"
+	ProjectSection(ProjectDependencies) = postProject
+		{9B21D41C-516B-43BF-9B10-E99B599C7589} = {9B21D41C-516B-43BF-9B10-E99B599C7589}
+	EndProjectSection
+EndProject
 Global
 Global
 	GlobalSection(SubversionScc) = preSolution
 	GlobalSection(SubversionScc) = preSolution
 		Svn-Managed = True
 		Svn-Managed = True
@@ -190,6 +195,19 @@ Global
 		{08975177-4A13-4EE7-BB21-3BB92FB3F3CC}.Release|Win32.ActiveCfg = Release|Win32
 		{08975177-4A13-4EE7-BB21-3BB92FB3F3CC}.Release|Win32.ActiveCfg = Release|Win32
 		{08975177-4A13-4EE7-BB21-3BB92FB3F3CC}.Release|Win32.Build.0 = Release|Win32
 		{08975177-4A13-4EE7-BB21-3BB92FB3F3CC}.Release|Win32.Build.0 = Release|Win32
 		{08975177-4A13-4EE7-BB21-3BB92FB3F3CC}.Release|x64.ActiveCfg = Release|Win32
 		{08975177-4A13-4EE7-BB21-3BB92FB3F3CC}.Release|x64.ActiveCfg = Release|Win32
+		{1437BB4E-DDB3-4307-AA41-8C035DA3014B}.Debug|Any CPU.ActiveCfg = Debug|Win32
+		{1437BB4E-DDB3-4307-AA41-8C035DA3014B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+		{1437BB4E-DDB3-4307-AA41-8C035DA3014B}.Debug|Mixed Platforms.Build.0 = Debug|Win32
+		{1437BB4E-DDB3-4307-AA41-8C035DA3014B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{1437BB4E-DDB3-4307-AA41-8C035DA3014B}.Debug|Win32.Build.0 = Debug|Win32
+		{1437BB4E-DDB3-4307-AA41-8C035DA3014B}.Debug|x64.ActiveCfg = Debug|x64
+		{1437BB4E-DDB3-4307-AA41-8C035DA3014B}.Debug|x64.Build.0 = Debug|x64
+		{1437BB4E-DDB3-4307-AA41-8C035DA3014B}.Release|Any CPU.ActiveCfg = Release|Win32
+		{1437BB4E-DDB3-4307-AA41-8C035DA3014B}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+		{1437BB4E-DDB3-4307-AA41-8C035DA3014B}.Release|Mixed Platforms.Build.0 = Release|Win32
+		{1437BB4E-DDB3-4307-AA41-8C035DA3014B}.Release|Win32.ActiveCfg = Release|Win32
+		{1437BB4E-DDB3-4307-AA41-8C035DA3014B}.Release|Win32.Build.0 = Release|Win32
+		{1437BB4E-DDB3-4307-AA41-8C035DA3014B}.Release|x64.ActiveCfg = Release|Win32
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 		HideSolutionNode = FALSE

+ 3 - 5
CamelotRenderer/Source/CmApplication.cpp

@@ -36,16 +36,16 @@ namespace CamelotEngine
 		:mPrimaryRenderWindow(nullptr)
 		:mPrimaryRenderWindow(nullptr)
 	{ }
 	{ }
 
 
-	void Application::startUp(const String& renderSystemDll, const String& rendererDll)
+	void Application::startUp(const String& renderSystemName, const String& rendererName)
 	{
 	{
 		Time::startUp(new Time());
 		Time::startUp(new Time());
 		Input::startUp(new Input());
 		Input::startUp(new Input());
 		DynLibManager::startUp(new DynLibManager());
 		DynLibManager::startUp(new DynLibManager());
 		HighLevelGpuProgramManager::startUp(new HighLevelGpuProgramManager());
 		HighLevelGpuProgramManager::startUp(new HighLevelGpuProgramManager());
 
 
-		RenderSystemManager::startUp(renderSystemDll);
+		RenderSystemManager::startUp(renderSystemName);
 
 
-		loadPlugin(rendererDll);
+		loadPlugin(rendererName);
 		RendererManager::setActive("ForwardRenderer");
 		RendererManager::setActive("ForwardRenderer");
 
 
 		RenderSystem* renderSystem = RenderSystemManager::getActive();
 		RenderSystem* renderSystem = RenderSystemManager::getActive();
@@ -53,8 +53,6 @@ namespace CamelotEngine
 
 
 		mPrimaryRenderWindow = renderSystem->createRenderWindow("Camelot Renderer", 1280, 720, false);
 		mPrimaryRenderWindow = renderSystem->createRenderWindow("Camelot Renderer", 1280, 720, false);
 
 
-		UINT32 winId = gApplication().getAppWindowId();
-
 		SceneManager::startUp(new SceneManager());
 		SceneManager::startUp(new SceneManager());
 		Resources::startUp(new Resources("D:\\CamelotResourceMetas"));
 		Resources::startUp(new Resources("D:\\CamelotResourceMetas"));