1. Robert Massaioli
  2. tokamakp

Commits

Robert Massaioli  committed fe183bb

Moving everything out of trunk and into the root.

  • Participants
  • Parent commits f0ead97
  • Branches master

Comments (0)

Files changed (336)

File changelog.txt

View file
  • Ignore whitespace
+Tokamak CHANGELOG
+-------------
+
+the rules for this file:
+  * entries are sorted newest-first.
+  * summarize sets of changes - dont reproduce every SVN log comment here.
+  * don't ever delete anything.
+  * keep the format consistent (79 char width, Y-M-D date format).
+
+------------------------------------------------------------------------------
+2010-03-10 James Chen(Kenshin)
+		* add balljoints demo
+		* add hingejoints demo
+2010-03-09 James Chen(Kenshin)
+		* fix the car demo,when push "R" reset state crash.
+2010-01-09 James Chen(Kenshin)
+		* add changelog.txt to trunk.
+		* put the source code to SCM Repositories.
+
+

File d3dapp/Car.exe

  • Ignore whitespace
Binary file added.

File d3dapp/Car.vcproj

View file
  • Ignore whitespace
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="Car"
+	ProjectGUID="{EE92B72B-0CBC-4962-8E12-64065F917D28}"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="Debug"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;PROFILE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="dxut\dxstdafx.h"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/IGNORE:4089"
+				AdditionalDependencies="tokamak_d.lib dxerr.lib dxguid.lib d3dx9d.lib d3d9.lib winmm.lib comctl32.lib Xinput.lib"
+				OutputFile="$(ProjectName)_d.exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="../lib"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/d3dapp.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="false"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="dxut\dxstdafx.h"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/IGNORE:4089"
+				AdditionalDependencies="tokamak.lib dxerr.lib dxguid.lib d3dx9.lib d3d9.lib winmm.lib comctl32.lib Xinput.lib"
+				OutputFile="$(ProjectName).exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="../lib"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="false"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Profile|Win32"
+			OutputDirectory="Profile"
+			IntermediateDirectory="Profile"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;PROFILE"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="dxut\dxstdafx.h"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/IGNORE:4089"
+				OutputFile="$(ProjectName)_p.exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="../lib"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="false"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\Common"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;PROFILE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="dxstdafx.h"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/IGNORE:4089"
+				AdditionalDependencies="dxerr.lib dxguid.lib d3dx9d.lib d3d9.lib winmm.lib comctl32.lib"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/d3dapp.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="false"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="..\..\Common"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="dxstdafx.h"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/IGNORE:4089"
+				AdditionalDependencies="dxerr.lib dxguid.lib d3dx9.lib d3d9.lib winmm.lib comctl32.lib"
+				OutputFile="$(OutDir)/d3dapp.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="false"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Profile|x64"
+			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="..\..\Common"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;PROFILE"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="dxstdafx.h"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/IGNORE:4089"
+				AdditionalDependencies="dxerr.lib dxguid.lib d3dx9.lib d3d9.lib winmm.lib comctl32.lib"
+				OutputFile="$(OutDir)/d3dapp.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="false"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="d3dapp.manifest"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Profile|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Profile|x64"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="d3dapp.rc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\Common\directx.ico"
+				>
+			</File>
+			<File
+				RelativePath="resource.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Common"
+			>
+			<File
+				RelativePath=".\dxut\dxstdafx.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\dxut\dxstdafx.h"
+				>
+			</File>
+			<File
+				RelativePath=".\dxut\DXUT.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\dxut\DXUT.h"
+				>
+			</File>
+			<File
+				RelativePath=".\dxut\DXUTenum.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\dxut\DXUTenum.h"
+				>
+			</File>
+			<File
+				RelativePath=".\dxut\DXUTgui.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\dxut\DXUTgui.h"
+				>
+			</File>
+			<File
+				RelativePath=".\dxut\DXUTMesh.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\dxut\DXUTMesh.h"
+				>
+			</File>
+			<File
+				RelativePath=".\dxut\DXUTmisc.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\dxut\DXUTmisc.h"
+				>
+			</File>
+			<File
+				RelativePath=".\dxut\DXUTRes.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\dxut\DXUTRes.h"
+				>
+			</File>
+			<File
+				RelativePath=".\dxut\DXUTSettingsDlg.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\dxut\DXUTSettingsDlg.h"
+				>
+			</File>
+		</Filter>
+		<File
+			RelativePath=".\car.cpp"
+			>
+		</File>
+		<File
+			RelativePath=".\d3dapp.cpp"
+			>
+		</File>
+		<File
+			RelativePath=".\tokamaksampleApp.cpp"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

File d3dapp/Main.fx

View file
  • Ignore whitespace
+//--------------------------------------------------------------------------------------
+// File: ConfigSystem.fx
+//
+// The effect file for the ConfigSystem sample.  
+// 
+// Copyright (c) Microsoft Corporation. All rights reserved.
+//--------------------------------------------------------------------------------------
+
+
+//--------------------------------------------------------------------------------------
+// Global variables
+//--------------------------------------------------------------------------------------
+matrix   g_mWorld;                  // World matrix for object
+matrix   g_mView;                   // View matrix for object
+matrix   g_mProj;                   // Projection matrix for object
+matrix   g_mWorldView;              // World * View matrix
+matrix   g_mWorldViewProj;          // World * View * Projection matrix
+texture  g_txScene;                 // texture for scene rendering
+float4   g_matDiffuse;              // Diffuse component of material
+float4   g_matSpecular;             // Specular component of material
+float    g_matPower;                // Specular power of material
+float4   g_vLightPos[4] = { float4(  3.5f, 1.0f,  5.5f, 1.0f ),
+                            float4( -3.5f, 1.0f, -5.5f, 1.0f ),
+                            float4(  3.5f, 1.0f, -5.5f, 1.0f ),
+                            float4( -3.5f, 1.0f,  5.5f, 1.0f ) };  // Light position in world space
+float4   g_vLightColor = float4( 0.5f, 0.5f, 0.5f, 1.0f );
+
+// These parameters will change based on the config flags.
+bool     g_bUseSpecular = true;
+bool     g_bUseAnisotropic = false;
+int      g_MinFilter = 2;           // Minification filtering
+int      g_MaxAnisotropy = 1;       // Maximum anisotropy
+
+float4 g_Ambient;
+float4 g_LightTokamak0;
+float4 g_LightTokamak1;
+float4 g_ViewPos;
+float4 g_LightColorTokamak0;
+float4 g_LightColorTokamak1;
+
+
+//-----------------------------------------------------------------------------
+// Texture samplers
+//-----------------------------------------------------------------------------
+sampler g_samScene =
+sampler_state
+{
+    Texture = <g_txScene>;
+    MinFilter = <g_MinFilter>;
+    MagFilter = Linear;
+    MipFilter = Linear;
+    MaxAnisotropy = <g_MaxAnisotropy>;
+};
+
+
+void VS20( float4 vPos : POSITION,
+           float3 vNormal : NORMAL,
+           float2 vTex0 : TEXCOORD0,
+           out float4 oPos : POSITION,
+           out float2 oTex0 : TEXCOORD0,
+           out float3 oVtE : TEXCOORD1,
+           out float3 oVNormal : TEXCOORD2,
+           out float3 oViewVtL0 : TEXCOORD3,
+           out float3 oViewVtL1 : TEXCOORD4,
+           out float3 oViewVtL2 : TEXCOORD5,
+           out float3 oViewVtL3 : TEXCOORD6 )
+{
+    oPos = mul( vPos, g_mWorldViewProj );
+
+    // Compute view space normal
+    oVNormal = normalize( mul( vNormal, (float3x3)g_mWorldView ) );
+
+    // Vertex pos in view space (normalize in pixel shader)
+    oVtE = -mul( vPos, g_mWorldView );
+
+    // Compute view space vertex to light vectors (normalized)
+    oViewVtL0 = normalize( mul( g_vLightPos[0], g_mView ) + oVtE );
+    oViewVtL1 = normalize( mul( g_vLightPos[1], g_mView ) + oVtE );
+    oViewVtL2 = normalize( mul( g_vLightPos[2], g_mView ) + oVtE );
+    oViewVtL3 = normalize( mul( g_vLightPos[3], g_mView ) + oVtE );
+
+    // Propogate texcoords
+    oTex0 = vTex0;
+}
+
+float4 PS20( float2 Tex0 : TEXCOORD0,
+             float3 VtE : TEXCOORD1,
+             float3 N : TEXCOORD2,
+             float3 VtL0 : TEXCOORD3,
+             float3 VtL1 : TEXCOORD4,
+             float3 VtL2 : TEXCOORD5,
+             float3 VtL3 : TEXCOORD6 ) : COLOR0
+{
+    // Diffuse luminance
+    float LumD = max( 0.0f, dot( N, VtL0 ) ) +
+                 max( 0.0f, dot( N, VtL1 ) ) +
+                 max( 0.0f, dot( N, VtL2 ) ) +
+                 max( 0.0f, dot( N, VtL3 ) );
+
+    // Normalize view space vertex-to-eye
+    VtE = normalize( VtE );
+
+    // Specular luminance
+    float LumS = pow( max( 0.0f, dot( N, normalize( VtE + VtL0 ) ) ), g_matPower ) +
+                 pow( max( 0.0f, dot( N, normalize( VtE + VtL1 ) ) ), g_matPower ) +
+                 pow( max( 0.0f, dot( N, normalize( VtE + VtL2 ) ) ), g_matPower ) +
+                 pow( max( 0.0f, dot( N, normalize( VtE + VtL3 ) ) ), g_matPower );
+
+    float Specular;
+    if( g_bUseSpecular )
+        Specular = g_matSpecular * LumS * g_vLightColor;
+    else
+        Specular = 0.0f;
+
+    return tex2D( g_samScene, Tex0 ) * g_matDiffuse * LumD * g_vLightColor + Specular;
+}
+
+
+void VS( float4 vPos : POSITION,
+         float3 vNormal : NORMAL,
+         float2 vTex0 : TEXCOORD0,
+         out float4 oDiffuse : COLOR0,
+         out float4 oSpecular : COLOR1,
+         out float4 oPos : POSITION,
+         out float2 oTex0 : TEXCOORD0 )
+{
+    oPos = mul( vPos, g_mWorldViewProj );
+
+    // Compute view space normal
+    float3 N = normalize( mul( vNormal, (float3x3)g_mWorldView ) );
+
+    // Vertex pos in view space
+    float3 Vv = mul( vPos, g_mWorldView );
+
+    float LumD = 0.0f;  // Diffuse luminance
+    float LumS = 0.0f;  // Specular luminance
+    for( int i = 0; i < 4; ++i )
+    {
+        // Light pos in view space
+        float3 Lv = mul( g_vLightPos[i], g_mView );
+
+        // View space vertex-to-light
+        float3 VtL = normalize( Lv - Vv );
+
+        LumD += max( 0.0f, dot( N, VtL ) );
+
+        // View space vertex-to-eye
+        float3 VtE = normalize( -Vv );
+
+        // Half vector
+        float3 H = normalize( VtE + VtL );
+
+        LumS += pow( max( 0.0f, dot( N, H ) ), 40.0f ); // This power is hardcoded to not exceed inst limit.
+    }
+
+    oDiffuse = g_matDiffuse * LumD * g_vLightColor;
+    if( g_bUseSpecular )
+        oSpecular = g_matSpecular * LumS * g_vLightColor;
+    else
+        oSpecular = 0.0f;
+
+    oTex0 = vTex0;
+}
+
+
+float4 PS( float4 Diffuse : COLOR0,
+           float4 Specular : COLOR1,
+           float2 Tex0 : TEXCOORD0 ) : COLOR0
+{
+    return tex2D( g_samScene, Tex0 ) * Diffuse + Specular;
+}
+
+void VS_Tokamak( float4 vPos : POSITION,
+		         float3 vNormal : NORMAL,
+         
+         out float3 oNormal : TEXCOORD0,
+         out float3 oView : TEXCOORD1,
+         out float4 oPos : POSITION)
+{
+	oPos = mul( vPos, g_mWorldViewProj );
+	
+	oNormal = mul(vNormal, g_mWorld);
+	
+	float3 worldPos = mul(vPos, g_mWorld);
+	
+	oView = g_ViewPos - worldPos;
+}
+
+float4 GetReflection(float3 Normal, float3 View, float3 LightDir, float3 LightColor)
+{
+	float ndotl = saturate(dot(Normal, LightDir));
+	
+	float3 reflection = 2.0f * dot(Normal, LightDir) * Normal - LightDir;
+	
+	float reflection_dot_view = dot(reflection, View);
+	
+	return float4(ndotl * LightColor, reflection_dot_view);
+}
+
+float4 PS_Tokamak(	float3 Normal : TEXCOORD0,
+					float3 View : TEXCOORD1) : COLOR0
+{
+	float4 ret;
+	
+	Normal = normalize(Normal);
+	View = normalize(View);
+	
+	float4 light0 = GetReflection(Normal, View, g_LightTokamak0, g_LightColorTokamak0);
+	
+	float4 light1 = GetReflection(Normal, View, g_LightTokamak1, g_LightColorTokamak1);
+		
+	float3 specular = g_matSpecular * pow(light0.w, g_matPower);
+	
+	specular += g_matSpecular * pow(light1.w, g_matPower);
+	
+	ret.rgb = g_matDiffuse.rgb * saturate(light0.xyz + light1.xyz) + specular.rgb;
+	
+	ret.a = g_matDiffuse.a;
+	
+    return ret;
+}
+
+
+//--------------------------------------------------------------------------------------
+// Techniques
+//--------------------------------------------------------------------------------------
+technique RenderSceneTokamak
+{
+    pass P0
+    {
+        VertexShader = compile vs_2_0 VS_Tokamak();
+        PixelShader = compile ps_2_0 PS_Tokamak();
+    }
+}
+
+technique RenderScenePS30
+{
+    pass P0
+    {
+        VertexShader = compile vs_3_0 VS20();
+        PixelShader = compile ps_3_0 PS20();
+    }
+}
+
+
+technique RenderScenePS20A
+{
+    pass P0
+    {
+        VertexShader = compile vs_2_0 VS20();
+        PixelShader = compile ps_2_a PS20();
+    }
+}
+
+
+technique RenderScenePS20B
+{
+    pass P0
+    {
+        VertexShader = compile vs_2_0 VS20();
+        PixelShader = compile ps_2_b PS20();
+    }
+}
+
+
+technique RenderScenePS20
+{
+    pass P0
+    {
+        VertexShader = compile vs_2_0 VS20();
+        PixelShader = compile ps_2_0 PS20();
+    }
+}
+
+
+technique RenderScenePS14
+{
+    pass P0
+    {
+        VertexShader = compile vs_1_1 VS();
+        PixelShader = compile ps_1_4 PS();
+    }
+}
+
+
+technique RenderScenePS13
+{
+    pass P0
+    {
+        VertexShader = compile vs_1_1 VS();
+        PixelShader = compile ps_1_3 PS();
+    }
+}
+
+
+technique RenderScenePS12
+{
+    pass P0
+    {
+        VertexShader = compile vs_1_1 VS();
+        PixelShader = compile ps_1_2 PS();
+    }
+}
+
+
+technique RenderScenePS11
+{
+    pass P0
+    {
+        VertexShader = compile vs_1_1 VS();
+        PixelShader = compile ps_1_1 PS();
+    }
+}
+
+
+technique FFRenderScene
+{
+    pass P0
+    {
+        VertexShader = null;
+        PixelShader = null;
+
+        WorldTransform[0] = <g_mWorld>;
+        ViewTransform = <g_mView>;
+        ProjectionTransform = <g_mProj>;
+
+        Texture[0] = <g_txScene>;
+        MinFilter[0] = <g_MinFilter>;
+        MaxAnisotropy[0] = <g_MaxAnisotropy>;
+        MagFilter[0] = Linear;
+        MipFilter[0] = Linear;
+        AddressU[0] = Wrap;
+        AddressV[0] = Wrap;
+        AddressW[0] = Wrap;
+        ColorArg1[0] = Texture;
+        ColorArg2[0] = Current;
+        ColorOp[0] = Modulate;
+
+        Lighting = True;
+        LightEnable[0] = True;
+//        LightAmbient[0] = float4( 0.0f, 0.0f, 0.0f, 0.0f );
+        LightType[0] = Point;
+        LightPosition[0] = <g_vLightPos[0]>;
+        LightRange[0] = 100.0f;
+        LightDiffuse[0] = <g_vLightColor>;
+        LightSpecular[0] = <g_vLightColor>;
+        LightAttenuation0[0] = 1.0f;
+        LightAttenuation1[0] = 0.0f;
+        LightAttenuation2[0] = 0.0f;
+        LightEnable[1] = True;
+//        LightAmbient[1] = float4( 0.0f, 0.0f, 0.0f, 0.0f );
+        LightType[1] = Point;
+        LightPosition[1] = <g_vLightPos[1]>;
+        LightRange[1] = 100.0f;
+        LightDiffuse[1] = <g_vLightColor>;
+        LightSpecular[1] = <g_vLightColor>;
+        LightAttenuation0[1] = 1.0f;
+        LightAttenuation1[1] = 0.0f;
+        LightAttenuation2[1] = 0.0f;
+        LightEnable[2] = True;
+//        LightAmbient[2] = float4( 0.0f, 0.0f, 0.0f, 0.0f );
+        LightType[2] = Point;
+        LightPosition[2] = <g_vLightPos[2]>;
+        LightRange[2] = 100.0f;
+        LightDiffuse[2] = <g_vLightColor>;
+        LightSpecular[2] = <g_vLightColor>;
+        LightAttenuation0[2] = 1.0f;
+        LightAttenuation1[2] = 0.0f;
+        LightAttenuation2[2] = 0.0f;
+        LightEnable[3] = True;
+//        LightAmbient[3] = float4( 0.0f, 0.0f, 0.0f, 0.0f );
+        LightType[3] = Point;
+        LightPosition[3] = <g_vLightPos[3]>;
+        LightRange[3] = 100.0f;
+        LightDiffuse[3] = <g_vLightColor>;
+        LightSpecular[3] = <g_vLightColor>;
+        LightAttenuation0[3] = 1.0f;
+        LightAttenuation1[3] = 0.0f;
+        LightAttenuation2[3] = 0.0f;
+
+        NormalizeNormals = true;
+
+        SpecularEnable = <g_bUseSpecular>;
+        Ambient = float4( 0.0f, 0.0f, 0.0f, 0.0f );
+        DiffuseMaterialSource = Material;
+        SpecularMaterialSource = Material;
+        MaterialAmbient = float4( 0.0f, 0.0f, 0.0f, 0.0f );
+        MaterialDiffuse = <g_matDiffuse>;
+        MaterialEmissive = float4( 0.0f, 0.0f, 0.0f, 0.0f );
+        MaterialSpecular = <g_matSpecular>;
+        MaterialPower = <g_matPower>;
+    }
+}

File d3dapp/RadDude.exe

  • Ignore whitespace
Binary file added.

File d3dapp/balljoints.cpp

View file
  • Ignore whitespace
+#include "dxut\dxstdafx.h"
+#include "resource.h"
+#include "d3dapp.h"
+#include "tokamaksampleApp.h"
+
+D3DXHANDLE g_hShaderTechTokamak;
+
+D3DXVECTOR4 vLightWorld[NUM_LIGHT] = {	D3DXVECTOR4(1.f,2.f,1.f,0.f),
+D3DXVECTOR4(-1.f,1.f,1.f,0.f)};
+
+D3DXVECTOR4 vLightColor[NUM_LIGHT] = {	D3DXVECTOR4(0.7f,0.7f,0.7f,0.f),
+D3DXVECTOR4(0.5f,0.5f,0.5f,0.f)};
+
+const s32 MAX_OVERLAPPED_PAIR = 300;
+const s32 WALL_NUMBER = 1;
+const f32 EPSILON  = 0.1f;
+
+struct DemoData
+{
+	neV3 pos;
+	neV3 boxSize;
+	neV3 colour;
+};
+
+DemoData gFloor = {	{0.0f,-11.0f,0.0f}, {200.0f,2.0f,200.0f}, {0.3f,0.3f,0.6f}};
+
+
+
+class CSampleBallJoints
+{
+public:
+	CSampleBallJoints() { 
+		paused = false;
+	}
+
+	void Initialise();
+
+	void Shutdown();
+
+	void Process(XINPUT_STATE & InputState);
+
+	void InititialisePhysics();
+
+public:
+	enum
+	{
+		N_BODY = 30,
+	};
+
+	neSimulator * sim;
+
+	neRigidBody * box[N_BODY];
+
+	CRenderPrimitive boxRenderPrimitives[N_BODY];
+
+	neJoint * lastJoint;
+
+	neAllocatorDefault all;
+
+	nePerformanceReport perfReport;
+
+	bool paused;
+
+	CRenderPrimitive groundRender;
+	neAnimatedBody * ground;
+};
+
+CSampleBallJoints sample;
+
+void CSampleBallJoints::Initialise() 
+{
+	InititialisePhysics();
+}
+
+void CSampleBallJoints::Process(XINPUT_STATE & InputState)
+{
+
+	// Zero value if thumbsticks are within the dead zone 
+	if( (InputState.Gamepad.sThumbLX < XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE && 
+		InputState.Gamepad.sThumbLX > -XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE) && 
+		(InputState.Gamepad.sThumbLY < XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE && 
+		InputState.Gamepad.sThumbLY > -XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE) )
+	{	
+		InputState.Gamepad.sThumbLX = 0;
+		InputState.Gamepad.sThumbLY = 0;
+	}
+
+	if( (InputState.Gamepad.sThumbRX < XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE && 
+		InputState.Gamepad.sThumbRX > -XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE) && 
+		(InputState.Gamepad.sThumbRY < XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE && 
+		InputState.Gamepad.sThumbRY > -XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE) ) 
+	{
+		InputState.Gamepad.sThumbRX = 0;
+		InputState.Gamepad.sThumbRY = 0;
+	}
+
+
+	s32 actOnBody = N_BODY - 1;
+
+
+	if (GetAsyncKeyState('P'))
+	{
+		paused = !paused;
+	}
+
+	neV3 vel;
+
+	if (GetAsyncKeyState('T'))
+	{
+		vel.Set (0.0f,30.0f,0.0f);
+
+		box[actOnBody]->SetVelocity(vel);
+	}
+
+}
+
+
+void CSampleBallJoints::Shutdown() 
+{
+	sample.groundRender.mMesh.Destroy();
+
+	for (s32 i = 0; i < sample.N_BODY; i++)
+	{
+		sample.boxRenderPrimitives[i].mMesh.Destroy();
+	}
+
+	neSimulator::DestroySimulator(sim);
+
+	sim = NULL;
+}
+
+void CSampleBallJoints::InititialisePhysics()
+{
+	neV3 gravity; gravity.Set(0.0f, -8.0f, 0.0f);
+
+	f32 linkLength = 1.2f;
+
+	neSimulatorSizeInfo sizeInfo;
+
+	sizeInfo.rigidBodiesCount = N_BODY;
+	sizeInfo.animatedBodiesCount = WALL_NUMBER;
+	sizeInfo.geometriesCount = N_BODY + WALL_NUMBER;
+	sizeInfo.overlappedPairsCount = MAX_OVERLAPPED_PAIR;
+
+	sizeInfo.controllersCount = 1;
+	{ //dont need any of these
+		sizeInfo.rigidParticleCount = 0;
+		sizeInfo.terrainNodesStartCount = 0;
+	}
+
+	sim = neSimulator::CreateSimulator(sizeInfo, &all, &gravity);
+
+	neRigidBody * lastbox = NULL;
+
+	for (s32 j = 0; j < N_BODY; j++)
+	{
+		f32 mass = 0.1f;
+
+		neRigidBody * rigidBody = sim->CreateRigidBody();
+
+		rigidBody->CollideConnected(true);
+
+		neGeometry * geom = rigidBody->AddGeometry();
+
+		neV3 boxSize; 
+
+		boxSize.Set(1.2f, 0.5f, 0.5f);
+
+		geom->SetBoxSize(boxSize[0],boxSize[1],boxSize[2]);
+
+		neV3 tensorSize;
+
+		tensorSize = boxSize;;
+
+		rigidBody->UpdateBoundingInfo();
+
+		//rigidBody->SetInertiaTensor(neBoxInertiaTensor(tensorSize, mass));
+
+		rigidBody->SetInertiaTensor(neSphereInertiaTensor(tensorSize[0], mass));
+
+		rigidBody->SetMass(mass);
+
+		neV3 pos;
+
+		if (j == 0)
+		{
+			pos.Set(-linkLength, 0.0f, 0.0f);
+		}
+		else if (j != 0)
+		{
+			pos.Set(-linkLength * (j+1), 0.0f, 0.0f);
+		}
+
+		rigidBody->SetPos(pos);
+
+		neJoint * joint = NULL;
+
+		neT3 jointFrame;
+
+		jointFrame.SetIdentity();
+
+		if (j != 0)
+		{
+			joint = sim->CreateJoint(rigidBody, lastbox);
+			//joint = sim->CreateJoint(lastbox, rigidBody);
+
+			jointFrame.pos.Set(-linkLength * (0.5f + j), 0.0f, 0.0f);
+
+			joint->SetJointFrameWorld(jointFrame);
+		}
+		if (j == N_BODY - 1)
+		{
+			lastJoint = joint;
+		}
+
+		if (joint)
+		{
+			joint->SetType(neJoint::NE_JOINT_BALLSOCKET);
+
+			joint->Enable(true);
+		}
+
+		/* set up the graphical models */
+		{
+			this->boxRenderPrimitives[j].SetGraphicBox(boxSize[0],boxSize[1],boxSize[2]);
+			geom->SetUserData((u32)&(boxRenderPrimitives[j]));
+			this->boxRenderPrimitives[j].SetDiffuseColor(D3DXCOLOR(0.8f,0.2f,0.2f,1.0f));
+			
+		}
+		box[j] = rigidBody;
+
+		lastbox = rigidBody;
+	}
+	if (lastJoint)
+	{
+		lastJoint->SetEpsilon(EPSILON);
+
+		lastJoint->SetIteration(5);
+	}
+
+	//SetUpRoom
+
+	ground = sim->CreateAnimatedBody();
+
+	neGeometry * geom = ground->AddGeometry();	 
+
+	geom->SetBoxSize(gFloor.boxSize);
+
+	ground->UpdateBoundingInfo();
+
+	ground->SetPos(gFloor.pos);
+
+	groundRender.SetGraphicBox(gFloor.boxSize[0], gFloor.boxSize[1], gFloor.boxSize[2]);
+
+
+}
+
+
+void MyAppInit()
+{
+    // TODO: Perform any application-level initialization here
+
+
+
+	D3DXVECTOR3 vecEye (-10.0f, 5.0f, 50.0f);
+	D3DXVECTOR3 vecAt (-30.0f, 0.0f, 0.0f);
+	g_Camera.SetViewParams( &vecEye, &vecAt );
+
+    g_Camera.SetEnableYAxisMovement( true );
+    g_Camera.SetRotateButtons( false, false, true );
+    g_Camera.SetScalers( 0.01f, 50.0f );
+
+
+
+	for (s32 i = 0; i < NUM_LIGHT; i++)
+		D3DXVec4Normalize(&vLightWorld[i], &vLightWorld[i]);
+
+	//OnMyAppDestroyDevice(g_pD3dDevice);
+
+	sample.Initialise();
+
+};
+
+void CALLBACK OnMyAppFrameMove( IDirect3DDevice9* pd3dDevice, double fTime, float fElapsedTime, void* pUserContext )
+{
+
+
+	DWORD dwResult;    
+
+	XINPUT_STATE state;
+
+	ZeroMemory( &state, sizeof(XINPUT_STATE) );
+
+	// Simply get the state of the controller from XInput.
+	dwResult = XInputGetState( 0, &state );
+
+	////////////////////////////////////////////////////////
+	sample.Process(state);
+
+	if (!sample.paused)
+	{
+		sample.sim->Advance(1.0f / 60.0f,1);
+	}
+}
+
+void CALLBACK OnMyAppFrameRender( IDirect3DDevice9* pd3dDevice, double fTime, float fElapsedTime, void* pUserContext )
+{
+	
+	neT3 t;
+	t = sample.ground->GetTransform();
+	t.MakeD3DCompatibleMatrix();
+	sample.groundRender.Render(pd3dDevice,&t);
+
+	// Display the boxes
+
+	for (s32 i = 0; i < sample.N_BODY; i++)
+	{
+		t = sample.box[i]->GetTransform();
+		t.MakeD3DCompatibleMatrix();
+		sample.boxRenderPrimitives[i].Render(pd3dDevice,&t);
+	}
+
+	WCHAR * str[8];
+	
+	str[0] = L"Tokamak demo - chain of 30 boxes connected by ball joints - (c) 2010 Tokamak Ltd";
+	str[1] = L"Controls:";
+	str[2] = L"'P' -> pause/unpause the simulation";
+	str[3] = L"'T' -> lift the end of the chain";	
+	str[4] = L"This sample demonstrate the ball joint.";
+	str[5] = L"Note the box can contact each other and the ground is modelled";
+	str[6] = L"as a box, rather than just a plane.";
+	str[7] = L"";
+
+	MyRenderText(str, 8);
+}
+
+LRESULT CALLBACK MyAppMsgProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, 
+                      bool* pbNoFurtherProcessing, void* pUserContext )
+{
+	return 0;
+}
+
+void CALLBACK OnMyAppDestroyDevice( void* pUserContext )
+{
+
+	SAFE_RELEASE( g_pEffect );
+
+	sample.Shutdown();
+
+
+}
+
+void CALLBACK MyAppKeyboardProc( UINT nChar, bool bKeyDown, bool bAltDown, void* pUserContext )
+{
+	if( bKeyDown )
+	{
+		 switch( nChar )
+		 {
+		 case 'R':
+			 {
+				//OnMyAppDestroyDevice(g_pD3dDevice);
+			 }
+			 break;
+
+		 default:
+			 break;
+		 }
+	}
+}
+

File d3dapp/balljoints.exe

  • Ignore whitespace
Binary file added.

File d3dapp/balljoints.vcproj

View file
  • Ignore whitespace
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="balljoints"
+	ProjectGUID="{5D9F6EBF-2BAA-4FED-A3A2-A5D8E7FFA87C}"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="Debug"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;PROFILE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="dxut\dxstdafx.h"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/IGNORE:4089"
+				AdditionalDependencies="tokamak_d.lib dxerr.lib dxguid.lib d3dx9d.lib d3d9.lib winmm.lib comctl32.lib Xinput.lib"
+				OutputFile="$(ProjectName)_d.exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="../lib"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/d3dapp.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="false"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="dxut\dxstdafx.h"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/IGNORE:4089"
+				AdditionalDependencies="tokamak.lib dxerr.lib dxguid.lib d3dx9.lib d3d9.lib winmm.lib comctl32.lib Xinput.lib"
+				OutputFile="$(ProjectName).exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="../lib"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="false"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Profile|Win32"
+			OutputDirectory="Profile"
+			IntermediateDirectory="Profile"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;PROFILE"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="dxut\dxstdafx.h"
+				WarningL