瀏覽代碼

Direct3D11 CMake and Project Generator files.

rextimmy 9 年之前
父節點
當前提交
bd60f3be1a
共有 3 個文件被更改,包括 41 次插入2 次删除
  1. 7 2
      Tools/CMake/torque3d.cmake
  2. 33 0
      Tools/projectGenerator/modules/d3d11.inc
  3. 1 0
      projects.xml

+ 7 - 2
Tools/CMake/torque3d.cmake

@@ -83,6 +83,10 @@ else()
 	option(TORQUE_DEDICATED "Torque dedicated" OFF)
 endif()
 
+if(WIN32)
+	option(TORQUE_D3D11 "Allow Direct3D 11 render" OFF)
+endif()
+
 ###############################################################################
 # options
 ###############################################################################
@@ -391,8 +395,9 @@ if(WIN32)
     addPath("${srcDir}/platformWin32/videoInfo")
     addPath("${srcDir}/platformWin32/minidump")
     addPath("${srcDir}/windowManager/win32")
-    #addPath("${srcDir}/gfx/D3D8")
-    addPath("${srcDir}/gfx/D3D")
+	if(TORQUE_D3D11)
+		addPath("${srcDir}/gfx/D3D11")
+	endif()
     addPath("${srcDir}/gfx/D3D9")
     addPath("${srcDir}/gfx/D3D9/pc")
     addPath("${srcDir}/shaderGen/HLSL")    

+ 33 - 0
Tools/projectGenerator/modules/d3d11.inc

@@ -0,0 +1,33 @@
+<?php
+//-----------------------------------------------------------------------------
+// Copyright (c) 2015 GarageGames, LLC
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to
+// deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+// IN THE SOFTWARE.
+//-----------------------------------------------------------------------------
+
+beginModule('d3d11');   
+   
+   if ( T3D_Generator::$platform == "win32" && !isDefined("TORQUE_DEDICATED"))
+   {
+      addEngineSrcDir("gfx/D3D11");
+   }
+
+endModule();
+
+?>

+ 1 - 0
projects.xml

@@ -29,6 +29,7 @@ Here are some examples:
 
   <entry type="modules">
     <module name="openGL">OpenGL Rendering</module>
+    <module name="d3d11">Direct3D 11 Rendering</module>
     <module name="fmod">FMod Sound Engine</module>
     <module name="leapMotion" path="$LEAPMOTION_SDK_PATH">Leap Motion Controller</module>
     <module name="razerHydra" path="$RAZERHYDRA_SDK_PATH">Razer Hydra Controller</module>