diff options
| author | Mirrorbot <mirrorbot@cogarr.net> | 2025-12-27 17:53:06 -0600 |
|---|---|---|
| committer | Mirrorbot <mirrorbot@cogarr.net> | 2025-12-27 17:53:06 -0600 |
| commit | 71e94ee161447b84c0eaabf6567f8fa62262cd3e (patch) | |
| tree | 391064cc6173a6fe75069af2fdc1978af12f623e /examples | |
| download | irrlicht-master.tar.gz irrlicht-master.tar.bz2 irrlicht-master.zip | |
Diffstat (limited to 'examples')
316 files changed, 60474 insertions, 0 deletions
diff --git a/examples/01.HelloWorld/HelloWorld.cbp b/examples/01.HelloWorld/HelloWorld.cbp new file mode 100644 index 0000000..1e437c1 --- /dev/null +++ b/examples/01.HelloWorld/HelloWorld.cbp @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 01 Hello World" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/HelloWorld" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="GL" /> + <Add library="X11" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/HelloWorld" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/01.HelloWorld/HelloWorld.dev b/examples/01.HelloWorld/HelloWorld.dev new file mode 100644 index 0000000..9de3da7 --- /dev/null +++ b/examples/01.HelloWorld/HelloWorld.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 01 HelloWorld
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=
+OverrideOutput=1
+OverrideOutputName=01.HelloWorld.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/01.HelloWorld/HelloWorld.vcproj b/examples/01.HelloWorld/HelloWorld.vcproj new file mode 100644 index 0000000..3a2fdb0 --- /dev/null +++ b/examples/01.HelloWorld/HelloWorld.vcproj @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="01.HelloWorld"
+ ProjectGUID="{265B57DD-0C6D-4CFD-A95E-0FCC3ECD0E90}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/HelloWorld.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\01.HelloWorld.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/HelloWorld.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/HelloWorld.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/HelloWorld.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\01.HelloWorld.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/HelloWorld.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/HelloWorld.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/01.HelloWorld/HelloWorld_vc10.vcxproj b/examples/01.HelloWorld/HelloWorld_vc10.vcxproj new file mode 100644 index 0000000..509ccbe --- /dev/null +++ b/examples/01.HelloWorld/HelloWorld_vc10.vcxproj @@ -0,0 +1,233 @@ +ďťż<?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">
+ <ProjectName>01.HelloWorld</ProjectName>
+ <ProjectGuid>{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}</ProjectGuid>
+ <RootNamespace>HelloWorld</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/HelloWorld.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\01.HelloWorld.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/HelloWorld.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\01.HelloWorld.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/HelloWorld.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\01.HelloWorld.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/HelloWorld.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\01.HelloWorld.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/01.HelloWorld/HelloWorld_vc11.vcxproj b/examples/01.HelloWorld/HelloWorld_vc11.vcxproj new file mode 100644 index 0000000..c131e02 --- /dev/null +++ b/examples/01.HelloWorld/HelloWorld_vc11.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>01.HelloWorld</ProjectName>
+ <ProjectGuid>{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}</ProjectGuid>
+ <RootNamespace>HelloWorld</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/HelloWorld.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\01.HelloWorld.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/HelloWorld.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\01.HelloWorld.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/HelloWorld.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\01.HelloWorld.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/HelloWorld.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\01.HelloWorld.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/01.HelloWorld/HelloWorld_vc12.vcxproj b/examples/01.HelloWorld/HelloWorld_vc12.vcxproj new file mode 100644 index 0000000..109da6b --- /dev/null +++ b/examples/01.HelloWorld/HelloWorld_vc12.vcxproj @@ -0,0 +1,235 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>01.HelloWorld</ProjectName>
+ <ProjectGuid>{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}</ProjectGuid>
+ <RootNamespace>HelloWorld</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/HelloWorld.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\01.HelloWorld.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/HelloWorld.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\01.HelloWorld.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/HelloWorld.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\01.HelloWorld.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/HelloWorld.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\01.HelloWorld.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/01.HelloWorld/HelloWorld_vc8.vcproj b/examples/01.HelloWorld/HelloWorld_vc8.vcproj new file mode 100644 index 0000000..ac11031 --- /dev/null +++ b/examples/01.HelloWorld/HelloWorld_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="01.HelloWorld_vc8"
+ ProjectGUID="{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}"
+ RootNamespace="HelloWorld_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/HelloWorld.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/HelloWorld.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\01.HelloWorld.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/HelloWorld.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/HelloWorld.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/HelloWorld.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\01.HelloWorld.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/HelloWorld.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/01.HelloWorld/HelloWorld_vc9.vcproj b/examples/01.HelloWorld/HelloWorld_vc9.vcproj new file mode 100644 index 0000000..982d202 --- /dev/null +++ b/examples/01.HelloWorld/HelloWorld_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="01.HelloWorld_vc9"
+ ProjectGUID="{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}"
+ RootNamespace="HelloWorld_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/HelloWorld.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/HelloWorld.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\01.HelloWorld.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/HelloWorld.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/HelloWorld.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/HelloWorld.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\01.HelloWorld.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/HelloWorld.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/01.HelloWorld/Makefile b/examples/01.HelloWorld/Makefile new file mode 100644 index 0000000..c834ab7 --- /dev/null +++ b/examples/01.HelloWorld/Makefile @@ -0,0 +1,66 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+
+# Name of the executable created (.exe will be added automatically if necessary)
+Target := 01.HelloWorld
+# List of source files, separated by spaces
+Sources := main.cpp
+# Path to Irrlicht directory, should contain include/ and lib/
+IrrlichtHome := ../..
+# Path for the executable. Note that Irrlicht.dll should usually also be there for win32 systems
+BinPath = ../../bin/$(SYSTEM)
+
+# general compiler settings (might need to be set when compiling the lib, too)
+# preprocessor flags, e.g. defines and include paths
+USERCPPFLAGS =
+# compiler flags such as optimization flags
+USERCXXFLAGS = -O3 -ffast-math
+#USERCXXFLAGS = -g -Wall
+# linker flags such as additional libraries and link paths
+USERLDFLAGS =
+
+####
+#no changes necessary below this line
+####
+
+CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS)
+CXXFLAGS = $(USERCXXFLAGS)
+LDFLAGS = $(USERLDFLAGS)
+
+#default target is Linux
+all: all_linux
+
+# target specific settings
+all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
+all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32 static_win32: SUF=.exe
+static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
+all_win32: LDFLAGS += -lopengl32 -lm
+static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = $(BinPath)/$(Target)$(SUF)
+
+all_linux all_win32 static_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 static_win32 clean clean_linux clean_win32
+
+#multilib handling
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+#solaris real-time features
+ifeq ($(HOSTTYPE), sun4)
+LDFLAGS += -lrt
+endif
+
diff --git a/examples/01.HelloWorld/main.cpp b/examples/01.HelloWorld/main.cpp new file mode 100644 index 0000000..a53483c --- /dev/null +++ b/examples/01.HelloWorld/main.cpp @@ -0,0 +1,236 @@ +/** Example 001 HelloWorld
+
+This Tutorial shows how to set up the IDE for using the Irrlicht Engine and how
+to write a simple HelloWorld program with it. The program will show how to use
+the basics of the VideoDriver, the GUIEnvironment, and the SceneManager.
+Microsoft Visual Studio is used as an IDE, but you will also be able to
+understand everything if you are using a different one or even another
+operating system than windows.
+
+You have to include the header file <irrlicht.h> in order to use the engine. The
+header file can be found in the Irrlicht Engine SDK directory \c include. To let
+the compiler find this header file, the directory where it is located has to be
+specified. This is different for every IDE and compiler you use. Let's explain
+shortly how to do this in Microsoft Visual Studio:
+
+- If you use Version 6.0, select the Menu Extras -> Options.
+ Select the directories tab, and select the 'Include' Item in the combo box.
+ Add the \c include directory of the irrlicht engine folder to the list of
+ directories. Now the compiler will find the Irrlicht.h header file. We also
+ need the irrlicht.lib to be found, so stay in that dialog, select 'Libraries'
+ in the combo box and add the \c lib/VisualStudio directory.
+ \image html "vc6optionsdir.jpg"
+ \image latex "vc6optionsdir.jpg"
+ \image html "vc6include.jpg"
+ \image latex "vc6include.jpg"
+
+- If your IDE is Visual Studio .NET, select Tools -> Options.
+ Select the projects entry and then select VC++ directories. Select 'show
+ directories for include files' in the combo box, and add the \c include
+ directory of the irrlicht engine folder to the list of directories. Now the
+ compiler will find the Irrlicht.h header file. We also need the irrlicht.lib
+ to be found, so stay in that dialog, select 'show directories for Library
+ files' and add the \c lib/VisualStudio directory.
+ \image html "vcnetinclude.jpg"
+ \image latex "vcnetinclude.jpg"
+
+That's it. With your IDE set up like this, you will now be able to develop
+applications with the Irrlicht Engine.
+
+Lets start!
+
+After we have set up the IDE, the compiler will know where to find the Irrlicht
+Engine header files so we can include it now in our code.
+*/
+#include <irrlicht.h>
+
+/*
+In the Irrlicht Engine, everything can be found in the namespace 'irr'. So if
+you want to use a class of the engine, you have to write irr:: before the name
+of the class. For example to use the IrrlichtDevice write: irr::IrrlichtDevice.
+To get rid of the irr:: in front of the name of every class, we tell the
+compiler that we use that namespace from now on, and we will not have to write
+irr:: anymore.
+*/
+using namespace irr;
+
+/*
+There are 5 sub namespaces in the Irrlicht Engine. Take a look at them, you can
+read a detailed description of them in the documentation by clicking on the top
+menu item 'Namespace List' or by using this link:
+http://irrlicht.sourceforge.net/docu/namespaces.html
+Like the irr namespace, we do not want these 5 sub namespaces now, to keep this
+example simple. Hence, we tell the compiler again that we do not want always to
+write their names.
+*/
+using namespace core;
+using namespace scene;
+using namespace video;
+using namespace io;
+using namespace gui;
+
+/*
+To be able to use the Irrlicht.DLL file, we need to link with the Irrlicht.lib.
+We could set this option in the project settings, but to make it easy, we use a
+pragma comment lib for VisualStudio. On Windows platforms, we have to get rid
+of the console window, which pops up when starting a program with main(). This
+is done by the second pragma. We could also use the WinMain method, though
+losing platform independence then.
+*/
+#ifdef _IRR_WINDOWS_
+#pragma comment(lib, "Irrlicht.lib")
+#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
+#endif
+
+
+/*
+This is the main method. We can now use main() on every platform.
+*/
+int main()
+{
+ /*
+ The most important function of the engine is the createDevice()
+ function. The IrrlichtDevice is created by it, which is the root
+ object for doing anything with the engine. createDevice() has 7
+ parameters:
+
+ - deviceType: Type of the device. This can currently be the Null-device,
+ one of the two software renderers, D3D8, D3D9, or OpenGL. In this
+ example we use EDT_SOFTWARE, but to try out, you might want to
+ change it to EDT_BURNINGSVIDEO, EDT_NULL, EDT_DIRECT3D8,
+ EDT_DIRECT3D9, or EDT_OPENGL.
+
+ - windowSize: Size of the Window or screen in FullScreenMode to be
+ created. In this example we use 640x480.
+
+ - bits: Amount of color bits per pixel. This should be 16 or 32. The
+ parameter is often ignored when running in windowed mode.
+
+ - fullscreen: Specifies if we want the device to run in fullscreen mode
+ or not.
+
+ - stencilbuffer: Specifies if we want to use the stencil buffer (for
+ drawing shadows).
+
+ - vsync: Specifies if we want to have vsync enabled, this is only useful
+ in fullscreen mode.
+
+ - eventReceiver: An object to receive events. We do not want to use this
+ parameter here, and set it to 0.
+
+ Always check the return value to cope with unsupported drivers,
+ dimensions, etc.
+ */
+ IrrlichtDevice *device =
+ createDevice( video::EDT_SOFTWARE, dimension2d<u32>(640, 480), 16,
+ false, false, false, 0);
+
+ if (!device)
+ return 1;
+
+ /*
+ Set the caption of the window to some nice text. Note that there is an
+ 'L' in front of the string. The Irrlicht Engine uses wide character
+ strings when displaying text.
+ */
+ device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");
+
+ /*
+ Get a pointer to the VideoDriver, the SceneManager and the graphical
+ user interface environment, so that we do not always have to write
+ device->getVideoDriver(), device->getSceneManager(), or
+ device->getGUIEnvironment().
+ */
+ IVideoDriver* driver = device->getVideoDriver();
+ ISceneManager* smgr = device->getSceneManager();
+ IGUIEnvironment* guienv = device->getGUIEnvironment();
+
+ /*
+ We add a hello world label to the window, using the GUI environment.
+ The text is placed at the position (10,10) as top left corner and
+ (260,22) as lower right corner.
+ */
+ guienv->addStaticText(L"Hello World! This is the Irrlicht Software renderer!",
+ rect<s32>(10,10,260,22), true);
+
+ /*
+ To show something interesting, we load a Quake 2 model and display it.
+ We only have to get the Mesh from the Scene Manager with getMesh() and add
+ a SceneNode to display the mesh with addAnimatedMeshSceneNode(). We
+ check the return value of getMesh() to become aware of loading problems
+ and other errors.
+
+ Instead of writing the filename sydney.md2, it would also be possible
+ to load a Maya object file (.obj), a complete Quake3 map (.bsp) or any
+ other supported file format. By the way, that cool Quake 2 model
+ called sydney was modelled by Brian Collins.
+ */
+ IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
+ if (!mesh)
+ {
+ device->drop();
+ return 1;
+ }
+ IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
+
+ /*
+ To let the mesh look a little bit nicer, we change its material. We
+ disable lighting because we do not have a dynamic light in here, and
+ the mesh would be totally black otherwise. Then we set the frame loop,
+ such that the predefined STAND animation is used. And last, we apply a
+ texture to the mesh. Without it the mesh would be drawn using only a
+ color.
+ */
+ if (node)
+ {
+ node->setMaterialFlag(EMF_LIGHTING, false);
+ node->setMD2Animation(scene::EMAT_STAND);
+ node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") );
+ }
+
+ /*
+ To look at the mesh, we place a camera into 3d space at the position
+ (0, 30, -40). The camera looks from there to (0,5,0), which is
+ approximately the place where our md2 model is.
+ */
+ smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));
+
+ /*
+ Ok, now we have set up the scene, lets draw everything: We run the
+ device in a while() loop, until the device does not want to run any
+ more. This would be when the user closes the window or presses ALT+F4
+ (or whatever keycode closes a window).
+ */
+ while(device->run())
+ {
+ /*
+ Anything can be drawn between a beginScene() and an endScene()
+ call. The beginScene() call clears the screen with a color and
+ the depth buffer, if desired. Then we let the Scene Manager and
+ the GUI Environment draw their content. With the endScene()
+ call everything is presented on the screen.
+ */
+ driver->beginScene(true, true, SColor(255,100,101,140));
+
+ smgr->drawAll();
+ guienv->drawAll();
+
+ driver->endScene();
+ }
+
+ /*
+ After we are done with the render loop, we have to delete the Irrlicht
+ Device created before with createDevice(). In the Irrlicht Engine, you
+ have to delete all objects you created with a method or function which
+ starts with 'create'. The object is simply deleted by calling ->drop().
+ See the documentation at irr::IReferenceCounted::drop() for more
+ information.
+ */
+ device->drop();
+
+ return 0;
+}
+
+/*
+That's it. Compile and run.
+**/
diff --git a/examples/01.HelloWorld/tutorial.html b/examples/01.HelloWorld/tutorial.html new file mode 100644 index 0000000..be3e4f7 --- /dev/null +++ b/examples/01.HelloWorld/tutorial.html @@ -0,0 +1,234 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 1: HelloWorld</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 1: HelloWorld </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/001shot.jpg" alt="001shot.jpg"/> +</div> + <p>This Tutorial shows how to set up the IDE for using the Irrlicht Engine and how to write a simple HelloWorld program with it. The program will show how to use the basics of the VideoDriver, the GUIEnvironment, and the SceneManager. Microsoft Visual Studio is used as an IDE, but you will also be able to understand everything if you are using a different one or even another operating system than windows.</p> +<p>You have to include the header file <irrlicht.h> in order to use the engine. The header file can be found in the Irrlicht Engine SDK directory <code>include</code>. To let the compiler find this header file, the directory where it is located has to be specified. This is different for every IDE and compiler you use. Let's explain shortly how to do this in Microsoft Visual Studio:</p> +<ul> +<li>If you use Version 6.0, select the Menu Extras -> Options. Select the directories tab, and select the 'Include' Item in the combo box. Add the <code>include</code> directory of the irrlicht engine folder to the list of directories. Now the compiler will find the Irrlicht.h header file. We also need the irrlicht.lib to be found, so stay in that dialog, select 'Libraries' in the combo box and add the <code>lib/VisualStudio</code> directory. <div class="image"> +<img src="../../media/vc6optionsdir.jpg" alt="vc6optionsdir.jpg"/> +</div> + <div class="image"> +<img src="../../media/vc6include.jpg" alt="vc6include.jpg"/> +</div> + </li> +<li>If your IDE is Visual Studio .NET, select Tools -> Options. Select the projects entry and then select VC++ directories. Select 'show directories for include files' in the combo box, and add the <code>include</code> directory of the irrlicht engine folder to the list of directories. Now the compiler will find the Irrlicht.h header file. We also need the irrlicht.lib to be found, so stay in that dialog, select 'show directories for Library files' and add the <code>lib/VisualStudio</code> directory. <div class="image"> +<img src="../../media/vcnetinclude.jpg" alt="vcnetinclude.jpg"/> +</div> + </li> +</ul> +<p>That's it. With your IDE set up like this, you will now be able to develop applications with the Irrlicht Engine.</p> +<p>Lets start!</p> +<p>After we have set up the IDE, the compiler will know where to find the Irrlicht Engine header files so we can include it now in our code. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div></div><!-- fragment --><p> In the Irrlicht Engine, everything can be found in the namespace 'irr'. So if you want to use a class of the engine, you have to write irr:: before the name of the class. For example to use the IrrlichtDevice write: irr::IrrlichtDevice. To get rid of the irr:: in front of the name of every class, we tell the compiler that we use that namespace from now on, and we will not have to write irr:: anymore. </p><div class="fragment"><div class="line"><span class="keyword">using namespace </span>irr;</div></div><!-- fragment --><p> There are 5 sub namespaces in the Irrlicht Engine. Take a look at them, you can read a detailed description of them in the documentation by clicking on the top menu item 'Namespace List' or by using this link: <a href="http://irrlicht.sourceforge.net/docu/namespaces.html">http://irrlicht.sourceforge.net/docu/namespaces.html</a> Like the irr namespace, we do not want these 5 sub namespaces now, to keep this example simple. Hence, we tell the compiler again that we do not want always to write their names. </p><div class="fragment"><div class="line"><span class="keyword">using namespace </span>core;</div><div class="line"><span class="keyword">using namespace </span>scene;</div><div class="line"><span class="keyword">using namespace </span>video;</div><div class="line"><span class="keyword">using namespace </span>io;</div><div class="line"><span class="keyword">using namespace </span>gui;</div></div><!-- fragment --><p> To be able to use the Irrlicht.DLL file, we need to link with the Irrlicht.lib. We could set this option in the project settings, but to make it easy, we use a pragma comment lib for VisualStudio. On Windows platforms, we have to get rid of the console window, which pops up when starting a program with main(). This is done by the second pragma. We could also use the WinMain method, though losing platform independence then. </p><div class="fragment"><div class="line"><span class="preprocessor">#ifdef _IRR_WINDOWS_</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")</span></div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> This is the main method. We can now use main() on every platform. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div></div><!-- fragment --><p> The most important function of the engine is the createDevice() function. The IrrlichtDevice is created by it, which is the root object for doing anything with the engine. createDevice() has 7 parameters:</p> +<ul> +<li>deviceType: Type of the device. This can currently be the Null-device, one of the two software renderers, D3D8, D3D9, or OpenGL. In this example we use EDT_SOFTWARE, but to try out, you might want to change it to EDT_BURNINGSVIDEO, EDT_NULL, EDT_DIRECT3D8, EDT_DIRECT3D9, or EDT_OPENGL.</li> +<li>windowSize: Size of the Window or screen in FullScreenMode to be created. In this example we use 640x480.</li> +<li>bits: Amount of color bits per pixel. This should be 16 or 32. The parameter is often ignored when running in windowed mode.</li> +<li>fullscreen: Specifies if we want the device to run in fullscreen mode or not.</li> +<li>stencilbuffer: Specifies if we want to use the stencil buffer (for drawing shadows).</li> +<li>vsync: Specifies if we want to have vsync enabled, this is only useful in fullscreen mode.</li> +<li>eventReceiver: An object to receive events. We do not want to use this parameter here, and set it to 0.</li> +</ul> +<p>Always check the return value to cope with unsupported drivers, dimensions, etc. </p><div class="fragment"><div class="line">IrrlichtDevice *device =</div><div class="line"> createDevice( video::EDT_SOFTWARE, dimension2d<u32>(640, 480), 16,</div><div class="line"> <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">false</span>, 0);</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (!device)</div><div class="line"> <span class="keywordflow">return</span> 1;</div></div><!-- fragment --><p> Set the caption of the window to some nice text. Note that there is an 'L' in front of the string. The Irrlicht Engine uses wide character strings when displaying text. </p><div class="fragment"><div class="line">device->setWindowCaption(L<span class="stringliteral">"Hello World! - Irrlicht Engine Demo"</span>);</div></div><!-- fragment --><p> Get a pointer to the VideoDriver, the SceneManager and the graphical user interface environment, so that we do not always have to write device->getVideoDriver(), device->getSceneManager(), or device->getGUIEnvironment(). </p><div class="fragment"><div class="line">IVideoDriver* driver = device->getVideoDriver();</div><div class="line">ISceneManager* smgr = device->getSceneManager();</div><div class="line">IGUIEnvironment* guienv = device->getGUIEnvironment();</div></div><!-- fragment --><p> We add a hello world label to the window, using the GUI environment. The text is placed at the position (10,10) as top left corner and (260,22) as lower right corner. </p><div class="fragment"><div class="line">guienv->addStaticText(L<span class="stringliteral">"Hello World! This is the Irrlicht Software renderer!"</span>,</div><div class="line"> rect<s32>(10,10,260,22), <span class="keyword">true</span>);</div></div><!-- fragment --><p> To show something interesting, we load a Quake 2 model and display it. We only have to get the Mesh from the Scene Manager with getMesh() and add a SceneNode to display the mesh with addAnimatedMeshSceneNode(). We check the return value of getMesh() to become aware of loading problems and other errors.</p> +<p>Instead of writing the filename sydney.md2, it would also be possible to load a Maya object file (.obj), a complete Quake3 map (.bsp) or any other supported file format. By the way, that cool Quake 2 model called sydney was modelled by Brian Collins. </p><div class="fragment"><div class="line">IAnimatedMesh* mesh = smgr->getMesh(<span class="stringliteral">"../../media/sydney.md2"</span>);</div><div class="line"><span class="keywordflow">if</span> (!mesh)</div><div class="line">{</div><div class="line"> device->drop();</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line">}</div><div class="line">IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );</div></div><!-- fragment --><p> To let the mesh look a little bit nicer, we change its material. We disable lighting because we do not have a dynamic light in here, and the mesh would be totally black otherwise. Then we set the frame loop, such that the predefined STAND animation is used. And last, we apply a texture to the mesh. Without it the mesh would be drawn using only a color. </p><div class="fragment"><div class="line"><span class="keywordflow">if</span> (node)</div><div class="line">{</div><div class="line"> node->setMaterialFlag(EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"> node->setMD2Animation(scene::EMAT_STAND);</div><div class="line"> node->setMaterialTexture( 0, driver->getTexture(<span class="stringliteral">"../../media/sydney.bmp"</span>) );</div><div class="line">}</div></div><!-- fragment --><p> To look at the mesh, we place a camera into 3d space at the position (0, 30, -40). The camera looks from there to (0,5,0), which is approximately the place where our md2 model is. </p><div class="fragment"><div class="line">smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));</div></div><!-- fragment --><p> Ok, now we have set up the scene, lets draw everything: We run the device in a while() loop, until the device does not want to run any more. This would be when the user closes the window or presses ALT+F4 (or whatever keycode closes a window). </p><div class="fragment"><div class="line"><span class="keywordflow">while</span>(device->run())</div><div class="line">{</div></div><!-- fragment --><p> Anything can be drawn between a beginScene() and an endScene() call. The beginScene() call clears the screen with a color and the depth buffer, if desired. Then we let the Scene Manager and the GUI Environment draw their content. With the endScene() call everything is presented on the screen. </p><div class="fragment"><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, SColor(255,100,101,140));</div><div class="line"></div><div class="line"> smgr->drawAll();</div><div class="line"> guienv->drawAll();</div><div class="line"></div><div class="line"> driver->endScene();</div><div class="line">}</div></div><!-- fragment --><p> After we are done with the render loop, we have to delete the Irrlicht Device created before with createDevice(). In the Irrlicht Engine, you have to delete all objects you created with a method or function which starts with 'create'. The object is simply deleted by calling ->drop(). See the documentation at irr::IReferenceCounted::drop() for more information. </p><div class="fragment"><div class="line"> device->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --><p> That's it. Compile and run. </p> +</div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/02.Quake3Map/Makefile b/examples/02.Quake3Map/Makefile new file mode 100644 index 0000000..09953cf --- /dev/null +++ b/examples/02.Quake3Map/Makefile @@ -0,0 +1,40 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 02.Quake3Map
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht
+static_win32: LDFLAGS += -lgdi32 -lopengl32 -ld3dx9d -lwinmm -lm
+static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
+static_win32 all_win32 clean_win32: SYSTEM=Win32-gcc
+static_win32 all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32 static_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32 static_win32
diff --git a/examples/02.Quake3Map/Quake3Map.cbp b/examples/02.Quake3Map/Quake3Map.cbp new file mode 100644 index 0000000..c0ad582 --- /dev/null +++ b/examples/02.Quake3Map/Quake3Map.cbp @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 02 Quake Map" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/QuakeMap" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="GL" /> + <Add library="X11" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/Quake3Map" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/02.Quake3Map/Quake3Map.dev b/examples/02.Quake3Map/Quake3Map.dev new file mode 100644 index 0000000..3e0a69e --- /dev/null +++ b/examples/02.Quake3Map/Quake3Map.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 02 Quake3Map
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=02.Quake3Map.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/02.Quake3Map/Quake3Map.vcproj b/examples/02.Quake3Map/Quake3Map.vcproj new file mode 100644 index 0000000..4416fbb --- /dev/null +++ b/examples/02.Quake3Map/Quake3Map.vcproj @@ -0,0 +1,162 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="02.Quake3Map"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/Quake3Map.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\02.Quake3Map.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/Quake3Map.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Quake3Map.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/Quake3Map.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\02.Quake3Map.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Quake3Map.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Quake3Map.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/02.Quake3Map/Quake3Map_vc10.vcxproj b/examples/02.Quake3Map/Quake3Map_vc10.vcxproj new file mode 100644 index 0000000..f45673a --- /dev/null +++ b/examples/02.Quake3Map/Quake3Map_vc10.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>02.Quake3Map</ProjectName>
+ <ProjectGuid>{D1A464A2-D479-458C-98A2-60965D823CD1}</ProjectGuid>
+ <RootNamespace>Quake3Map</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Quake3Map.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\02.Quake3Map.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Quake3Map.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\02.Quake3Map.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Quake3Map.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\02.Quake3Map.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Quake3Map.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\02.Quake3Map.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/02.Quake3Map/Quake3Map_vc11.vcxproj b/examples/02.Quake3Map/Quake3Map_vc11.vcxproj new file mode 100644 index 0000000..f45673a --- /dev/null +++ b/examples/02.Quake3Map/Quake3Map_vc11.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>02.Quake3Map</ProjectName>
+ <ProjectGuid>{D1A464A2-D479-458C-98A2-60965D823CD1}</ProjectGuid>
+ <RootNamespace>Quake3Map</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Quake3Map.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\02.Quake3Map.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Quake3Map.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\02.Quake3Map.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Quake3Map.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\02.Quake3Map.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Quake3Map.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\02.Quake3Map.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/02.Quake3Map/Quake3Map_vc12.vcxproj b/examples/02.Quake3Map/Quake3Map_vc12.vcxproj new file mode 100644 index 0000000..042060f --- /dev/null +++ b/examples/02.Quake3Map/Quake3Map_vc12.vcxproj @@ -0,0 +1,235 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>02.Quake3Map</ProjectName>
+ <ProjectGuid>{D1A464A2-D479-458C-98A2-60965D823CD1}</ProjectGuid>
+ <RootNamespace>Quake3Map</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Quake3Map.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\02.Quake3Map.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Quake3Map.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\02.Quake3Map.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Quake3Map.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\02.Quake3Map.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Quake3Map.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\02.Quake3Map.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/02.Quake3Map/Quake3Map_vc8.vcproj b/examples/02.Quake3Map/Quake3Map_vc8.vcproj new file mode 100644 index 0000000..bae5931 --- /dev/null +++ b/examples/02.Quake3Map/Quake3Map_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="02.Quake3Map_vc8"
+ ProjectGUID="{D1A464A2-D479-458C-98A2-60965D823CD1}"
+ RootNamespace="Quake3Map_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Quake3Map.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/Quake3Map.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\02.Quake3Map.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/Quake3Map.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Quake3Map.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/Quake3Map.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\02.Quake3Map.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Quake3Map.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/02.Quake3Map/Quake3Map_vc9.vcproj b/examples/02.Quake3Map/Quake3Map_vc9.vcproj new file mode 100644 index 0000000..8acc07a --- /dev/null +++ b/examples/02.Quake3Map/Quake3Map_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="02.Quake3Map_vc9"
+ ProjectGUID="{D1A464A2-D479-458C-98A2-60965D823CD1}"
+ RootNamespace="Quake3Map_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Quake3Map.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/Quake3Map.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\02.Quake3Map.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/Quake3Map.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Quake3Map.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/Quake3Map.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\02.Quake3Map.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Quake3Map.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/02.Quake3Map/main.cpp b/examples/02.Quake3Map/main.cpp new file mode 100644 index 0000000..fc7461f --- /dev/null +++ b/examples/02.Quake3Map/main.cpp @@ -0,0 +1,206 @@ +/** Example 002 Quake3Map
+
+This Tutorial shows how to load a Quake 3 map into the engine, create a
+SceneNode for optimizing the speed of rendering, and how to create a user
+controlled camera.
+
+Please note that you should know the basics of the engine before starting this
+tutorial. Just take a short look at the first tutorial, if you haven't done
+this yet: http://irrlicht.sourceforge.net/tut001.html
+
+Lets start like the HelloWorld example: We include the irrlicht header files
+and an additional file to be able to ask the user for a driver type using the
+console.
+*/
+#include <irrlicht.h>
+#include <iostream>
+
+/*
+As already written in the HelloWorld example, in the Irrlicht Engine everything
+can be found in the namespace 'irr'. To get rid of the irr:: in front of the
+name of every class, we tell the compiler that we use that namespace from now
+on, and we will not have to write that 'irr::'. There are 5 other sub
+namespaces 'core', 'scene', 'video', 'io' and 'gui'. Unlike in the HelloWorld
+example, we do not call 'using namespace' for these 5 other namespaces, because
+in this way you will see what can be found in which namespace. But if you like,
+you can also include the namespaces like in the previous example.
+*/
+using namespace irr;
+
+/*
+Again, to be able to use the Irrlicht.DLL file, we need to link with the
+Irrlicht.lib. We could set this option in the project settings, but to make it
+easy, we use a pragma comment lib:
+*/
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+/*
+Ok, lets start. Again, we use the main() method as start, not the WinMain().
+*/
+int main()
+{
+ /*
+ Like in the HelloWorld example, we create an IrrlichtDevice with
+ createDevice(). The difference now is that we ask the user to select
+ which video driver to use. The Software device might be
+ too slow to draw a huge Quake 3 map, but just for the fun of it, we make
+ this decision possible, too.
+ Instead of copying this whole code into your app, you can simply include
+ driverChoice.h from Irrlicht's include directory. The function
+ driverChoiceConsole does exactly the same.
+ */
+
+ // ask user for driver
+
+ video::E_DRIVER_TYPE driverType;
+
+ printf("Please select the driver you want for this example:\n"\
+ " (a) OpenGL 1.5\n (b) Direct3D 9.0c\n (c) Direct3D 8.1\n"\
+ " (d) Burning's Software Renderer\n (e) Software Renderer\n"\
+ " (f) NullDevice\n (otherKey) exit\n\n");
+
+ char i;
+ std::cin >> i;
+
+ switch(i)
+ {
+ case 'a': driverType = video::EDT_OPENGL; break;
+ case 'b': driverType = video::EDT_DIRECT3D9;break;
+ case 'c': driverType = video::EDT_DIRECT3D8;break;
+ case 'd': driverType = video::EDT_BURNINGSVIDEO;break;
+ case 'e': driverType = video::EDT_SOFTWARE; break;
+ case 'f': driverType = video::EDT_NULL; break;
+ default: return 1;
+ }
+
+ // create device and exit if creation failed
+
+ IrrlichtDevice *device =
+ createDevice(driverType, core::dimension2d<u32>(640, 480));
+
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ /*
+ Get a pointer to the video driver and the SceneManager so that
+ we do not always have to call irr::IrrlichtDevice::getVideoDriver() and
+ irr::IrrlichtDevice::getSceneManager().
+ */
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* smgr = device->getSceneManager();
+
+ /*
+ To display the Quake 3 map, we first need to load it. Quake 3 maps
+ are packed into .pk3 files which are nothing else than .zip files.
+ So we add the .pk3 file to our irr::io::IFileSystem. After it was added,
+ we are able to read from the files in that archive as if they are
+ directly stored on the disk.
+ */
+ device->getFileSystem()->addFileArchive("../../media/map-20kdm2.pk3");
+
+ /*
+ Now we can load the mesh by calling
+ irr::scene::ISceneManager::getMesh(). We get a pointer returned to an
+ irr::scene::IAnimatedMesh. As you might know, Quake 3 maps are not
+ really animated, they are only a huge chunk of static geometry with
+ some materials attached. Hence the IAnimatedMesh consists of only one
+ frame, so we get the "first frame" of the "animation", which is our
+ quake level and create an Octree scene node with it, using
+ irr::scene::ISceneManager::addOctreeSceneNode().
+ The Octree optimizes the scene a little bit, trying to draw only geometry
+ which is currently visible. An alternative to the Octree would be a
+ irr::scene::IMeshSceneNode, which would always draw the complete
+ geometry of the mesh, without optimization. Try it: Use
+ irr::scene::ISceneManager::addMeshSceneNode() instead of
+ addOctreeSceneNode() and compare the primitives drawn by the video
+ driver. (There is a irr::video::IVideoDriver::getPrimitiveCountDrawn()
+ method in the irr::video::IVideoDriver class). Note that this
+ optimization with the Octree is only useful when drawing huge meshes
+ consisting of lots of geometry.
+ */
+ scene::IAnimatedMesh* mesh = smgr->getMesh("20kdm2.bsp");
+ scene::ISceneNode* node = 0;
+
+ if (mesh)
+ node = smgr->addOctreeSceneNode(mesh->getMesh(0), 0, -1, 1024);
+// node = smgr->addMeshSceneNode(mesh->getMesh(0));
+
+ /*
+ Because the level was not modelled around the origin (0,0,0), we
+ translate the whole level a little bit. This is done on
+ irr::scene::ISceneNode level using the methods
+ irr::scene::ISceneNode::setPosition() (in this case),
+ irr::scene::ISceneNode::setRotation(), and
+ irr::scene::ISceneNode::setScale().
+ */
+ if (node)
+ node->setPosition(core::vector3df(-1300,-144,-1249));
+
+ /*
+ Now we only need a camera to look at the Quake 3 map.
+ We want to create a user controlled camera. There are some
+ cameras available in the Irrlicht engine. For example the
+ MayaCamera which can be controlled like the camera in Maya:
+ Rotate with left mouse button pressed, Zoom with both buttons pressed,
+ translate with right mouse button pressed. This could be created with
+ irr::scene::ISceneManager::addCameraSceneNodeMaya(). But for this
+ example, we want to create a camera which behaves like the ones in
+ first person shooter games (FPS) and hence use
+ irr::scene::ISceneManager::addCameraSceneNodeFPS().
+ */
+ smgr->addCameraSceneNodeFPS();
+
+ /*
+ The mouse cursor needs not be visible, so we hide it via the
+ irr::IrrlichtDevice::ICursorControl.
+ */
+ device->getCursorControl()->setVisible(false);
+
+ /*
+ We have done everything, so lets draw it. We also write the current
+ frames per second and the primitives drawn into the caption of the
+ window. The test for irr::IrrlichtDevice::isWindowActive() is optional,
+ but prevents the engine to grab the mouse cursor after task switching
+ when other programs are active. The call to
+ irr::IrrlichtDevice::yield() will avoid the busy loop to eat up all CPU
+ cycles when the window is not active.
+ */
+ int lastFPS = -1;
+
+ while(device->run())
+ {
+ if (device->isWindowActive())
+ {
+ driver->beginScene(true, true, video::SColor(255,200,200,200));
+ smgr->drawAll();
+ driver->endScene();
+
+ int fps = driver->getFPS();
+
+ if (lastFPS != fps)
+ {
+ core::stringw str = L"Irrlicht Engine - Quake 3 Map example [";
+ str += driver->getName();
+ str += "] FPS:";
+ str += fps;
+
+ device->setWindowCaption(str.c_str());
+ lastFPS = fps;
+ }
+ }
+ else
+ device->yield();
+ }
+
+ /*
+ In the end, delete the Irrlicht device.
+ */
+ device->drop();
+ return 0;
+}
+
+/*
+That's it. Compile and play around with the program.
+**/
diff --git a/examples/02.Quake3Map/tutorial.html b/examples/02.Quake3Map/tutorial.html new file mode 100644 index 0000000..550bac3 --- /dev/null +++ b/examples/02.Quake3Map/tutorial.html @@ -0,0 +1,208 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 2: Quake3Map</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 2: Quake3Map </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/002shot.jpg" alt="002shot.jpg"/> +</div> + <p>This Tutorial shows how to load a Quake 3 map into the engine, create a SceneNode for optimizing the speed of rendering, and how to create a user controlled camera.</p> +<p>Please note that you should know the basics of the engine before starting this tutorial. Just take a short look at the first tutorial, if you haven't done this yet: <a href="http://irrlicht.sourceforge.net/tut001.html">http://irrlicht.sourceforge.net/tut001.html</a></p> +<p>Lets start like the HelloWorld example: We include the irrlicht header files and an additional file to be able to ask the user for a driver type using the console. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include <iostream></span></div></div><!-- fragment --><p> As already written in the HelloWorld example, in the Irrlicht Engine everything can be found in the namespace 'irr'. To get rid of the irr:: in front of the name of every class, we tell the compiler that we use that namespace from now on, and we will not have to write that 'irr::'. There are 5 other sub namespaces 'core', 'scene', 'video', 'io' and 'gui'. Unlike in the HelloWorld example, we do not call 'using namespace' for these 5 other namespaces, because in this way you will see what can be found in which namespace. But if you like, you can also include the namespaces like in the previous example. </p><div class="fragment"><div class="line"><span class="keyword">using namespace </span>irr;</div></div><!-- fragment --><p> Again, to be able to use the Irrlicht.DLL file, we need to link with the Irrlicht.lib. We could set this option in the project settings, but to make it easy, we use a pragma comment lib: </p><div class="fragment"><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> Ok, lets start. Again, we use the main() method as start, not the WinMain(). </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div></div><!-- fragment --><p> Like in the HelloWorld example, we create an IrrlichtDevice with createDevice(). The difference now is that we ask the user to select which video driver to use. The Software device might be too slow to draw a huge Quake 3 map, but just for the fun of it, we make this decision possible, too. Instead of copying this whole code into your app, you can simply include driverChoice.h from Irrlicht's include directory. The function driverChoiceConsole does exactly the same. </p><div class="fragment"><div class="line"><span class="comment">// ask user for driver</span></div><div class="line"></div><div class="line">video::E_DRIVER_TYPE driverType;</div><div class="line"></div><div class="line">printf(<span class="stringliteral">"Please select the driver you want for this example:\n"</span>\</div><div class="line"> <span class="stringliteral">" (a) OpenGL 1.5\n (b) Direct3D 9.0c\n (c) Direct3D 8.1\n"</span>\</div><div class="line"> <span class="stringliteral">" (d) Burning's Software Renderer\n (e) Software Renderer\n"</span>\</div><div class="line"> <span class="stringliteral">" (f) NullDevice\n (otherKey) exit\n\n"</span>);</div><div class="line"></div><div class="line"><span class="keywordtype">char</span> i;</div><div class="line">std::cin >> i;</div><div class="line"></div><div class="line"><span class="keywordflow">switch</span>(i)</div><div class="line">{</div><div class="line"> <span class="keywordflow">case</span> <span class="charliteral">'a'</span>: driverType = video::EDT_OPENGL; <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> <span class="charliteral">'b'</span>: driverType = video::EDT_DIRECT3D9;<span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> <span class="charliteral">'c'</span>: driverType = video::EDT_DIRECT3D8;<span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> <span class="charliteral">'d'</span>: driverType = video::EDT_BURNINGSVIDEO;<span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> <span class="charliteral">'e'</span>: driverType = video::EDT_SOFTWARE; <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> <span class="charliteral">'f'</span>: driverType = video::EDT_NULL; <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">default</span>: <span class="keywordflow">return</span> 1;</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// create device and exit if creation failed</span></div><div class="line"></div><div class="line">IrrlichtDevice *device =</div><div class="line"> createDevice(driverType, core::dimension2d<u32>(640, 480));</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div></div><!-- fragment --><p> Get a pointer to the video driver and the SceneManager so that we do not always have to call irr::IrrlichtDevice::getVideoDriver() and irr::IrrlichtDevice::getSceneManager(). </p><div class="fragment"><div class="line">video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line">scene::ISceneManager* smgr = device->getSceneManager();</div></div><!-- fragment --><p> To display the Quake 3 map, we first need to load it. Quake 3 maps are packed into .pk3 files which are nothing else than .zip files. So we add the .pk3 file to our irr::io::IFileSystem. After it was added, we are able to read from the files in that archive as if they are directly stored on the disk. </p><div class="fragment"><div class="line">device->getFileSystem()->addFileArchive(<span class="stringliteral">"../../media/map-20kdm2.pk3"</span>);</div></div><!-- fragment --><p> Now we can load the mesh by calling irr::scene::ISceneManager::getMesh(). We get a pointer returned to an irr::scene::IAnimatedMesh. As you might know, Quake 3 maps are not really animated, they are only a huge chunk of static geometry with some materials attached. Hence the IAnimatedMesh consists of only one frame, so we get the "first frame" of the "animation", which is our quake level and create an Octree scene node with it, using irr::scene::ISceneManager::addOctreeSceneNode(). The Octree optimizes the scene a little bit, trying to draw only geometry which is currently visible. An alternative to the Octree would be a irr::scene::IMeshSceneNode, which would always draw the complete geometry of the mesh, without optimization. Try it: Use irr::scene::ISceneManager::addMeshSceneNode() instead of addOctreeSceneNode() and compare the primitives drawn by the video driver. (There is a irr::video::IVideoDriver::getPrimitiveCountDrawn() method in the irr::video::IVideoDriver class). Note that this optimization with the Octree is only useful when drawing huge meshes consisting of lots of geometry. </p><div class="fragment"><div class="line"> scene::IAnimatedMesh* mesh = smgr->getMesh(<span class="stringliteral">"20kdm2.bsp"</span>);</div><div class="line"> scene::ISceneNode* node = 0;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (mesh)</div><div class="line"> node = smgr->addOctreeSceneNode(mesh->getMesh(0), 0, -1, 1024);</div><div class="line"><span class="comment">// node = smgr->addMeshSceneNode(mesh->getMesh(0));</span></div></div><!-- fragment --><p> Because the level was not modelled around the origin (0,0,0), we translate the whole level a little bit. This is done on irr::scene::ISceneNode level using the methods irr::scene::ISceneNode::setPosition() (in this case), irr::scene::ISceneNode::setRotation(), and irr::scene::ISceneNode::setScale(). </p><div class="fragment"><div class="line"><span class="keywordflow">if</span> (node)</div><div class="line"> node->setPosition(core::vector3df(-1300,-144,-1249));</div></div><!-- fragment --><p> Now we only need a camera to look at the Quake 3 map. We want to create a user controlled camera. There are some cameras available in the Irrlicht engine. For example the MayaCamera which can be controlled like the camera in Maya: Rotate with left mouse button pressed, Zoom with both buttons pressed, translate with right mouse button pressed. This could be created with irr::scene::ISceneManager::addCameraSceneNodeMaya(). But for this example, we want to create a camera which behaves like the ones in first person shooter games (FPS) and hence use irr::scene::ISceneManager::addCameraSceneNodeFPS(). </p><div class="fragment"><div class="line">smgr->addCameraSceneNodeFPS();</div></div><!-- fragment --><p> The mouse cursor needs not be visible, so we hide it via the irr::IrrlichtDevice::ICursorControl. </p><div class="fragment"><div class="line">device->getCursorControl()->setVisible(<span class="keyword">false</span>);</div></div><!-- fragment --><p> We have done everything, so lets draw it. We also write the current frames per second and the primitives drawn into the caption of the window. The test for irr::IrrlichtDevice::isWindowActive() is optional, but prevents the engine to grab the mouse cursor after task switching when other programs are active. The call to irr::IrrlichtDevice::yield() will avoid the busy loop to eat up all CPU cycles when the window is not active. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> lastFPS = -1;</div><div class="line"></div><div class="line"><span class="keywordflow">while</span>(device->run())</div><div class="line">{</div><div class="line"> <span class="keywordflow">if</span> (device->isWindowActive())</div><div class="line"> {</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, video::SColor(255,200,200,200));</div><div class="line"> smgr->drawAll();</div><div class="line"> driver->endScene();</div><div class="line"></div><div class="line"> <span class="keywordtype">int</span> fps = driver->getFPS();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (lastFPS != fps)</div><div class="line"> {</div><div class="line"> core::stringw str = L<span class="stringliteral">"Irrlicht Engine - Quake 3 Map example ["</span>;</div><div class="line"> str += driver->getName();</div><div class="line"> str += <span class="stringliteral">"] FPS:"</span>;</div><div class="line"> str += fps;</div><div class="line"></div><div class="line"> device->setWindowCaption(str.c_str());</div><div class="line"> lastFPS = fps;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> device->yield();</div><div class="line">}</div></div><!-- fragment --><p> In the end, delete the Irrlicht device. </p><div class="fragment"><div class="line"> device->drop();</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --><p> That's it. Compile and play around with the program. </p> +</div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/03.CustomSceneNode/CustomSceneNode.cbp b/examples/03.CustomSceneNode/CustomSceneNode.cbp new file mode 100644 index 0000000..4295fbc --- /dev/null +++ b/examples/03.CustomSceneNode/CustomSceneNode.cbp @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 03 Custom Scene Node" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/CustomSceneNode" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="GL" /> + <Add library="X11" /> + <Add directory="../../lib/Linux/" /> + </Linker> + </Target> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/CustomSceneNode" prefix_auto="1" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + <Add directory="../../bin/gcc" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/03.CustomSceneNode/CustomSceneNode.dev b/examples/03.CustomSceneNode/CustomSceneNode.dev new file mode 100644 index 0000000..57c5ee0 --- /dev/null +++ b/examples/03.CustomSceneNode/CustomSceneNode.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 03 Custom Scene Node
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=03.CustomSceneNode.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/03.CustomSceneNode/CustomSceneNode.vcproj b/examples/03.CustomSceneNode/CustomSceneNode.vcproj new file mode 100644 index 0000000..890d308 --- /dev/null +++ b/examples/03.CustomSceneNode/CustomSceneNode.vcproj @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="03.CustomSceneNode"
+ ProjectGUID="{32078844-1903-47AB-AEAC-FC2E3415DB46}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/CustomSceneNode.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/CustomSceneNode.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/CustomSceneNode.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/CustomSceneNode.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/CustomSceneNode.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/CustomSceneNode.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/03.CustomSceneNode/CustomSceneNode_vc10.vcxproj b/examples/03.CustomSceneNode/CustomSceneNode_vc10.vcxproj new file mode 100644 index 0000000..77e9e6e --- /dev/null +++ b/examples/03.CustomSceneNode/CustomSceneNode_vc10.vcxproj @@ -0,0 +1,247 @@ +ďťż<?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">
+ <ProjectName>03.CustomSceneNode</ProjectName>
+ <ProjectGuid>{171CCDFA-C140-4956-8EB7-F0168F4521D3}</ProjectGuid>
+ <RootNamespace>CustomSceneNode</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/CustomSceneNode.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/CustomSceneNode.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\03.CustomSceneNode.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/CustomSceneNode.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <PrecompiledHeaderOutputFile>.\Release/CustomSceneNode.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
+ <ObjectFileName>.\Release/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ProgramDatabaseFile>.\Release/CustomSceneNode.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/CustomSceneNode.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <PrecompiledHeaderOutputFile>.\Release/CustomSceneNode.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
+ <ObjectFileName>.\Release/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\03.CustomSceneNode.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ProgramDatabaseFile>.\Release/CustomSceneNode.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/03.CustomSceneNode/CustomSceneNode_vc11.vcxproj b/examples/03.CustomSceneNode/CustomSceneNode_vc11.vcxproj new file mode 100644 index 0000000..77e9e6e --- /dev/null +++ b/examples/03.CustomSceneNode/CustomSceneNode_vc11.vcxproj @@ -0,0 +1,247 @@ +ďťż<?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">
+ <ProjectName>03.CustomSceneNode</ProjectName>
+ <ProjectGuid>{171CCDFA-C140-4956-8EB7-F0168F4521D3}</ProjectGuid>
+ <RootNamespace>CustomSceneNode</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/CustomSceneNode.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/CustomSceneNode.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\03.CustomSceneNode.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/CustomSceneNode.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <PrecompiledHeaderOutputFile>.\Release/CustomSceneNode.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
+ <ObjectFileName>.\Release/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ProgramDatabaseFile>.\Release/CustomSceneNode.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/CustomSceneNode.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <PrecompiledHeaderOutputFile>.\Release/CustomSceneNode.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
+ <ObjectFileName>.\Release/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\03.CustomSceneNode.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ProgramDatabaseFile>.\Release/CustomSceneNode.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/03.CustomSceneNode/CustomSceneNode_vc12.vcxproj b/examples/03.CustomSceneNode/CustomSceneNode_vc12.vcxproj new file mode 100644 index 0000000..aa125e4 --- /dev/null +++ b/examples/03.CustomSceneNode/CustomSceneNode_vc12.vcxproj @@ -0,0 +1,247 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>03.CustomSceneNode</ProjectName>
+ <ProjectGuid>{171CCDFA-C140-4956-8EB7-F0168F4521D3}</ProjectGuid>
+ <RootNamespace>CustomSceneNode</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/CustomSceneNode.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/CustomSceneNode.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\03.CustomSceneNode.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/CustomSceneNode.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <PrecompiledHeaderOutputFile>.\Release/CustomSceneNode.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
+ <ObjectFileName>.\Release/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ProgramDatabaseFile>.\Release/CustomSceneNode.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/CustomSceneNode.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <PrecompiledHeaderOutputFile>.\Release/CustomSceneNode.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
+ <ObjectFileName>.\Release/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\03.CustomSceneNode.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ProgramDatabaseFile>.\Release/CustomSceneNode.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/03.CustomSceneNode/CustomSceneNode_vc8.vcproj b/examples/03.CustomSceneNode/CustomSceneNode_vc8.vcproj new file mode 100644 index 0000000..42c7879 --- /dev/null +++ b/examples/03.CustomSceneNode/CustomSceneNode_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="03.CustomSceneNode_vc8"
+ ProjectGUID="{171CCDFA-C140-4956-8EB7-F0168F4521D3}"
+ RootNamespace="CustomSceneNode_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/CustomSceneNode.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/CustomSceneNode.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/CustomSceneNode.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/CustomSceneNode.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/CustomSceneNode.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/CustomSceneNode.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/03.CustomSceneNode/CustomSceneNode_vc9.vcproj b/examples/03.CustomSceneNode/CustomSceneNode_vc9.vcproj new file mode 100644 index 0000000..50f0382 --- /dev/null +++ b/examples/03.CustomSceneNode/CustomSceneNode_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="03.CustomSceneNode_vc9"
+ ProjectGUID="{171CCDFA-C140-4956-8EB7-F0168F4521D3}"
+ RootNamespace="CustomSceneNode_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/CustomSceneNode.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/CustomSceneNode.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/CustomSceneNode.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/CustomSceneNode.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/CustomSceneNode.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/CustomSceneNode.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/03.CustomSceneNode/Makefile b/examples/03.CustomSceneNode/Makefile new file mode 100644 index 0000000..34e3d43 --- /dev/null +++ b/examples/03.CustomSceneNode/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 03.CustomSceneNode
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/03.CustomSceneNode/main.cpp b/examples/03.CustomSceneNode/main.cpp new file mode 100644 index 0000000..534f0d3 --- /dev/null +++ b/examples/03.CustomSceneNode/main.cpp @@ -0,0 +1,267 @@ +/** Example 003 Custom SceneNode
+
+This Tutorial is more advanced than the previous ones.
+If you are currently just playing around with the Irrlicht
+engine, you may want to look at other examples first.
+This tutorials shows how to create a custom scene node and
+how to use it in the engine. A custom scene node is needed
+if you want to implement a render technique the Irrlicht
+Engine currently does not support. For example, you can write
+an indoor portal based renderer or an advanced terrain scene
+node with it. By creating custom scene nodes, you can
+easily extend the Irrlicht Engine and adapt it to your own
+needs.
+
+I will keep the tutorial simple: Keep everything very
+short, everything in one .cpp file, and I'll use the engine
+here as in all other tutorials.
+
+To start, I include the header files, use the irr namespace,
+and tell the linker to link with the .lib file.
+*/
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+/*
+Here comes the more sophisticated part of this tutorial:
+The class of our very own custom scene node. To keep it simple,
+our scene node will not be an indoor portal renderer nor a terrain
+scene node, but a simple tetraeder, a 3d object consisting of 4
+connected vertices, which only draws itself and does nothing more.
+Note that this scenario does not require a custom scene node in Irrlicht.
+Instead one would create a mesh from the geometry and pass it to a
+irr::scene::IMeshSceneNode. This example just illustrates creation of a custom
+scene node in a very simple setting.
+
+To let our scene node be able to be inserted into the Irrlicht
+Engine scene, the class we create needs to be derived from the
+irr::scene::ISceneNode class and has to override some methods.
+*/
+
+class CSampleSceneNode : public scene::ISceneNode
+{
+
+ /*
+ First, we declare some member variables:
+ The bounding box, 4 vertices, and the material of the tetraeder.
+ */
+ core::aabbox3d<f32> Box;
+ video::S3DVertex Vertices[4];
+ video::SMaterial Material;
+
+ /*
+ The parameters of the constructor specify the parent of the scene node,
+ a pointer to the scene manager, and an id of the scene node.
+ In the constructor we call the parent class' constructor,
+ set some properties of the material, and
+ create the 4 vertices of the tetraeder we will draw later.
+ */
+
+public:
+
+ CSampleSceneNode(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id)
+ : scene::ISceneNode(parent, mgr, id)
+ {
+ Material.Wireframe = false;
+ Material.Lighting = false;
+
+ Vertices[0] = video::S3DVertex(0,0,10, 1,1,0,
+ video::SColor(255,0,255,255), 0, 1);
+ Vertices[1] = video::S3DVertex(10,0,-10, 1,0,0,
+ video::SColor(255,255,0,255), 1, 1);
+ Vertices[2] = video::S3DVertex(0,20,0, 0,1,1,
+ video::SColor(255,255,255,0), 1, 0);
+ Vertices[3] = video::S3DVertex(-10,0,-10, 0,0,1,
+ video::SColor(255,0,255,0), 0, 0);
+
+ /*
+ The Irrlicht Engine needs to know the bounding box of a scene node.
+ It will use it for automatic culling and other things. Hence, we
+ need to create a bounding box from the 4 vertices we use.
+ If you do not want the engine to use the box for automatic culling,
+ and/or don't want to create the box, you could also call
+ irr::scene::ISceneNode::setAutomaticCulling() with irr::scene::EAC_OFF.
+ */
+ Box.reset(Vertices[0].Pos);
+ for (s32 i=1; i<4; ++i)
+ Box.addInternalPoint(Vertices[i].Pos);
+ }
+
+ /*
+ Before it is drawn, the irr::scene::ISceneNode::OnRegisterSceneNode()
+ method of every scene node in the scene is called by the scene manager.
+ If the scene node wishes to draw itself, it may register itself in the
+ scene manager to be drawn. This is necessary to tell the scene manager
+ when it should call irr::scene::ISceneNode::render(). For
+ example, normal scene nodes render their content one after another,
+ while stencil buffer shadows would like to be drawn after all other
+ scene nodes. And camera or light scene nodes need to be rendered before
+ all other scene nodes (if at all). So here we simply register the
+ scene node to render normally. If we would like to let it be rendered
+ like cameras or light, we would have to call
+ SceneManager->registerNodeForRendering(this, SNRT_LIGHT_AND_CAMERA);
+ After this, we call the actual
+ irr::scene::ISceneNode::OnRegisterSceneNode() method of the base class,
+ which simply lets also all the child scene nodes of this node register
+ themselves.
+ */
+ virtual void OnRegisterSceneNode()
+ {
+ if (IsVisible)
+ SceneManager->registerNodeForRendering(this);
+
+ ISceneNode::OnRegisterSceneNode();
+ }
+
+ /*
+ In the render() method most of the interesting stuff happens: The
+ Scene node renders itself. We override this method and draw the
+ tetraeder.
+ */
+ virtual void render()
+ {
+ u16 indices[] = { 0,2,3, 2,1,3, 1,0,3, 2,0,1 };
+ video::IVideoDriver* driver = SceneManager->getVideoDriver();
+
+ driver->setMaterial(Material);
+ driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
+ driver->drawVertexPrimitiveList(&Vertices[0], 4, &indices[0], 4, video::EVT_STANDARD, scene::EPT_TRIANGLES, video::EIT_16BIT);
+ }
+
+ /*
+ And finally we create three small additional methods.
+ irr::scene::ISceneNode::getBoundingBox() returns the bounding box of
+ this scene node, irr::scene::ISceneNode::getMaterialCount() returns the
+ amount of materials in this scene node (our tetraeder only has one
+ material), and irr::scene::ISceneNode::getMaterial() returns the
+ material at an index. Because we have only one material here, we can
+ return the only one material, assuming that no one ever calls
+ getMaterial() with an index greater than 0.
+ */
+ virtual const core::aabbox3d<f32>& getBoundingBox() const
+ {
+ return Box;
+ }
+
+ virtual u32 getMaterialCount() const
+ {
+ return 1;
+ }
+
+ virtual video::SMaterial& getMaterial(u32 i)
+ {
+ return Material;
+ }
+};
+
+/*
+That's it. The Scene node is done. Now we simply have to start
+the engine, create the scene node and a camera, and look at the result.
+*/
+int main()
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ // create device
+
+ IrrlichtDevice *device = createDevice(driverType,
+ core::dimension2d<u32>(640, 480), 16, false);
+
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ // create engine and camera
+
+ device->setWindowCaption(L"Custom Scene Node - Irrlicht Engine Demo");
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* smgr = device->getSceneManager();
+
+ smgr->addCameraSceneNode(0, core::vector3df(0,-40,0), core::vector3df(0,0,0));
+
+ /*
+ Create our scene node. I don't check the result of calling new, as it
+ should throw an exception rather than returning 0 on failure. Because
+ the new node will create itself with a reference count of 1, and then
+ will have another reference added by its parent scene node when it is
+ added to the scene, I need to drop my reference to it. Best practice is
+ to drop it only *after* I have finished using it, regardless of what
+ the reference count of the object is after creation.
+ */
+ CSampleSceneNode *myNode =
+ new CSampleSceneNode(smgr->getRootSceneNode(), smgr, 666);
+
+ /*
+ To animate something in this boring scene consisting only of one
+ tetraeder, and to show that you now can use your scene node like any
+ other scene node in the engine, we add an animator to the scene node,
+ which rotates the node a little bit.
+ irr::scene::ISceneManager::createRotationAnimator() could return 0, so
+ should be checked.
+ */
+ scene::ISceneNodeAnimator* anim =
+ smgr->createRotationAnimator(core::vector3df(0.8f, 0, 0.8f));
+
+ if(anim)
+ {
+ myNode->addAnimator(anim);
+
+ /*
+ I'm done referring to anim, so must
+ irr::IReferenceCounted::drop() this reference now because it
+ was produced by a createFoo() function. As I shouldn't refer to
+ it again, ensure that I can't by setting to 0.
+ */
+ anim->drop();
+ anim = 0;
+ }
+
+ /*
+ I'm done with my CSampleSceneNode object, and so must drop my reference.
+ This won't delete the object, yet, because it is still attached to the
+ scene graph, which prevents the deletion until the graph is deleted or the
+ custom scene node is removed from it.
+ */
+ myNode->drop();
+ myNode = 0; // As I shouldn't refer to it again, ensure that I can't
+
+ /*
+ Now draw everything and finish.
+ */
+ u32 frames=0;
+ while(device->run())
+ {
+ driver->beginScene(true, true, video::SColor(0,100,100,100));
+
+ smgr->drawAll();
+
+ driver->endScene();
+ if (++frames==100)
+ {
+ core::stringw str = L"Irrlicht Engine [";
+ str += driver->getName();
+ str += L"] FPS: ";
+ str += (s32)driver->getFPS();
+
+ device->setWindowCaption(str.c_str());
+ frames=0;
+ }
+ }
+
+ device->drop();
+
+ return 0;
+}
+
+/*
+That's it. Compile and play around with the program.
+**/
diff --git a/examples/03.CustomSceneNode/tutorial.html b/examples/03.CustomSceneNode/tutorial.html new file mode 100644 index 0000000..28315f4 --- /dev/null +++ b/examples/03.CustomSceneNode/tutorial.html @@ -0,0 +1,209 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 3: Custom SceneNode</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 3: Custom SceneNode </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/003shot.jpg" alt="003shot.jpg"/> +</div> + <p>This Tutorial is more advanced than the previous ones. If you are currently just playing around with the Irrlicht engine, you may want to look at other examples first. This tutorials shows how to create a custom scene node and how to use it in the engine. A custom scene node is needed if you want to implement a render technique the Irrlicht Engine currently does not support. For example, you can write an indoor portal based renderer or an advanced terrain scene node with it. By creating custom scene nodes, you can easily extend the Irrlicht Engine and adapt it to your own needs.</p> +<p>I will keep the tutorial simple: Keep everything very short, everything in one .cpp file, and I'll use the engine here as in all other tutorials.</p> +<p>To start, I include the header files, use the irr namespace, and tell the linker to link with the .lib file. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> Here comes the more sophisticated part of this tutorial: The class of our very own custom scene node. To keep it simple, our scene node will not be an indoor portal renderer nor a terrain scene node, but a simple tetraeder, a 3d object consisting of 4 connected vertices, which only draws itself and does nothing more. Note that this scenario does not require a custom scene node in Irrlicht. Instead one would create a mesh from the geometry and pass it to a irr::scene::IMeshSceneNode. This example just illustrates creation of a custom scene node in a very simple setting.</p> +<p>To let our scene node be able to be inserted into the Irrlicht Engine scene, the class we create needs to be derived from the irr::scene::ISceneNode class and has to override some methods. </p><div class="fragment"><div class="line"><span class="keyword">class </span>CSampleSceneNode : <span class="keyword">public</span> scene::ISceneNode</div><div class="line">{</div></div><!-- fragment --><p> First, we declare some member variables: The bounding box, 4 vertices, and the material of the tetraeder. </p><div class="fragment"><div class="line">core::aabbox3d<f32> Box;</div><div class="line">video::S3DVertex Vertices[4];</div><div class="line">video::SMaterial Material;</div></div><!-- fragment --><p> The parameters of the constructor specify the parent of the scene node, a pointer to the scene manager, and an id of the scene node. In the constructor we call the parent class' constructor, set some properties of the material, and create the 4 vertices of the tetraeder we will draw later. </p><div class="fragment"><div class="line"><span class="keyword">public</span>:</div><div class="line"></div><div class="line"> CSampleSceneNode(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 <span class="keywordtype">id</span>)</div><div class="line"> : scene::ISceneNode(parent, mgr, id)</div><div class="line"> {</div><div class="line"> Material.Wireframe = <span class="keyword">false</span>;</div><div class="line"> Material.Lighting = <span class="keyword">false</span>;</div><div class="line"></div><div class="line"> Vertices[0] = video::S3DVertex(0,0,10, 1,1,0,</div><div class="line"> video::SColor(255,0,255,255), 0, 1);</div><div class="line"> Vertices[1] = video::S3DVertex(10,0,-10, 1,0,0,</div><div class="line"> video::SColor(255,255,0,255), 1, 1);</div><div class="line"> Vertices[2] = video::S3DVertex(0,20,0, 0,1,1,</div><div class="line"> video::SColor(255,255,255,0), 1, 0);</div><div class="line"> Vertices[3] = video::S3DVertex(-10,0,-10, 0,0,1,</div><div class="line"> video::SColor(255,0,255,0), 0, 0);</div></div><!-- fragment --><p> The Irrlicht Engine needs to know the bounding box of a scene node. It will use it for automatic culling and other things. Hence, we need to create a bounding box from the 4 vertices we use. If you do not want the engine to use the box for automatic culling, and/or don't want to create the box, you could also call irr::scene::ISceneNode::setAutomaticCulling() with irr::scene::EAC_OFF. </p><div class="fragment"><div class="line"> Box.reset(Vertices[0].Pos);</div><div class="line"> <span class="keywordflow">for</span> (s32 i=1; i<4; ++i)</div><div class="line"> Box.addInternalPoint(Vertices[i].Pos);</div><div class="line">}</div></div><!-- fragment --><p> Before it is drawn, the irr::scene::ISceneNode::OnRegisterSceneNode() method of every scene node in the scene is called by the scene manager. If the scene node wishes to draw itself, it may register itself in the scene manager to be drawn. This is necessary to tell the scene manager when it should call irr::scene::ISceneNode::render(). For example, normal scene nodes render their content one after another, while stencil buffer shadows would like to be drawn after all other scene nodes. And camera or light scene nodes need to be rendered before all other scene nodes (if at all). So here we simply register the scene node to render normally. If we would like to let it be rendered like cameras or light, we would have to call SceneManager->registerNodeForRendering(this, SNRT_LIGHT_AND_CAMERA); After this, we call the actual irr::scene::ISceneNode::OnRegisterSceneNode() method of the base class, which simply lets also all the child scene nodes of this node register themselves. </p><div class="fragment"><div class="line"><span class="keyword">virtual</span> <span class="keywordtype">void</span> OnRegisterSceneNode()</div><div class="line">{</div><div class="line"> <span class="keywordflow">if</span> (IsVisible)</div><div class="line"> SceneManager->registerNodeForRendering(<span class="keyword">this</span>);</div><div class="line"></div><div class="line"> ISceneNode::OnRegisterSceneNode();</div><div class="line">}</div></div><!-- fragment --><p> In the render() method most of the interesting stuff happens: The Scene node renders itself. We override this method and draw the tetraeder. </p><div class="fragment"><div class="line"><span class="keyword">virtual</span> <span class="keywordtype">void</span> render()</div><div class="line">{</div><div class="line"> u16 indices[] = { 0,2,3, 2,1,3, 1,0,3, 2,0,1 };</div><div class="line"> video::IVideoDriver* driver = SceneManager->getVideoDriver();</div><div class="line"></div><div class="line"> driver->setMaterial(Material);</div><div class="line"> driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);</div><div class="line"> driver->drawVertexPrimitiveList(&Vertices[0], 4, &indices[0], 4, video::EVT_STANDARD, scene::EPT_TRIANGLES, video::EIT_16BIT);</div><div class="line">}</div></div><!-- fragment --><p> And finally we create three small additional methods. irr::scene::ISceneNode::getBoundingBox() returns the bounding box of this scene node, irr::scene::ISceneNode::getMaterialCount() returns the amount of materials in this scene node (our tetraeder only has one material), and irr::scene::ISceneNode::getMaterial() returns the material at an index. Because we have only one material here, we can return the only one material, assuming that no one ever calls getMaterial() with an index greater than 0. </p><div class="fragment"><div class="line"> <span class="keyword">virtual</span> <span class="keyword">const</span> core::aabbox3d<f32>& getBoundingBox()<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> <span class="keywordflow">return</span> Box;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> u32 getMaterialCount()<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> video::SMaterial& getMaterial(u32 i)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">return</span> Material;</div><div class="line"> } </div><div class="line">};</div></div><!-- fragment --><p> That's it. The Scene node is done. Now we simply have to start the engine, create the scene node and a camera, and look at the result. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> <span class="comment">// create device</span></div><div class="line"></div><div class="line"> IrrlichtDevice *device = createDevice(driverType,</div><div class="line"> core::dimension2d<u32>(640, 480), 16, <span class="keyword">false</span>);</div><div class="line"> </div><div class="line"> <span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div><div class="line"></div><div class="line"> <span class="comment">// create engine and camera</span></div><div class="line"></div><div class="line"> device->setWindowCaption(L<span class="stringliteral">"Custom Scene Node - Irrlicht Engine Demo"</span>);</div><div class="line"></div><div class="line"> video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line"> scene::ISceneManager* smgr = device->getSceneManager();</div><div class="line"></div><div class="line"> smgr->addCameraSceneNode(0, core::vector3df(0,-40,0), core::vector3df(0,0,0));</div></div><!-- fragment --><p> Create our scene node. I don't check the result of calling new, as it should throw an exception rather than returning 0 on failure. Because the new node will create itself with a reference count of 1, and then will have another reference added by its parent scene node when it is added to the scene, I need to drop my reference to it. Best practice is to drop it only <em>after</em> I have finished using it, regardless of what the reference count of the object is after creation. </p><div class="fragment"><div class="line">CSampleSceneNode *myNode =</div><div class="line"> <span class="keyword">new</span> CSampleSceneNode(smgr->getRootSceneNode(), smgr, 666);</div></div><!-- fragment --><p> To animate something in this boring scene consisting only of one tetraeder, and to show that you now can use your scene node like any other scene node in the engine, we add an animator to the scene node, which rotates the node a little bit. irr::scene::ISceneManager::createRotationAnimator() could return 0, so should be checked. </p><div class="fragment"><div class="line">scene::ISceneNodeAnimator* anim =</div><div class="line"> smgr->createRotationAnimator(core::vector3df(0.8f, 0, 0.8f));</div><div class="line"></div><div class="line"><span class="keywordflow">if</span>(anim)</div><div class="line">{</div><div class="line"> myNode->addAnimator(anim);</div></div><!-- fragment --><p> I'm done referring to anim, so must irr::IReferenceCounted::drop() this reference now because it was produced by a createFoo() function. As I shouldn't refer to it again, ensure that I can't by setting to 0. </p><div class="fragment"><div class="line"> anim->drop();</div><div class="line"> anim = 0;</div><div class="line">}</div></div><!-- fragment --><p> I'm done with my CSampleSceneNode object, and so must drop my reference. This won't delete the object, yet, because it is still attached to the scene graph, which prevents the deletion until the graph is deleted or the custom scene node is removed from it. </p><div class="fragment"><div class="line">myNode->drop();</div><div class="line">myNode = 0; <span class="comment">// As I shouldn't refer to it again, ensure that I can't</span></div></div><!-- fragment --><p> Now draw everything and finish. </p><div class="fragment"><div class="line"> u32 frames=0;</div><div class="line"> <span class="keywordflow">while</span>(device->run())</div><div class="line"> {</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, video::SColor(0,100,100,100));</div><div class="line"></div><div class="line"> smgr->drawAll();</div><div class="line"></div><div class="line"> driver->endScene();</div><div class="line"> <span class="keywordflow">if</span> (++frames==100)</div><div class="line"> {</div><div class="line"> core::stringw str = L<span class="stringliteral">"Irrlicht Engine ["</span>;</div><div class="line"> str += driver->getName();</div><div class="line"> str += L<span class="stringliteral">"] FPS: "</span>;</div><div class="line"> str += (s32)driver->getFPS();</div><div class="line"></div><div class="line"> device->setWindowCaption(str.c_str());</div><div class="line"> frames=0;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> device->drop();</div><div class="line"> </div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --><p> That's it. Compile and play around with the program. </p> +</div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/04.Movement/Makefile b/examples/04.Movement/Makefile new file mode 100644 index 0000000..0dcd252 --- /dev/null +++ b/examples/04.Movement/Makefile @@ -0,0 +1,39 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 04.Movement
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/04.Movement/Movement.cbp b/examples/04.Movement/Movement.cbp new file mode 100644 index 0000000..76e2f43 --- /dev/null +++ b/examples/04.Movement/Movement.cbp @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 04 Movement" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option output="../../bin/Win32-gcc/Movement" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/Movement" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="GL" /> + <Add library="X11" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/04.Movement/Movement.dev b/examples/04.Movement/Movement.dev new file mode 100644 index 0000000..0753c10 --- /dev/null +++ b/examples/04.Movement/Movement.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 04 Movement
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=04.Movement.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/04.Movement/Movement.vcproj b/examples/04.Movement/Movement.vcproj new file mode 100644 index 0000000..105c625 --- /dev/null +++ b/examples/04.Movement/Movement.vcproj @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="04.Movement"
+ ProjectGUID="{735B050B-1AC5-4602-B0BE-D2D2B5893E94}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/Movement.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\04.Movement.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/Movement.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Movement.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/Movement.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\04.Movement.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Movement.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Movement.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/04.Movement/Movement_vc10.vcxproj b/examples/04.Movement/Movement_vc10.vcxproj new file mode 100644 index 0000000..131479d --- /dev/null +++ b/examples/04.Movement/Movement_vc10.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>04.Movement</ProjectName>
+ <ProjectGuid>{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}</ProjectGuid>
+ <RootNamespace>Movement</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Movement.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\04.Movement.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Movement.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\04.Movement.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Movement.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\04.Movement.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Movement.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\04.Movement.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/04.Movement/Movement_vc11.vcxproj b/examples/04.Movement/Movement_vc11.vcxproj new file mode 100644 index 0000000..131479d --- /dev/null +++ b/examples/04.Movement/Movement_vc11.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>04.Movement</ProjectName>
+ <ProjectGuid>{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}</ProjectGuid>
+ <RootNamespace>Movement</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Movement.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\04.Movement.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Movement.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\04.Movement.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Movement.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\04.Movement.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Movement.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\04.Movement.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/04.Movement/Movement_vc12.vcxproj b/examples/04.Movement/Movement_vc12.vcxproj new file mode 100644 index 0000000..bbebe74 --- /dev/null +++ b/examples/04.Movement/Movement_vc12.vcxproj @@ -0,0 +1,235 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>04.Movement</ProjectName>
+ <ProjectGuid>{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}</ProjectGuid>
+ <RootNamespace>Movement</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Movement.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\04.Movement.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Movement.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\04.Movement.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Movement.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\04.Movement.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Movement.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\04.Movement.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/04.Movement/Movement_vc8.vcproj b/examples/04.Movement/Movement_vc8.vcproj new file mode 100644 index 0000000..8f56add --- /dev/null +++ b/examples/04.Movement/Movement_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="04.Movement_vc8"
+ ProjectGUID="{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}"
+ RootNamespace="Movement_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Movement.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/Movement.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\04.Movement.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/Movement.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Movement.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/Movement.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\04.Movement.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Movement.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/04.Movement/Movement_vc9.vcproj b/examples/04.Movement/Movement_vc9.vcproj new file mode 100644 index 0000000..074fe40 --- /dev/null +++ b/examples/04.Movement/Movement_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="04.Movement_vc9"
+ ProjectGUID="{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}"
+ RootNamespace="Movement_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Movement.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/Movement.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\04.Movement.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/Movement.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Movement.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/Movement.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\04.Movement.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Movement.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/04.Movement/main.cpp b/examples/04.Movement/main.cpp new file mode 100644 index 0000000..7bacda3 --- /dev/null +++ b/examples/04.Movement/main.cpp @@ -0,0 +1,258 @@ +/** Example 004 Movement
+
+This Tutorial shows how to move and animate SceneNodes. The
+basic concept of SceneNodeAnimators is shown as well as manual
+movement of nodes using the keyboard. We'll demonstrate framerate
+independent movement, which means moving by an amount dependent
+on the duration of the last run of the Irrlicht loop.
+
+Example 19.MouseAndJoystick shows how to handle those kinds of input.
+
+As always, I include the header files, use the irr namespace,
+and tell the linker to link with the .lib file.
+*/
+#ifdef _MSC_VER
+// We'll also define this to stop MSVC complaining about sprintf().
+#define _CRT_SECURE_NO_WARNINGS
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+/*
+To receive events like mouse and keyboard input, or GUI events like "the OK
+button has been clicked", we need an object which is derived from the
+irr::IEventReceiver object. There is only one method to override:
+irr::IEventReceiver::OnEvent(). This method will be called by the engine once
+when an event happens. What we really want to know is whether a key is being
+held down, and so we will remember the current state of each key.
+*/
+class MyEventReceiver : public IEventReceiver
+{
+public:
+ // This is the one method that we have to implement
+ virtual bool OnEvent(const SEvent& event)
+ {
+ // Remember whether each key is down or up
+ if (event.EventType == irr::EET_KEY_INPUT_EVENT)
+ KeyIsDown[event.KeyInput.Key] = event.KeyInput.PressedDown;
+
+ return false;
+ }
+
+ // This is used to check whether a key is being held down
+ virtual bool IsKeyDown(EKEY_CODE keyCode) const
+ {
+ return KeyIsDown[keyCode];
+ }
+
+ MyEventReceiver()
+ {
+ for (u32 i=0; i<KEY_KEY_CODES_COUNT; ++i)
+ KeyIsDown[i] = false;
+ }
+
+private:
+ // We use this array to store the current state of each key
+ bool KeyIsDown[KEY_KEY_CODES_COUNT];
+};
+
+
+/*
+The event receiver for keeping the pressed keys is ready, the actual responses
+will be made inside the render loop, right before drawing the scene. So lets
+just create an irr::IrrlichtDevice and the scene node we want to move. We also
+create some other additional scene nodes, to show that there are also some
+different possibilities to move and animate scene nodes.
+*/
+int main()
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ // create device
+ MyEventReceiver receiver;
+
+ IrrlichtDevice* device = createDevice(driverType,
+ core::dimension2d<u32>(640, 480), 16, false, false, false, &receiver);
+
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* smgr = device->getSceneManager();
+
+ /*
+ Create the node which will be moved with the WSAD keys. We create a
+ sphere node, which is a built-in geometry primitive. We place the node
+ at (0,0,30) and assign a texture to it to let it look a little bit more
+ interesting. Because we have no dynamic lights in this scene we disable
+ lighting for each model (otherwise the models would be black).
+ */
+ scene::ISceneNode * node = smgr->addSphereSceneNode();
+ if (node)
+ {
+ node->setPosition(core::vector3df(0,0,30));
+ node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+ node->setMaterialFlag(video::EMF_LIGHTING, false);
+ }
+
+ /*
+ Now we create another node, movable using a scene node animator. Scene
+ node animators modify scene nodes and can be attached to any scene node
+ like mesh scene nodes, billboards, lights and even camera scene nodes.
+ Scene node animators are not only able to modify the position of a
+ scene node, they can also animate the textures of an object for
+ example. We create a cube scene node and attach a 'fly circle' scene
+ node animator to it, letting this node fly around our sphere scene node.
+ */
+ scene::ISceneNode* n = smgr->addCubeSceneNode();
+
+ if (n)
+ {
+ n->setMaterialTexture(0, driver->getTexture("../../media/t351sml.jpg"));
+ n->setMaterialFlag(video::EMF_LIGHTING, false);
+ scene::ISceneNodeAnimator* anim =
+ smgr->createFlyCircleAnimator(core::vector3df(0,0,30), 20.0f);
+ if (anim)
+ {
+ n->addAnimator(anim);
+ anim->drop();
+ }
+ }
+
+ /*
+ The last scene node we add to show possibilities of scene node animators is
+ a b3d model, which uses a 'fly straight' animator to run between to points.
+ */
+ scene::IAnimatedMeshSceneNode* anms =
+ smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/ninja.b3d"));
+
+ if (anms)
+ {
+ scene::ISceneNodeAnimator* anim =
+ smgr->createFlyStraightAnimator(core::vector3df(100,0,60),
+ core::vector3df(-100,0,60), 3500, true);
+ if (anim)
+ {
+ anms->addAnimator(anim);
+ anim->drop();
+ }
+
+ /*
+ To make the model look right we disable lighting, set the
+ frames between which the animation should loop, rotate the
+ model around 180 degrees, and adjust the animation speed and
+ the texture. To set the right animation (frames and speed), we
+ would also be able to just call
+ "anms->setMD2Animation(scene::EMAT_RUN)" for the 'run'
+ animation instead of "setFrameLoop" and "setAnimationSpeed",
+ but this only works with MD2 animations, and so you know how to
+ start other animations. But a good advice is to not use
+ hardcoded frame-numbers...
+ */
+ anms->setMaterialFlag(video::EMF_LIGHTING, false);
+
+ anms->setFrameLoop(0, 13);
+ anms->setAnimationSpeed(15);
+// anms->setMD2Animation(scene::EMAT_RUN);
+
+ anms->setScale(core::vector3df(2.f,2.f,2.f));
+ anms->setRotation(core::vector3df(0,-90,0));
+// anms->setMaterialTexture(0, driver->getTexture("../../media/sydney.bmp"));
+
+ }
+
+
+ /*
+ To be able to look at and move around in this scene, we create a first
+ person shooter style camera and make the mouse cursor invisible.
+ */
+ smgr->addCameraSceneNodeFPS();
+ device->getCursorControl()->setVisible(false);
+
+ /*
+ Add a colorful irrlicht logo
+ */
+ device->getGUIEnvironment()->addImage(
+ driver->getTexture("../../media/irrlichtlogoalpha2.tga"),
+ core::position2d<s32>(10,20));
+
+ gui::IGUIStaticText* diagnostics = device->getGUIEnvironment()->addStaticText(
+ L"", core::rect<s32>(10, 10, 400, 20));
+ diagnostics->setOverrideColor(video::SColor(255, 255, 255, 0));
+
+ /*
+ We have done everything, so lets draw it. We also write the current
+ frames per second and the name of the driver to the caption of the
+ window.
+ */
+ int lastFPS = -1;
+
+ // In order to do framerate independent movement, we have to know
+ // how long it was since the last frame
+ u32 then = device->getTimer()->getTime();
+
+ // This is the movemen speed in units per second.
+ const f32 MOVEMENT_SPEED = 5.f;
+
+ while(device->run())
+ {
+ // Work out a frame delta time.
+ const u32 now = device->getTimer()->getTime();
+ const f32 frameDeltaTime = (f32)(now - then) / 1000.f; // Time in seconds
+ then = now;
+
+ /* Check if keys W, S, A or D are being held down, and move the
+ sphere node around respectively. */
+ core::vector3df nodePosition = node->getPosition();
+
+ if(receiver.IsKeyDown(irr::KEY_KEY_W))
+ nodePosition.Y += MOVEMENT_SPEED * frameDeltaTime;
+ else if(receiver.IsKeyDown(irr::KEY_KEY_S))
+ nodePosition.Y -= MOVEMENT_SPEED * frameDeltaTime;
+
+ if(receiver.IsKeyDown(irr::KEY_KEY_A))
+ nodePosition.X -= MOVEMENT_SPEED * frameDeltaTime;
+ else if(receiver.IsKeyDown(irr::KEY_KEY_D))
+ nodePosition.X += MOVEMENT_SPEED * frameDeltaTime;
+
+ node->setPosition(nodePosition);
+
+ driver->beginScene(true, true, video::SColor(255,113,113,133));
+
+ smgr->drawAll(); // draw the 3d scene
+ device->getGUIEnvironment()->drawAll(); // draw the gui environment (the logo)
+
+ driver->endScene();
+
+ int fps = driver->getFPS();
+
+ if (lastFPS != fps)
+ {
+ core::stringw tmp(L"Movement Example - Irrlicht Engine [");
+ tmp += driver->getName();
+ tmp += L"] fps: ";
+ tmp += fps;
+
+ device->setWindowCaption(tmp.c_str());
+ lastFPS = fps;
+ }
+ }
+
+ /*
+ In the end, delete the Irrlicht device.
+ */
+ device->drop();
+
+ return 0;
+}
+
+/*
+That's it. Compile and play around with the program.
+**/
diff --git a/examples/04.Movement/tutorial.html b/examples/04.Movement/tutorial.html new file mode 100644 index 0000000..45df714 --- /dev/null +++ b/examples/04.Movement/tutorial.html @@ -0,0 +1,209 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 4: Movement</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 4: Movement </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/004shot.jpg" alt="004shot.jpg"/> +</div> + <p>This Tutorial shows how to move and animate SceneNodes. The basic concept of SceneNodeAnimators is shown as well as manual movement of nodes using the keyboard. We'll demonstrate framerate independent movement, which means moving by an amount dependent on the duration of the last run of the Irrlicht loop.</p> +<p>Example 19.MouseAndJoystick shows how to handle those kinds of input.</p> +<p>As always, I include the header files, use the irr namespace, and tell the linker to link with the .lib file. </p><div class="fragment"><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="comment">// We'll also define this to stop MSVC complaining about sprintf().</span></div><div class="line"><span class="preprocessor">#define _CRT_SECURE_NO_WARNINGS</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div></div><!-- fragment --><p> To receive events like mouse and keyboard input, or GUI events like "the OK +button has been clicked", we need an object which is derived from the irr::IEventReceiver object. There is only one method to override: irr::IEventReceiver::OnEvent(). This method will be called by the engine once when an event happens. What we really want to know is whether a key is being held down, and so we will remember the current state of each key. </p><div class="fragment"><div class="line"><span class="keyword">class </span>MyEventReceiver : <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"> <span class="comment">// This is the one method that we have to implement</span></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent& event)</div><div class="line"> {</div><div class="line"> <span class="comment">// Remember whether each key is down or up</span></div><div class="line"> <span class="keywordflow">if</span> (event.EventType == irr::EET_KEY_INPUT_EVENT)</div><div class="line"> KeyIsDown[<span class="keyword">event</span>.KeyInput.Key] = <span class="keyword">event</span>.KeyInput.PressedDown;</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// This is used to check whether a key is being held down</span></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> IsKeyDown(EKEY_CODE keyCode)<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> <span class="keywordflow">return</span> KeyIsDown[keyCode];</div><div class="line"> }</div><div class="line"> </div><div class="line"> MyEventReceiver()</div><div class="line"> {</div><div class="line"> <span class="keywordflow">for</span> (u32 i=0; i<KEY_KEY_CODES_COUNT; ++i)</div><div class="line"> KeyIsDown[i] = <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"> <span class="comment">// We use this array to store the current state of each key</span></div><div class="line"> <span class="keywordtype">bool</span> KeyIsDown[KEY_KEY_CODES_COUNT];</div><div class="line">};</div></div><!-- fragment --><p> The event receiver for keeping the pressed keys is ready, the actual responses will be made inside the render loop, right before drawing the scene. So lets just create an irr::IrrlichtDevice and the scene node we want to move. We also create some other additional scene nodes, to show that there are also some different possibilities to move and animate scene nodes. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> <span class="comment">// create device</span></div><div class="line"> MyEventReceiver receiver;</div><div class="line"></div><div class="line"> IrrlichtDevice* device = createDevice(driverType,</div><div class="line"> core::dimension2d<u32>(640, 480), 16, <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">false</span>, &receiver);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div><div class="line"></div><div class="line"> video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line"> scene::ISceneManager* smgr = device->getSceneManager();</div></div><!-- fragment --><p> Create the node which will be moved with the WSAD keys. We create a sphere node, which is a built-in geometry primitive. We place the node at (0,0,30) and assign a texture to it to let it look a little bit more interesting. Because we have no dynamic lights in this scene we disable lighting for each model (otherwise the models would be black). </p><div class="fragment"><div class="line">scene::ISceneNode * node = smgr->addSphereSceneNode();</div><div class="line"><span class="keywordflow">if</span> (node)</div><div class="line">{</div><div class="line"> node->setPosition(core::vector3df(0,0,30));</div><div class="line"> node->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/wall.bmp"</span>));</div><div class="line"> node->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line">}</div></div><!-- fragment --><p> Now we create another node, movable using a scene node animator. Scene node animators modify scene nodes and can be attached to any scene node like mesh scene nodes, billboards, lights and even camera scene nodes. Scene node animators are not only able to modify the position of a scene node, they can also animate the textures of an object for example. We create a cube scene node and attach a 'fly circle' scene node animator to it, letting this node fly around our sphere scene node. </p><div class="fragment"><div class="line">scene::ISceneNode* n = smgr->addCubeSceneNode();</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (n)</div><div class="line">{</div><div class="line"> n->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/t351sml.jpg"</span>));</div><div class="line"> n->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"> scene::ISceneNodeAnimator* anim =</div><div class="line"> smgr->createFlyCircleAnimator(core::vector3df(0,0,30), 20.0f);</div><div class="line"> <span class="keywordflow">if</span> (anim)</div><div class="line"> {</div><div class="line"> n->addAnimator(anim);</div><div class="line"> anim->drop();</div><div class="line"> }</div><div class="line">}</div></div><!-- fragment --><p> The last scene node we add to show possibilities of scene node animators is a b3d model, which uses a 'fly straight' animator to run between to points. </p><div class="fragment"><div class="line">scene::IAnimatedMeshSceneNode* anms =</div><div class="line"> smgr->addAnimatedMeshSceneNode(smgr->getMesh(<span class="stringliteral">"../../media/ninja.b3d"</span>));</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (anms)</div><div class="line">{</div><div class="line"> scene::ISceneNodeAnimator* anim =</div><div class="line"> smgr->createFlyStraightAnimator(core::vector3df(100,0,60),</div><div class="line"> core::vector3df(-100,0,60), 3500, <span class="keyword">true</span>);</div><div class="line"> <span class="keywordflow">if</span> (anim)</div><div class="line"> {</div><div class="line"> anms->addAnimator(anim);</div><div class="line"> anim->drop();</div><div class="line"> }</div></div><!-- fragment --><p> To make the model look right we disable lighting, set the frames between which the animation should loop, rotate the model around 180 degrees, and adjust the animation speed and the texture. To set the right animation (frames and speed), we would also be able to just call "anms->setMD2Animation(scene::EMAT_RUN)" for the 'run' animation instead of "setFrameLoop" and "setAnimationSpeed", but this only works with MD2 animations, and so you know how to start other animations. But a good advice is to not use hardcoded frame-numbers... </p><div class="fragment"><div class="line"> anms->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"></div><div class="line"> anms->setFrameLoop(0, 13);</div><div class="line"> anms->setAnimationSpeed(15);</div><div class="line"><span class="comment">// anms->setMD2Animation(scene::EMAT_RUN);</span></div><div class="line"></div><div class="line"> anms->setScale(core::vector3df(2.f,2.f,2.f));</div><div class="line"> anms->setRotation(core::vector3df(0,-90,0));</div><div class="line"><span class="comment">// anms->setMaterialTexture(0, driver->getTexture("../../media/sydney.bmp"));</span></div><div class="line"></div><div class="line"> }</div></div><!-- fragment --><p> To be able to look at and move around in this scene, we create a first person shooter style camera and make the mouse cursor invisible. </p><div class="fragment"><div class="line">smgr->addCameraSceneNodeFPS();</div><div class="line">device->getCursorControl()->setVisible(<span class="keyword">false</span>);</div></div><!-- fragment --><p> Add a colorful irrlicht logo </p><div class="fragment"><div class="line">device->getGUIEnvironment()->addImage(</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlichtlogoalpha2.tga"</span>),</div><div class="line"> core::position2d<s32>(10,20));</div><div class="line"></div><div class="line">gui::IGUIStaticText* diagnostics = device->getGUIEnvironment()->addStaticText(</div><div class="line"> L<span class="stringliteral">""</span>, core::rect<s32>(10, 10, 400, 20));</div><div class="line">diagnostics->setOverrideColor(video::SColor(255, 255, 255, 0));</div></div><!-- fragment --><p> We have done everything, so lets draw it. We also write the current frames per second and the name of the driver to the caption of the window. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> lastFPS = -1;</div><div class="line"></div><div class="line"><span class="comment">// In order to do framerate independent movement, we have to know</span></div><div class="line"><span class="comment">// how long it was since the last frame</span></div><div class="line">u32 then = device->getTimer()->getTime();</div><div class="line"></div><div class="line"><span class="comment">// This is the movemen speed in units per second.</span></div><div class="line"><span class="keyword">const</span> f32 MOVEMENT_SPEED = 5.f;</div><div class="line"></div><div class="line"><span class="keywordflow">while</span>(device->run())</div><div class="line">{</div><div class="line"> <span class="comment">// Work out a frame delta time.</span></div><div class="line"> <span class="keyword">const</span> u32 now = device->getTimer()->getTime();</div><div class="line"> <span class="keyword">const</span> f32 frameDeltaTime = (f32)(now - then) / 1000.f; <span class="comment">// Time in seconds</span></div><div class="line"> then = now;</div></div><!-- fragment --><p> Check if keys W, S, A or D are being held down, and move the sphere node around respectively.</p><div class="fragment"><div class="line"> core::vector3df nodePosition = node->getPosition();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span>(receiver.IsKeyDown(irr::KEY_KEY_W))</div><div class="line"> nodePosition.Y += MOVEMENT_SPEED * frameDeltaTime;</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span>(receiver.IsKeyDown(irr::KEY_KEY_S))</div><div class="line"> nodePosition.Y -= MOVEMENT_SPEED * frameDeltaTime;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span>(receiver.IsKeyDown(irr::KEY_KEY_A))</div><div class="line"> nodePosition.X -= MOVEMENT_SPEED * frameDeltaTime;</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span>(receiver.IsKeyDown(irr::KEY_KEY_D))</div><div class="line"> nodePosition.X += MOVEMENT_SPEED * frameDeltaTime;</div><div class="line"></div><div class="line"> node->setPosition(nodePosition);</div><div class="line"></div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, video::SColor(255,113,113,133));</div><div class="line"></div><div class="line"> smgr->drawAll(); <span class="comment">// draw the 3d scene</span></div><div class="line"> device->getGUIEnvironment()->drawAll(); <span class="comment">// draw the gui environment (the logo)</span></div><div class="line"></div><div class="line"> driver->endScene();</div><div class="line"></div><div class="line"> <span class="keywordtype">int</span> fps = driver->getFPS();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (lastFPS != fps)</div><div class="line"> {</div><div class="line"> core::stringw tmp(L<span class="stringliteral">"Movement Example - Irrlicht Engine ["</span>);</div><div class="line"> tmp += driver->getName();</div><div class="line"> tmp += L<span class="stringliteral">"] fps: "</span>;</div><div class="line"> tmp += fps;</div><div class="line"></div><div class="line"> device->setWindowCaption(tmp.c_str());</div><div class="line"> lastFPS = fps;</div><div class="line"> }</div><div class="line">}</div></div><!-- fragment --><p> In the end, delete the Irrlicht device. </p><div class="fragment"><div class="line"> device->drop();</div><div class="line"> </div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --><p> That's it. Compile and play around with the program. </p> +</div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/05.UserInterface/Makefile b/examples/05.UserInterface/Makefile new file mode 100644 index 0000000..24cd5d4 --- /dev/null +++ b/examples/05.UserInterface/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 05.UserInterface
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/05.UserInterface/UserInterface.cbp b/examples/05.UserInterface/UserInterface.cbp new file mode 100644 index 0000000..9988718 --- /dev/null +++ b/examples/05.UserInterface/UserInterface.cbp @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 05 User Interface" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/UserInterface" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/UserInterface" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="GL" /> + <Add library="X11" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/05.UserInterface/UserInterface.dev b/examples/05.UserInterface/UserInterface.dev new file mode 100644 index 0000000..6a32ece --- /dev/null +++ b/examples/05.UserInterface/UserInterface.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 05 User Interface
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=05.UserInterface.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/05.UserInterface/UserInterface.vcproj b/examples/05.UserInterface/UserInterface.vcproj new file mode 100644 index 0000000..4428169 --- /dev/null +++ b/examples/05.UserInterface/UserInterface.vcproj @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="05.UserInterface"
+ ProjectGUID="{0294193E-12DE-4B24-91C0-419865BF7E33}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/UserInterface.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\05.UserInterface.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/UserInterface.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/UserInterface.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/UserInterface.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\05.UserInterface.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/UserInterface.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/UserInterface.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/05.UserInterface/UserInterface_vc10.vcxproj b/examples/05.UserInterface/UserInterface_vc10.vcxproj new file mode 100644 index 0000000..d4be57f --- /dev/null +++ b/examples/05.UserInterface/UserInterface_vc10.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>05.UserInterface</ProjectName>
+ <ProjectGuid>{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}</ProjectGuid>
+ <RootNamespace>UserInterface</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/UserInterface.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\05.UserInterface.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/UserInterface.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\05.UserInterface.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/UserInterface.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\05.UserInterface.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/UserInterface.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\05.UserInterface.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/05.UserInterface/UserInterface_vc11.vcxproj b/examples/05.UserInterface/UserInterface_vc11.vcxproj new file mode 100644 index 0000000..d4be57f --- /dev/null +++ b/examples/05.UserInterface/UserInterface_vc11.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>05.UserInterface</ProjectName>
+ <ProjectGuid>{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}</ProjectGuid>
+ <RootNamespace>UserInterface</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/UserInterface.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\05.UserInterface.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/UserInterface.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\05.UserInterface.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/UserInterface.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\05.UserInterface.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/UserInterface.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\05.UserInterface.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/05.UserInterface/UserInterface_vc12.vcxproj b/examples/05.UserInterface/UserInterface_vc12.vcxproj new file mode 100644 index 0000000..3945262 --- /dev/null +++ b/examples/05.UserInterface/UserInterface_vc12.vcxproj @@ -0,0 +1,235 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>05.UserInterface</ProjectName>
+ <ProjectGuid>{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}</ProjectGuid>
+ <RootNamespace>UserInterface</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/UserInterface.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\05.UserInterface.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/UserInterface.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\05.UserInterface.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/UserInterface.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\05.UserInterface.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/UserInterface.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\05.UserInterface.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/05.UserInterface/UserInterface_vc8.vcproj b/examples/05.UserInterface/UserInterface_vc8.vcproj new file mode 100644 index 0000000..fdc4fef --- /dev/null +++ b/examples/05.UserInterface/UserInterface_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="05.UserInterface_vc8"
+ ProjectGUID="{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}"
+ RootNamespace="UserInterface_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/UserInterface.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/UserInterface.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\05.UserInterface.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/UserInterface.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/UserInterface.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/UserInterface.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\05.UserInterface.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/UserInterface.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/05.UserInterface/UserInterface_vc9.vcproj b/examples/05.UserInterface/UserInterface_vc9.vcproj new file mode 100644 index 0000000..e192238 --- /dev/null +++ b/examples/05.UserInterface/UserInterface_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="05.UserInterface_vc8"
+ ProjectGUID="{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}"
+ RootNamespace="UserInterface_vc8"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/UserInterface.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/UserInterface.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\05.UserInterface.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/UserInterface.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/UserInterface.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/UserInterface.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\05.UserInterface.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/UserInterface.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/05.UserInterface/main.cpp b/examples/05.UserInterface/main.cpp new file mode 100644 index 0000000..98b3898 --- /dev/null +++ b/examples/05.UserInterface/main.cpp @@ -0,0 +1,291 @@ +/** Example 005 User Interface
+
+This tutorial shows how to use the built in User Interface of
+the Irrlicht Engine. It will give a brief overview and show
+how to create and use windows, buttons, scroll bars, static
+texts, and list boxes.
+
+As always, we include the header files, and use the irrlicht
+namespaces. We also store a pointer to the Irrlicht device,
+a counter variable for changing the creation position of a window,
+and a pointer to a listbox.
+*/
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+using namespace core;
+using namespace scene;
+using namespace video;
+using namespace io;
+using namespace gui;
+
+#ifdef _IRR_WINDOWS_
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+// Declare a structure to hold some context for the event receiver so that it
+// has it available inside its OnEvent() method.
+struct SAppContext
+{
+ IrrlichtDevice *device;
+ s32 counter;
+ IGUIListBox* listbox;
+};
+
+// Define some values that we'll use to identify individual GUI controls.
+enum
+{
+ GUI_ID_QUIT_BUTTON = 101,
+ GUI_ID_NEW_WINDOW_BUTTON,
+ GUI_ID_FILE_OPEN_BUTTON,
+ GUI_ID_TRANSPARENCY_SCROLL_BAR
+};
+
+/*
+ Set the skin transparency by changing the alpha values of all skin-colors
+*/
+void setSkinTransparency(s32 alpha, irr::gui::IGUISkin * skin)
+{
+ for (s32 i=0; i<irr::gui::EGDC_COUNT ; ++i)
+ {
+ video::SColor col = skin->getColor((EGUI_DEFAULT_COLOR)i);
+ col.setAlpha(alpha);
+ skin->setColor((EGUI_DEFAULT_COLOR)i, col);
+ }
+}
+
+/*
+The Event Receiver is not only capable of getting keyboard and
+mouse input events, but also events of the graphical user interface
+(gui). There are events for almost everything: Button click,
+Listbox selection change, events that say that a element was hovered
+and so on. To be able to react to some of these events, we create
+an event receiver.
+We only react to gui events, and if it's such an event, we get the
+id of the caller (the gui element which caused the event) and get
+the pointer to the gui environment.
+*/
+class MyEventReceiver : public IEventReceiver
+{
+public:
+ MyEventReceiver(SAppContext & context) : Context(context) { }
+
+ virtual bool OnEvent(const SEvent& event)
+ {
+ if (event.EventType == EET_GUI_EVENT)
+ {
+ s32 id = event.GUIEvent.Caller->getID();
+ IGUIEnvironment* env = Context.device->getGUIEnvironment();
+
+ switch(event.GUIEvent.EventType)
+ {
+
+ /*
+ If a scrollbar changed its scroll position, and it is
+ 'our' scrollbar (the one with id GUI_ID_TRANSPARENCY_SCROLL_BAR), then we change
+ the transparency of all gui elements. This is a very
+ easy task: There is a skin object, in which all color
+ settings are stored. We simply go through all colors
+ stored in the skin and change their alpha value.
+ */
+ case EGET_SCROLL_BAR_CHANGED:
+ if (id == GUI_ID_TRANSPARENCY_SCROLL_BAR)
+ {
+ s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos();
+ setSkinTransparency(pos, env->getSkin());
+ }
+ break;
+
+ /*
+ If a button was clicked, it could be one of 'our'
+ three buttons. If it is the first, we shut down the engine.
+ If it is the second, we create a little window with some
+ text on it. We also add a string to the list box to log
+ what happened. And if it is the third button, we create
+ a file open dialog, and add also this as string to the list box.
+ That's all for the event receiver.
+ */
+ case EGET_BUTTON_CLICKED:
+ switch(id)
+ {
+ case GUI_ID_QUIT_BUTTON:
+ Context.device->closeDevice();
+ return true;
+
+ case GUI_ID_NEW_WINDOW_BUTTON:
+ {
+ Context.listbox->addItem(L"Window created");
+ Context.counter += 30;
+ if (Context.counter > 200)
+ Context.counter = 0;
+
+ IGUIWindow* window = env->addWindow(
+ rect<s32>(100 + Context.counter, 100 + Context.counter, 300 + Context.counter, 200 + Context.counter),
+ false, // modal?
+ L"Test window");
+
+ env->addStaticText(L"Please close me",
+ rect<s32>(35,35,140,50),
+ true, // border?
+ false, // wordwrap?
+ window);
+ }
+ return true;
+
+ case GUI_ID_FILE_OPEN_BUTTON:
+ Context.listbox->addItem(L"File open");
+ // There are some options for the file open dialog
+ // We set the title, make it a modal window, and make sure
+ // that the working directory is restored after the dialog
+ // is finished.
+ env->addFileOpenDialog(L"Please choose a file.", true, 0, -1, true);
+ return true;
+
+ default:
+ return false;
+ }
+ break;
+
+ case EGET_FILE_SELECTED:
+ {
+ // show the model filename, selected in the file dialog
+ IGUIFileOpenDialog* dialog =
+ (IGUIFileOpenDialog*)event.GUIEvent.Caller;
+ Context.listbox->addItem(dialog->getFileName());
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return false;
+ }
+
+private:
+ SAppContext & Context;
+};
+
+
+/*
+Ok, now for the more interesting part. First, create the Irrlicht device. As in
+some examples before, we ask the user which driver he wants to use for this
+example:
+*/
+int main()
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ // create device and exit if creation failed
+
+ IrrlichtDevice * device = createDevice(driverType, core::dimension2d<u32>(640, 480));
+
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ /* The creation was successful, now we set the event receiver and
+ store pointers to the driver and to the gui environment. */
+
+ device->setWindowCaption(L"Irrlicht Engine - User Interface Demo");
+ device->setResizable(true);
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+ IGUIEnvironment* env = device->getGUIEnvironment();
+
+ /*
+ To make the font a little bit nicer, we load an external font
+ and set it as the new default font in the skin.
+ To keep the standard font for tool tip text, we set it to
+ the built-in font.
+ */
+
+ IGUISkin* skin = env->getSkin();
+ IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp");
+ if (font)
+ skin->setFont(font);
+
+ skin->setFont(env->getBuiltInFont(), EGDF_TOOLTIP);
+
+ /*
+ We add three buttons. The first one closes the engine. The second
+ creates a window and the third opens a file open dialog. The third
+ parameter is the id of the button, with which we can easily identify
+ the button in the event receiver.
+ */
+
+ env->addButton(rect<s32>(10,240,110,240 + 32), 0, GUI_ID_QUIT_BUTTON,
+ L"Quit", L"Exits Program");
+ env->addButton(rect<s32>(10,280,110,280 + 32), 0, GUI_ID_NEW_WINDOW_BUTTON,
+ L"New Window", L"Launches a new Window");
+ env->addButton(rect<s32>(10,320,110,320 + 32), 0, GUI_ID_FILE_OPEN_BUTTON,
+ L"File Open", L"Opens a file");
+
+ /*
+ Now, we add a static text and a scrollbar, which modifies the
+ transparency of all gui elements. We set the maximum value of
+ the scrollbar to 255, because that's the maximal value for
+ a color value.
+ Then we create an other static text and a list box.
+ */
+
+ env->addStaticText(L"Transparent Control:", rect<s32>(150,20,350,40), true);
+ IGUIScrollBar* scrollbar = env->addScrollBar(true,
+ rect<s32>(150, 45, 350, 60), 0, GUI_ID_TRANSPARENCY_SCROLL_BAR);
+ scrollbar->setMax(255);
+ scrollbar->setPos(255);
+ setSkinTransparency( scrollbar->getPos(), env->getSkin());
+
+ // set scrollbar position to alpha value of an arbitrary element
+ scrollbar->setPos(env->getSkin()->getColor(EGDC_WINDOW).getAlpha());
+
+ env->addStaticText(L"Logging ListBox:", rect<s32>(50,110,250,130), true);
+ IGUIListBox * listbox = env->addListBox(rect<s32>(50, 140, 250, 210));
+ env->addEditBox(L"Editable Text", rect<s32>(350, 80, 550, 100));
+
+ // Store the appropriate data in a context structure.
+ SAppContext context;
+ context.device = device;
+ context.counter = 0;
+ context.listbox = listbox;
+
+ // Then create the event receiver, giving it that context structure.
+ MyEventReceiver receiver(context);
+
+ // And tell the device to use our custom event receiver.
+ device->setEventReceiver(&receiver);
+
+
+ /*
+ And at last, we create a nice Irrlicht Engine logo in the top left corner.
+ */
+ env->addImage(driver->getTexture("../../media/irrlichtlogo2.png"),
+ position2d<int>(10,10));
+
+
+ /*
+ That's all, we only have to draw everything.
+ */
+
+ while(device->run() && driver)
+ if (device->isWindowActive())
+ {
+ driver->beginScene(true, true, SColor(0,200,200,200));
+
+ env->drawAll();
+
+ driver->endScene();
+ }
+
+ device->drop();
+
+ return 0;
+}
+
+/*
+**/
diff --git a/examples/05.UserInterface/tutorial.html b/examples/05.UserInterface/tutorial.html new file mode 100644 index 0000000..4c57388 --- /dev/null +++ b/examples/05.UserInterface/tutorial.html @@ -0,0 +1,206 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 5: User Interface</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 5: User Interface </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/005shot.jpg" alt="005shot.jpg"/> +</div> + <p>This tutorial shows how to use the built in User Interface of the Irrlicht Engine. It will give a brief overview and show how to create and use windows, buttons, scroll bars, static texts, and list boxes.</p> +<p>As always, we include the header files, and use the irrlicht namespaces. We also store a pointer to the Irrlicht device, a counter variable for changing the creation position of a window, and a pointer to a listbox. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>core;</div><div class="line"><span class="keyword">using namespace </span>scene;</div><div class="line"><span class="keyword">using namespace </span>video;</div><div class="line"><span class="keyword">using namespace </span>io;</div><div class="line"><span class="keyword">using namespace </span>gui;</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef _IRR_WINDOWS_</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"><span class="comment">// Declare a structure to hold some context for the event receiver so that it</span></div><div class="line"><span class="comment">// has it available inside its OnEvent() method.</span></div><div class="line"><span class="keyword">struct </span>SAppContext</div><div class="line">{</div><div class="line"> IrrlichtDevice *device;</div><div class="line"> s32 counter;</div><div class="line"> IGUIListBox* listbox;</div><div class="line">};</div><div class="line"></div><div class="line"><span class="comment">// Define some values that we'll use to identify individual GUI controls.</span></div><div class="line"><span class="keyword">enum</span></div><div class="line">{</div><div class="line"> GUI_ID_QUIT_BUTTON = 101,</div><div class="line"> GUI_ID_NEW_WINDOW_BUTTON,</div><div class="line"> GUI_ID_FILE_OPEN_BUTTON,</div><div class="line"> GUI_ID_TRANSPARENCY_SCROLL_BAR</div><div class="line">};</div></div><!-- fragment --><p> Set the skin transparency by changing the alpha values of all skin-colors </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> setSkinTransparency(s32 alpha, irr::gui::IGUISkin * skin)</div><div class="line">{</div><div class="line"> <span class="keywordflow">for</span> (s32 i=0; i<irr::gui::EGDC_COUNT ; ++i)</div><div class="line"> {</div><div class="line"> video::SColor col = skin->getColor((EGUI_DEFAULT_COLOR)i);</div><div class="line"> col.setAlpha(alpha);</div><div class="line"> skin->setColor((EGUI_DEFAULT_COLOR)i, col);</div><div class="line"> }</div><div class="line">}</div></div><!-- fragment --><p> The Event Receiver is not only capable of getting keyboard and mouse input events, but also events of the graphical user interface (gui). There are events for almost everything: Button click, Listbox selection change, events that say that a element was hovered and so on. To be able to react to some of these events, we create an event receiver. We only react to gui events, and if it's such an event, we get the id of the caller (the gui element which caused the event) and get the pointer to the gui environment. </p><div class="fragment"><div class="line"><span class="keyword">class </span>MyEventReceiver : <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"> MyEventReceiver(SAppContext & context) : Context(context) { }</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent& event)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (event.EventType == EET_GUI_EVENT)</div><div class="line"> {</div><div class="line"> s32 <span class="keywordtype">id</span> = <span class="keyword">event</span>.GUIEvent.Caller->getID();</div><div class="line"> IGUIEnvironment* env = Context.device->getGUIEnvironment();</div><div class="line"></div><div class="line"> <span class="keywordflow">switch</span>(event.GUIEvent.EventType)</div><div class="line"> {</div></div><!-- fragment --><p> If a scrollbar changed its scroll position, and it is 'our' scrollbar (the one with id GUI_ID_TRANSPARENCY_SCROLL_BAR), then we change the transparency of all gui elements. This is a very easy task: There is a skin object, in which all color settings are stored. We simply go through all colors stored in the skin and change their alpha value. </p><div class="fragment"><div class="line"><span class="keywordflow">case</span> EGET_SCROLL_BAR_CHANGED:</div><div class="line"> <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == GUI_ID_TRANSPARENCY_SCROLL_BAR)</div><div class="line"> {</div><div class="line"> s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos();</div><div class="line"> setSkinTransparency(pos, env->getSkin());</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div></div><!-- fragment --><p> If a button was clicked, it could be one of 'our' three buttons. If it is the first, we shut down the engine. If it is the second, we create a little window with some text on it. We also add a string to the list box to log what happened. And if it is the third button, we create a file open dialog, and add also this as string to the list box. That's all for the event receiver. </p><div class="fragment"><div class="line"> <span class="keywordflow">case</span> EGET_BUTTON_CLICKED:</div><div class="line"> <span class="keywordflow">switch</span>(<span class="keywordtype">id</span>)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_QUIT_BUTTON:</div><div class="line"> Context.device->closeDevice();</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> GUI_ID_NEW_WINDOW_BUTTON:</div><div class="line"> {</div><div class="line"> Context.listbox->addItem(L<span class="stringliteral">"Window created"</span>);</div><div class="line"> Context.counter += 30;</div><div class="line"> <span class="keywordflow">if</span> (Context.counter > 200)</div><div class="line"> Context.counter = 0;</div><div class="line"></div><div class="line"> IGUIWindow* window = env->addWindow(</div><div class="line"> rect<s32>(100 + Context.counter, 100 + Context.counter, 300 + Context.counter, 200 + Context.counter),</div><div class="line"> <span class="keyword">false</span>, <span class="comment">// modal?</span></div><div class="line"> L<span class="stringliteral">"Test window"</span>);</div><div class="line"></div><div class="line"> env->addStaticText(L<span class="stringliteral">"Please close me"</span>,</div><div class="line"> rect<s32>(35,35,140,50),</div><div class="line"> <span class="keyword">true</span>, <span class="comment">// border?</span></div><div class="line"> <span class="keyword">false</span>, <span class="comment">// wordwrap?</span></div><div class="line"> window);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> GUI_ID_FILE_OPEN_BUTTON:</div><div class="line"> Context.listbox->addItem(L<span class="stringliteral">"File open"</span>);</div><div class="line"> <span class="comment">// There are some options for the file open dialog</span></div><div class="line"> <span class="comment">// We set the title, make it a modal window, and make sure</span></div><div class="line"> <span class="comment">// that the working directory is restored after the dialog</span></div><div class="line"> <span class="comment">// is finished.</span></div><div class="line"> env->addFileOpenDialog(L<span class="stringliteral">"Please choose a file."</span>, <span class="keyword">true</span>, 0, -1, <span class="keyword">true</span>);</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">default</span>:</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EGET_FILE_SELECTED:</div><div class="line"> {</div><div class="line"> <span class="comment">// show the model filename, selected in the file dialog</span></div><div class="line"> IGUIFileOpenDialog* dialog =</div><div class="line"> (IGUIFileOpenDialog*)event.GUIEvent.Caller;</div><div class="line"> Context.listbox->addItem(dialog->getFileName());</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">default</span>:</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"> SAppContext & Context;</div><div class="line">};</div></div><!-- fragment --><p> Ok, now for the more interesting part. First, create the Irrlicht device. As in some examples before, we ask the user which driver he wants to use for this example: </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> <span class="comment">// create device and exit if creation failed</span></div><div class="line"></div><div class="line"> IrrlichtDevice * device = createDevice(driverType, core::dimension2d<u32>(640, 480));</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div></div><!-- fragment --><p> The creation was successful, now we set the event receiver and store pointers to the driver and to the gui environment.</p><div class="fragment"><div class="line">device->setWindowCaption(L<span class="stringliteral">"Irrlicht Engine - User Interface Demo"</span>);</div><div class="line">device->setResizable(<span class="keyword">true</span>);</div><div class="line"></div><div class="line">video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line">IGUIEnvironment* env = device->getGUIEnvironment();</div></div><!-- fragment --><p> To make the font a little bit nicer, we load an external font and set it as the new default font in the skin. To keep the standard font for tool tip text, we set it to the built-in font. </p><div class="fragment"><div class="line">IGUISkin* skin = env->getSkin();</div><div class="line">IGUIFont* font = env->getFont(<span class="stringliteral">"../../media/fonthaettenschweiler.bmp"</span>);</div><div class="line"><span class="keywordflow">if</span> (font)</div><div class="line"> skin->setFont(font);</div><div class="line"></div><div class="line">skin->setFont(env->getBuiltInFont(), EGDF_TOOLTIP);</div></div><!-- fragment --><p> We add three buttons. The first one closes the engine. The second creates a window and the third opens a file open dialog. The third parameter is the id of the button, with which we can easily identify the button in the event receiver. </p><div class="fragment"><div class="line">env->addButton(rect<s32>(10,240,110,240 + 32), 0, GUI_ID_QUIT_BUTTON,</div><div class="line"> L<span class="stringliteral">"Quit"</span>, L<span class="stringliteral">"Exits Program"</span>);</div><div class="line">env->addButton(rect<s32>(10,280,110,280 + 32), 0, GUI_ID_NEW_WINDOW_BUTTON,</div><div class="line"> L<span class="stringliteral">"New Window"</span>, L<span class="stringliteral">"Launches a new Window"</span>);</div><div class="line">env->addButton(rect<s32>(10,320,110,320 + 32), 0, GUI_ID_FILE_OPEN_BUTTON,</div><div class="line"> L<span class="stringliteral">"File Open"</span>, L<span class="stringliteral">"Opens a file"</span>);</div></div><!-- fragment --><p> Now, we add a static text and a scrollbar, which modifies the transparency of all gui elements. We set the maximum value of the scrollbar to 255, because that's the maximal value for a color value. Then we create an other static text and a list box. </p><div class="fragment"><div class="line">env->addStaticText(L<span class="stringliteral">"Transparent Control:"</span>, rect<s32>(150,20,350,40), <span class="keyword">true</span>);</div><div class="line">IGUIScrollBar* scrollbar = env->addScrollBar(<span class="keyword">true</span>,</div><div class="line"> rect<s32>(150, 45, 350, 60), 0, GUI_ID_TRANSPARENCY_SCROLL_BAR);</div><div class="line">scrollbar->setMax(255);</div><div class="line">scrollbar->setPos(255);</div><div class="line">setSkinTransparency( scrollbar->getPos(), env->getSkin());</div><div class="line"></div><div class="line"><span class="comment">// set scrollbar position to alpha value of an arbitrary element</span></div><div class="line">scrollbar->setPos(env->getSkin()->getColor(EGDC_WINDOW).getAlpha());</div><div class="line"></div><div class="line">env->addStaticText(L<span class="stringliteral">"Logging ListBox:"</span>, rect<s32>(50,110,250,130), <span class="keyword">true</span>);</div><div class="line">IGUIListBox * listbox = env->addListBox(rect<s32>(50, 140, 250, 210));</div><div class="line">env->addEditBox(L<span class="stringliteral">"Editable Text"</span>, rect<s32>(350, 80, 550, 100));</div><div class="line"></div><div class="line"><span class="comment">// Store the appropriate data in a context structure.</span></div><div class="line">SAppContext context;</div><div class="line">context.device = device;</div><div class="line">context.counter = 0;</div><div class="line">context.listbox = listbox;</div><div class="line"></div><div class="line"><span class="comment">// Then create the event receiver, giving it that context structure.</span></div><div class="line">MyEventReceiver receiver(context);</div><div class="line"></div><div class="line"><span class="comment">// And tell the device to use our custom event receiver.</span></div><div class="line">device->setEventReceiver(&receiver);</div></div><!-- fragment --><p> And at last, we create a nice Irrlicht Engine logo in the top left corner. </p><div class="fragment"><div class="line">env->addImage(driver->getTexture(<span class="stringliteral">"../../media/irrlichtlogo2.png"</span>),</div><div class="line"> position2d<int>(10,10));</div></div><!-- fragment --><p> That's all, we only have to draw everything. </p><div class="fragment"><div class="line"> <span class="keywordflow">while</span>(device->run() && driver)</div><div class="line"> <span class="keywordflow">if</span> (device->isWindowActive())</div><div class="line"> {</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, SColor(0,200,200,200));</div><div class="line"></div><div class="line"> env->drawAll();</div><div class="line"> </div><div class="line"> driver->endScene();</div><div class="line"> }</div><div class="line"></div><div class="line"> device->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/06.2DGraphics/2DGraphics.cbp b/examples/06.2DGraphics/2DGraphics.cbp new file mode 100644 index 0000000..f7b7396 --- /dev/null +++ b/examples/06.2DGraphics/2DGraphics.cbp @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 06 2D Graphics" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/2DGraphics" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/2DGraphics" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="GL" /> + <Add library="X11" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/06.2DGraphics/2DGraphics.dev b/examples/06.2DGraphics/2DGraphics.dev new file mode 100644 index 0000000..93694f1 --- /dev/null +++ b/examples/06.2DGraphics/2DGraphics.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 06 2D Graphics
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=06.2DGraphics.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/06.2DGraphics/2DGraphics.vcproj b/examples/06.2DGraphics/2DGraphics.vcproj new file mode 100644 index 0000000..b21c351 --- /dev/null +++ b/examples/06.2DGraphics/2DGraphics.vcproj @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="06.2DGraphics"
+ ProjectGUID="{E71B6F18-10DC-4101-A541-F6D33F71B2BD}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/2DGraphics.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\06.2DGraphics.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/2DGraphics.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/2DGraphics.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/2DGraphics.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\06.2DGraphics.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/2DGraphics.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/2DGraphics.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/06.2DGraphics/2DGraphics_vc10.vcxproj b/examples/06.2DGraphics/2DGraphics_vc10.vcxproj new file mode 100644 index 0000000..07fd309 --- /dev/null +++ b/examples/06.2DGraphics/2DGraphics_vc10.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>06.2DGraphics</ProjectName>
+ <ProjectGuid>{E71B6F18-10DC-4101-A541-F6D33F71B2BD}</ProjectGuid>
+ <RootNamespace>2DGraphics</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/2DGraphics.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\06.2DGraphics.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/2DGraphics.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\06.2DGraphics.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/2DGraphics.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\06.2DGraphics.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/2DGraphics.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\06.2DGraphics.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/06.2DGraphics/2DGraphics_vc11.vcxproj b/examples/06.2DGraphics/2DGraphics_vc11.vcxproj new file mode 100644 index 0000000..07fd309 --- /dev/null +++ b/examples/06.2DGraphics/2DGraphics_vc11.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>06.2DGraphics</ProjectName>
+ <ProjectGuid>{E71B6F18-10DC-4101-A541-F6D33F71B2BD}</ProjectGuid>
+ <RootNamespace>2DGraphics</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/2DGraphics.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\06.2DGraphics.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/2DGraphics.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\06.2DGraphics.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/2DGraphics.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\06.2DGraphics.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/2DGraphics.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\06.2DGraphics.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/06.2DGraphics/2DGraphics_vc12.vcxproj b/examples/06.2DGraphics/2DGraphics_vc12.vcxproj new file mode 100644 index 0000000..a4750aa --- /dev/null +++ b/examples/06.2DGraphics/2DGraphics_vc12.vcxproj @@ -0,0 +1,235 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>06.2DGraphics</ProjectName>
+ <ProjectGuid>{E71B6F18-10DC-4101-A541-F6D33F71B2BD}</ProjectGuid>
+ <RootNamespace>2DGraphics</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/2DGraphics.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\06.2DGraphics.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/2DGraphics.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\06.2DGraphics.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/2DGraphics.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\06.2DGraphics.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/2DGraphics.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\06.2DGraphics.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/06.2DGraphics/2DGraphics_vc8.vcproj b/examples/06.2DGraphics/2DGraphics_vc8.vcproj new file mode 100644 index 0000000..8a10914 --- /dev/null +++ b/examples/06.2DGraphics/2DGraphics_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="06.2DGraphics_vc8"
+ ProjectGUID="{E71B6F18-10DC-4101-A541-F6D33F71B2BD}"
+ RootNamespace="2DGraphics_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/2DGraphics.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/2DGraphics.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\06.2DGraphics.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/2DGraphics.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/2DGraphics.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/2DGraphics.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\06.2DGraphics.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/2DGraphics.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/06.2DGraphics/2DGraphics_vc9.vcproj b/examples/06.2DGraphics/2DGraphics_vc9.vcproj new file mode 100644 index 0000000..e78f8a0 --- /dev/null +++ b/examples/06.2DGraphics/2DGraphics_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="06.2DGraphics_vc9"
+ ProjectGUID="{E71B6F18-10DC-4101-A541-F6D33F71B2BD}"
+ RootNamespace="2DGraphics_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/2DGraphics.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/2DGraphics.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\06.2DGraphics.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/2DGraphics.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/2DGraphics.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/2DGraphics.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\06.2DGraphics.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/2DGraphics.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/06.2DGraphics/Makefile b/examples/06.2DGraphics/Makefile new file mode 100644 index 0000000..6e62b2b --- /dev/null +++ b/examples/06.2DGraphics/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 06.2DGraphics
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/06.2DGraphics/main.cpp b/examples/06.2DGraphics/main.cpp new file mode 100644 index 0000000..40e311a --- /dev/null +++ b/examples/06.2DGraphics/main.cpp @@ -0,0 +1,166 @@ +/** Example 006 2D Graphics
+
+This Tutorial shows how to do 2d graphics with the Irrlicht Engine.
+It shows how to draw images, keycolor based sprites,
+transparent rectangles, and different fonts. You may consider
+this useful if you want to make a 2d game with the engine, or if
+you want to draw a cool interface or head up display for your 3d game.
+
+As always, I include the header files, use the irr namespace,
+and tell the linker to link with the .lib file.
+*/
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+/*
+At first, we let the user select the driver type, then start up the engine, set
+a caption, and get a pointer to the video driver.
+*/
+int main()
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ // create device
+
+ IrrlichtDevice *device = createDevice(driverType,
+ core::dimension2d<u32>(512, 384));
+
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ device->setWindowCaption(L"Irrlicht Engine - 2D Graphics Demo");
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+
+ /*
+ All 2d graphics in this example are put together into one texture,
+ 2ddemo.png. Because we want to draw colorkey based sprites, we need to
+ load this texture and tell the engine, which part of it should be
+ transparent based on a colorkey.
+
+ In this example, we don't tell it the color directly, we just say "Hey
+ Irrlicht Engine, you'll find the color I want at position (0,0) on the
+ texture.". Instead, it would be also possible to call
+ driver->makeColorKeyTexture(images, video::SColor(0,0,0,0)), to make
+ e.g. all black pixels transparent. Please note that
+ makeColorKeyTexture just creates an alpha channel based on the color.
+ */
+ video::ITexture* images = driver->getTexture("../../media/2ddemo.png");
+ driver->makeColorKeyTexture(images, core::position2d<s32>(0,0));
+
+ /*
+ To be able to draw some text with two different fonts, we first load
+ them. Ok, we load just one. As the first font we just use the default
+ font which is built into the engine. Also, we define two rectangles
+ which specify the position of the images of the red imps (little flying
+ creatures) in the texture.
+ */
+ gui::IGUIFont* font = device->getGUIEnvironment()->getBuiltInFont();
+ gui::IGUIFont* font2 =
+ device->getGUIEnvironment()->getFont("../../media/fonthaettenschweiler.bmp");
+
+ core::rect<s32> imp1(349,15,385,78);
+ core::rect<s32> imp2(387,15,423,78);
+
+ /*
+ Prepare a nicely filtering 2d render mode for special cases.
+ */
+ driver->getMaterial2D().TextureLayer[0].BilinearFilter=true;
+ driver->getMaterial2D().AntiAliasing=video::EAAM_FULL_BASIC;
+
+ /*
+ Everything is prepared, now we can draw everything in the draw loop,
+ between the begin scene and end scene calls. In this example, we are
+ just doing 2d graphics, but it would be no problem to mix them with 3d
+ graphics. Just try it out, and draw some 3d vertices or set up a scene
+ with the scene manager and draw it.
+ */
+ while(device->run() && driver)
+ {
+ if (device->isWindowActive())
+ {
+ u32 time = device->getTimer()->getTime();
+
+ driver->beginScene(true, true, video::SColor(255,120,102,136));
+
+ /*
+ First, we draw 3 sprites, using the alpha channel we
+ created with makeColorKeyTexture. The last parameter
+ specifies that the drawing method should use this alpha
+ channel. The last-but-one parameter specifies a
+ color, with which the sprite should be colored.
+ (255,255,255,255) is full white, so the sprite will
+ look like the original. The third sprite is drawn
+ with the red channel modulated based on the time.
+ */
+
+ // draw fire & dragons background world
+ driver->draw2DImage(images, core::position2d<s32>(50,50),
+ core::rect<s32>(0,0,342,224), 0,
+ video::SColor(255,255,255,255), true);
+
+ // draw flying imp
+ driver->draw2DImage(images, core::position2d<s32>(164,125),
+ (time/500 % 2) ? imp1 : imp2, 0,
+ video::SColor(255,255,255,255), true);
+
+ // draw second flying imp with colorcylce
+ driver->draw2DImage(images, core::position2d<s32>(270,105),
+ (time/500 % 2) ? imp1 : imp2, 0,
+ video::SColor(255,(time) % 255,255,255), true);
+
+ /*
+ Drawing text is really simple. The code should be self
+ explanatory.
+ */
+
+ // draw some text
+ if (font)
+ font->draw(L"This demo shows that Irrlicht is also capable of drawing 2D graphics.",
+ core::rect<s32>(130,10,300,50),
+ video::SColor(255,255,255,255));
+
+ // draw some other text
+ if (font2)
+ font2->draw(L"Also mixing with 3d graphics is possible.",
+ core::rect<s32>(130,20,300,60),
+ video::SColor(255,time % 255,time % 255,255));
+
+ /*
+ Next, we draw the Irrlicht Engine logo (without
+ using a color or an alpha channel). Since we slightly scale
+ the image we use the prepared filter mode.
+ */
+ driver->enableMaterial2D();
+ driver->draw2DImage(images, core::rect<s32>(10,10,108,48),
+ core::rect<s32>(354,87,442,118));
+ driver->enableMaterial2D(false);
+
+ /*
+ Finally draw a half-transparent rect under the mouse cursor.
+ */
+ core::position2d<s32> m = device->getCursorControl()->getPosition();
+ driver->draw2DRectangle(video::SColor(100,255,255,255),
+ core::rect<s32>(m.X-20, m.Y-20, m.X+20, m.Y+20));
+
+ driver->endScene();
+ }
+ }
+
+ device->drop();
+
+ return 0;
+}
+
+/*
+That's all. I hope it was not too difficult.
+**/
diff --git a/examples/06.2DGraphics/tutorial.html b/examples/06.2DGraphics/tutorial.html new file mode 100644 index 0000000..9a8ace6 --- /dev/null +++ b/examples/06.2DGraphics/tutorial.html @@ -0,0 +1,208 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 6: 2D Graphics</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 6: 2D Graphics </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/006shot.jpg" alt="006shot.jpg"/> +</div> + <p>This Tutorial shows how to do 2d graphics with the Irrlicht Engine. It shows how to draw images, keycolor based sprites, transparent rectangles, and different fonts. You may consider this useful if you want to make a 2d game with the engine, or if you want to draw a cool interface or head up display for your 3d game.</p> +<p>As always, I include the header files, use the irr namespace, and tell the linker to link with the .lib file. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> At first, we let the user select the driver type, then start up the engine, set a caption, and get a pointer to the video driver. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> <span class="comment">// create device</span></div><div class="line"></div><div class="line"> IrrlichtDevice *device = createDevice(driverType,</div><div class="line"> core::dimension2d<u32>(512, 384));</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div><div class="line"></div><div class="line"> device->setWindowCaption(L<span class="stringliteral">"Irrlicht Engine - 2D Graphics Demo"</span>);</div><div class="line"></div><div class="line"> video::IVideoDriver* driver = device->getVideoDriver();</div></div><!-- fragment --><p> All 2d graphics in this example are put together into one texture, 2ddemo.png. Because we want to draw colorkey based sprites, we need to load this texture and tell the engine, which part of it should be transparent based on a colorkey.</p> +<p>In this example, we don't tell it the color directly, we just say "Hey Irrlicht Engine, you'll find the color I want at position (0,0) on the texture.". Instead, it would be also possible to call driver->makeColorKeyTexture(images, video::SColor(0,0,0,0)), to make e.g. all black pixels transparent. Please note that makeColorKeyTexture just creates an alpha channel based on the color. </p><div class="fragment"><div class="line">video::ITexture* images = driver->getTexture(<span class="stringliteral">"../../media/2ddemo.png"</span>);</div><div class="line">driver->makeColorKeyTexture(images, core::position2d<s32>(0,0));</div></div><!-- fragment --><p> To be able to draw some text with two different fonts, we first load them. Ok, we load just one. As the first font we just use the default font which is built into the engine. Also, we define two rectangles which specify the position of the images of the red imps (little flying creatures) in the texture. </p><div class="fragment"><div class="line">gui::IGUIFont* font = device->getGUIEnvironment()->getBuiltInFont();</div><div class="line">gui::IGUIFont* font2 =</div><div class="line"> device->getGUIEnvironment()->getFont(<span class="stringliteral">"../../media/fonthaettenschweiler.bmp"</span>);</div><div class="line"></div><div class="line">core::rect<s32> imp1(349,15,385,78);</div><div class="line">core::rect<s32> imp2(387,15,423,78);</div></div><!-- fragment --><p> Prepare a nicely filtering 2d render mode for special cases. </p><div class="fragment"><div class="line">driver->getMaterial2D().TextureLayer[0].BilinearFilter=<span class="keyword">true</span>;</div><div class="line">driver->getMaterial2D().AntiAliasing=video::EAAM_FULL_BASIC;</div></div><!-- fragment --><p> Everything is prepared, now we can draw everything in the draw loop, between the begin scene and end scene calls. In this example, we are just doing 2d graphics, but it would be no problem to mix them with 3d graphics. Just try it out, and draw some 3d vertices or set up a scene with the scene manager and draw it. </p><div class="fragment"><div class="line"><span class="keywordflow">while</span>(device->run() && driver)</div><div class="line">{</div><div class="line"> <span class="keywordflow">if</span> (device->isWindowActive())</div><div class="line"> {</div><div class="line"> u32 time = device->getTimer()->getTime();</div><div class="line"></div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, video::SColor(255,120,102,136));</div></div><!-- fragment --><p> First, we draw 3 sprites, using the alpha channel we created with makeColorKeyTexture. The last parameter specifies that the drawing method should use this alpha channel. The last-but-one parameter specifies a color, with which the sprite should be colored. (255,255,255,255) is full white, so the sprite will look like the original. The third sprite is drawn with the red channel modulated based on the time. </p><div class="fragment"><div class="line"><span class="comment">// draw fire & dragons background world</span></div><div class="line">driver->draw2DImage(images, core::position2d<s32>(50,50),</div><div class="line"> core::rect<s32>(0,0,342,224), 0,</div><div class="line"> video::SColor(255,255,255,255), <span class="keyword">true</span>);</div><div class="line"></div><div class="line"><span class="comment">// draw flying imp</span></div><div class="line">driver->draw2DImage(images, core::position2d<s32>(164,125),</div><div class="line"> (time/500 % 2) ? imp1 : imp2, 0,</div><div class="line"> video::SColor(255,255,255,255), <span class="keyword">true</span>);</div><div class="line"></div><div class="line"><span class="comment">// draw second flying imp with colorcylce</span></div><div class="line">driver->draw2DImage(images, core::position2d<s32>(270,105),</div><div class="line"> (time/500 % 2) ? imp1 : imp2, 0,</div><div class="line"> video::SColor(255,(time) % 255,255,255), <span class="keyword">true</span>);</div></div><!-- fragment --><p> Drawing text is really simple. The code should be self explanatory. </p><div class="fragment"><div class="line"><span class="comment">// draw some text</span></div><div class="line"><span class="keywordflow">if</span> (font)</div><div class="line"> font->draw(L<span class="stringliteral">"This demo shows that Irrlicht is also capable of drawing 2D graphics."</span>,</div><div class="line"> core::rect<s32>(130,10,300,50),</div><div class="line"> video::SColor(255,255,255,255));</div><div class="line"></div><div class="line"><span class="comment">// draw some other text</span></div><div class="line"><span class="keywordflow">if</span> (font2)</div><div class="line"> font2->draw(L<span class="stringliteral">"Also mixing with 3d graphics is possible."</span>,</div><div class="line"> core::rect<s32>(130,20,300,60),</div><div class="line"> video::SColor(255,time % 255,time % 255,255));</div></div><!-- fragment --><p> Next, we draw the Irrlicht Engine logo (without using a color or an alpha channel). Since we slightly scale the image we use the prepared filter mode. </p><div class="fragment"><div class="line">driver->enableMaterial2D();</div><div class="line">driver->draw2DImage(images, core::rect<s32>(10,10,108,48),</div><div class="line"> core::rect<s32>(354,87,442,118));</div><div class="line">driver->enableMaterial2D(<span class="keyword">false</span>);</div></div><!-- fragment --><p> Finally draw a half-transparent rect under the mouse cursor. </p><div class="fragment"><div class="line"> core::position2d<s32> m = device->getCursorControl()->getPosition();</div><div class="line"> driver->draw2DRectangle(video::SColor(100,255,255,255),</div><div class="line"> core::rect<s32>(m.X-20, m.Y-20, m.X+20, m.Y+20));</div><div class="line"></div><div class="line"> driver->endScene();</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> device->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --><p> That's all. I hope it was not too difficult. </p> +</div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/07.Collision/Collision.cbp b/examples/07.Collision/Collision.cbp new file mode 100644 index 0000000..1d73587 --- /dev/null +++ b/examples/07.Collision/Collision.cbp @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 07 Collision" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/Collision" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/Collision" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/07.Collision/Collision.dev b/examples/07.Collision/Collision.dev new file mode 100644 index 0000000..c13a041 --- /dev/null +++ b/examples/07.Collision/Collision.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 07 Collision
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=07.Collision.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/07.Collision/Collision.vcproj b/examples/07.Collision/Collision.vcproj new file mode 100644 index 0000000..a4e4b07 --- /dev/null +++ b/examples/07.Collision/Collision.vcproj @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="07.Collision"
+ ProjectGUID="{EB92287F-CBA1-4FF9-801E-89091F0B6D10}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/Collision.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\07.Collision.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/Collision.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Collision.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/Collision.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\07.Collision.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Collision.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Collision.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/07.Collision/Collision_vc10.vcxproj b/examples/07.Collision/Collision_vc10.vcxproj new file mode 100644 index 0000000..72fcae0 --- /dev/null +++ b/examples/07.Collision/Collision_vc10.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>07.Collision</ProjectName>
+ <ProjectGuid>{3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}</ProjectGuid>
+ <RootNamespace>Collision</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Collision.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\07.Collision.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Collision.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\07.Collision.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Collision.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\07.Collision.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Collision.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\07.Collision.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/07.Collision/Collision_vc11.vcxproj b/examples/07.Collision/Collision_vc11.vcxproj new file mode 100644 index 0000000..72fcae0 --- /dev/null +++ b/examples/07.Collision/Collision_vc11.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>07.Collision</ProjectName>
+ <ProjectGuid>{3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}</ProjectGuid>
+ <RootNamespace>Collision</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Collision.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\07.Collision.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Collision.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\07.Collision.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Collision.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\07.Collision.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Collision.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\07.Collision.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/07.Collision/Collision_vc12.vcxproj b/examples/07.Collision/Collision_vc12.vcxproj new file mode 100644 index 0000000..6434626 --- /dev/null +++ b/examples/07.Collision/Collision_vc12.vcxproj @@ -0,0 +1,235 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>07.Collision</ProjectName>
+ <ProjectGuid>{3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}</ProjectGuid>
+ <RootNamespace>Collision</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Collision.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\07.Collision.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Collision.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\07.Collision.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Collision.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\07.Collision.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Collision.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\07.Collision.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/07.Collision/Collision_vc8.vcproj b/examples/07.Collision/Collision_vc8.vcproj new file mode 100644 index 0000000..4a2b6c1 --- /dev/null +++ b/examples/07.Collision/Collision_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="07.Collision_vc8"
+ ProjectGUID="{3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}"
+ RootNamespace="Collision_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Collision.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/Collision.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\07.Collision.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/Collision.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Collision.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/Collision.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\07.Collision.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Collision.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/07.Collision/Collision_vc9.vcproj b/examples/07.Collision/Collision_vc9.vcproj new file mode 100644 index 0000000..3cca93d --- /dev/null +++ b/examples/07.Collision/Collision_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="07.Collision_vc9"
+ ProjectGUID="{3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}"
+ RootNamespace="Collision_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Collision.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/Collision.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\07.Collision.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/Collision.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Collision.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/Collision.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\07.Collision.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Collision.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/07.Collision/Makefile b/examples/07.Collision/Makefile new file mode 100644 index 0000000..6698725 --- /dev/null +++ b/examples/07.Collision/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 07.Collision
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/07.Collision/main.cpp b/examples/07.Collision/main.cpp new file mode 100644 index 0000000..8387c49 --- /dev/null +++ b/examples/07.Collision/main.cpp @@ -0,0 +1,330 @@ +/** Example 007 Collision
+
+We will describe 2 methods: Automatic collision detection for moving through
+3d worlds with stair climbing and sliding, and manual scene node and triangle
+picking using a ray. In this case, we will use a ray coming out from the
+camera, but you can use any ray.
+
+To start, we take the program from tutorial 2, which loads and displays a
+quake 3 level. We will use the level to walk in it and to pick triangles from.
+In addition we'll place 3 animated models into it for triangle picking. The
+following code starts up the engine and loads the level, as per tutorial 2.
+*/
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+enum
+{
+ // I use this ISceneNode ID to indicate a scene node that is
+ // not pickable by getSceneNodeAndCollisionPointFromRay()
+ ID_IsNotPickable = 0,
+
+ // I use this flag in ISceneNode IDs to indicate that the
+ // scene node can be picked by ray selection.
+ IDFlag_IsPickable = 1 << 0,
+
+ // I use this flag in ISceneNode IDs to indicate that the
+ // scene node can be highlighted. In this example, the
+ // homonids can be highlighted, but the level mesh can't.
+ IDFlag_IsHighlightable = 1 << 1
+};
+
+int main()
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ // create device
+
+ IrrlichtDevice *device =
+ createDevice(driverType, core::dimension2d<u32>(640, 480), 16, false);
+
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* smgr = device->getSceneManager();
+
+ device->getFileSystem()->addFileArchive("../../media/map-20kdm2.pk3");
+
+ scene::IAnimatedMesh* q3levelmesh = smgr->getMesh("20kdm2.bsp");
+ scene::IMeshSceneNode* q3node = 0;
+
+ // The Quake mesh is pickable, but doesn't get highlighted.
+ if (q3levelmesh)
+ q3node = smgr->addOctreeSceneNode(q3levelmesh->getMesh(0), 0, IDFlag_IsPickable);
+
+ /*
+ So far so good, we've loaded the quake 3 level like in tutorial 2. Now,
+ here comes something different: We create a triangle selector. A
+ triangle selector is a class which can fetch the triangles from scene
+ nodes for doing different things with them, for example collision
+ detection. There are different triangle selectors, and all can be
+ created with the ISceneManager. In this example, we create an
+ OctreeTriangleSelector, which optimizes the triangle output a little
+ bit by reducing it like an octree. This is very useful for huge meshes
+ like quake 3 levels. After we created the triangle selector, we attach
+ it to the q3node. This is not necessary, but in this way, we do not
+ need to care for the selector, for example dropping it after we do not
+ need it anymore.
+ */
+
+ scene::ITriangleSelector* selector = 0;
+
+ if (q3node)
+ {
+ q3node->setPosition(core::vector3df(-1350,-130,-1400));
+
+ selector = smgr->createOctreeTriangleSelector(
+ q3node->getMesh(), q3node, 128);
+ q3node->setTriangleSelector(selector);
+ // We're not done with this selector yet, so don't drop it.
+ }
+
+
+ /*
+ We add a first person shooter camera to the scene so that we can see and
+ move in the quake 3 level like in tutorial 2. But this, time, we add a
+ special animator to the camera: A Collision Response animator. This
+ animator modifies the scene node to which it is attached to in order to
+ prevent it moving through walls, and to add gravity to it. The
+ only thing we have to tell the animator is how the world looks like,
+ how big the scene node is, how much gravity to apply and so on. After the
+ collision response animator is attached to the camera, we do not have to do
+ anything more for collision detection, anything is done automatically.
+ The rest of the collision detection code below is for picking. And please
+ note another cool feature: The collision response animator can be
+ attached also to all other scene nodes, not only to cameras. And it can
+ be mixed with other scene node animators. In this way, collision
+ detection and response in the Irrlicht engine is really easy.
+
+ Now we'll take a closer look on the parameters of
+ createCollisionResponseAnimator(). The first parameter is the
+ TriangleSelector, which specifies how the world, against collision
+ detection is done looks like. The second parameter is the scene node,
+ which is the object, which is affected by collision detection, in our
+ case it is the camera. The third defines how big the object is, it is
+ the radius of an ellipsoid. Try it out and change the radius to smaller
+ values, the camera will be able to move closer to walls after this. The
+ next parameter is the direction and speed of gravity. We'll set it to
+ (0, -10, 0), which approximates to realistic gravity, assuming that our
+ units are metres. You could set it to (0,0,0) to disable gravity. And the
+ last value is just a translation: Without this, the ellipsoid with which
+ collision detection is done would be around the camera, and the camera would
+ be in the middle of the ellipsoid. But as human beings, we are used to have our
+ eyes on top of the body, with which we collide with our world, not in
+ the middle of it. So we place the scene node 50 units over the center
+ of the ellipsoid with this parameter. And that's it, collision
+ detection works now.
+ */
+
+ // Set a jump speed of 3 units per second, which gives a fairly realistic jump
+ // when used with the gravity of (0, -10, 0) in the collision response animator.
+ scene::ICameraSceneNode* camera =
+ smgr->addCameraSceneNodeFPS(0, 100.0f, .3f, ID_IsNotPickable, 0, 0, true, 3.f);
+ camera->setPosition(core::vector3df(50,50,-60));
+ camera->setTarget(core::vector3df(-70,30,-60));
+
+ if (selector)
+ {
+ scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
+ selector, camera, core::vector3df(30,50,30),
+ core::vector3df(0,-10,0), core::vector3df(0,30,0));
+ selector->drop(); // As soon as we're done with the selector, drop it.
+ camera->addAnimator(anim);
+ anim->drop(); // And likewise, drop the animator when we're done referring to it.
+ }
+
+ // Now I create three animated characters which we can pick, a dynamic light for
+ // lighting them, and a billboard for drawing where we found an intersection.
+
+ // First, let's get rid of the mouse cursor. We'll use a billboard to show
+ // what we're looking at.
+ device->getCursorControl()->setVisible(false);
+
+ // Add the billboard.
+ scene::IBillboardSceneNode * bill = smgr->addBillboardSceneNode();
+ bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );
+ bill->setMaterialTexture(0, driver->getTexture("../../media/particle.bmp"));
+ bill->setMaterialFlag(video::EMF_LIGHTING, false);
+ bill->setMaterialFlag(video::EMF_ZBUFFER, false);
+ bill->setSize(core::dimension2d<f32>(20.0f, 20.0f));
+ bill->setID(ID_IsNotPickable); // This ensures that we don't accidentally ray-pick it
+
+ /* Add 3 animated hominids, which we can pick using a ray-triangle intersection.
+ They all animate quite slowly, to make it easier to see that accurate triangle
+ selection is being performed. */
+ scene::IAnimatedMeshSceneNode* node = 0;
+
+ video::SMaterial material;
+
+ // Add an MD2 node, which uses vertex-based animation.
+ node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/faerie.md2"),
+ 0, IDFlag_IsPickable | IDFlag_IsHighlightable);
+ node->setPosition(core::vector3df(-90,-15,-140)); // Put its feet on the floor.
+ node->setScale(core::vector3df(1.6f)); // Make it appear realistically scaled
+ node->setMD2Animation(scene::EMAT_POINT);
+ node->setAnimationSpeed(20.f);
+ material.setTexture(0, driver->getTexture("../../media/faerie2.bmp"));
+ material.Lighting = true;
+ material.NormalizeNormals = true;
+ node->getMaterial(0) = material;
+
+ // Now create a triangle selector for it. The selector will know that it
+ // is associated with an animated node, and will update itself as necessary.
+ selector = smgr->createTriangleSelector(node);
+ node->setTriangleSelector(selector);
+ selector->drop(); // We're done with this selector, so drop it now.
+
+ // And this B3D file uses skinned skeletal animation.
+ node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/ninja.b3d"),
+ 0, IDFlag_IsPickable | IDFlag_IsHighlightable);
+ node->setScale(core::vector3df(10));
+ node->setPosition(core::vector3df(-75,-66,-80));
+ node->setRotation(core::vector3df(0,90,0));
+ node->setAnimationSpeed(8.f);
+ node->getMaterial(0).NormalizeNormals = true;
+ node->getMaterial(0).Lighting = true;
+ // Just do the same as we did above.
+ selector = smgr->createTriangleSelector(node);
+ node->setTriangleSelector(selector);
+ selector->drop();
+
+ // This X files uses skeletal animation, but without skinning.
+ node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/dwarf.x"),
+ 0, IDFlag_IsPickable | IDFlag_IsHighlightable);
+ node->setPosition(core::vector3df(-70,-66,-30)); // Put its feet on the floor.
+ node->setRotation(core::vector3df(0,-90,0)); // And turn it towards the camera.
+ node->setAnimationSpeed(20.f);
+ node->getMaterial(0).Lighting = true;
+ selector = smgr->createTriangleSelector(node);
+ node->setTriangleSelector(selector);
+ selector->drop();
+
+
+ // And this mdl file uses skinned skeletal animation.
+ node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/yodan.mdl"),
+ 0, IDFlag_IsPickable | IDFlag_IsHighlightable);
+ node->setPosition(core::vector3df(-90,-25,20));
+ node->setScale(core::vector3df(0.8f));
+ node->getMaterial(0).Lighting = true;
+ node->setAnimationSpeed(20.f);
+
+ // Just do the same as we did above.
+ selector = smgr->createTriangleSelector(node);
+ node->setTriangleSelector(selector);
+ selector->drop();
+
+ material.setTexture(0, 0);
+ material.Lighting = false;
+
+ // Add a light, so that the unselected nodes aren't completely dark.
+ scene::ILightSceneNode * light = smgr->addLightSceneNode(0, core::vector3df(-60,100,400),
+ video::SColorf(1.0f,1.0f,1.0f,1.0f), 600.0f);
+ light->setID(ID_IsNotPickable); // Make it an invalid target for selection.
+
+ // Remember which scene node is highlighted
+ scene::ISceneNode* highlightedSceneNode = 0;
+ scene::ISceneCollisionManager* collMan = smgr->getSceneCollisionManager();
+ int lastFPS = -1;
+
+ // draw the selection triangle only as wireframe
+ material.Wireframe=true;
+
+ while(device->run())
+ if (device->isWindowActive())
+ {
+ driver->beginScene(true, true, 0);
+ smgr->drawAll();
+
+ // Unlight any currently highlighted scene node
+ if (highlightedSceneNode)
+ {
+ highlightedSceneNode->setMaterialFlag(video::EMF_LIGHTING, true);
+ highlightedSceneNode = 0;
+ }
+
+ // All intersections in this example are done with a ray cast out from the camera to
+ // a distance of 1000. You can easily modify this to check (e.g.) a bullet
+ // trajectory or a sword's position, or create a ray from a mouse click position using
+ // ISceneCollisionManager::getRayFromScreenCoordinates()
+ core::line3d<f32> ray;
+ ray.start = camera->getPosition();
+ ray.end = ray.start + (camera->getTarget() - ray.start).normalize() * 1000.0f;
+
+ // Tracks the current intersection point with the level or a mesh
+ core::vector3df intersection;
+ // Used to show with triangle has been hit
+ core::triangle3df hitTriangle;
+
+ // This call is all you need to perform ray/triangle collision on every scene node
+ // that has a triangle selector, including the Quake level mesh. It finds the nearest
+ // collision point/triangle, and returns the scene node containing that point.
+ // Irrlicht provides other types of selection, including ray/triangle selector,
+ // ray/box and ellipse/triangle selector, plus associated helpers.
+ // See the methods of ISceneCollisionManager
+ scene::ISceneNode * selectedSceneNode =
+ collMan->getSceneNodeAndCollisionPointFromRay(
+ ray,
+ intersection, // This will be the position of the collision
+ hitTriangle, // This will be the triangle hit in the collision
+ IDFlag_IsPickable, // This ensures that only nodes that we have
+ // set up to be pickable are considered
+ 0); // Check the entire scene (this is actually the implicit default)
+
+ // If the ray hit anything, move the billboard to the collision position
+ // and draw the triangle that was hit.
+ if(selectedSceneNode)
+ {
+ bill->setPosition(intersection);
+
+ // We need to reset the transform before doing our own rendering.
+ driver->setTransform(video::ETS_WORLD, core::matrix4());
+ driver->setMaterial(material);
+ driver->draw3DTriangle(hitTriangle, video::SColor(0,255,0,0));
+
+ // We can check the flags for the scene node that was hit to see if it should be
+ // highlighted. The animated nodes can be highlighted, but not the Quake level mesh
+ if((selectedSceneNode->getID() & IDFlag_IsHighlightable) == IDFlag_IsHighlightable)
+ {
+ highlightedSceneNode = selectedSceneNode;
+
+ // Highlighting in this case means turning lighting OFF for this node,
+ // which means that it will be drawn with full brightness.
+ highlightedSceneNode->setMaterialFlag(video::EMF_LIGHTING, false);
+ }
+ }
+
+ // We're all done drawing, so end the scene.
+ driver->endScene();
+
+ int fps = driver->getFPS();
+
+ if (lastFPS != fps)
+ {
+ core::stringw str = L"Collision detection example - Irrlicht Engine [";
+ str += driver->getName();
+ str += "] FPS:";
+ str += fps;
+
+ device->setWindowCaption(str.c_str());
+ lastFPS = fps;
+ }
+ }
+
+ device->drop();
+
+ return 0;
+}
+
+/*
+**/
+
diff --git a/examples/07.Collision/tutorial.html b/examples/07.Collision/tutorial.html new file mode 100644 index 0000000..5a9a3bd --- /dev/null +++ b/examples/07.Collision/tutorial.html @@ -0,0 +1,207 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 7: Collision</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 7: Collision </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/007shot.jpg" alt="007shot.jpg"/> +</div> + <p>We will describe 2 methods: Automatic collision detection for moving through 3d worlds with stair climbing and sliding, and manual scene node and triangle picking using a ray. In this case, we will use a ray coming out from the camera, but you can use any ray.</p> +<p>To start, we take the program from tutorial 2, which loads and displays a quake 3 level. We will use the level to walk in it and to pick triangles from. In addition we'll place 3 animated models into it for triangle picking. The following code starts up the engine and loads the level, as per tutorial 2. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"><span class="keyword">enum</span></div><div class="line">{</div><div class="line"> <span class="comment">// I use this ISceneNode ID to indicate a scene node that is</span></div><div class="line"> <span class="comment">// not pickable by getSceneNodeAndCollisionPointFromRay()</span></div><div class="line"> ID_IsNotPickable = 0,</div><div class="line"></div><div class="line"> <span class="comment">// I use this flag in ISceneNode IDs to indicate that the</span></div><div class="line"> <span class="comment">// scene node can be picked by ray selection.</span></div><div class="line"> IDFlag_IsPickable = 1 << 0,</div><div class="line"></div><div class="line"> <span class="comment">// I use this flag in ISceneNode IDs to indicate that the</span></div><div class="line"> <span class="comment">// scene node can be highlighted. In this example, the</span></div><div class="line"> <span class="comment">// homonids can be highlighted, but the level mesh can't.</span></div><div class="line"> IDFlag_IsHighlightable = 1 << 1</div><div class="line">};</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> <span class="comment">// create device</span></div><div class="line"></div><div class="line"> IrrlichtDevice *device =</div><div class="line"> createDevice(driverType, core::dimension2d<u32>(640, 480), 16, <span class="keyword">false</span>);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div><div class="line"></div><div class="line"> video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line"> scene::ISceneManager* smgr = device->getSceneManager();</div><div class="line"></div><div class="line"> device->getFileSystem()->addFileArchive(<span class="stringliteral">"../../media/map-20kdm2.pk3"</span>);</div><div class="line"></div><div class="line"> scene::IAnimatedMesh* q3levelmesh = smgr->getMesh(<span class="stringliteral">"20kdm2.bsp"</span>);</div><div class="line"> scene::IMeshSceneNode* q3node = 0;</div><div class="line"></div><div class="line"> <span class="comment">// The Quake mesh is pickable, but doesn't get highlighted.</span></div><div class="line"> <span class="keywordflow">if</span> (q3levelmesh)</div><div class="line"> q3node = smgr->addOctreeSceneNode(q3levelmesh->getMesh(0), 0, IDFlag_IsPickable);</div></div><!-- fragment --><p> So far so good, we've loaded the quake 3 level like in tutorial 2. Now, here comes something different: We create a triangle selector. A triangle selector is a class which can fetch the triangles from scene nodes for doing different things with them, for example collision detection. There are different triangle selectors, and all can be created with the ISceneManager. In this example, we create an OctreeTriangleSelector, which optimizes the triangle output a little bit by reducing it like an octree. This is very useful for huge meshes like quake 3 levels. After we created the triangle selector, we attach it to the q3node. This is not necessary, but in this way, we do not need to care for the selector, for example dropping it after we do not need it anymore. </p><div class="fragment"><div class="line">scene::ITriangleSelector* selector = 0;</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (q3node)</div><div class="line">{</div><div class="line"> q3node->setPosition(core::vector3df(-1350,-130,-1400));</div><div class="line"></div><div class="line"> selector = smgr->createOctreeTriangleSelector(</div><div class="line"> q3node->getMesh(), q3node, 128);</div><div class="line"> q3node->setTriangleSelector(selector);</div><div class="line"> <span class="comment">// We're not done with this selector yet, so don't drop it.</span></div><div class="line">}</div></div><!-- fragment --><p> We add a first person shooter camera to the scene so that we can see and move in the quake 3 level like in tutorial 2. But this, time, we add a special animator to the camera: A Collision Response animator. This animator modifies the scene node to which it is attached to in order to prevent it moving through walls, and to add gravity to it. The only thing we have to tell the animator is how the world looks like, how big the scene node is, how much gravity to apply and so on. After the collision response animator is attached to the camera, we do not have to do anything more for collision detection, anything is done automatically. The rest of the collision detection code below is for picking. And please note another cool feature: The collision response animator can be attached also to all other scene nodes, not only to cameras. And it can be mixed with other scene node animators. In this way, collision detection and response in the Irrlicht engine is really easy.</p> +<p>Now we'll take a closer look on the parameters of createCollisionResponseAnimator(). The first parameter is the TriangleSelector, which specifies how the world, against collision detection is done looks like. The second parameter is the scene node, which is the object, which is affected by collision detection, in our case it is the camera. The third defines how big the object is, it is the radius of an ellipsoid. Try it out and change the radius to smaller values, the camera will be able to move closer to walls after this. The next parameter is the direction and speed of gravity. We'll set it to (0, -10, 0), which approximates to realistic gravity, assuming that our units are metres. You could set it to (0,0,0) to disable gravity. And the last value is just a translation: Without this, the ellipsoid with which collision detection is done would be around the camera, and the camera would be in the middle of the ellipsoid. But as human beings, we are used to have our eyes on top of the body, with which we collide with our world, not in the middle of it. So we place the scene node 50 units over the center of the ellipsoid with this parameter. And that's it, collision detection works now. </p><div class="fragment"><div class="line"><span class="comment">// Set a jump speed of 3 units per second, which gives a fairly realistic jump</span></div><div class="line"><span class="comment">// when used with the gravity of (0, -10, 0) in the collision response animator.</span></div><div class="line">scene::ICameraSceneNode* camera =</div><div class="line"> smgr->addCameraSceneNodeFPS(0, 100.0f, .3f, ID_IsNotPickable, 0, 0, <span class="keyword">true</span>, 3.f);</div><div class="line">camera->setPosition(core::vector3df(50,50,-60));</div><div class="line">camera->setTarget(core::vector3df(-70,30,-60));</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (selector)</div><div class="line">{</div><div class="line"> scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(</div><div class="line"> selector, camera, core::vector3df(30,50,30),</div><div class="line"> core::vector3df(0,-10,0), core::vector3df(0,30,0));</div><div class="line"> selector->drop(); <span class="comment">// As soon as we're done with the selector, drop it.</span></div><div class="line"> camera->addAnimator(anim);</div><div class="line"> anim->drop(); <span class="comment">// And likewise, drop the animator when we're done referring to it.</span></div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// Now I create three animated characters which we can pick, a dynamic light for</span></div><div class="line"><span class="comment">// lighting them, and a billboard for drawing where we found an intersection.</span></div><div class="line"></div><div class="line"><span class="comment">// First, let's get rid of the mouse cursor. We'll use a billboard to show</span></div><div class="line"><span class="comment">// what we're looking at.</span></div><div class="line">device->getCursorControl()->setVisible(<span class="keyword">false</span>);</div><div class="line"></div><div class="line"><span class="comment">// Add the billboard.</span></div><div class="line">scene::IBillboardSceneNode * bill = smgr->addBillboardSceneNode();</div><div class="line">bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );</div><div class="line">bill->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/particle.bmp"</span>));</div><div class="line">bill->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line">bill->setMaterialFlag(video::EMF_ZBUFFER, <span class="keyword">false</span>);</div><div class="line">bill->setSize(core::dimension2d<f32>(20.0f, 20.0f));</div><div class="line">bill->setID(ID_IsNotPickable); <span class="comment">// This ensures that we don't accidentally ray-pick it</span></div></div><!-- fragment --><p> Add 3 animated hominids, which we can pick using a ray-triangle intersection. They all animate quite slowly, to make it easier to see that accurate triangle selection is being performed.</p><div class="fragment"><div class="line"> scene::IAnimatedMeshSceneNode* node = 0;</div><div class="line"></div><div class="line"> video::SMaterial material;</div><div class="line"></div><div class="line"> <span class="comment">// Add an MD2 node, which uses vertex-based animation.</span></div><div class="line"> node = smgr->addAnimatedMeshSceneNode(smgr->getMesh(<span class="stringliteral">"../../media/faerie.md2"</span>),</div><div class="line"> 0, IDFlag_IsPickable | IDFlag_IsHighlightable);</div><div class="line"> node->setPosition(core::vector3df(-90,-15,-140)); <span class="comment">// Put its feet on the floor.</span></div><div class="line"> node->setScale(core::vector3df(1.6f)); <span class="comment">// Make it appear realistically scaled</span></div><div class="line"> node->setMD2Animation(scene::EMAT_POINT);</div><div class="line"> node->setAnimationSpeed(20.f);</div><div class="line"> material.setTexture(0, driver->getTexture(<span class="stringliteral">"../../media/faerie2.bmp"</span>));</div><div class="line"> material.Lighting = <span class="keyword">true</span>;</div><div class="line"> material.NormalizeNormals = <span class="keyword">true</span>;</div><div class="line"> node->getMaterial(0) = material;</div><div class="line"></div><div class="line"> <span class="comment">// Now create a triangle selector for it. The selector will know that it</span></div><div class="line"> <span class="comment">// is associated with an animated node, and will update itself as necessary.</span></div><div class="line"> selector = smgr->createTriangleSelector(node);</div><div class="line"> node->setTriangleSelector(selector);</div><div class="line"> selector->drop(); <span class="comment">// We're done with this selector, so drop it now.</span></div><div class="line"></div><div class="line"> <span class="comment">// And this B3D file uses skinned skeletal animation.</span></div><div class="line"> node = smgr->addAnimatedMeshSceneNode(smgr->getMesh(<span class="stringliteral">"../../media/ninja.b3d"</span>),</div><div class="line"> 0, IDFlag_IsPickable | IDFlag_IsHighlightable);</div><div class="line"> node->setScale(core::vector3df(10));</div><div class="line"> node->setPosition(core::vector3df(-75,-66,-80));</div><div class="line"> node->setRotation(core::vector3df(0,90,0));</div><div class="line"> node->setAnimationSpeed(8.f);</div><div class="line"> node->getMaterial(0).NormalizeNormals = <span class="keyword">true</span>;</div><div class="line"> node->getMaterial(0).Lighting = <span class="keyword">true</span>;</div><div class="line"> <span class="comment">// Just do the same as we did above.</span></div><div class="line"> selector = smgr->createTriangleSelector(node);</div><div class="line"> node->setTriangleSelector(selector);</div><div class="line"> selector->drop();</div><div class="line"></div><div class="line"> <span class="comment">// This X files uses skeletal animation, but without skinning.</span></div><div class="line"> node = smgr->addAnimatedMeshSceneNode(smgr->getMesh(<span class="stringliteral">"../../media/dwarf.x"</span>),</div><div class="line"> 0, IDFlag_IsPickable | IDFlag_IsHighlightable);</div><div class="line"> node->setPosition(core::vector3df(-70,-66,-30)); <span class="comment">// Put its feet on the floor.</span></div><div class="line"> node->setRotation(core::vector3df(0,-90,0)); <span class="comment">// And turn it towards the camera.</span></div><div class="line"> node->setAnimationSpeed(20.f);</div><div class="line"> node->getMaterial(0).Lighting = <span class="keyword">true</span>;</div><div class="line"> selector = smgr->createTriangleSelector(node);</div><div class="line"> node->setTriangleSelector(selector);</div><div class="line"> selector->drop();</div><div class="line"></div><div class="line"></div><div class="line"> <span class="comment">// And this mdl file uses skinned skeletal animation.</span></div><div class="line"> node = smgr->addAnimatedMeshSceneNode(smgr->getMesh(<span class="stringliteral">"../../media/yodan.mdl"</span>),</div><div class="line"> 0, IDFlag_IsPickable | IDFlag_IsHighlightable);</div><div class="line"> node->setPosition(core::vector3df(-90,-25,20));</div><div class="line"> node->setScale(core::vector3df(0.8f));</div><div class="line"> node->getMaterial(0).Lighting = <span class="keyword">true</span>;</div><div class="line"> node->setAnimationSpeed(20.f);</div><div class="line"></div><div class="line"> <span class="comment">// Just do the same as we did above.</span></div><div class="line"> selector = smgr->createTriangleSelector(node);</div><div class="line"> node->setTriangleSelector(selector);</div><div class="line"> selector->drop();</div><div class="line"></div><div class="line"> material.setTexture(0, 0);</div><div class="line"> material.Lighting = <span class="keyword">false</span>;</div><div class="line"></div><div class="line"> <span class="comment">// Add a light, so that the unselected nodes aren't completely dark.</span></div><div class="line"> scene::ILightSceneNode * light = smgr->addLightSceneNode(0, core::vector3df(-60,100,400),</div><div class="line"> video::SColorf(1.0f,1.0f,1.0f,1.0f), 600.0f);</div><div class="line"> light->setID(ID_IsNotPickable); <span class="comment">// Make it an invalid target for selection.</span></div><div class="line"></div><div class="line"> <span class="comment">// Remember which scene node is highlighted</span></div><div class="line"> scene::ISceneNode* highlightedSceneNode = 0;</div><div class="line"> scene::ISceneCollisionManager* collMan = smgr->getSceneCollisionManager();</div><div class="line"> <span class="keywordtype">int</span> lastFPS = -1;</div><div class="line"></div><div class="line"> <span class="comment">// draw the selection triangle only as wireframe</span></div><div class="line"> material.Wireframe=<span class="keyword">true</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">while</span>(device->run())</div><div class="line"> <span class="keywordflow">if</span> (device->isWindowActive())</div><div class="line"> {</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, 0);</div><div class="line"> smgr->drawAll();</div><div class="line"></div><div class="line"> <span class="comment">// Unlight any currently highlighted scene node</span></div><div class="line"> <span class="keywordflow">if</span> (highlightedSceneNode)</div><div class="line"> {</div><div class="line"> highlightedSceneNode->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">true</span>);</div><div class="line"> highlightedSceneNode = 0;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// All intersections in this example are done with a ray cast out from the camera to</span></div><div class="line"> <span class="comment">// a distance of 1000. You can easily modify this to check (e.g.) a bullet</span></div><div class="line"> <span class="comment">// trajectory or a sword's position, or create a ray from a mouse click position using</span></div><div class="line"> <span class="comment">// ISceneCollisionManager::getRayFromScreenCoordinates()</span></div><div class="line"> core::line3d<f32> ray;</div><div class="line"> ray.start = camera->getPosition();</div><div class="line"> ray.end = ray.start + (camera->getTarget() - ray.start).normalize() * 1000.0f;</div><div class="line"></div><div class="line"> <span class="comment">// Tracks the current intersection point with the level or a mesh</span></div><div class="line"> core::vector3df intersection;</div><div class="line"> <span class="comment">// Used to show with triangle has been hit</span></div><div class="line"> core::triangle3df hitTriangle;</div><div class="line"></div><div class="line"> <span class="comment">// This call is all you need to perform ray/triangle collision on every scene node</span></div><div class="line"> <span class="comment">// that has a triangle selector, including the Quake level mesh. It finds the nearest</span></div><div class="line"> <span class="comment">// collision point/triangle, and returns the scene node containing that point.</span></div><div class="line"> <span class="comment">// Irrlicht provides other types of selection, including ray/triangle selector,</span></div><div class="line"> <span class="comment">// ray/box and ellipse/triangle selector, plus associated helpers.</span></div><div class="line"> <span class="comment">// See the methods of ISceneCollisionManager</span></div><div class="line"> scene::ISceneNode * selectedSceneNode =</div><div class="line"> collMan->getSceneNodeAndCollisionPointFromRay(</div><div class="line"> ray,</div><div class="line"> intersection, <span class="comment">// This will be the position of the collision</span></div><div class="line"> hitTriangle, <span class="comment">// This will be the triangle hit in the collision</span></div><div class="line"> IDFlag_IsPickable, <span class="comment">// This ensures that only nodes that we have</span></div><div class="line"> <span class="comment">// set up to be pickable are considered</span></div><div class="line"> 0); <span class="comment">// Check the entire scene (this is actually the implicit default)</span></div><div class="line"></div><div class="line"> <span class="comment">// If the ray hit anything, move the billboard to the collision position</span></div><div class="line"> <span class="comment">// and draw the triangle that was hit.</span></div><div class="line"> <span class="keywordflow">if</span>(selectedSceneNode)</div><div class="line"> {</div><div class="line"> bill->setPosition(intersection);</div><div class="line"></div><div class="line"> <span class="comment">// We need to reset the transform before doing our own rendering.</span></div><div class="line"> driver->setTransform(video::ETS_WORLD, core::matrix4());</div><div class="line"> driver->setMaterial(material);</div><div class="line"> driver->draw3DTriangle(hitTriangle, video::SColor(0,255,0,0));</div><div class="line"></div><div class="line"> <span class="comment">// We can check the flags for the scene node that was hit to see if it should be</span></div><div class="line"> <span class="comment">// highlighted. The animated nodes can be highlighted, but not the Quake level mesh</span></div><div class="line"> <span class="keywordflow">if</span>((selectedSceneNode->getID() & IDFlag_IsHighlightable) == IDFlag_IsHighlightable)</div><div class="line"> {</div><div class="line"> highlightedSceneNode = selectedSceneNode;</div><div class="line"></div><div class="line"> <span class="comment">// Highlighting in this case means turning lighting OFF for this node,</span></div><div class="line"> <span class="comment">// which means that it will be drawn with full brightness.</span></div><div class="line"> highlightedSceneNode->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// We're all done drawing, so end the scene.</span></div><div class="line"> driver->endScene();</div><div class="line"></div><div class="line"> <span class="keywordtype">int</span> fps = driver->getFPS();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (lastFPS != fps)</div><div class="line"> {</div><div class="line"> core::stringw str = L<span class="stringliteral">"Collision detection example - Irrlicht Engine ["</span>;</div><div class="line"> str += driver->getName();</div><div class="line"> str += <span class="stringliteral">"] FPS:"</span>;</div><div class="line"> str += fps;</div><div class="line"></div><div class="line"> device->setWindowCaption(str.c_str());</div><div class="line"> lastFPS = fps;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> device->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/08.SpecialFX/Makefile b/examples/08.SpecialFX/Makefile new file mode 100644 index 0000000..05b68ec --- /dev/null +++ b/examples/08.SpecialFX/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 08.SpecialFX
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/08.SpecialFX/SpecialFX.cbp b/examples/08.SpecialFX/SpecialFX.cbp new file mode 100644 index 0000000..c23c621 --- /dev/null +++ b/examples/08.SpecialFX/SpecialFX.cbp @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 08 Special Effects" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/SpecialFX" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/SpeciaFX" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/08.SpecialFX/SpecialFX.dev b/examples/08.SpecialFX/SpecialFX.dev new file mode 100644 index 0000000..b2c2f26 --- /dev/null +++ b/examples/08.SpecialFX/SpecialFX.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 08 Special Effects
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=08.SpecialFX.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/08.SpecialFX/SpecialFX.vcproj b/examples/08.SpecialFX/SpecialFX.vcproj new file mode 100644 index 0000000..e22266e --- /dev/null +++ b/examples/08.SpecialFX/SpecialFX.vcproj @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="08.SpecialFx"
+ ProjectGUID="{8553D1C8-6AE6-423E-A2D5-1016804AE67C}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/SpecialFX.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\08.SpecialFx.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/SpecialFx.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/SpecialFX.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/SpecialFX.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\08.SpecialFx.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/SpecialFx.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/SpecialFX.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/08.SpecialFX/SpecialFX_vc10.vcxproj b/examples/08.SpecialFX/SpecialFX_vc10.vcxproj new file mode 100644 index 0000000..fd669a1 --- /dev/null +++ b/examples/08.SpecialFX/SpecialFX_vc10.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>08.SpecialFX</ProjectName>
+ <ProjectGuid>{C869BF55-B9D6-4980-BC92-60FA0CF8411A}</ProjectGuid>
+ <RootNamespace>SpecialFX</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/SpecialFX.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\08.SpecialFx.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/SpecialFX.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\08.SpecialFx.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/SpecialFX.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\08.SpecialFx.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/SpecialFX.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\08.SpecialFx.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/08.SpecialFX/SpecialFX_vc11.vcxproj b/examples/08.SpecialFX/SpecialFX_vc11.vcxproj new file mode 100644 index 0000000..fd669a1 --- /dev/null +++ b/examples/08.SpecialFX/SpecialFX_vc11.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>08.SpecialFX</ProjectName>
+ <ProjectGuid>{C869BF55-B9D6-4980-BC92-60FA0CF8411A}</ProjectGuid>
+ <RootNamespace>SpecialFX</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/SpecialFX.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\08.SpecialFx.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/SpecialFX.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\08.SpecialFx.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/SpecialFX.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\08.SpecialFx.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/SpecialFX.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\08.SpecialFx.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/08.SpecialFX/SpecialFX_vc12.vcxproj b/examples/08.SpecialFX/SpecialFX_vc12.vcxproj new file mode 100644 index 0000000..45f6064 --- /dev/null +++ b/examples/08.SpecialFX/SpecialFX_vc12.vcxproj @@ -0,0 +1,235 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>08.SpecialFX</ProjectName>
+ <ProjectGuid>{C869BF55-B9D6-4980-BC92-60FA0CF8411A}</ProjectGuid>
+ <RootNamespace>SpecialFX</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/SpecialFX.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\08.SpecialFx.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/SpecialFX.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\08.SpecialFx.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/SpecialFX.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\08.SpecialFx.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/SpecialFX.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\08.SpecialFx.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/08.SpecialFX/SpecialFX_vc8.vcproj b/examples/08.SpecialFX/SpecialFX_vc8.vcproj new file mode 100644 index 0000000..21dd96f --- /dev/null +++ b/examples/08.SpecialFX/SpecialFX_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="08.SpecialFX_vc8"
+ ProjectGUID="{C869BF55-B9D6-4980-BC92-60FA0CF8411A}"
+ RootNamespace="SpecialFX_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/SpecialFX.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/SpecialFX.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\08.SpecialFx.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/SpecialFx.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/SpecialFX.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/SpecialFX.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\08.SpecialFx.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/SpecialFx.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/08.SpecialFX/SpecialFX_vc9.vcproj b/examples/08.SpecialFX/SpecialFX_vc9.vcproj new file mode 100644 index 0000000..29763e5 --- /dev/null +++ b/examples/08.SpecialFX/SpecialFX_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="08.SpecialFX_vc9"
+ ProjectGUID="{C869BF55-B9D6-4980-BC92-60FA0CF8411A}"
+ RootNamespace="SpecialFX_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/SpecialFX.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/SpecialFX.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\08.SpecialFx.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/SpecialFx.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/SpecialFX.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/SpecialFX.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\08.SpecialFx.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/SpecialFx.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/08.SpecialFX/main.cpp b/examples/08.SpecialFX/main.cpp new file mode 100644 index 0000000..d8f32f7 --- /dev/null +++ b/examples/08.SpecialFX/main.cpp @@ -0,0 +1,308 @@ +/** Example 008 SpecialFX
+
+This tutorials describes how to do special effects. It shows how to use stencil
+buffer shadows, the particle system, billboards, dynamic light, and the water
+surface scene node.
+
+We start like in some tutorials before. Please note that this time, the
+'shadows' flag in createDevice() is set to true, for we want to have a dynamic
+shadow casted from an animated character. If this example runs too slow,
+set it to false. The Irrlicht Engine checks if your hardware doesn't support
+the stencil buffer, and disables shadows by itself, but just in case the demo
+runs slow on your hardware.
+*/
+
+#include <irrlicht.h>
+#include <iostream>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+int main()
+{
+ // ask if user would like shadows
+ char i;
+ printf("Please press 'y' if you want to use realtime shadows.\n");
+
+ std::cin >> i;
+
+ const bool shadows = (i == 'y');
+
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+
+ /*
+ Create device and exit if creation failed. We make the stencil flag
+ optional to avoid slow screen modes for runs without shadows.
+ */
+
+ IrrlichtDevice *device =
+ createDevice(driverType, core::dimension2d<u32>(640, 480),
+ 16, false, shadows);
+
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* smgr = device->getSceneManager();
+
+ /*
+ For our environment, we load a .3ds file. It is a small room I modelled
+ with Anim8or and exported into the 3ds format because the Irrlicht
+ Engine does not support the .an8 format. I am a very bad 3d graphic
+ artist, and so the texture mapping is not very nice in this model.
+ Luckily I am a better programmer than artist, and so the Irrlicht
+ Engine is able to create a cool texture mapping for me: Just use the
+ mesh manipulator and create a planar texture mapping for the mesh. If
+ you want to see the mapping I made with Anim8or, uncomment this line. I
+ also did not figure out how to set the material right in Anim8or, it
+ has a specular light color which I don't really like. I'll switch it
+ off too with this code.
+ */
+
+ scene::IAnimatedMesh* mesh = smgr->getMesh("../../media/room.3ds");
+
+ smgr->getMeshManipulator()->makePlanarTextureMapping(mesh->getMesh(0), 0.004f);
+
+ scene::ISceneNode* node = 0;
+
+ node = smgr->addAnimatedMeshSceneNode(mesh);
+ node->setMaterialTexture(0, driver->getTexture("../../media/wall.jpg"));
+ node->getMaterial(0).SpecularColor.set(0,0,0,0);
+
+ /*
+ Now, for the first special effect: Animated water. It works like this:
+ The WaterSurfaceSceneNode takes a mesh as input and makes it wave like
+ a water surface. And if we let this scene node use a nice material like
+ the EMT_REFLECTION_2_LAYER, it looks really cool. We are doing this
+ with the next few lines of code. As input mesh, we create a hill plane
+ mesh, without hills. But any other mesh could be used for this, you
+ could even use the room.3ds (which would look really strange) if you
+ want to.
+ */
+
+ mesh = smgr->addHillPlaneMesh( "myHill",
+ core::dimension2d<f32>(20,20),
+ core::dimension2d<u32>(40,40), 0, 0,
+ core::dimension2d<f32>(0,0),
+ core::dimension2d<f32>(10,10));
+
+ node = smgr->addWaterSurfaceSceneNode(mesh->getMesh(0), 3.0f, 300.0f, 30.0f);
+ node->setPosition(core::vector3df(0,7,0));
+
+ node->setMaterialTexture(0, driver->getTexture("../../media/stones.jpg"));
+ node->setMaterialTexture(1, driver->getTexture("../../media/water.jpg"));
+
+ node->setMaterialType(video::EMT_REFLECTION_2_LAYER);
+
+ /*
+ The second special effect is very basic, I bet you saw it already in
+ some Irrlicht Engine demos: A transparent billboard combined with a
+ dynamic light. We simply create a light scene node, let it fly around,
+ and to make it look more cool, we attach a billboard scene node to it.
+ */
+
+ // create light
+
+ node = smgr->addLightSceneNode(0, core::vector3df(0,0,0),
+ video::SColorf(1.0f, 0.6f, 0.7f, 1.0f), 800.0f);
+ scene::ISceneNodeAnimator* anim = 0;
+ anim = smgr->createFlyCircleAnimator (core::vector3df(0,150,0),250.0f);
+ node->addAnimator(anim);
+ anim->drop();
+
+ // attach billboard to light
+
+ node = smgr->addBillboardSceneNode(node, core::dimension2d<f32>(50, 50));
+ node->setMaterialFlag(video::EMF_LIGHTING, false);
+ node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+ node->setMaterialTexture(0, driver->getTexture("../../media/particlewhite.bmp"));
+
+ /*
+ The next special effect is a lot more interesting: A particle system.
+ The particle system in the Irrlicht Engine is quite modular and
+ extensible, but yet easy to use. There is a particle system scene node
+ into which you can put a particle emitter, which makes particles come out
+ of nothing. These emitters are quite flexible and usually have lots of
+ parameters like direction, amount, and color of the particles they
+ create.
+
+ There are different emitters, for example a point emitter which lets
+ particles pop out at a fixed point. If the particle emitters available
+ in the engine are not enough for you, you can easily create your own
+ ones, you'll simply have to create a class derived from the
+ IParticleEmitter interface and attach it to the particle system using
+ setEmitter(). In this example we create a box particle emitter, which
+ creates particles randomly inside a box. The parameters define the box,
+ direction of the particles, minimal and maximal new particles per
+ second, color, and minimal and maximal lifetime of the particles.
+
+ Because only with emitters particle system would be a little bit
+ boring, there are particle affectors which modify particles while
+ they fly around. Affectors can be added to a particle system for
+ simulating additional effects like gravity or wind.
+ The particle affector we use in this example is an affector which
+ modifies the color of the particles: It lets them fade out. Like the
+ particle emitters, additional particle affectors can also be
+ implemented by you, simply derive a class from IParticleAffector and
+ add it with addAffector().
+
+ After we set a nice material to the particle system, we have a cool
+ looking camp fire. By adjusting material, texture, particle emitter,
+ and affector parameters, it is also easily possible to create smoke,
+ rain, explosions, snow, and so on.
+ */
+
+ // create a particle system
+
+ scene::IParticleSystemSceneNode* ps =
+ smgr->addParticleSystemSceneNode(false);
+
+ scene::IParticleEmitter* em = ps->createBoxEmitter(
+ core::aabbox3d<f32>(-7,0,-7,7,1,7), // emitter size
+ core::vector3df(0.0f,0.06f,0.0f), // initial direction
+ 80,100, // emit rate
+ video::SColor(0,255,255,255), // darkest color
+ video::SColor(0,255,255,255), // brightest color
+ 800,2000,0, // min and max age, angle
+ core::dimension2df(10.f,10.f), // min size
+ core::dimension2df(20.f,20.f)); // max size
+
+ ps->setEmitter(em); // this grabs the emitter
+ em->drop(); // so we can drop it here without deleting it
+
+ scene::IParticleAffector* paf = ps->createFadeOutParticleAffector();
+
+ ps->addAffector(paf); // same goes for the affector
+ paf->drop();
+
+ ps->setPosition(core::vector3df(-70,60,40));
+ ps->setScale(core::vector3df(2,2,2));
+ ps->setMaterialFlag(video::EMF_LIGHTING, false);
+ ps->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
+ ps->setMaterialTexture(0, driver->getTexture("../../media/fire.bmp"));
+ ps->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+
+ /*
+ Next we add a volumetric light node, which adds a glowing fake area light to
+ the scene. Like with the billboards and particle systems we also assign a
+ texture for the desired effect, though this time we'll use a texture animator
+ to create the illusion of a magical glowing area effect.
+ */
+ scene::IVolumeLightSceneNode * n = smgr->addVolumeLightSceneNode(0, -1,
+ 32, // Subdivisions on U axis
+ 32, // Subdivisions on V axis
+ video::SColor(0, 255, 255, 255), // foot color
+ video::SColor(0, 0, 0, 0)); // tail color
+
+ if (n)
+ {
+ n->setScale(core::vector3df(56.0f, 56.0f, 56.0f));
+ n->setPosition(core::vector3df(-120,50,40));
+
+ // load textures for animation
+ core::array<video::ITexture*> textures;
+ for (s32 g=7; g > 0; --g)
+ {
+ core::stringc tmp;
+ tmp = "../../media/portal";
+ tmp += g;
+ tmp += ".bmp";
+ video::ITexture* t = driver->getTexture( tmp.c_str() );
+ textures.push_back(t);
+ }
+
+ // create texture animator
+ scene::ISceneNodeAnimator* glow = smgr->createTextureAnimator(textures, 150);
+
+ // add the animator
+ n->addAnimator(glow);
+
+ // drop the animator because it was created with a create() function
+ glow->drop();
+ }
+
+ /*
+ As our last special effect, we want a dynamic shadow be casted from an
+ animated character. For this we load a DirectX .x model and place it
+ into our world. For creating the shadow, we simply need to call
+ addShadowVolumeSceneNode(). The color of shadows is only adjustable
+ globally for all shadows, by calling ISceneManager::setShadowColor().
+ Voila, here is our dynamic shadow.
+
+ Because the character is a little bit too small for this scene, we make
+ it bigger using setScale(). And because the character is lighted by a
+ dynamic light, we need to normalize the normals to make the lighting on
+ it correct. This is always necessary if the scale of a dynamic lighted
+ model is not (1,1,1). Otherwise it would get too dark or too bright
+ because the normals will be scaled too.
+ */
+
+ // add animated character
+
+ mesh = smgr->getMesh("../../media/dwarf.x");
+ scene::IAnimatedMeshSceneNode* anode = 0;
+
+ anode = smgr->addAnimatedMeshSceneNode(mesh);
+ anode->setPosition(core::vector3df(-50,20,-60));
+ anode->setAnimationSpeed(15);
+
+ // add shadow
+ anode->addShadowVolumeSceneNode();
+ smgr->setShadowColor(video::SColor(150,0,0,0));
+
+ // make the model a little bit bigger and normalize its normals
+ // because of the scaling, for correct lighting
+ anode->setScale(core::vector3df(2,2,2));
+ anode->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
+
+ /*
+ Finally we simply have to draw everything, that's all.
+ */
+
+ scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS();
+ camera->setPosition(core::vector3df(-50,50,-150));
+ camera->setFarValue(10000.0f); // this increase a shadow visible range.
+
+ // disable mouse cursor
+ device->getCursorControl()->setVisible(false);
+
+ s32 lastFPS = -1;
+
+ while(device->run())
+ if (device->isWindowActive())
+ {
+ driver->beginScene(true, true, 0);
+
+ smgr->drawAll();
+
+ driver->endScene();
+
+ const s32 fps = driver->getFPS();
+
+ if (lastFPS != fps)
+ {
+ core::stringw str = L"Irrlicht Engine - SpecialFX example [";
+ str += driver->getName();
+ str += "] FPS:";
+ str += fps;
+
+ device->setWindowCaption(str.c_str());
+ lastFPS = fps;
+ }
+ }
+
+ device->drop();
+
+ return 0;
+}
+
+/*
+**/
diff --git a/examples/08.SpecialFX/tutorial.html b/examples/08.SpecialFX/tutorial.html new file mode 100644 index 0000000..725473b --- /dev/null +++ b/examples/08.SpecialFX/tutorial.html @@ -0,0 +1,210 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 8: SpecialFX</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 8: SpecialFX </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/008shot.jpg" alt="008shot.jpg"/> +</div> + <p>This tutorials describes how to do special effects. It shows how to use stencil buffer shadows, the particle system, billboards, dynamic light, and the water surface scene node.</p> +<p>We start like in some tutorials before. Please note that this time, the 'shadows' flag in createDevice() is set to true, for we want to have a dynamic shadow casted from an animated character. If this example runs too slow, set it to false. The Irrlicht Engine checks if your hardware doesn't support the stencil buffer, and disables shadows by itself, but just in case the demo runs slow on your hardware. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include <iostream></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> <span class="comment">// ask if user would like shadows</span></div><div class="line"> <span class="keywordtype">char</span> i;</div><div class="line"> printf(<span class="stringliteral">"Please press 'y' if you want to use realtime shadows.\n"</span>);</div><div class="line"></div><div class="line"> std::cin >> i;</div><div class="line"></div><div class="line"> <span class="keyword">const</span> <span class="keywordtype">bool</span> shadows = (i == <span class="charliteral">'y'</span>);</div><div class="line"></div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div></div><!-- fragment --><p> Create device and exit if creation failed. We make the stencil flag optional to avoid slow screen modes for runs without shadows. </p><div class="fragment"><div class="line">IrrlichtDevice *device =</div><div class="line"> createDevice(driverType, core::dimension2d<u32>(640, 480),</div><div class="line"> 16, <span class="keyword">false</span>, shadows);</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div><div class="line"></div><div class="line">video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line">scene::ISceneManager* smgr = device->getSceneManager();</div></div><!-- fragment --><p> For our environment, we load a .3ds file. It is a small room I modelled with Anim8or and exported into the 3ds format because the Irrlicht Engine does not support the .an8 format. I am a very bad 3d graphic artist, and so the texture mapping is not very nice in this model. Luckily I am a better programmer than artist, and so the Irrlicht Engine is able to create a cool texture mapping for me: Just use the mesh manipulator and create a planar texture mapping for the mesh. If you want to see the mapping I made with Anim8or, uncomment this line. I also did not figure out how to set the material right in Anim8or, it has a specular light color which I don't really like. I'll switch it off too with this code. </p><div class="fragment"><div class="line">scene::IAnimatedMesh* mesh = smgr->getMesh(<span class="stringliteral">"../../media/room.3ds"</span>);</div><div class="line"></div><div class="line">smgr->getMeshManipulator()->makePlanarTextureMapping(mesh->getMesh(0), 0.004f);</div><div class="line"></div><div class="line">scene::ISceneNode* node = 0;</div><div class="line"></div><div class="line">node = smgr->addAnimatedMeshSceneNode(mesh);</div><div class="line">node->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/wall.jpg"</span>));</div><div class="line">node->getMaterial(0).SpecularColor.set(0,0,0,0);</div></div><!-- fragment --><p> Now, for the first special effect: Animated water. It works like this: The WaterSurfaceSceneNode takes a mesh as input and makes it wave like a water surface. And if we let this scene node use a nice material like the EMT_REFLECTION_2_LAYER, it looks really cool. We are doing this with the next few lines of code. As input mesh, we create a hill plane mesh, without hills. But any other mesh could be used for this, you could even use the room.3ds (which would look really strange) if you want to. </p><div class="fragment"><div class="line">mesh = smgr->addHillPlaneMesh( <span class="stringliteral">"myHill"</span>,</div><div class="line"> core::dimension2d<f32>(20,20),</div><div class="line"> core::dimension2d<u32>(40,40), 0, 0,</div><div class="line"> core::dimension2d<f32>(0,0),</div><div class="line"> core::dimension2d<f32>(10,10));</div><div class="line"></div><div class="line">node = smgr->addWaterSurfaceSceneNode(mesh->getMesh(0), 3.0f, 300.0f, 30.0f);</div><div class="line">node->setPosition(core::vector3df(0,7,0));</div><div class="line"></div><div class="line">node->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/stones.jpg"</span>));</div><div class="line">node->setMaterialTexture(1, driver->getTexture(<span class="stringliteral">"../../media/water.jpg"</span>));</div><div class="line"></div><div class="line">node->setMaterialType(video::EMT_REFLECTION_2_LAYER);</div></div><!-- fragment --><p> The second special effect is very basic, I bet you saw it already in some Irrlicht Engine demos: A transparent billboard combined with a dynamic light. We simply create a light scene node, let it fly around, and to make it look more cool, we attach a billboard scene node to it. </p><div class="fragment"><div class="line"><span class="comment">// create light</span></div><div class="line"></div><div class="line">node = smgr->addLightSceneNode(0, core::vector3df(0,0,0),</div><div class="line"> video::SColorf(1.0f, 0.6f, 0.7f, 1.0f), 800.0f);</div><div class="line">scene::ISceneNodeAnimator* anim = 0;</div><div class="line">anim = smgr->createFlyCircleAnimator (core::vector3df(0,150,0),250.0f);</div><div class="line">node->addAnimator(anim);</div><div class="line">anim->drop();</div><div class="line"></div><div class="line"><span class="comment">// attach billboard to light</span></div><div class="line"></div><div class="line">node = smgr->addBillboardSceneNode(node, core::dimension2d<f32>(50, 50));</div><div class="line">node->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line">node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);</div><div class="line">node->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/particlewhite.bmp"</span>));</div></div><!-- fragment --><p> The next special effect is a lot more interesting: A particle system. The particle system in the Irrlicht Engine is quite modular and extensible, but yet easy to use. There is a particle system scene node into which you can put a particle emitter, which makes particles come out of nothing. These emitters are quite flexible and usually have lots of parameters like direction, amount, and color of the particles they create.</p> +<p>There are different emitters, for example a point emitter which lets particles pop out at a fixed point. If the particle emitters available in the engine are not enough for you, you can easily create your own ones, you'll simply have to create a class derived from the IParticleEmitter interface and attach it to the particle system using setEmitter(). In this example we create a box particle emitter, which creates particles randomly inside a box. The parameters define the box, direction of the particles, minimal and maximal new particles per second, color, and minimal and maximal lifetime of the particles.</p> +<p>Because only with emitters particle system would be a little bit boring, there are particle affectors which modify particles while they fly around. Affectors can be added to a particle system for simulating additional effects like gravity or wind. The particle affector we use in this example is an affector which modifies the color of the particles: It lets them fade out. Like the particle emitters, additional particle affectors can also be implemented by you, simply derive a class from IParticleAffector and add it with addAffector().</p> +<p>After we set a nice material to the particle system, we have a cool looking camp fire. By adjusting material, texture, particle emitter, and affector parameters, it is also easily possible to create smoke, rain, explosions, snow, and so on. </p><div class="fragment"><div class="line"><span class="comment">// create a particle system</span></div><div class="line"></div><div class="line">scene::IParticleSystemSceneNode* ps =</div><div class="line"> smgr->addParticleSystemSceneNode(<span class="keyword">false</span>);</div><div class="line"></div><div class="line">scene::IParticleEmitter* em = ps->createBoxEmitter(</div><div class="line"> core::aabbox3d<f32>(-7,0,-7,7,1,7), <span class="comment">// emitter size</span></div><div class="line"> core::vector3df(0.0f,0.06f,0.0f), <span class="comment">// initial direction</span></div><div class="line"> 80,100, <span class="comment">// emit rate</span></div><div class="line"> video::SColor(0,255,255,255), <span class="comment">// darkest color</span></div><div class="line"> video::SColor(0,255,255,255), <span class="comment">// brightest color</span></div><div class="line"> 800,2000,0, <span class="comment">// min and max age, angle</span></div><div class="line"> core::dimension2df(10.f,10.f), <span class="comment">// min size</span></div><div class="line"> core::dimension2df(20.f,20.f)); <span class="comment">// max size</span></div><div class="line"></div><div class="line">ps->setEmitter(em); <span class="comment">// this grabs the emitter</span></div><div class="line">em->drop(); <span class="comment">// so we can drop it here without deleting it</span></div><div class="line"></div><div class="line">scene::IParticleAffector* paf = ps->createFadeOutParticleAffector();</div><div class="line"></div><div class="line">ps->addAffector(paf); <span class="comment">// same goes for the affector</span></div><div class="line">paf->drop();</div><div class="line"></div><div class="line">ps->setPosition(core::vector3df(-70,60,40));</div><div class="line">ps->setScale(core::vector3df(2,2,2));</div><div class="line">ps->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line">ps->setMaterialFlag(video::EMF_ZWRITE_ENABLE, <span class="keyword">false</span>);</div><div class="line">ps->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/fire.bmp"</span>));</div><div class="line">ps->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);</div></div><!-- fragment --><p> Next we add a volumetric light node, which adds a glowing fake area light to the scene. Like with the billboards and particle systems we also assign a texture for the desired effect, though this time we'll use a texture animator to create the illusion of a magical glowing area effect. </p><div class="fragment"><div class="line">scene::IVolumeLightSceneNode * n = smgr->addVolumeLightSceneNode(0, -1,</div><div class="line"> 32, <span class="comment">// Subdivisions on U axis</span></div><div class="line"> 32, <span class="comment">// Subdivisions on V axis</span></div><div class="line"> video::SColor(0, 255, 255, 255), <span class="comment">// foot color</span></div><div class="line"> video::SColor(0, 0, 0, 0)); <span class="comment">// tail color</span></div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (n)</div><div class="line">{</div><div class="line"> n->setScale(core::vector3df(56.0f, 56.0f, 56.0f));</div><div class="line"> n->setPosition(core::vector3df(-120,50,40));</div><div class="line"></div><div class="line"> <span class="comment">// load textures for animation</span></div><div class="line"> core::array<video::ITexture*> textures;</div><div class="line"> <span class="keywordflow">for</span> (s32 g=7; g > 0; --g)</div><div class="line"> {</div><div class="line"> core::stringc tmp;</div><div class="line"> tmp = <span class="stringliteral">"../../media/portal"</span>;</div><div class="line"> tmp += g;</div><div class="line"> tmp += <span class="stringliteral">".bmp"</span>;</div><div class="line"> video::ITexture* t = driver->getTexture( tmp.c_str() );</div><div class="line"> textures.push_back(t);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// create texture animator</span></div><div class="line"> scene::ISceneNodeAnimator* glow = smgr->createTextureAnimator(textures, 150);</div><div class="line"></div><div class="line"> <span class="comment">// add the animator</span></div><div class="line"> n->addAnimator(glow);</div><div class="line"></div><div class="line"> <span class="comment">// drop the animator because it was created with a create() function</span></div><div class="line"> glow->drop();</div><div class="line">}</div></div><!-- fragment --><p> As our last special effect, we want a dynamic shadow be casted from an animated character. For this we load a DirectX .x model and place it into our world. For creating the shadow, we simply need to call addShadowVolumeSceneNode(). The color of shadows is only adjustable globally for all shadows, by calling ISceneManager::setShadowColor(). Voila, here is our dynamic shadow.</p> +<p>Because the character is a little bit too small for this scene, we make it bigger using setScale(). And because the character is lighted by a dynamic light, we need to normalize the normals to make the lighting on it correct. This is always necessary if the scale of a dynamic lighted model is not (1,1,1). Otherwise it would get too dark or too bright because the normals will be scaled too. </p><div class="fragment"><div class="line"><span class="comment">// add animated character</span></div><div class="line"></div><div class="line">mesh = smgr->getMesh(<span class="stringliteral">"../../media/dwarf.x"</span>);</div><div class="line">scene::IAnimatedMeshSceneNode* anode = 0;</div><div class="line"></div><div class="line">anode = smgr->addAnimatedMeshSceneNode(mesh);</div><div class="line">anode->setPosition(core::vector3df(-50,20,-60));</div><div class="line">anode->setAnimationSpeed(15);</div><div class="line"></div><div class="line"><span class="comment">// add shadow</span></div><div class="line">anode->addShadowVolumeSceneNode();</div><div class="line">smgr->setShadowColor(video::SColor(150,0,0,0));</div><div class="line"></div><div class="line"><span class="comment">// make the model a little bit bigger and normalize its normals</span></div><div class="line"><span class="comment">// because of the scaling, for correct lighting</span></div><div class="line">anode->setScale(core::vector3df(2,2,2));</div><div class="line">anode->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, <span class="keyword">true</span>);</div></div><!-- fragment --><p> Finally we simply have to draw everything, that's all. </p><div class="fragment"><div class="line"> scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS();</div><div class="line"> camera->setPosition(core::vector3df(-50,50,-150));</div><div class="line"> camera->setFarValue(10000.0f); <span class="comment">// this increase a shadow visible range.</span></div><div class="line"></div><div class="line"> <span class="comment">// disable mouse cursor</span></div><div class="line"> device->getCursorControl()->setVisible(<span class="keyword">false</span>);</div><div class="line"></div><div class="line"> s32 lastFPS = -1;</div><div class="line"></div><div class="line"> <span class="keywordflow">while</span>(device->run())</div><div class="line"> <span class="keywordflow">if</span> (device->isWindowActive())</div><div class="line"> {</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, 0);</div><div class="line"></div><div class="line"> smgr->drawAll();</div><div class="line"></div><div class="line"> driver->endScene();</div><div class="line"></div><div class="line"> <span class="keyword">const</span> s32 fps = driver->getFPS();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (lastFPS != fps)</div><div class="line"> {</div><div class="line"> core::stringw str = L<span class="stringliteral">"Irrlicht Engine - SpecialFX example ["</span>;</div><div class="line"> str += driver->getName();</div><div class="line"> str += <span class="stringliteral">"] FPS:"</span>;</div><div class="line"> str += fps;</div><div class="line"></div><div class="line"> device->setWindowCaption(str.c_str());</div><div class="line"> lastFPS = fps;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> device->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/09.Meshviewer/9.Meshviewer.rc b/examples/09.Meshviewer/9.Meshviewer.rc new file mode 100644 index 0000000..3208583 --- /dev/null +++ b/examples/09.Meshviewer/9.Meshviewer.rc @@ -0,0 +1,84 @@ +// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// German (Austria) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEA)
+#ifdef _WIN32
+LANGUAGE LANG_GERMAN, SUBLANG_GERMAN_AUSTRIAN
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON1 ICON "icon.ico"
+#endif // German (Austria) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/examples/09.Meshviewer/Makefile b/examples/09.Meshviewer/Makefile new file mode 100644 index 0000000..99fe9d0 --- /dev/null +++ b/examples/09.Meshviewer/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 09.Meshviewer
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/09.Meshviewer/MeshViewer.dev b/examples/09.Meshviewer/MeshViewer.dev new file mode 100644 index 0000000..47416a1 --- /dev/null +++ b/examples/09.Meshviewer/MeshViewer.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 09 Mesh Viewer
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=09.MeshViewer.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/09.Meshviewer/Meshviewer.cbp b/examples/09.Meshviewer/Meshviewer.cbp new file mode 100644 index 0000000..be11327 --- /dev/null +++ b/examples/09.Meshviewer/Meshviewer.cbp @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 09 Mesh Viewer" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/MeshViewer" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option output="../../bin/Linux/MeshViewer" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/09.Meshviewer/Meshviewer.vcproj b/examples/09.Meshviewer/Meshviewer.vcproj new file mode 100644 index 0000000..4077b86 --- /dev/null +++ b/examples/09.Meshviewer/Meshviewer.vcproj @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="09.MeshViewer"
+ ProjectGUID="{EF198BF9-7446-443D-961E-E617E1BD3AFB}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/Meshviewer.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\09.MeshViewer.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/MeshViewer.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Meshviewer.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/Meshviewer.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\09.MeshViewer.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/MeshViewer.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Meshviewer.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/09.Meshviewer/Meshviewer_vc10.vcxproj b/examples/09.Meshviewer/Meshviewer_vc10.vcxproj new file mode 100644 index 0000000..eb918cc --- /dev/null +++ b/examples/09.Meshviewer/Meshviewer_vc10.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>09.Meshviewer</ProjectName>
+ <ProjectGuid>{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}</ProjectGuid>
+ <RootNamespace>Meshviewer</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Meshviewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\09.MeshViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Meshviewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\09.MeshViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Meshviewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\09.MeshViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Meshviewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\09.MeshViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/09.Meshviewer/Meshviewer_vc11.vcxproj b/examples/09.Meshviewer/Meshviewer_vc11.vcxproj new file mode 100644 index 0000000..eb918cc --- /dev/null +++ b/examples/09.Meshviewer/Meshviewer_vc11.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>09.Meshviewer</ProjectName>
+ <ProjectGuid>{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}</ProjectGuid>
+ <RootNamespace>Meshviewer</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Meshviewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\09.MeshViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Meshviewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\09.MeshViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Meshviewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\09.MeshViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Meshviewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\09.MeshViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/09.Meshviewer/Meshviewer_vc12.vcxproj b/examples/09.Meshviewer/Meshviewer_vc12.vcxproj new file mode 100644 index 0000000..effddf2 --- /dev/null +++ b/examples/09.Meshviewer/Meshviewer_vc12.vcxproj @@ -0,0 +1,235 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>09.Meshviewer</ProjectName>
+ <ProjectGuid>{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}</ProjectGuid>
+ <RootNamespace>Meshviewer</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Meshviewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\09.MeshViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Meshviewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\09.MeshViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Meshviewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\09.MeshViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Meshviewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\09.MeshViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/09.Meshviewer/Meshviewer_vc8.vcproj b/examples/09.Meshviewer/Meshviewer_vc8.vcproj new file mode 100644 index 0000000..0346771 --- /dev/null +++ b/examples/09.Meshviewer/Meshviewer_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="09.Meshviewer_vc8"
+ ProjectGUID="{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}"
+ RootNamespace="Meshviewer_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Meshviewer.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/Meshviewer.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\09.MeshViewer.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/MeshViewer.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Meshviewer.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/Meshviewer.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\09.MeshViewer.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/MeshViewer.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/09.Meshviewer/Meshviewer_vc9.vcproj b/examples/09.Meshviewer/Meshviewer_vc9.vcproj new file mode 100644 index 0000000..f6a8038 --- /dev/null +++ b/examples/09.Meshviewer/Meshviewer_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="09.Meshviewer_vc9"
+ ProjectGUID="{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}"
+ RootNamespace="Meshviewer_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Meshviewer.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/Meshviewer.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\09.MeshViewer.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/MeshViewer.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Meshviewer.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/Meshviewer.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\09.MeshViewer.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/MeshViewer.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/09.Meshviewer/icon.ico b/examples/09.Meshviewer/icon.ico Binary files differnew file mode 100644 index 0000000..49f8eab --- /dev/null +++ b/examples/09.Meshviewer/icon.ico diff --git a/examples/09.Meshviewer/main.cpp b/examples/09.Meshviewer/main.cpp new file mode 100644 index 0000000..b9dc550 --- /dev/null +++ b/examples/09.Meshviewer/main.cpp @@ -0,0 +1,1042 @@ +/** Example 009 Mesh Viewer
+
+This tutorial show how to create a more complex application with the engine.
+We construct a simple mesh viewer using the user interface API and the
+scene management of Irrlicht. The tutorial show how to create and use Buttons,
+Windows, Toolbars, Menus, ComboBoxes, Tabcontrols, Editboxes, Images,
+MessageBoxes, SkyBoxes, and how to parse XML files with the integrated XML
+reader of the engine.
+
+We start like in most other tutorials: Include all necessary header files, add
+a comment to let the engine be linked with the right .lib file in Visual
+Studio, and declare some global variables. We also add two 'using namespace'
+statements, so we do not need to write the whole names of all classes. In this
+tutorial, we use a lot stuff from the gui namespace.
+*/
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+using namespace gui;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+
+/*
+Some global variables used later on
+*/
+IrrlichtDevice *Device = 0;
+core::stringc StartUpModelFile;
+core::stringw MessageText;
+core::stringw Caption;
+scene::ISceneNode* Model = 0;
+scene::ISceneNode* SkyBox = 0;
+bool Octree=false;
+bool UseLight=false;
+
+scene::ICameraSceneNode* Camera[2] = {0, 0};
+
+// Values used to identify individual GUI elements
+enum
+{
+ GUI_ID_DIALOG_ROOT_WINDOW = 0x10000,
+
+ GUI_ID_X_SCALE,
+ GUI_ID_Y_SCALE,
+ GUI_ID_Z_SCALE,
+
+ GUI_ID_OPEN_MODEL,
+ GUI_ID_SET_MODEL_ARCHIVE,
+ GUI_ID_LOAD_AS_OCTREE,
+
+ GUI_ID_SKY_BOX_VISIBLE,
+ GUI_ID_TOGGLE_DEBUG_INFO,
+
+ GUI_ID_DEBUG_OFF,
+ GUI_ID_DEBUG_BOUNDING_BOX,
+ GUI_ID_DEBUG_NORMALS,
+ GUI_ID_DEBUG_SKELETON,
+ GUI_ID_DEBUG_WIRE_OVERLAY,
+ GUI_ID_DEBUG_HALF_TRANSPARENT,
+ GUI_ID_DEBUG_BUFFERS_BOUNDING_BOXES,
+ GUI_ID_DEBUG_ALL,
+
+ GUI_ID_MODEL_MATERIAL_SOLID,
+ GUI_ID_MODEL_MATERIAL_TRANSPARENT,
+ GUI_ID_MODEL_MATERIAL_REFLECTION,
+
+ GUI_ID_CAMERA_MAYA,
+ GUI_ID_CAMERA_FIRST_PERSON,
+
+ GUI_ID_POSITION_TEXT,
+
+ GUI_ID_ABOUT,
+ GUI_ID_QUIT,
+
+ GUI_ID_TEXTUREFILTER,
+ GUI_ID_SKIN_TRANSPARENCY,
+ GUI_ID_SKIN_ANIMATION_FPS,
+
+ GUI_ID_BUTTON_SET_SCALE,
+ GUI_ID_BUTTON_SCALE_MUL10,
+ GUI_ID_BUTTON_SCALE_DIV10,
+ GUI_ID_BUTTON_OPEN_MODEL,
+ GUI_ID_BUTTON_SHOW_ABOUT,
+ GUI_ID_BUTTON_SHOW_TOOLBOX,
+ GUI_ID_BUTTON_SELECT_ARCHIVE,
+
+ GUI_ID_ANIMATION_INFO,
+
+ // And some magic numbers
+ MAX_FRAMERATE = 80,
+ DEFAULT_FRAMERATE = 30
+};
+
+
+/*
+Toggle between various cameras
+*/
+void setActiveCamera(scene::ICameraSceneNode* newActive)
+{
+ if (0 == Device)
+ return;
+
+ scene::ICameraSceneNode * active = Device->getSceneManager()->getActiveCamera();
+ active->setInputReceiverEnabled(false);
+
+ newActive->setInputReceiverEnabled(true);
+ Device->getSceneManager()->setActiveCamera(newActive);
+}
+
+/*
+ Set the skin transparency by changing the alpha values of all skin-colors
+*/
+void setSkinTransparency(s32 alpha, irr::gui::IGUISkin * skin)
+{
+ for (s32 i=0; i<irr::gui::EGDC_COUNT ; ++i)
+ {
+ video::SColor col = skin->getColor((EGUI_DEFAULT_COLOR)i);
+ col.setAlpha(alpha);
+ skin->setColor((EGUI_DEFAULT_COLOR)i, col);
+ }
+}
+
+/*
+ Update the display of the model scaling
+*/
+void updateScaleInfo(scene::ISceneNode* model)
+{
+ IGUIElement* toolboxWnd = Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true);
+ if (!toolboxWnd)
+ return;
+ if (!model)
+ {
+ toolboxWnd->getElementFromId(GUI_ID_X_SCALE, true)->setText( L"-" );
+ toolboxWnd->getElementFromId(GUI_ID_Y_SCALE, true)->setText( L"-" );
+ toolboxWnd->getElementFromId(GUI_ID_Z_SCALE, true)->setText( L"-" );
+ }
+ else
+ {
+ core::vector3df scale = model->getScale();
+ toolboxWnd->getElementFromId(GUI_ID_X_SCALE, true)->setText( core::stringw(scale.X).c_str() );
+ toolboxWnd->getElementFromId(GUI_ID_Y_SCALE, true)->setText( core::stringw(scale.Y).c_str() );
+ toolboxWnd->getElementFromId(GUI_ID_Z_SCALE, true)->setText( core::stringw(scale.Z).c_str() );
+ }
+}
+
+/*
+Function showAboutText() displays a messagebox with a caption and
+a message text. The texts will be stored in the MessageText and Caption
+variables at startup.
+*/
+void showAboutText()
+{
+ // create modal message box with the text
+ // loaded from the xml file.
+ Device->getGUIEnvironment()->addMessageBox(
+ Caption.c_str(), MessageText.c_str());
+}
+
+
+/*
+Function loadModel() loads a model and displays it using an
+addAnimatedMeshSceneNode and the scene manager. Nothing difficult. It also
+displays a short message box, if the model could not be loaded.
+*/
+void loadModel(const c8* fn)
+{
+ // modify the name if it a .pk3 file
+
+ io::path filename(fn);
+
+ io::path extension;
+ core::getFileNameExtension(extension, filename);
+ extension.make_lower();
+
+ // if a texture is loaded apply it to the current model..
+ if (extension == ".jpg" || extension == ".pcx" ||
+ extension == ".png" || extension == ".ppm" ||
+ extension == ".pgm" || extension == ".pbm" ||
+ extension == ".psd" || extension == ".tga" ||
+ extension == ".bmp" || extension == ".wal" ||
+ extension == ".rgb" || extension == ".rgba")
+ {
+ video::ITexture * texture =
+ Device->getVideoDriver()->getTexture( filename );
+ if ( texture && Model )
+ {
+ // always reload texture
+ Device->getVideoDriver()->removeTexture(texture);
+ texture = Device->getVideoDriver()->getTexture( filename );
+
+ Model->setMaterialTexture(0, texture);
+ }
+ return;
+ }
+ // if a archive is loaded add it to the FileArchive..
+ else if (extension == ".pk3" || extension == ".zip" || extension == ".pak" || extension == ".npk")
+ {
+ Device->getFileSystem()->addFileArchive(filename.c_str());
+ return;
+ }
+
+ // load a model into the engine
+
+ if (Model)
+ Model->remove();
+
+ Model = 0;
+
+ if (extension==".irr")
+ {
+ core::array<scene::ISceneNode*> outNodes;
+ Device->getSceneManager()->loadScene(filename);
+ Device->getSceneManager()->getSceneNodesFromType(scene::ESNT_ANIMATED_MESH, outNodes);
+ if (outNodes.size())
+ Model = outNodes[0];
+ return;
+ }
+
+ scene::IAnimatedMesh* m = Device->getSceneManager()->getMesh( filename.c_str() );
+
+ if (!m)
+ {
+ // model could not be loaded
+
+ if (StartUpModelFile != filename)
+ Device->getGUIEnvironment()->addMessageBox(
+ Caption.c_str(), L"The model could not be loaded. " \
+ L"Maybe it is not a supported file format.");
+ return;
+ }
+
+ // set default material properties
+
+ if (Octree)
+ Model = Device->getSceneManager()->addOctreeSceneNode(m->getMesh(0));
+ else
+ {
+ scene::IAnimatedMeshSceneNode* animModel = Device->getSceneManager()->addAnimatedMeshSceneNode(m);
+ animModel->setAnimationSpeed(30);
+ Model = animModel;
+ }
+ Model->setMaterialFlag(video::EMF_LIGHTING, UseLight);
+ Model->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, UseLight);
+// Model->setMaterialFlag(video::EMF_BACK_FACE_CULLING, false);
+ Model->setDebugDataVisible(scene::EDS_OFF);
+
+ // we need to uncheck the menu entries. would be cool to fake a menu event, but
+ // that's not so simple. so we do it brute force
+ gui::IGUIContextMenu* menu = (gui::IGUIContextMenu*)Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_TOGGLE_DEBUG_INFO, true);
+ if (menu)
+ for(int item = 1; item < 6; ++item)
+ menu->setItemChecked(item, false);
+ updateScaleInfo(Model);
+}
+
+
+/*
+Function createToolBox() creates a toolbox window. In this simple mesh
+viewer, this toolbox only contains a tab control with three edit boxes for
+changing the scale of the displayed model.
+*/
+void createToolBox()
+{
+ // remove tool box if already there
+ IGUIEnvironment* env = Device->getGUIEnvironment();
+ IGUIElement* root = env->getRootGUIElement();
+ IGUIElement* e = root->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true);
+ if (e)
+ e->remove();
+
+ // create the toolbox window
+ IGUIWindow* wnd = env->addWindow(core::rect<s32>(600,45,800,480),
+ false, L"Toolset", 0, GUI_ID_DIALOG_ROOT_WINDOW);
+
+ // create tab control and tabs
+ IGUITabControl* tab = env->addTabControl(
+ core::rect<s32>(2,20,800-602,480-7), wnd, true, true);
+
+ IGUITab* t1 = tab->addTab(L"Config");
+
+ // add some edit boxes and a button to tab one
+ env->addStaticText(L"Scale:",
+ core::rect<s32>(10,20,60,45), false, false, t1);
+ env->addStaticText(L"X:", core::rect<s32>(22,48,40,66), false, false, t1);
+ env->addEditBox(L"1.0", core::rect<s32>(40,46,130,66), true, t1, GUI_ID_X_SCALE);
+ env->addStaticText(L"Y:", core::rect<s32>(22,82,40,96), false, false, t1);
+ env->addEditBox(L"1.0", core::rect<s32>(40,76,130,96), true, t1, GUI_ID_Y_SCALE);
+ env->addStaticText(L"Z:", core::rect<s32>(22,108,40,126), false, false, t1);
+ env->addEditBox(L"1.0", core::rect<s32>(40,106,130,126), true, t1, GUI_ID_Z_SCALE);
+
+ env->addButton(core::rect<s32>(10,134,85,165), t1, GUI_ID_BUTTON_SET_SCALE, L"Set");
+
+ // quick scale buttons
+ env->addButton(core::rect<s32>(65,20,95,40), t1, GUI_ID_BUTTON_SCALE_MUL10, L"* 10");
+ env->addButton(core::rect<s32>(100,20,130,40), t1, GUI_ID_BUTTON_SCALE_DIV10, L"* 0.1");
+
+ updateScaleInfo(Model);
+
+ // add transparency control
+ env->addStaticText(L"GUI Transparency Control:",
+ core::rect<s32>(10,200,150,225), true, false, t1);
+ IGUIScrollBar* scrollbar = env->addScrollBar(true,
+ core::rect<s32>(10,225,150,240), t1, GUI_ID_SKIN_TRANSPARENCY);
+ scrollbar->setMax(255);
+ scrollbar->setPos(255);
+
+ // add framerate control
+ env->addStaticText(L":", core::rect<s32>(10,240,150,265), true, false, t1);
+ env->addStaticText(L"Framerate:",
+ core::rect<s32>(12,240,75,265), false, false, t1);
+ // current frame info
+ env->addStaticText(L"", core::rect<s32>(75,240,200,265), false, false, t1,
+ GUI_ID_ANIMATION_INFO);
+ scrollbar = env->addScrollBar(true,
+ core::rect<s32>(10,265,150,280), t1, GUI_ID_SKIN_ANIMATION_FPS);
+ scrollbar->setMax(MAX_FRAMERATE);
+ scrollbar->setMin(-MAX_FRAMERATE);
+ scrollbar->setPos(DEFAULT_FRAMERATE);
+ scrollbar->setSmallStep(1);
+}
+
+/*
+Function updateToolBox() is called each frame to update dynamic information in
+the toolbox.
+*/
+void updateToolBox()
+{
+ IGUIEnvironment* env = Device->getGUIEnvironment();
+ IGUIElement* root = env->getRootGUIElement();
+ IGUIElement* dlg = root->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true);
+ if (!dlg )
+ return;
+
+ // update the info we have about the animation of the model
+ IGUIStaticText * aniInfo = (IGUIStaticText *)(dlg->getElementFromId(GUI_ID_ANIMATION_INFO, true));
+ if (aniInfo)
+ {
+ if ( Model && scene::ESNT_ANIMATED_MESH == Model->getType() )
+ {
+ scene::IAnimatedMeshSceneNode* animatedModel = (scene::IAnimatedMeshSceneNode*)Model;
+
+ core::stringw str( (s32)core::round_(animatedModel->getAnimationSpeed()) );
+ str += L" Frame: ";
+ str += core::stringw((s32)animatedModel->getFrameNr());
+ aniInfo->setText(str.c_str());
+ }
+ else
+ aniInfo->setText(L"");
+ }
+}
+
+void onKillFocus()
+{
+ // Avoid that the FPS-camera continues moving when the user presses alt-tab while
+ // moving the camera.
+ const core::list<scene::ISceneNodeAnimator*>& animators = Camera[1]->getAnimators();
+ core::list<irr::scene::ISceneNodeAnimator*>::ConstIterator iter = animators.begin();
+ while ( iter != animators.end() )
+ {
+ if ( (*iter)->getType() == scene::ESNAT_CAMERA_FPS )
+ {
+ // we send a key-down event for all keys used by this animator
+ scene::ISceneNodeAnimatorCameraFPS * fpsAnimator = static_cast<scene::ISceneNodeAnimatorCameraFPS*>(*iter);
+ const core::array<SKeyMap>& keyMap = fpsAnimator->getKeyMap();
+ for ( irr::u32 i=0; i< keyMap.size(); ++i )
+ {
+ irr::SEvent event;
+ event.EventType = EET_KEY_INPUT_EVENT;
+ event.KeyInput.Key = keyMap[i].KeyCode;
+ event.KeyInput.PressedDown = false;
+ fpsAnimator->OnEvent(event);
+ }
+ }
+ ++iter;
+ }
+}
+
+/*
+Function hasModalDialog() checks if we currently have a modal dialog open.
+*/
+bool hasModalDialog()
+{
+ if ( !Device )
+ return false;
+ IGUIEnvironment* env = Device->getGUIEnvironment();
+ IGUIElement * focused = env->getFocus();
+ while ( focused )
+ {
+ if ( focused->isVisible() && focused->hasType(EGUIET_MODAL_SCREEN) )
+ return true;
+ focused = focused->getParent();
+ }
+ return false;
+}
+
+/*
+To get all the events sent by the GUI Elements, we need to create an event
+receiver. This one is really simple. If an event occurs, it checks the id of
+the caller and the event type, and starts an action based on these values. For
+example, if a menu item with id GUI_ID_OPEN_MODEL was selected, it opens a file-open-dialog.
+*/
+class MyEventReceiver : public IEventReceiver
+{
+public:
+ virtual bool OnEvent(const SEvent& event)
+ {
+ // Escape swaps Camera Input
+ if (event.EventType == EET_KEY_INPUT_EVENT &&
+ event.KeyInput.PressedDown == false)
+ {
+ if ( OnKeyUp(event.KeyInput.Key) )
+ return true;
+ }
+
+ if (event.EventType == EET_GUI_EVENT)
+ {
+ s32 id = event.GUIEvent.Caller->getID();
+ IGUIEnvironment* env = Device->getGUIEnvironment();
+
+ switch(event.GUIEvent.EventType)
+ {
+ case EGET_MENU_ITEM_SELECTED:
+ // a menu item was clicked
+ OnMenuItemSelected( (IGUIContextMenu*)event.GUIEvent.Caller );
+ break;
+
+ case EGET_FILE_SELECTED:
+ {
+ // load the model file, selected in the file open dialog
+ IGUIFileOpenDialog* dialog =
+ (IGUIFileOpenDialog*)event.GUIEvent.Caller;
+ loadModel(core::stringc(dialog->getFileName()).c_str());
+ }
+ break;
+
+ case EGET_SCROLL_BAR_CHANGED:
+
+ // control skin transparency
+ if (id == GUI_ID_SKIN_TRANSPARENCY)
+ {
+ const s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos();
+ setSkinTransparency(pos, env->getSkin());
+ }
+ // control animation speed
+ else if (id == GUI_ID_SKIN_ANIMATION_FPS)
+ {
+ const s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos();
+ if (scene::ESNT_ANIMATED_MESH == Model->getType())
+ ((scene::IAnimatedMeshSceneNode*)Model)->setAnimationSpeed((f32)pos);
+ }
+ break;
+
+ case EGET_COMBO_BOX_CHANGED:
+
+ // control anti-aliasing/filtering
+ if (id == GUI_ID_TEXTUREFILTER)
+ {
+ OnTextureFilterSelected( (IGUIComboBox*)event.GUIEvent.Caller );
+ }
+ break;
+
+ case EGET_BUTTON_CLICKED:
+
+ switch(id)
+ {
+ case GUI_ID_BUTTON_SET_SCALE:
+ {
+ // set scale
+ gui::IGUIElement* root = env->getRootGUIElement();
+ core::vector3df scale;
+ core::stringc s;
+
+ s = root->getElementFromId(GUI_ID_X_SCALE, true)->getText();
+ scale.X = (f32)atof(s.c_str());
+ s = root->getElementFromId(GUI_ID_Y_SCALE, true)->getText();
+ scale.Y = (f32)atof(s.c_str());
+ s = root->getElementFromId(GUI_ID_Z_SCALE, true)->getText();
+ scale.Z = (f32)atof(s.c_str());
+
+ if (Model)
+ Model->setScale(scale);
+ updateScaleInfo(Model);
+ }
+ break;
+ case GUI_ID_BUTTON_SCALE_MUL10:
+ if (Model)
+ Model->setScale(Model->getScale()*10.f);
+ updateScaleInfo(Model);
+ break;
+ case GUI_ID_BUTTON_SCALE_DIV10:
+ if (Model)
+ Model->setScale(Model->getScale()*0.1f);
+ updateScaleInfo(Model);
+ break;
+ case GUI_ID_BUTTON_OPEN_MODEL:
+ env->addFileOpenDialog(L"Please select a model file to open");
+ break;
+ case GUI_ID_BUTTON_SHOW_ABOUT:
+ showAboutText();
+ break;
+ case GUI_ID_BUTTON_SHOW_TOOLBOX:
+ createToolBox();
+ break;
+ case GUI_ID_BUTTON_SELECT_ARCHIVE:
+ env->addFileOpenDialog(L"Please select your game archive/directory");
+ break;
+ }
+
+ break;
+ default:
+ break;
+ }
+ }
+
+ return false;
+ }
+
+
+ /*
+ Handle key-up events
+ */
+ bool OnKeyUp(irr::EKEY_CODE keyCode)
+ {
+ // Don't handle keys if we have a modal dialog open as it would lead
+ // to unexpected application behaviour for the user.
+ if ( hasModalDialog() )
+ return false;
+
+ if (keyCode == irr::KEY_ESCAPE)
+ {
+ if (Device)
+ {
+ scene::ICameraSceneNode * camera =
+ Device->getSceneManager()->getActiveCamera();
+ if (camera)
+ {
+ camera->setInputReceiverEnabled( !camera->isInputReceiverEnabled() );
+ }
+ return true;
+ }
+ }
+ else if (keyCode == irr::KEY_F1)
+ {
+ if (Device)
+ {
+ IGUIElement* elem = Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_POSITION_TEXT);
+ if (elem)
+ elem->setVisible(!elem->isVisible());
+ }
+ }
+ else if (keyCode == irr::KEY_KEY_M)
+ {
+ if (Device)
+ Device->minimizeWindow();
+ }
+ else if (keyCode == irr::KEY_KEY_L)
+ {
+ UseLight=!UseLight;
+ if (Model)
+ {
+ Model->setMaterialFlag(video::EMF_LIGHTING, UseLight);
+ Model->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, UseLight);
+ }
+ }
+ return false;
+ }
+
+
+ /*
+ Handle "menu item clicked" events.
+ */
+ void OnMenuItemSelected( IGUIContextMenu* menu )
+ {
+ s32 id = menu->getItemCommandId(menu->getSelectedItem());
+ IGUIEnvironment* env = Device->getGUIEnvironment();
+
+ switch(id)
+ {
+ case GUI_ID_OPEN_MODEL: // FilOnButtonSetScalinge -> Open Model
+ env->addFileOpenDialog(L"Please select a model file to open");
+ break;
+ case GUI_ID_SET_MODEL_ARCHIVE: // File -> Set Model Archive
+ env->addFileOpenDialog(L"Please select your game archive/directory");
+ break;
+ case GUI_ID_LOAD_AS_OCTREE: // File -> LoadAsOctree
+ Octree = !Octree;
+ menu->setItemChecked(menu->getSelectedItem(), Octree);
+ break;
+ case GUI_ID_QUIT: // File -> Quit
+ Device->closeDevice();
+ break;
+ case GUI_ID_SKY_BOX_VISIBLE: // View -> Skybox
+ menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));
+ SkyBox->setVisible(!SkyBox->isVisible());
+ break;
+ case GUI_ID_DEBUG_OFF: // View -> Debug Information
+ menu->setItemChecked(menu->getSelectedItem()+1, false);
+ menu->setItemChecked(menu->getSelectedItem()+2, false);
+ menu->setItemChecked(menu->getSelectedItem()+3, false);
+ menu->setItemChecked(menu->getSelectedItem()+4, false);
+ menu->setItemChecked(menu->getSelectedItem()+5, false);
+ menu->setItemChecked(menu->getSelectedItem()+6, false);
+ if (Model)
+ Model->setDebugDataVisible(scene::EDS_OFF);
+ break;
+ case GUI_ID_DEBUG_BOUNDING_BOX: // View -> Debug Information
+ menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));
+ if (Model)
+ Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_BBOX));
+ break;
+ case GUI_ID_DEBUG_NORMALS: // View -> Debug Information
+ menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));
+ if (Model)
+ Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_NORMALS));
+ break;
+ case GUI_ID_DEBUG_SKELETON: // View -> Debug Information
+ menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));
+ if (Model)
+ Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_SKELETON));
+ break;
+ case GUI_ID_DEBUG_WIRE_OVERLAY: // View -> Debug Information
+ menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));
+ if (Model)
+ Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_MESH_WIRE_OVERLAY));
+ break;
+ case GUI_ID_DEBUG_HALF_TRANSPARENT: // View -> Debug Information
+ menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));
+ if (Model)
+ Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_HALF_TRANSPARENCY));
+ break;
+ case GUI_ID_DEBUG_BUFFERS_BOUNDING_BOXES: // View -> Debug Information
+ menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));
+ if (Model)
+ Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_BBOX_BUFFERS));
+ break;
+ case GUI_ID_DEBUG_ALL: // View -> Debug Information
+ menu->setItemChecked(menu->getSelectedItem()-1, true);
+ menu->setItemChecked(menu->getSelectedItem()-2, true);
+ menu->setItemChecked(menu->getSelectedItem()-3, true);
+ menu->setItemChecked(menu->getSelectedItem()-4, true);
+ menu->setItemChecked(menu->getSelectedItem()-5, true);
+ menu->setItemChecked(menu->getSelectedItem()-6, true);
+ if (Model)
+ Model->setDebugDataVisible(scene::EDS_FULL);
+ break;
+ case GUI_ID_ABOUT: // Help->About
+ showAboutText();
+ break;
+ case GUI_ID_MODEL_MATERIAL_SOLID: // View -> Material -> Solid
+ if (Model)
+ Model->setMaterialType(video::EMT_SOLID);
+ break;
+ case GUI_ID_MODEL_MATERIAL_TRANSPARENT: // View -> Material -> Transparent
+ if (Model)
+ Model->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+ break;
+ case GUI_ID_MODEL_MATERIAL_REFLECTION: // View -> Material -> Reflection
+ if (Model)
+ Model->setMaterialType(video::EMT_SPHERE_MAP);
+ break;
+
+ case GUI_ID_CAMERA_MAYA:
+ setActiveCamera(Camera[0]);
+ break;
+ case GUI_ID_CAMERA_FIRST_PERSON:
+ setActiveCamera(Camera[1]);
+ break;
+ }
+ }
+
+ /*
+ Handle the event that one of the texture-filters was selected in the corresponding combobox.
+ */
+ void OnTextureFilterSelected( IGUIComboBox* combo )
+ {
+ s32 pos = combo->getSelected();
+ switch (pos)
+ {
+ case 0:
+ if (Model)
+ {
+ Model->setMaterialFlag(video::EMF_BILINEAR_FILTER, false);
+ Model->setMaterialFlag(video::EMF_TRILINEAR_FILTER, false);
+ Model->setMaterialFlag(video::EMF_ANISOTROPIC_FILTER, false);
+ }
+ break;
+ case 1:
+ if (Model)
+ {
+ Model->setMaterialFlag(video::EMF_BILINEAR_FILTER, true);
+ Model->setMaterialFlag(video::EMF_TRILINEAR_FILTER, false);
+ }
+ break;
+ case 2:
+ if (Model)
+ {
+ Model->setMaterialFlag(video::EMF_BILINEAR_FILTER, false);
+ Model->setMaterialFlag(video::EMF_TRILINEAR_FILTER, true);
+ }
+ break;
+ case 3:
+ if (Model)
+ {
+ Model->setMaterialFlag(video::EMF_ANISOTROPIC_FILTER, true);
+ }
+ break;
+ case 4:
+ if (Model)
+ {
+ Model->setMaterialFlag(video::EMF_ANISOTROPIC_FILTER, false);
+ }
+ break;
+ }
+ }
+};
+
+
+/*
+Most of the hard work is done. We only need to create the Irrlicht Engine
+device and all the buttons, menus and toolbars. We start up the engine as
+usual, using createDevice(). To make our application catch events, we set our
+eventreceiver as parameter. As you can see, there is also a call to
+IrrlichtDevice::setResizeable(). This makes the render window resizeable, which
+is quite useful for a mesh viewer.
+*/
+int main(int argc, char* argv[])
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ // create device and exit if creation failed
+ MyEventReceiver receiver;
+ Device = createDevice(driverType, core::dimension2d<u32>(800, 600),
+ 16, false, false, false, &receiver);
+
+ if (Device == 0)
+ return 1; // could not create selected driver.
+
+ Device->setResizable(true);
+
+ Device->setWindowCaption(L"Irrlicht Engine - Loading...");
+
+ video::IVideoDriver* driver = Device->getVideoDriver();
+ IGUIEnvironment* env = Device->getGUIEnvironment();
+ scene::ISceneManager* smgr = Device->getSceneManager();
+ smgr->getParameters()->setAttribute(scene::COLLADA_CREATE_SCENE_INSTANCES, true);
+
+ driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);
+
+ smgr->addLightSceneNode(0, core::vector3df(200,200,200),
+ video::SColorf(1.0f,1.0f,1.0f),2000);
+ smgr->setAmbientLight(video::SColorf(0.3f,0.3f,0.3f));
+ // add our media directory as "search path"
+ Device->getFileSystem()->addFileArchive("../../media/");
+
+ /*
+ The next step is to read the configuration file. It is stored in the xml
+ format and looks a little bit like this:
+
+ @verbatim
+ <?xml version="1.0"?>
+ <config>
+ <startUpModel file="some filename" />
+ <messageText caption="Irrlicht Engine Mesh Viewer">
+ Hello!
+ </messageText>
+ </config>
+ @endverbatim
+
+ We need the data stored in there to be written into the global variables
+ StartUpModelFile, MessageText and Caption. This is now done using the
+ Irrlicht Engine integrated XML parser:
+ */
+
+ // read configuration from xml file
+
+ io::IXMLReader* xml = Device->getFileSystem()->createXMLReader( L"config.xml");
+
+ while(xml && xml->read())
+ {
+ switch(xml->getNodeType())
+ {
+ case io::EXN_TEXT:
+ // in this xml file, the only text which occurs is the
+ // messageText
+ MessageText = xml->getNodeData();
+ break;
+ case io::EXN_ELEMENT:
+ {
+ if (core::stringw("startUpModel") == xml->getNodeName())
+ StartUpModelFile = xml->getAttributeValue(L"file");
+ else
+ if (core::stringw("messageText") == xml->getNodeName())
+ Caption = xml->getAttributeValue(L"caption");
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (xml)
+ xml->drop(); // don't forget to delete the xml reader
+
+ if (argc > 1)
+ StartUpModelFile = argv[1];
+
+ /*
+ That wasn't difficult. Now we'll set a nicer font and create the Menu.
+ It is possible to create submenus for every menu item. The call
+ menu->addItem(L"File", -1, true, true); for example adds a new menu
+ Item with the name "File" and the id -1. The following parameter says
+ that the menu item should be enabled, and the last one says, that there
+ should be a submenu. The submenu can now be accessed with
+ menu->getSubMenu(0), because the "File" entry is the menu item with
+ index 0.
+ */
+
+ // set a nicer font
+
+ IGUISkin* skin = env->getSkin();
+ IGUIFont* font = env->getFont("fonthaettenschweiler.bmp");
+ if (font)
+ skin->setFont(font);
+
+ // create menu
+ gui::IGUIContextMenu* menu = env->addMenu();
+ menu->addItem(L"File", -1, true, true);
+ menu->addItem(L"View", -1, true, true);
+ menu->addItem(L"Camera", -1, true, true);
+ menu->addItem(L"Help", -1, true, true);
+
+ gui::IGUIContextMenu* submenu;
+ submenu = menu->getSubMenu(0);
+ submenu->addItem(L"Open Model File & Texture...", GUI_ID_OPEN_MODEL);
+ submenu->addItem(L"Set Model Archive...", GUI_ID_SET_MODEL_ARCHIVE);
+ submenu->addItem(L"Load as Octree", GUI_ID_LOAD_AS_OCTREE);
+ submenu->addSeparator();
+ submenu->addItem(L"Quit", GUI_ID_QUIT);
+
+ submenu = menu->getSubMenu(1);
+ submenu->addItem(L"sky box visible", GUI_ID_SKY_BOX_VISIBLE, true, false, true);
+ submenu->addItem(L"toggle model debug information", GUI_ID_TOGGLE_DEBUG_INFO, true, true);
+ submenu->addItem(L"model material", -1, true, true );
+
+ submenu = submenu->getSubMenu(1);
+ submenu->addItem(L"Off", GUI_ID_DEBUG_OFF);
+ submenu->addItem(L"Bounding Box", GUI_ID_DEBUG_BOUNDING_BOX);
+ submenu->addItem(L"Normals", GUI_ID_DEBUG_NORMALS);
+ submenu->addItem(L"Skeleton", GUI_ID_DEBUG_SKELETON);
+ submenu->addItem(L"Wire overlay", GUI_ID_DEBUG_WIRE_OVERLAY);
+ submenu->addItem(L"Half-Transparent", GUI_ID_DEBUG_HALF_TRANSPARENT);
+ submenu->addItem(L"Buffers bounding boxes", GUI_ID_DEBUG_BUFFERS_BOUNDING_BOXES);
+ submenu->addItem(L"All", GUI_ID_DEBUG_ALL);
+
+ submenu = menu->getSubMenu(1)->getSubMenu(2);
+ submenu->addItem(L"Solid", GUI_ID_MODEL_MATERIAL_SOLID);
+ submenu->addItem(L"Transparent", GUI_ID_MODEL_MATERIAL_TRANSPARENT);
+ submenu->addItem(L"Reflection", GUI_ID_MODEL_MATERIAL_REFLECTION);
+
+ submenu = menu->getSubMenu(2);
+ submenu->addItem(L"Maya Style", GUI_ID_CAMERA_MAYA);
+ submenu->addItem(L"First Person", GUI_ID_CAMERA_FIRST_PERSON);
+
+ submenu = menu->getSubMenu(3);
+ submenu->addItem(L"About", GUI_ID_ABOUT);
+
+ /*
+ Below the menu we want a toolbar, onto which we can place colored
+ buttons and important looking stuff like a senseless combobox.
+ */
+
+ // create toolbar
+
+ gui::IGUIToolBar* bar = env->addToolBar();
+
+ video::ITexture* image = driver->getTexture("open.png");
+ bar->addButton(GUI_ID_BUTTON_OPEN_MODEL, 0, L"Open a model",image, 0, false, true);
+
+ image = driver->getTexture("tools.png");
+ bar->addButton(GUI_ID_BUTTON_SHOW_TOOLBOX, 0, L"Open Toolset",image, 0, false, true);
+
+ image = driver->getTexture("zip.png");
+ bar->addButton(GUI_ID_BUTTON_SELECT_ARCHIVE, 0, L"Set Model Archive",image, 0, false, true);
+
+ image = driver->getTexture("help.png");
+ bar->addButton(GUI_ID_BUTTON_SHOW_ABOUT, 0, L"Open Help", image, 0, false, true);
+
+ // create a combobox for texture filters
+
+ gui::IGUIComboBox* box = env->addComboBox(core::rect<s32>(250,4,350,23), bar, GUI_ID_TEXTUREFILTER);
+ box->addItem(L"No filtering");
+ box->addItem(L"Bilinear");
+ box->addItem(L"Trilinear");
+ box->addItem(L"Anisotropic");
+ box->addItem(L"Isotropic");
+
+ /*
+ To make the editor look a little bit better, we disable transparent gui
+ elements, and add an Irrlicht Engine logo. In addition, a text showing
+ the current frames per second value is created and the window caption is
+ changed.
+ */
+
+ // disable alpha
+
+ for (s32 i=0; i<gui::EGDC_COUNT ; ++i)
+ {
+ video::SColor col = env->getSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i);
+ col.setAlpha(255);
+ env->getSkin()->setColor((gui::EGUI_DEFAULT_COLOR)i, col);
+ }
+
+ // add a tabcontrol
+
+ createToolBox();
+
+ // create fps text
+
+ IGUIStaticText* fpstext = env->addStaticText(L"",
+ core::rect<s32>(400,4,570,23), true, false, bar);
+
+ IGUIStaticText* postext = env->addStaticText(L"",
+ core::rect<s32>(10,50,470,80),false, false, 0, GUI_ID_POSITION_TEXT);
+ postext->setVisible(false);
+
+ // set window caption
+
+ Caption += " - [";
+ Caption += driver->getName();
+ Caption += "]";
+ Device->setWindowCaption(Caption.c_str());
+
+ /*
+ That's nearly the whole application. We simply show the about message
+ box at start up, and load the first model. To make everything look
+ better, a skybox is created and a user controlled camera, to make the
+ application a little bit more interactive. Finally, everything is drawn
+ in a standard drawing loop.
+ */
+
+ // show about message box and load default model
+ if (argc==1)
+ showAboutText();
+ loadModel(StartUpModelFile.c_str());
+
+ // add skybox
+
+ SkyBox = smgr->addSkyBoxSceneNode(
+ driver->getTexture("irrlicht2_up.jpg"),
+ driver->getTexture("irrlicht2_dn.jpg"),
+ driver->getTexture("irrlicht2_lf.jpg"),
+ driver->getTexture("irrlicht2_rt.jpg"),
+ driver->getTexture("irrlicht2_ft.jpg"),
+ driver->getTexture("irrlicht2_bk.jpg"));
+
+ // add a camera scene node
+ Camera[0] = smgr->addCameraSceneNodeMaya();
+ Camera[0]->setFarValue(20000.f);
+ // Maya cameras reposition themselves relative to their target, so target the location
+ // where the mesh scene node is placed.
+ Camera[0]->setTarget(core::vector3df(0,30,0));
+
+ Camera[1] = smgr->addCameraSceneNodeFPS();
+ Camera[1]->setFarValue(20000.f);
+ Camera[1]->setPosition(core::vector3df(0,0,-70));
+ Camera[1]->setTarget(core::vector3df(0,30,0));
+
+ setActiveCamera(Camera[0]);
+
+ // load the irrlicht engine logo
+ IGUIImage *img =
+ env->addImage(driver->getTexture("irrlichtlogo2.png"),
+ core::position2d<s32>(10, driver->getScreenSize().Height - 128));
+
+ // lock the logo's edges to the bottom left corner of the screen
+ img->setAlignment(EGUIA_UPPERLEFT, EGUIA_UPPERLEFT,
+ EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT);
+
+ // remember state so we notice when the window does lose the focus
+ bool hasFocus = Device->isWindowFocused();
+
+ // draw everything
+
+ while(Device->run() && driver)
+ {
+ // Catch focus changes (workaround until Irrlicht has events for this)
+ bool focused = Device->isWindowFocused();
+ if ( hasFocus && !focused )
+ onKillFocus();
+ hasFocus = focused;
+
+ if (Device->isWindowActive())
+ {
+ driver->beginScene(true, true, video::SColor(150,50,50,50));
+
+ smgr->drawAll();
+ env->drawAll();
+
+ driver->endScene();
+
+ // update information about current frame-rate
+ core::stringw str(L"FPS: ");
+ str.append(core::stringw(driver->getFPS()));
+ str += L" Tris: ";
+ str.append(core::stringw(driver->getPrimitiveCountDrawn()));
+ fpstext->setText(str.c_str());
+
+ // update information about the active camera
+ scene::ICameraSceneNode* cam = Device->getSceneManager()->getActiveCamera();
+ str = L"Pos: ";
+ str.append(core::stringw(cam->getPosition().X));
+ str += L" ";
+ str.append(core::stringw(cam->getPosition().Y));
+ str += L" ";
+ str.append(core::stringw(cam->getPosition().Z));
+ str += L" Tgt: ";
+ str.append(core::stringw(cam->getTarget().X));
+ str += L" ";
+ str.append(core::stringw(cam->getTarget().Y));
+ str += L" ";
+ str.append(core::stringw(cam->getTarget().Z));
+ postext->setText(str.c_str());
+
+ // update the tool dialog
+ updateToolBox();
+ }
+ else
+ Device->yield();
+ }
+
+ Device->drop();
+ return 0;
+}
+
+/*
+**/
diff --git a/examples/09.Meshviewer/resource.h b/examples/09.Meshviewer/resource.h new file mode 100644 index 0000000..a8e8616 --- /dev/null +++ b/examples/09.Meshviewer/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by 9.Meshviewer.rc
+//
+#define IDI_ICON1 101
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/examples/09.Meshviewer/tutorial.html b/examples/09.Meshviewer/tutorial.html new file mode 100644 index 0000000..e67cc02 --- /dev/null +++ b/examples/09.Meshviewer/tutorial.html @@ -0,0 +1,213 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 9: Mesh Viewer</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 9: Mesh Viewer </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/009shot.jpg" alt="009shot.jpg"/> +</div> + <p>This tutorial show how to create a more complex application with the engine. We construct a simple mesh viewer using the user interface API and the scene management of Irrlicht. The tutorial show how to create and use Buttons, Windows, Toolbars, Menus, ComboBoxes, Tabcontrols, Editboxes, Images, MessageBoxes, SkyBoxes, and how to parse XML files with the integrated XML reader of the engine.</p> +<p>We start like in most other tutorials: Include all necessary header files, add a comment to let the engine be linked with the right .lib file in Visual Studio, and declare some global variables. We also add two 'using namespace' statements, so we do not need to write the whole names of all classes. In this tutorial, we use a lot stuff from the gui namespace. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"><span class="keyword">using namespace </span>gui;</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> Some global variables used later on </p><div class="fragment"><div class="line">IrrlichtDevice *Device = 0;</div><div class="line">core::stringc StartUpModelFile;</div><div class="line">core::stringw MessageText;</div><div class="line">core::stringw Caption;</div><div class="line">scene::ISceneNode* Model = 0;</div><div class="line">scene::ISceneNode* SkyBox = 0;</div><div class="line"><span class="keywordtype">bool</span> Octree=<span class="keyword">false</span>;</div><div class="line"><span class="keywordtype">bool</span> UseLight=<span class="keyword">false</span>;</div><div class="line"></div><div class="line">scene::ICameraSceneNode* Camera[2] = {0, 0};</div><div class="line"></div><div class="line"><span class="comment">// Values used to identify individual GUI elements</span></div><div class="line"><span class="keyword">enum</span></div><div class="line">{</div><div class="line"> GUI_ID_DIALOG_ROOT_WINDOW = 0x10000,</div><div class="line"></div><div class="line"> GUI_ID_X_SCALE,</div><div class="line"> GUI_ID_Y_SCALE,</div><div class="line"> GUI_ID_Z_SCALE,</div><div class="line"></div><div class="line"> GUI_ID_OPEN_MODEL,</div><div class="line"> GUI_ID_SET_MODEL_ARCHIVE,</div><div class="line"> GUI_ID_LOAD_AS_OCTREE,</div><div class="line"></div><div class="line"> GUI_ID_SKY_BOX_VISIBLE,</div><div class="line"> GUI_ID_TOGGLE_DEBUG_INFO,</div><div class="line"></div><div class="line"> GUI_ID_DEBUG_OFF,</div><div class="line"> GUI_ID_DEBUG_BOUNDING_BOX,</div><div class="line"> GUI_ID_DEBUG_NORMALS,</div><div class="line"> GUI_ID_DEBUG_SKELETON,</div><div class="line"> GUI_ID_DEBUG_WIRE_OVERLAY,</div><div class="line"> GUI_ID_DEBUG_HALF_TRANSPARENT,</div><div class="line"> GUI_ID_DEBUG_BUFFERS_BOUNDING_BOXES,</div><div class="line"> GUI_ID_DEBUG_ALL,</div><div class="line"></div><div class="line"> GUI_ID_MODEL_MATERIAL_SOLID,</div><div class="line"> GUI_ID_MODEL_MATERIAL_TRANSPARENT,</div><div class="line"> GUI_ID_MODEL_MATERIAL_REFLECTION,</div><div class="line"></div><div class="line"> GUI_ID_CAMERA_MAYA,</div><div class="line"> GUI_ID_CAMERA_FIRST_PERSON,</div><div class="line"></div><div class="line"> GUI_ID_POSITION_TEXT,</div><div class="line"></div><div class="line"> GUI_ID_ABOUT,</div><div class="line"> GUI_ID_QUIT,</div><div class="line"></div><div class="line"> GUI_ID_TEXTUREFILTER,</div><div class="line"> GUI_ID_SKIN_TRANSPARENCY,</div><div class="line"> GUI_ID_SKIN_ANIMATION_FPS,</div><div class="line"></div><div class="line"> GUI_ID_BUTTON_SET_SCALE,</div><div class="line"> GUI_ID_BUTTON_SCALE_MUL10,</div><div class="line"> GUI_ID_BUTTON_SCALE_DIV10,</div><div class="line"> GUI_ID_BUTTON_OPEN_MODEL,</div><div class="line"> GUI_ID_BUTTON_SHOW_ABOUT,</div><div class="line"> GUI_ID_BUTTON_SHOW_TOOLBOX,</div><div class="line"> GUI_ID_BUTTON_SELECT_ARCHIVE,</div><div class="line"></div><div class="line"> GUI_ID_ANIMATION_INFO,</div><div class="line"></div><div class="line"> <span class="comment">// And some magic numbers</span></div><div class="line"> MAX_FRAMERATE = 80,</div><div class="line"> DEFAULT_FRAMERATE = 30</div><div class="line">};</div></div><!-- fragment --><p> Toggle between various cameras </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> setActiveCamera(scene::ICameraSceneNode* newActive)</div><div class="line">{</div><div class="line"> <span class="keywordflow">if</span> (0 == Device)</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"></div><div class="line"> scene::ICameraSceneNode * active = Device->getSceneManager()->getActiveCamera();</div><div class="line"> active->setInputReceiverEnabled(<span class="keyword">false</span>);</div><div class="line"></div><div class="line"> newActive->setInputReceiverEnabled(<span class="keyword">true</span>);</div><div class="line"> Device->getSceneManager()->setActiveCamera(newActive);</div><div class="line">}</div></div><!-- fragment --><p> Set the skin transparency by changing the alpha values of all skin-colors </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> setSkinTransparency(s32 alpha, irr::gui::IGUISkin * skin)</div><div class="line">{</div><div class="line"> <span class="keywordflow">for</span> (s32 i=0; i<irr::gui::EGDC_COUNT ; ++i)</div><div class="line"> {</div><div class="line"> video::SColor col = skin->getColor((EGUI_DEFAULT_COLOR)i);</div><div class="line"> col.setAlpha(alpha);</div><div class="line"> skin->setColor((EGUI_DEFAULT_COLOR)i, col);</div><div class="line"> }</div><div class="line">}</div></div><!-- fragment --><p> Update the display of the model scaling </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> updateScaleInfo(scene::ISceneNode* model)</div><div class="line">{</div><div class="line"> IGUIElement* toolboxWnd = Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, <span class="keyword">true</span>);</div><div class="line"> <span class="keywordflow">if</span> (!toolboxWnd)</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"> <span class="keywordflow">if</span> (!model)</div><div class="line"> {</div><div class="line"> toolboxWnd->getElementFromId(GUI_ID_X_SCALE, <span class="keyword">true</span>)->setText( L<span class="stringliteral">"-"</span> );</div><div class="line"> toolboxWnd->getElementFromId(GUI_ID_Y_SCALE, <span class="keyword">true</span>)->setText( L<span class="stringliteral">"-"</span> );</div><div class="line"> toolboxWnd->getElementFromId(GUI_ID_Z_SCALE, <span class="keyword">true</span>)->setText( L<span class="stringliteral">"-"</span> );</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> core::vector3df scale = model->getScale();</div><div class="line"> toolboxWnd->getElementFromId(GUI_ID_X_SCALE, <span class="keyword">true</span>)->setText( core::stringw(scale.X).c_str() );</div><div class="line"> toolboxWnd->getElementFromId(GUI_ID_Y_SCALE, <span class="keyword">true</span>)->setText( core::stringw(scale.Y).c_str() );</div><div class="line"> toolboxWnd->getElementFromId(GUI_ID_Z_SCALE, <span class="keyword">true</span>)->setText( core::stringw(scale.Z).c_str() );</div><div class="line"> }</div><div class="line">}</div></div><!-- fragment --><p> Function showAboutText() displays a messagebox with a caption and a message text. The texts will be stored in the MessageText and Caption variables at startup. </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> showAboutText()</div><div class="line">{</div><div class="line"> <span class="comment">// create modal message box with the text</span></div><div class="line"> <span class="comment">// loaded from the xml file.</span></div><div class="line"> Device->getGUIEnvironment()->addMessageBox(</div><div class="line"> Caption.c_str(), MessageText.c_str());</div><div class="line">}</div></div><!-- fragment --><p> Function loadModel() loads a model and displays it using an addAnimatedMeshSceneNode and the scene manager. Nothing difficult. It also displays a short message box, if the model could not be loaded. </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> loadModel(<span class="keyword">const</span> c8* fn)</div><div class="line">{</div><div class="line"> <span class="comment">// modify the name if it a .pk3 file</span></div><div class="line"></div><div class="line"> io::path filename(fn);</div><div class="line"></div><div class="line"> io::path extension;</div><div class="line"> core::getFileNameExtension(extension, filename);</div><div class="line"> extension.make_lower();</div><div class="line"></div><div class="line"> <span class="comment">// if a texture is loaded apply it to the current model..</span></div><div class="line"> <span class="keywordflow">if</span> (extension == <span class="stringliteral">".jpg"</span> || extension == <span class="stringliteral">".pcx"</span> ||</div><div class="line"> extension == <span class="stringliteral">".png"</span> || extension == <span class="stringliteral">".ppm"</span> ||</div><div class="line"> extension == <span class="stringliteral">".pgm"</span> || extension == <span class="stringliteral">".pbm"</span> ||</div><div class="line"> extension == <span class="stringliteral">".psd"</span> || extension == <span class="stringliteral">".tga"</span> ||</div><div class="line"> extension == <span class="stringliteral">".bmp"</span> || extension == <span class="stringliteral">".wal"</span> ||</div><div class="line"> extension == <span class="stringliteral">".rgb"</span> || extension == <span class="stringliteral">".rgba"</span>)</div><div class="line"> {</div><div class="line"> video::ITexture * texture =</div><div class="line"> Device->getVideoDriver()->getTexture( filename );</div><div class="line"> <span class="keywordflow">if</span> ( texture && Model )</div><div class="line"> {</div><div class="line"> <span class="comment">// always reload texture</span></div><div class="line"> Device->getVideoDriver()->removeTexture(texture);</div><div class="line"> texture = Device->getVideoDriver()->getTexture( filename );</div><div class="line"></div><div class="line"> Model->setMaterialTexture(0, texture);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"> }</div><div class="line"> <span class="comment">// if a archive is loaded add it to the FileArchive..</span></div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (extension == <span class="stringliteral">".pk3"</span> || extension == <span class="stringliteral">".zip"</span> || extension == <span class="stringliteral">".pak"</span> || extension == <span class="stringliteral">".npk"</span>)</div><div class="line"> {</div><div class="line"> Device->getFileSystem()->addFileArchive(filename.c_str());</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// load a model into the engine</span></div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> Model->remove();</div><div class="line"></div><div class="line"> Model = 0;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (extension==<span class="stringliteral">".irr"</span>)</div><div class="line"> {</div><div class="line"> core::array<scene::ISceneNode*> outNodes;</div><div class="line"> Device->getSceneManager()->loadScene(filename);</div><div class="line"> Device->getSceneManager()->getSceneNodesFromType(scene::ESNT_ANIMATED_MESH, outNodes);</div><div class="line"> <span class="keywordflow">if</span> (outNodes.size())</div><div class="line"> Model = outNodes[0];</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> scene::IAnimatedMesh* m = Device->getSceneManager()->getMesh( filename.c_str() );</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (!m)</div><div class="line"> {</div><div class="line"> <span class="comment">// model could not be loaded</span></div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (StartUpModelFile != filename)</div><div class="line"> Device->getGUIEnvironment()->addMessageBox(</div><div class="line"> Caption.c_str(), L<span class="stringliteral">"The model could not be loaded. "</span> \</div><div class="line"> L<span class="stringliteral">"Maybe it is not a supported file format."</span>);</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// set default material properties</span></div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (Octree)</div><div class="line"> Model = Device->getSceneManager()->addOctreeSceneNode(m->getMesh(0));</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> scene::IAnimatedMeshSceneNode* animModel = Device->getSceneManager()->addAnimatedMeshSceneNode(m);</div><div class="line"> animModel->setAnimationSpeed(30);</div><div class="line"> Model = animModel;</div><div class="line"> }</div><div class="line"> Model->setMaterialFlag(video::EMF_LIGHTING, UseLight);</div><div class="line"> Model->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, UseLight);</div><div class="line"><span class="comment">// Model->setMaterialFlag(video::EMF_BACK_FACE_CULLING, false);</span></div><div class="line"> Model->setDebugDataVisible(scene::EDS_OFF);</div><div class="line"></div><div class="line"> <span class="comment">// we need to uncheck the menu entries. would be cool to fake a menu event, but</span></div><div class="line"> <span class="comment">// that's not so simple. so we do it brute force</span></div><div class="line"> gui::IGUIContextMenu* menu = (gui::IGUIContextMenu*)Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_TOGGLE_DEBUG_INFO, <span class="keyword">true</span>);</div><div class="line"> <span class="keywordflow">if</span> (menu)</div><div class="line"> <span class="keywordflow">for</span>(<span class="keywordtype">int</span> item = 1; item < 6; ++item)</div><div class="line"> menu->setItemChecked(item, <span class="keyword">false</span>);</div><div class="line"> updateScaleInfo(Model);</div><div class="line">}</div></div><!-- fragment --><p> Function createToolBox() creates a toolbox window. In this simple mesh viewer, this toolbox only contains a tab control with three edit boxes for changing the scale of the displayed model. </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> createToolBox()</div><div class="line">{</div><div class="line"> <span class="comment">// remove tool box if already there</span></div><div class="line"> IGUIEnvironment* env = Device->getGUIEnvironment();</div><div class="line"> IGUIElement* root = env->getRootGUIElement();</div><div class="line"> IGUIElement* e = root->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, <span class="keyword">true</span>);</div><div class="line"> <span class="keywordflow">if</span> (e)</div><div class="line"> e->remove();</div><div class="line"></div><div class="line"> <span class="comment">// create the toolbox window</span></div><div class="line"> IGUIWindow* wnd = env->addWindow(core::rect<s32>(600,45,800,480),</div><div class="line"> <span class="keyword">false</span>, L<span class="stringliteral">"Toolset"</span>, 0, GUI_ID_DIALOG_ROOT_WINDOW);</div><div class="line"></div><div class="line"> <span class="comment">// create tab control and tabs</span></div><div class="line"> IGUITabControl* tab = env->addTabControl(</div><div class="line"> core::rect<s32>(2,20,800-602,480-7), wnd, <span class="keyword">true</span>, <span class="keyword">true</span>);</div><div class="line"></div><div class="line"> IGUITab* t1 = tab->addTab(L<span class="stringliteral">"Config"</span>);</div><div class="line"></div><div class="line"> <span class="comment">// add some edit boxes and a button to tab one</span></div><div class="line"> env->addStaticText(L<span class="stringliteral">"Scale:"</span>,</div><div class="line"> core::rect<s32>(10,20,60,45), <span class="keyword">false</span>, <span class="keyword">false</span>, t1);</div><div class="line"> env->addStaticText(L<span class="stringliteral">"X:"</span>, core::rect<s32>(22,48,40,66), <span class="keyword">false</span>, <span class="keyword">false</span>, t1);</div><div class="line"> env->addEditBox(L<span class="stringliteral">"1.0"</span>, core::rect<s32>(40,46,130,66), <span class="keyword">true</span>, t1, GUI_ID_X_SCALE);</div><div class="line"> env->addStaticText(L<span class="stringliteral">"Y:"</span>, core::rect<s32>(22,82,40,96), <span class="keyword">false</span>, <span class="keyword">false</span>, t1);</div><div class="line"> env->addEditBox(L<span class="stringliteral">"1.0"</span>, core::rect<s32>(40,76,130,96), <span class="keyword">true</span>, t1, GUI_ID_Y_SCALE);</div><div class="line"> env->addStaticText(L<span class="stringliteral">"Z:"</span>, core::rect<s32>(22,108,40,126), <span class="keyword">false</span>, <span class="keyword">false</span>, t1);</div><div class="line"> env->addEditBox(L<span class="stringliteral">"1.0"</span>, core::rect<s32>(40,106,130,126), <span class="keyword">true</span>, t1, GUI_ID_Z_SCALE);</div><div class="line"></div><div class="line"> env->addButton(core::rect<s32>(10,134,85,165), t1, GUI_ID_BUTTON_SET_SCALE, L<span class="stringliteral">"Set"</span>);</div><div class="line"></div><div class="line"> <span class="comment">// quick scale buttons</span></div><div class="line"> env->addButton(core::rect<s32>(65,20,95,40), t1, GUI_ID_BUTTON_SCALE_MUL10, L<span class="stringliteral">"* 10"</span>);</div><div class="line"> env->addButton(core::rect<s32>(100,20,130,40), t1, GUI_ID_BUTTON_SCALE_DIV10, L<span class="stringliteral">"* 0.1"</span>);</div><div class="line"></div><div class="line"> updateScaleInfo(Model);</div><div class="line"></div><div class="line"> <span class="comment">// add transparency control</span></div><div class="line"> env->addStaticText(L<span class="stringliteral">"GUI Transparency Control:"</span>,</div><div class="line"> core::rect<s32>(10,200,150,225), <span class="keyword">true</span>, <span class="keyword">false</span>, t1);</div><div class="line"> IGUIScrollBar* scrollbar = env->addScrollBar(<span class="keyword">true</span>,</div><div class="line"> core::rect<s32>(10,225,150,240), t1, GUI_ID_SKIN_TRANSPARENCY);</div><div class="line"> scrollbar->setMax(255);</div><div class="line"> scrollbar->setPos(255);</div><div class="line"></div><div class="line"> <span class="comment">// add framerate control</span></div><div class="line"> env->addStaticText(L<span class="stringliteral">":"</span>, core::rect<s32>(10,240,150,265), <span class="keyword">true</span>, <span class="keyword">false</span>, t1);</div><div class="line"> env->addStaticText(L<span class="stringliteral">"Framerate:"</span>,</div><div class="line"> core::rect<s32>(12,240,75,265), <span class="keyword">false</span>, <span class="keyword">false</span>, t1);</div><div class="line"> <span class="comment">// current frame info</span></div><div class="line"> env->addStaticText(L<span class="stringliteral">""</span>, core::rect<s32>(75,240,200,265), <span class="keyword">false</span>, <span class="keyword">false</span>, t1,</div><div class="line"> GUI_ID_ANIMATION_INFO);</div><div class="line"> scrollbar = env->addScrollBar(<span class="keyword">true</span>,</div><div class="line"> core::rect<s32>(10,265,150,280), t1, GUI_ID_SKIN_ANIMATION_FPS);</div><div class="line"> scrollbar->setMax(MAX_FRAMERATE);</div><div class="line"> scrollbar->setMin(-MAX_FRAMERATE);</div><div class="line"> scrollbar->setPos(DEFAULT_FRAMERATE);</div><div class="line"> scrollbar->setSmallStep(1);</div><div class="line">}</div></div><!-- fragment --><p> Function updateToolBox() is called each frame to update dynamic information in the toolbox. </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> updateToolBox()</div><div class="line">{</div><div class="line"> IGUIEnvironment* env = Device->getGUIEnvironment();</div><div class="line"> IGUIElement* root = env->getRootGUIElement();</div><div class="line"> IGUIElement* dlg = root->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, <span class="keyword">true</span>);</div><div class="line"> <span class="keywordflow">if</span> (!dlg )</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"></div><div class="line"> <span class="comment">// update the info we have about the animation of the model</span></div><div class="line"> IGUIStaticText * aniInfo = (IGUIStaticText *)(dlg->getElementFromId(GUI_ID_ANIMATION_INFO, <span class="keyword">true</span>));</div><div class="line"> <span class="keywordflow">if</span> (aniInfo)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( Model && scene::ESNT_ANIMATED_MESH == Model->getType() )</div><div class="line"> {</div><div class="line"> scene::IAnimatedMeshSceneNode* animatedModel = (scene::IAnimatedMeshSceneNode*)Model;</div><div class="line"></div><div class="line"> core::stringw str( (s32)core::round_(animatedModel->getAnimationSpeed()) );</div><div class="line"> str += L<span class="stringliteral">" Frame: "</span>;</div><div class="line"> str += core::stringw((s32)animatedModel->getFrameNr());</div><div class="line"> aniInfo->setText(str.c_str());</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> aniInfo->setText(L<span class="stringliteral">""</span>);</div><div class="line"> }</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keywordtype">void</span> onKillFocus()</div><div class="line">{</div><div class="line"> <span class="comment">// Avoid that the FPS-camera continues moving when the user presses alt-tab while </span></div><div class="line"> <span class="comment">// moving the camera. </span></div><div class="line"> <span class="keyword">const</span> core::list<scene::ISceneNodeAnimator*>& animators = Camera[1]->getAnimators();</div><div class="line"> core::list<irr::scene::ISceneNodeAnimator*>::ConstIterator iter = animators.begin();</div><div class="line"> <span class="keywordflow">while</span> ( iter != animators.end() )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( (*iter)->getType() == scene::ESNAT_CAMERA_FPS )</div><div class="line"> {</div><div class="line"> <span class="comment">// we send a key-down event for all keys used by this animator</span></div><div class="line"> scene::ISceneNodeAnimatorCameraFPS * fpsAnimator = <span class="keyword">static_cast<</span>scene::ISceneNodeAnimatorCameraFPS*<span class="keyword">></span>(*iter);</div><div class="line"> <span class="keyword">const</span> core::array<SKeyMap>& keyMap = fpsAnimator->getKeyMap();</div><div class="line"> <span class="keywordflow">for</span> ( irr::u32 i=0; i< keyMap.size(); ++i )</div><div class="line"> {</div><div class="line"> irr::SEvent event;</div><div class="line"> <span class="keyword">event</span>.EventType = EET_KEY_INPUT_EVENT;</div><div class="line"> <span class="keyword">event</span>.KeyInput.Key = keyMap[i].KeyCode;</div><div class="line"> <span class="keyword">event</span>.KeyInput.PressedDown = <span class="keyword">false</span>;</div><div class="line"> fpsAnimator->OnEvent(event);</div><div class="line"> }</div><div class="line"> }</div><div class="line"> ++iter;</div><div class="line"> }</div><div class="line">}</div></div><!-- fragment --><p> Function hasModalDialog() checks if we currently have a modal dialog open. </p><div class="fragment"><div class="line"><span class="keywordtype">bool</span> hasModalDialog()</div><div class="line">{</div><div class="line"> <span class="keywordflow">if</span> ( !Device )</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> IGUIEnvironment* env = Device->getGUIEnvironment();</div><div class="line"> IGUIElement * focused = env->getFocus();</div><div class="line"> <span class="keywordflow">while</span> ( focused )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( focused->isVisible() && focused->hasType(EGUIET_MODAL_SCREEN) )</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> focused = focused->getParent();</div><div class="line"> }</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line">}</div></div><!-- fragment --><p> To get all the events sent by the GUI Elements, we need to create an event receiver. This one is really simple. If an event occurs, it checks the id of the caller and the event type, and starts an action based on these values. For example, if a menu item with id GUI_ID_OPEN_MODEL was selected, it opens a file-open-dialog. </p><div class="fragment"><div class="line"><span class="keyword">class </span>MyEventReceiver : <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent& event)</div><div class="line"> {</div><div class="line"> <span class="comment">// Escape swaps Camera Input</span></div><div class="line"> <span class="keywordflow">if</span> (event.EventType == EET_KEY_INPUT_EVENT &&</div><div class="line"> event.KeyInput.PressedDown == <span class="keyword">false</span>)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( OnKeyUp(event.KeyInput.Key) )</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (event.EventType == EET_GUI_EVENT)</div><div class="line"> {</div><div class="line"> s32 <span class="keywordtype">id</span> = <span class="keyword">event</span>.GUIEvent.Caller->getID();</div><div class="line"> IGUIEnvironment* env = Device->getGUIEnvironment();</div><div class="line"></div><div class="line"> <span class="keywordflow">switch</span>(event.GUIEvent.EventType)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> EGET_MENU_ITEM_SELECTED:</div><div class="line"> <span class="comment">// a menu item was clicked</span></div><div class="line"> OnMenuItemSelected( (IGUIContextMenu*)event.GUIEvent.Caller );</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EGET_FILE_SELECTED:</div><div class="line"> {</div><div class="line"> <span class="comment">// load the model file, selected in the file open dialog</span></div><div class="line"> IGUIFileOpenDialog* dialog =</div><div class="line"> (IGUIFileOpenDialog*)event.GUIEvent.Caller;</div><div class="line"> loadModel(core::stringc(dialog->getFileName()).c_str());</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EGET_SCROLL_BAR_CHANGED:</div><div class="line"></div><div class="line"> <span class="comment">// control skin transparency</span></div><div class="line"> <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == GUI_ID_SKIN_TRANSPARENCY)</div><div class="line"> {</div><div class="line"> <span class="keyword">const</span> s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos();</div><div class="line"> setSkinTransparency(pos, env->getSkin());</div><div class="line"> }</div><div class="line"> <span class="comment">// control animation speed</span></div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == GUI_ID_SKIN_ANIMATION_FPS)</div><div class="line"> {</div><div class="line"> <span class="keyword">const</span> s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos();</div><div class="line"> <span class="keywordflow">if</span> (scene::ESNT_ANIMATED_MESH == Model->getType())</div><div class="line"> ((scene::IAnimatedMeshSceneNode*)Model)->setAnimationSpeed((f32)pos);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EGET_COMBO_BOX_CHANGED:</div><div class="line"></div><div class="line"> <span class="comment">// control anti-aliasing/filtering</span></div><div class="line"> <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == GUI_ID_TEXTUREFILTER)</div><div class="line"> {</div><div class="line"> OnTextureFilterSelected( (IGUIComboBox*)event.GUIEvent.Caller );</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EGET_BUTTON_CLICKED:</div><div class="line"></div><div class="line"> <span class="keywordflow">switch</span>(<span class="keywordtype">id</span>)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_BUTTON_SET_SCALE:</div><div class="line"> {</div><div class="line"> <span class="comment">// set scale</span></div><div class="line"> gui::IGUIElement* root = env->getRootGUIElement();</div><div class="line"> core::vector3df scale;</div><div class="line"> core::stringc s;</div><div class="line"></div><div class="line"> s = root->getElementFromId(GUI_ID_X_SCALE, <span class="keyword">true</span>)->getText();</div><div class="line"> scale.X = (f32)atof(s.c_str());</div><div class="line"> s = root->getElementFromId(GUI_ID_Y_SCALE, <span class="keyword">true</span>)->getText();</div><div class="line"> scale.Y = (f32)atof(s.c_str());</div><div class="line"> s = root->getElementFromId(GUI_ID_Z_SCALE, <span class="keyword">true</span>)->getText();</div><div class="line"> scale.Z = (f32)atof(s.c_str());</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> Model->setScale(scale);</div><div class="line"> updateScaleInfo(Model);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_BUTTON_SCALE_MUL10:</div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> Model->setScale(Model->getScale()*10.f);</div><div class="line"> updateScaleInfo(Model);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_BUTTON_SCALE_DIV10:</div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> Model->setScale(Model->getScale()*0.1f);</div><div class="line"> updateScaleInfo(Model);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_BUTTON_OPEN_MODEL:</div><div class="line"> env->addFileOpenDialog(L<span class="stringliteral">"Please select a model file to open"</span>);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_BUTTON_SHOW_ABOUT:</div><div class="line"> showAboutText();</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_BUTTON_SHOW_TOOLBOX:</div><div class="line"> createToolBox();</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_BUTTON_SELECT_ARCHIVE:</div><div class="line"> env->addFileOpenDialog(L<span class="stringliteral">"Please select your game archive/directory"</span>);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">default</span>:</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div></div><!-- fragment --><p> Handle key-up events </p><div class="fragment"><div class="line"><span class="keywordtype">bool</span> OnKeyUp(irr::EKEY_CODE keyCode)</div><div class="line">{</div><div class="line"> <span class="comment">// Don't handle keys if we have a modal dialog open as it would lead </span></div><div class="line"> <span class="comment">// to unexpected application behaviour for the user.</span></div><div class="line"> <span class="keywordflow">if</span> ( hasModalDialog() )</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> </div><div class="line"> <span class="keywordflow">if</span> (keyCode == irr::KEY_ESCAPE)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (Device)</div><div class="line"> {</div><div class="line"> scene::ICameraSceneNode * camera =</div><div class="line"> Device->getSceneManager()->getActiveCamera();</div><div class="line"> <span class="keywordflow">if</span> (camera)</div><div class="line"> {</div><div class="line"> camera->setInputReceiverEnabled( !camera->isInputReceiverEnabled() );</div><div class="line"> }</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (keyCode == irr::KEY_F1)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (Device)</div><div class="line"> {</div><div class="line"> IGUIElement* elem = Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_POSITION_TEXT);</div><div class="line"> <span class="keywordflow">if</span> (elem)</div><div class="line"> elem->setVisible(!elem->isVisible());</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (keyCode == irr::KEY_KEY_M)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (Device)</div><div class="line"> Device->minimizeWindow();</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (keyCode == irr::KEY_KEY_L)</div><div class="line"> {</div><div class="line"> UseLight=!UseLight;</div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> {</div><div class="line"> Model->setMaterialFlag(video::EMF_LIGHTING, UseLight);</div><div class="line"> Model->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, UseLight);</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line">}</div></div><!-- fragment --><p> Handle "menu item clicked" events. </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> OnMenuItemSelected( IGUIContextMenu* menu )</div><div class="line">{</div><div class="line"> s32 <span class="keywordtype">id</span> = menu->getItemCommandId(menu->getSelectedItem());</div><div class="line"> IGUIEnvironment* env = Device->getGUIEnvironment();</div><div class="line"></div><div class="line"> <span class="keywordflow">switch</span>(<span class="keywordtype">id</span>)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_OPEN_MODEL: <span class="comment">// FilOnButtonSetScalinge -> Open Model</span></div><div class="line"> env->addFileOpenDialog(L<span class="stringliteral">"Please select a model file to open"</span>);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_SET_MODEL_ARCHIVE: <span class="comment">// File -> Set Model Archive</span></div><div class="line"> env->addFileOpenDialog(L<span class="stringliteral">"Please select your game archive/directory"</span>);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_LOAD_AS_OCTREE: <span class="comment">// File -> LoadAsOctree</span></div><div class="line"> Octree = !Octree;</div><div class="line"> menu->setItemChecked(menu->getSelectedItem(), Octree);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_QUIT: <span class="comment">// File -> Quit</span></div><div class="line"> Device->closeDevice();</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_SKY_BOX_VISIBLE: <span class="comment">// View -> Skybox</span></div><div class="line"> menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));</div><div class="line"> SkyBox->setVisible(!SkyBox->isVisible());</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_DEBUG_OFF: <span class="comment">// View -> Debug Information</span></div><div class="line"> menu->setItemChecked(menu->getSelectedItem()+1, <span class="keyword">false</span>);</div><div class="line"> menu->setItemChecked(menu->getSelectedItem()+2, <span class="keyword">false</span>);</div><div class="line"> menu->setItemChecked(menu->getSelectedItem()+3, <span class="keyword">false</span>);</div><div class="line"> menu->setItemChecked(menu->getSelectedItem()+4, <span class="keyword">false</span>);</div><div class="line"> menu->setItemChecked(menu->getSelectedItem()+5, <span class="keyword">false</span>);</div><div class="line"> menu->setItemChecked(menu->getSelectedItem()+6, <span class="keyword">false</span>);</div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> Model->setDebugDataVisible(scene::EDS_OFF);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_DEBUG_BOUNDING_BOX: <span class="comment">// View -> Debug Information</span></div><div class="line"> menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));</div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_BBOX));</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_DEBUG_NORMALS: <span class="comment">// View -> Debug Information</span></div><div class="line"> menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));</div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_NORMALS));</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_DEBUG_SKELETON: <span class="comment">// View -> Debug Information</span></div><div class="line"> menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));</div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_SKELETON));</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_DEBUG_WIRE_OVERLAY: <span class="comment">// View -> Debug Information</span></div><div class="line"> menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));</div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_MESH_WIRE_OVERLAY));</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_DEBUG_HALF_TRANSPARENT: <span class="comment">// View -> Debug Information</span></div><div class="line"> menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));</div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_HALF_TRANSPARENCY));</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_DEBUG_BUFFERS_BOUNDING_BOXES: <span class="comment">// View -> Debug Information</span></div><div class="line"> menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));</div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_BBOX_BUFFERS));</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_DEBUG_ALL: <span class="comment">// View -> Debug Information</span></div><div class="line"> menu->setItemChecked(menu->getSelectedItem()-1, <span class="keyword">true</span>);</div><div class="line"> menu->setItemChecked(menu->getSelectedItem()-2, <span class="keyword">true</span>);</div><div class="line"> menu->setItemChecked(menu->getSelectedItem()-3, <span class="keyword">true</span>);</div><div class="line"> menu->setItemChecked(menu->getSelectedItem()-4, <span class="keyword">true</span>);</div><div class="line"> menu->setItemChecked(menu->getSelectedItem()-5, <span class="keyword">true</span>);</div><div class="line"> menu->setItemChecked(menu->getSelectedItem()-6, <span class="keyword">true</span>);</div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> Model->setDebugDataVisible(scene::EDS_FULL);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_ABOUT: <span class="comment">// Help->About</span></div><div class="line"> showAboutText();</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_MODEL_MATERIAL_SOLID: <span class="comment">// View -> Material -> Solid</span></div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> Model->setMaterialType(video::EMT_SOLID);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_MODEL_MATERIAL_TRANSPARENT: <span class="comment">// View -> Material -> Transparent</span></div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> Model->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_MODEL_MATERIAL_REFLECTION: <span class="comment">// View -> Material -> Reflection</span></div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> Model->setMaterialType(video::EMT_SPHERE_MAP);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> GUI_ID_CAMERA_MAYA:</div><div class="line"> setActiveCamera(Camera[0]);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_CAMERA_FIRST_PERSON:</div><div class="line"> setActiveCamera(Camera[1]);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line">}</div></div><!-- fragment --><p> Handle the event that one of the texture-filters was selected in the corresponding combobox. </p><div class="fragment"><div class="line"> <span class="keywordtype">void</span> OnTextureFilterSelected( IGUIComboBox* combo )</div><div class="line"> {</div><div class="line"> s32 pos = combo->getSelected();</div><div class="line"> <span class="keywordflow">switch</span> (pos)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> 0:</div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> {</div><div class="line"> Model->setMaterialFlag(video::EMF_BILINEAR_FILTER, <span class="keyword">false</span>);</div><div class="line"> Model->setMaterialFlag(video::EMF_TRILINEAR_FILTER, <span class="keyword">false</span>);</div><div class="line"> Model->setMaterialFlag(video::EMF_ANISOTROPIC_FILTER, <span class="keyword">false</span>);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> 1:</div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> {</div><div class="line"> Model->setMaterialFlag(video::EMF_BILINEAR_FILTER, <span class="keyword">true</span>);</div><div class="line"> Model->setMaterialFlag(video::EMF_TRILINEAR_FILTER, <span class="keyword">false</span>);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> 2:</div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> {</div><div class="line"> Model->setMaterialFlag(video::EMF_BILINEAR_FILTER, <span class="keyword">false</span>);</div><div class="line"> Model->setMaterialFlag(video::EMF_TRILINEAR_FILTER, <span class="keyword">true</span>);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> 3:</div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> {</div><div class="line"> Model->setMaterialFlag(video::EMF_ANISOTROPIC_FILTER, <span class="keyword">true</span>);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> 4:</div><div class="line"> <span class="keywordflow">if</span> (Model)</div><div class="line"> {</div><div class="line"> Model->setMaterialFlag(video::EMF_ANISOTROPIC_FILTER, <span class="keyword">false</span>);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line">};</div></div><!-- fragment --><p> Most of the hard work is done. We only need to create the Irrlicht Engine device and all the buttons, menus and toolbars. We start up the engine as usual, using createDevice(). To make our application catch events, we set our eventreceiver as parameter. As you can see, there is also a call to IrrlichtDevice::setResizeable(). This makes the render window resizeable, which is quite useful for a mesh viewer. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>* argv[])</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> <span class="comment">// create device and exit if creation failed</span></div><div class="line"> MyEventReceiver receiver;</div><div class="line"> Device = createDevice(driverType, core::dimension2d<u32>(800, 600),</div><div class="line"> 16, <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">false</span>, &receiver);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (Device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div><div class="line"></div><div class="line"> Device->setResizable(<span class="keyword">true</span>);</div><div class="line"></div><div class="line"> Device->setWindowCaption(L<span class="stringliteral">"Irrlicht Engine - Loading..."</span>);</div><div class="line"></div><div class="line"> video::IVideoDriver* driver = Device->getVideoDriver();</div><div class="line"> IGUIEnvironment* env = Device->getGUIEnvironment();</div><div class="line"> scene::ISceneManager* smgr = Device->getSceneManager();</div><div class="line"> smgr->getParameters()->setAttribute(scene::COLLADA_CREATE_SCENE_INSTANCES, <span class="keyword">true</span>);</div><div class="line"></div><div class="line"> driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, <span class="keyword">true</span>);</div><div class="line"></div><div class="line"> smgr->addLightSceneNode(0, core::vector3df(200,200,200),</div><div class="line"> video::SColorf(1.0f,1.0f,1.0f),2000);</div><div class="line"> smgr->setAmbientLight(video::SColorf(0.3f,0.3f,0.3f));</div><div class="line"> <span class="comment">// add our media directory as "search path"</span></div><div class="line"> Device->getFileSystem()->addFileArchive(<span class="stringliteral">"../../media/"</span>);</div></div><!-- fragment --><p> The next step is to read the configuration file. It is stored in the xml format and looks a little bit like this:</p> +<pre class="fragment"> <?xml version="1.0"?> + <config> + <startUpModel file="some filename" /> + <messageText caption="Irrlicht Engine Mesh Viewer"> + Hello! + </messageText> + </config></pre><p>We need the data stored in there to be written into the global variables StartUpModelFile, MessageText and Caption. This is now done using the Irrlicht Engine integrated XML parser: </p><div class="fragment"><div class="line"><span class="comment">// read configuration from xml file</span></div><div class="line"></div><div class="line">io::IXMLReader* xml = Device->getFileSystem()->createXMLReader( L<span class="stringliteral">"config.xml"</span>);</div><div class="line"></div><div class="line"><span class="keywordflow">while</span>(xml && xml->read())</div><div class="line">{</div><div class="line"> <span class="keywordflow">switch</span>(xml->getNodeType())</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> io::EXN_TEXT:</div><div class="line"> <span class="comment">// in this xml file, the only text which occurs is the</span></div><div class="line"> <span class="comment">// messageText</span></div><div class="line"> MessageText = xml->getNodeData();</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> io::EXN_ELEMENT:</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (core::stringw(<span class="stringliteral">"startUpModel"</span>) == xml->getNodeName())</div><div class="line"> StartUpModelFile = xml->getAttributeValue(L<span class="stringliteral">"file"</span>);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> (core::stringw(<span class="stringliteral">"messageText"</span>) == xml->getNodeName())</div><div class="line"> Caption = xml->getAttributeValue(L<span class="stringliteral">"caption"</span>);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">default</span>:</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (xml)</div><div class="line"> xml->drop(); <span class="comment">// don't forget to delete the xml reader</span></div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (argc > 1)</div><div class="line"> StartUpModelFile = argv[1];</div></div><!-- fragment --><p> That wasn't difficult. Now we'll set a nicer font and create the Menu. It is possible to create submenus for every menu item. The call menu->addItem(L"File", -1, true, true); for example adds a new menu Item with the name "File" and the id -1. The following parameter says that the menu item should be enabled, and the last one says, that there should be a submenu. The submenu can now be accessed with menu->getSubMenu(0), because the "File" entry is the menu item with index 0. </p><div class="fragment"><div class="line"><span class="comment">// set a nicer font</span></div><div class="line"></div><div class="line">IGUISkin* skin = env->getSkin();</div><div class="line">IGUIFont* font = env->getFont(<span class="stringliteral">"fonthaettenschweiler.bmp"</span>);</div><div class="line"><span class="keywordflow">if</span> (font)</div><div class="line"> skin->setFont(font);</div><div class="line"></div><div class="line"><span class="comment">// create menu</span></div><div class="line">gui::IGUIContextMenu* menu = env->addMenu();</div><div class="line">menu->addItem(L<span class="stringliteral">"File"</span>, -1, <span class="keyword">true</span>, <span class="keyword">true</span>);</div><div class="line">menu->addItem(L<span class="stringliteral">"View"</span>, -1, <span class="keyword">true</span>, <span class="keyword">true</span>);</div><div class="line">menu->addItem(L<span class="stringliteral">"Camera"</span>, -1, <span class="keyword">true</span>, <span class="keyword">true</span>);</div><div class="line">menu->addItem(L<span class="stringliteral">"Help"</span>, -1, <span class="keyword">true</span>, <span class="keyword">true</span>);</div><div class="line"></div><div class="line">gui::IGUIContextMenu* submenu;</div><div class="line">submenu = menu->getSubMenu(0);</div><div class="line">submenu->addItem(L<span class="stringliteral">"Open Model File & Texture..."</span>, GUI_ID_OPEN_MODEL);</div><div class="line">submenu->addItem(L<span class="stringliteral">"Set Model Archive..."</span>, GUI_ID_SET_MODEL_ARCHIVE);</div><div class="line">submenu->addItem(L<span class="stringliteral">"Load as Octree"</span>, GUI_ID_LOAD_AS_OCTREE);</div><div class="line">submenu->addSeparator();</div><div class="line">submenu->addItem(L<span class="stringliteral">"Quit"</span>, GUI_ID_QUIT);</div><div class="line"></div><div class="line">submenu = menu->getSubMenu(1);</div><div class="line">submenu->addItem(L<span class="stringliteral">"sky box visible"</span>, GUI_ID_SKY_BOX_VISIBLE, <span class="keyword">true</span>, <span class="keyword">false</span>, <span class="keyword">true</span>);</div><div class="line">submenu->addItem(L<span class="stringliteral">"toggle model debug information"</span>, GUI_ID_TOGGLE_DEBUG_INFO, <span class="keyword">true</span>, <span class="keyword">true</span>);</div><div class="line">submenu->addItem(L<span class="stringliteral">"model material"</span>, -1, <span class="keyword">true</span>, <span class="keyword">true</span> );</div><div class="line"></div><div class="line">submenu = submenu->getSubMenu(1);</div><div class="line">submenu->addItem(L<span class="stringliteral">"Off"</span>, GUI_ID_DEBUG_OFF);</div><div class="line">submenu->addItem(L<span class="stringliteral">"Bounding Box"</span>, GUI_ID_DEBUG_BOUNDING_BOX);</div><div class="line">submenu->addItem(L<span class="stringliteral">"Normals"</span>, GUI_ID_DEBUG_NORMALS);</div><div class="line">submenu->addItem(L<span class="stringliteral">"Skeleton"</span>, GUI_ID_DEBUG_SKELETON);</div><div class="line">submenu->addItem(L<span class="stringliteral">"Wire overlay"</span>, GUI_ID_DEBUG_WIRE_OVERLAY);</div><div class="line">submenu->addItem(L<span class="stringliteral">"Half-Transparent"</span>, GUI_ID_DEBUG_HALF_TRANSPARENT);</div><div class="line">submenu->addItem(L<span class="stringliteral">"Buffers bounding boxes"</span>, GUI_ID_DEBUG_BUFFERS_BOUNDING_BOXES);</div><div class="line">submenu->addItem(L<span class="stringliteral">"All"</span>, GUI_ID_DEBUG_ALL);</div><div class="line"></div><div class="line">submenu = menu->getSubMenu(1)->getSubMenu(2);</div><div class="line">submenu->addItem(L<span class="stringliteral">"Solid"</span>, GUI_ID_MODEL_MATERIAL_SOLID);</div><div class="line">submenu->addItem(L<span class="stringliteral">"Transparent"</span>, GUI_ID_MODEL_MATERIAL_TRANSPARENT);</div><div class="line">submenu->addItem(L<span class="stringliteral">"Reflection"</span>, GUI_ID_MODEL_MATERIAL_REFLECTION);</div><div class="line"></div><div class="line">submenu = menu->getSubMenu(2);</div><div class="line">submenu->addItem(L<span class="stringliteral">"Maya Style"</span>, GUI_ID_CAMERA_MAYA);</div><div class="line">submenu->addItem(L<span class="stringliteral">"First Person"</span>, GUI_ID_CAMERA_FIRST_PERSON);</div><div class="line"></div><div class="line">submenu = menu->getSubMenu(3);</div><div class="line">submenu->addItem(L<span class="stringliteral">"About"</span>, GUI_ID_ABOUT);</div></div><!-- fragment --><p> Below the menu we want a toolbar, onto which we can place colored buttons and important looking stuff like a senseless combobox. </p><div class="fragment"><div class="line"><span class="comment">// create toolbar</span></div><div class="line"></div><div class="line">gui::IGUIToolBar* bar = env->addToolBar();</div><div class="line"></div><div class="line">video::ITexture* image = driver->getTexture(<span class="stringliteral">"open.png"</span>);</div><div class="line">bar->addButton(GUI_ID_BUTTON_OPEN_MODEL, 0, L<span class="stringliteral">"Open a model"</span>,image, 0, <span class="keyword">false</span>, <span class="keyword">true</span>);</div><div class="line"></div><div class="line">image = driver->getTexture(<span class="stringliteral">"tools.png"</span>);</div><div class="line">bar->addButton(GUI_ID_BUTTON_SHOW_TOOLBOX, 0, L<span class="stringliteral">"Open Toolset"</span>,image, 0, <span class="keyword">false</span>, <span class="keyword">true</span>);</div><div class="line"></div><div class="line">image = driver->getTexture(<span class="stringliteral">"zip.png"</span>);</div><div class="line">bar->addButton(GUI_ID_BUTTON_SELECT_ARCHIVE, 0, L<span class="stringliteral">"Set Model Archive"</span>,image, 0, <span class="keyword">false</span>, <span class="keyword">true</span>);</div><div class="line"></div><div class="line">image = driver->getTexture(<span class="stringliteral">"help.png"</span>);</div><div class="line">bar->addButton(GUI_ID_BUTTON_SHOW_ABOUT, 0, L<span class="stringliteral">"Open Help"</span>, image, 0, <span class="keyword">false</span>, <span class="keyword">true</span>);</div><div class="line"></div><div class="line"><span class="comment">// create a combobox for texture filters</span></div><div class="line"></div><div class="line">gui::IGUIComboBox* box = env->addComboBox(core::rect<s32>(250,4,350,23), bar, GUI_ID_TEXTUREFILTER);</div><div class="line">box->addItem(L<span class="stringliteral">"No filtering"</span>);</div><div class="line">box->addItem(L<span class="stringliteral">"Bilinear"</span>);</div><div class="line">box->addItem(L<span class="stringliteral">"Trilinear"</span>);</div><div class="line">box->addItem(L<span class="stringliteral">"Anisotropic"</span>);</div><div class="line">box->addItem(L<span class="stringliteral">"Isotropic"</span>);</div></div><!-- fragment --><p> To make the editor look a little bit better, we disable transparent gui elements, and add an Irrlicht Engine logo. In addition, a text showing the current frames per second value is created and the window caption is changed. </p><div class="fragment"><div class="line"><span class="comment">// disable alpha</span></div><div class="line"></div><div class="line"><span class="keywordflow">for</span> (s32 i=0; i<gui::EGDC_COUNT ; ++i)</div><div class="line">{</div><div class="line"> video::SColor col = env->getSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i);</div><div class="line"> col.setAlpha(255);</div><div class="line"> env->getSkin()->setColor((gui::EGUI_DEFAULT_COLOR)i, col);</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// add a tabcontrol</span></div><div class="line"></div><div class="line">createToolBox();</div><div class="line"></div><div class="line"><span class="comment">// create fps text</span></div><div class="line"></div><div class="line">IGUIStaticText* fpstext = env->addStaticText(L<span class="stringliteral">""</span>,</div><div class="line"> core::rect<s32>(400,4,570,23), <span class="keyword">true</span>, <span class="keyword">false</span>, bar);</div><div class="line"></div><div class="line">IGUIStaticText* postext = env->addStaticText(L<span class="stringliteral">""</span>,</div><div class="line"> core::rect<s32>(10,50,470,80),<span class="keyword">false</span>, <span class="keyword">false</span>, 0, GUI_ID_POSITION_TEXT);</div><div class="line">postext->setVisible(<span class="keyword">false</span>);</div><div class="line"></div><div class="line"><span class="comment">// set window caption</span></div><div class="line"></div><div class="line">Caption += <span class="stringliteral">" - ["</span>;</div><div class="line">Caption += driver->getName();</div><div class="line">Caption += <span class="stringliteral">"]"</span>;</div><div class="line">Device->setWindowCaption(Caption.c_str());</div></div><!-- fragment --><p> That's nearly the whole application. We simply show the about message box at start up, and load the first model. To make everything look better, a skybox is created and a user controlled camera, to make the application a little bit more interactive. Finally, everything is drawn in a standard drawing loop. </p><div class="fragment"><div class="line"> <span class="comment">// show about message box and load default model</span></div><div class="line"> <span class="keywordflow">if</span> (argc==1)</div><div class="line"> showAboutText();</div><div class="line"> loadModel(StartUpModelFile.c_str());</div><div class="line"></div><div class="line"> <span class="comment">// add skybox</span></div><div class="line"></div><div class="line"> SkyBox = smgr->addSkyBoxSceneNode(</div><div class="line"> driver->getTexture(<span class="stringliteral">"irrlicht2_up.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"irrlicht2_dn.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"irrlicht2_lf.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"irrlicht2_rt.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"irrlicht2_ft.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"irrlicht2_bk.jpg"</span>));</div><div class="line"></div><div class="line"> <span class="comment">// add a camera scene node</span></div><div class="line"> Camera[0] = smgr->addCameraSceneNodeMaya();</div><div class="line"> Camera[0]->setFarValue(20000.f);</div><div class="line"> <span class="comment">// Maya cameras reposition themselves relative to their target, so target the location</span></div><div class="line"> <span class="comment">// where the mesh scene node is placed.</span></div><div class="line"> Camera[0]->setTarget(core::vector3df(0,30,0));</div><div class="line"></div><div class="line"> Camera[1] = smgr->addCameraSceneNodeFPS();</div><div class="line"> Camera[1]->setFarValue(20000.f);</div><div class="line"> Camera[1]->setPosition(core::vector3df(0,0,-70));</div><div class="line"> Camera[1]->setTarget(core::vector3df(0,30,0));</div><div class="line"></div><div class="line"> setActiveCamera(Camera[0]);</div><div class="line"></div><div class="line"> <span class="comment">// load the irrlicht engine logo</span></div><div class="line"> IGUIImage *img =</div><div class="line"> env->addImage(driver->getTexture(<span class="stringliteral">"irrlichtlogo2.png"</span>),</div><div class="line"> core::position2d<s32>(10, driver->getScreenSize().Height - 128));</div><div class="line"></div><div class="line"> <span class="comment">// lock the logo's edges to the bottom left corner of the screen</span></div><div class="line"> img->setAlignment(EGUIA_UPPERLEFT, EGUIA_UPPERLEFT,</div><div class="line"> EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT);</div><div class="line"></div><div class="line"> <span class="comment">// remember state so we notice when the window does lose the focus</span></div><div class="line"> <span class="keywordtype">bool</span> hasFocus = Device->isWindowFocused();</div><div class="line"></div><div class="line"> <span class="comment">// draw everything</span></div><div class="line"></div><div class="line"> <span class="keywordflow">while</span>(Device->run() && driver)</div><div class="line"> {</div><div class="line"> <span class="comment">// Catch focus changes (workaround until Irrlicht has events for this)</span></div><div class="line"> <span class="keywordtype">bool</span> focused = Device->isWindowFocused();</div><div class="line"> <span class="keywordflow">if</span> ( hasFocus && !focused )</div><div class="line"> onKillFocus();</div><div class="line"> hasFocus = focused;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (Device->isWindowActive())</div><div class="line"> {</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, video::SColor(150,50,50,50));</div><div class="line"></div><div class="line"> smgr->drawAll();</div><div class="line"> env->drawAll();</div><div class="line"></div><div class="line"> driver->endScene();</div><div class="line"></div><div class="line"> <span class="comment">// update information about current frame-rate</span></div><div class="line"> core::stringw str(L<span class="stringliteral">"FPS: "</span>);</div><div class="line"> str.append(core::stringw(driver->getFPS()));</div><div class="line"> str += L<span class="stringliteral">" Tris: "</span>;</div><div class="line"> str.append(core::stringw(driver->getPrimitiveCountDrawn()));</div><div class="line"> fpstext->setText(str.c_str());</div><div class="line"></div><div class="line"> <span class="comment">// update information about the active camera</span></div><div class="line"> scene::ICameraSceneNode* cam = Device->getSceneManager()->getActiveCamera();</div><div class="line"> str = L<span class="stringliteral">"Pos: "</span>;</div><div class="line"> str.append(core::stringw(cam->getPosition().X));</div><div class="line"> str += L<span class="stringliteral">" "</span>;</div><div class="line"> str.append(core::stringw(cam->getPosition().Y));</div><div class="line"> str += L<span class="stringliteral">" "</span>;</div><div class="line"> str.append(core::stringw(cam->getPosition().Z));</div><div class="line"> str += L<span class="stringliteral">" Tgt: "</span>;</div><div class="line"> str.append(core::stringw(cam->getTarget().X));</div><div class="line"> str += L<span class="stringliteral">" "</span>;</div><div class="line"> str.append(core::stringw(cam->getTarget().Y));</div><div class="line"> str += L<span class="stringliteral">" "</span>;</div><div class="line"> str.append(core::stringw(cam->getTarget().Z));</div><div class="line"> postext->setText(str.c_str());</div><div class="line"></div><div class="line"> <span class="comment">// update the tool dialog</span></div><div class="line"> updateToolBox();</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> Device->yield();</div><div class="line"> }</div><div class="line"></div><div class="line"> Device->drop();</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/10.Shaders/Makefile b/examples/10.Shaders/Makefile new file mode 100644 index 0000000..ff2df2a --- /dev/null +++ b/examples/10.Shaders/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 10.Shaders
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/10.Shaders/Shaders.cbp b/examples/10.Shaders/Shaders.cbp new file mode 100644 index 0000000..b4f9dc5 --- /dev/null +++ b/examples/10.Shaders/Shaders.cbp @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 10 Shaders" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/Shaders" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/Shaders" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/10.Shaders/Shaders.dev b/examples/10.Shaders/Shaders.dev new file mode 100644 index 0000000..bcaa4f8 --- /dev/null +++ b/examples/10.Shaders/Shaders.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 10 Shaders
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=10.Shaders.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/10.Shaders/Shaders.vcproj b/examples/10.Shaders/Shaders.vcproj new file mode 100644 index 0000000..e730a2f --- /dev/null +++ b/examples/10.Shaders/Shaders.vcproj @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="10.Shaders"
+ ProjectGUID="{A4F71E8D-4042-4909-9AB8-1BA4CF5B926D}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/Shaders.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/Shaders.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Shaders.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/Shaders.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Shaders.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Shaders.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/10.Shaders/Shaders_vc10.vcxproj b/examples/10.Shaders/Shaders_vc10.vcxproj new file mode 100644 index 0000000..55e1e88 --- /dev/null +++ b/examples/10.Shaders/Shaders_vc10.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>10.Shaders</ProjectName>
+ <ProjectGuid>{27158C82-CD15-4A9B-9848-35E7065B209F}</ProjectGuid>
+ <RootNamespace>Shaders</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Shaders.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\10.Shaders.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Shaders.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\10.Shaders.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Shaders.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\10.Shaders.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Shaders.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\10.Shaders.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/10.Shaders/Shaders_vc11.vcxproj b/examples/10.Shaders/Shaders_vc11.vcxproj new file mode 100644 index 0000000..55e1e88 --- /dev/null +++ b/examples/10.Shaders/Shaders_vc11.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>10.Shaders</ProjectName>
+ <ProjectGuid>{27158C82-CD15-4A9B-9848-35E7065B209F}</ProjectGuid>
+ <RootNamespace>Shaders</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Shaders.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\10.Shaders.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Shaders.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\10.Shaders.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Shaders.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\10.Shaders.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Shaders.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\10.Shaders.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/10.Shaders/Shaders_vc12.vcxproj b/examples/10.Shaders/Shaders_vc12.vcxproj new file mode 100644 index 0000000..b7dedf0 --- /dev/null +++ b/examples/10.Shaders/Shaders_vc12.vcxproj @@ -0,0 +1,235 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>10.Shaders</ProjectName>
+ <ProjectGuid>{27158C82-CD15-4A9B-9848-35E7065B209F}</ProjectGuid>
+ <RootNamespace>Shaders</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Shaders.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\10.Shaders.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Shaders.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\10.Shaders.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Shaders.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\10.Shaders.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Shaders.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\10.Shaders.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/10.Shaders/Shaders_vc8.vcproj b/examples/10.Shaders/Shaders_vc8.vcproj new file mode 100644 index 0000000..f107140 --- /dev/null +++ b/examples/10.Shaders/Shaders_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="10.Shaders_vc8"
+ ProjectGUID="{27158C82-CD15-4A9B-9848-35E7065B209F}"
+ RootNamespace="Shaders_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Shaders.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/Shaders.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/Shaders.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Shaders.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/Shaders.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Shaders.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/10.Shaders/Shaders_vc9.vcproj b/examples/10.Shaders/Shaders_vc9.vcproj new file mode 100644 index 0000000..d870b03 --- /dev/null +++ b/examples/10.Shaders/Shaders_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="10.Shaders_vc9"
+ ProjectGUID="{27158C82-CD15-4A9B-9848-35E7065B209F}"
+ RootNamespace="Shaders_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Shaders.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/Shaders.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/Shaders.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Shaders.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/Shaders.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Shaders.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/10.Shaders/main.cpp b/examples/10.Shaders/main.cpp new file mode 100644 index 0000000..269c47f --- /dev/null +++ b/examples/10.Shaders/main.cpp @@ -0,0 +1,443 @@ +/** Example 010 Shaders
+
+This tutorial shows how to use shaders for D3D8, D3D9, OpenGL, and Cg with the
+engine and how to create new material types with them. It also shows how to
+disable the generation of mipmaps at texture loading, and how to use text scene
+nodes.
+
+This tutorial does not explain how shaders work. I would recommend to read the
+D3D, OpenGL, or Cg documentation, to search a tutorial, or to read a book about
+this.
+
+At first, we need to include all headers and do the stuff we always do, like in
+nearly all other tutorials:
+*/
+#include <irrlicht.h>
+#include <iostream>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+/*
+Because we want to use some interesting shaders in this tutorials, we need to
+set some data for them to make them able to compute nice colors. In this
+example, we'll use a simple vertex shader which will calculate the color of the
+vertex based on the position of the camera.
+For this, the shader needs the following data: The inverted world matrix for
+transforming the normal, the clip matrix for transforming the position, the
+camera position and the world position of the object for the calculation of the
+angle of light, and the color of the light. To be able to tell the shader all
+this data every frame, we have to derive a class from the
+IShaderConstantSetCallBack interface and override its only method, namely
+OnSetConstants(). This method will be called every time the material is set.
+The method setVertexShaderConstant() of the IMaterialRendererServices interface
+is used to set the data the shader needs. If the user chose to use a High Level
+shader language like HLSL instead of Assembler in this example, you have to set
+the variable name as parameter instead of the register index.
+*/
+
+IrrlichtDevice* device = 0;
+bool UseHighLevelShaders = false;
+bool UseCgShaders = false;
+
+class MyShaderCallBack : public video::IShaderConstantSetCallBack
+{
+public:
+
+ virtual void OnSetConstants(video::IMaterialRendererServices* services,
+ s32 userData)
+ {
+ video::IVideoDriver* driver = services->getVideoDriver();
+
+ // set inverted world matrix
+ // if we are using highlevel shaders (the user can select this when
+ // starting the program), we must set the constants by name.
+
+ core::matrix4 invWorld = driver->getTransform(video::ETS_WORLD);
+ invWorld.makeInverse();
+
+ if (UseHighLevelShaders)
+ services->setVertexShaderConstant("mInvWorld", invWorld.pointer(), 16);
+ else
+ services->setVertexShaderConstant(invWorld.pointer(), 0, 4);
+
+ // set clip matrix
+
+ core::matrix4 worldViewProj;
+ worldViewProj = driver->getTransform(video::ETS_PROJECTION);
+ worldViewProj *= driver->getTransform(video::ETS_VIEW);
+ worldViewProj *= driver->getTransform(video::ETS_WORLD);
+
+ if (UseHighLevelShaders)
+ services->setVertexShaderConstant("mWorldViewProj", worldViewProj.pointer(), 16);
+ else
+ services->setVertexShaderConstant(worldViewProj.pointer(), 4, 4);
+
+ // set camera position
+
+ core::vector3df pos = device->getSceneManager()->
+ getActiveCamera()->getAbsolutePosition();
+
+ if (UseHighLevelShaders)
+ services->setVertexShaderConstant("mLightPos", reinterpret_cast<f32*>(&pos), 3);
+ else
+ services->setVertexShaderConstant(reinterpret_cast<f32*>(&pos), 8, 1);
+
+ // set light color
+
+ video::SColorf col(0.0f,1.0f,1.0f,0.0f);
+
+ if (UseHighLevelShaders)
+ services->setVertexShaderConstant("mLightColor",
+ reinterpret_cast<f32*>(&col), 4);
+ else
+ services->setVertexShaderConstant(reinterpret_cast<f32*>(&col), 9, 1);
+
+ // set transposed world matrix
+
+ core::matrix4 world = driver->getTransform(video::ETS_WORLD);
+ world = world.getTransposed();
+
+ if (UseHighLevelShaders)
+ {
+ services->setVertexShaderConstant("mTransWorld", world.pointer(), 16);
+
+ // set texture, for textures you can use both an int and a float setPixelShaderConstant interfaces (You need it only for an OpenGL driver).
+ s32 TextureLayerID = 0;
+ if (UseHighLevelShaders)
+ services->setPixelShaderConstant("myTexture", &TextureLayerID, 1);
+ }
+ else
+ services->setVertexShaderConstant(world.pointer(), 10, 4);
+ }
+};
+
+/*
+The next few lines start up the engine just like in most other tutorials
+before. But in addition, we ask the user if he wants to use high level shaders
+in this example, if he selected a driver which is capable of doing so.
+*/
+int main()
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ // ask the user if we should use high level shaders for this example
+ if (driverType == video::EDT_DIRECT3D9 ||
+ driverType == video::EDT_OPENGL)
+ {
+ char i;
+ printf("Please press 'y' if you want to use high level shaders.\n");
+ std::cin >> i;
+ if (i == 'y')
+ {
+ UseHighLevelShaders = true;
+ printf("Please press 'y' if you want to use Cg shaders.\n");
+ std::cin >> i;
+ if (i == 'y')
+ UseCgShaders = true;
+ }
+ }
+
+ // create device
+ device = createDevice(driverType, core::dimension2d<u32>(640, 480));
+
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* smgr = device->getSceneManager();
+ gui::IGUIEnvironment* gui = device->getGUIEnvironment();
+
+ // Make sure we don't try Cg without support for it
+ if (UseCgShaders && !driver->queryFeature(video::EVDF_CG))
+ {
+ printf("Warning: No Cg support, disabling.\n");
+ UseCgShaders=false;
+ }
+
+ /*
+ Now for the more interesting parts. If we are using Direct3D, we want
+ to load vertex and pixel shader programs, if we have OpenGL, we want to
+ use ARB fragment and vertex programs. I wrote the corresponding
+ programs down into the files d3d8.ps, d3d8.vs, d3d9.ps, d3d9.vs,
+ opengl.ps and opengl.vs. We only need the right filenames now. This is
+ done in the following switch. Note, that it is not necessary to write
+ the shaders into text files, like in this example. You can even write
+ the shaders directly as strings into the cpp source file, and use later
+ addShaderMaterial() instead of addShaderMaterialFromFiles().
+ */
+
+ io::path vsFileName; // filename for the vertex shader
+ io::path psFileName; // filename for the pixel shader
+
+ switch(driverType)
+ {
+ case video::EDT_DIRECT3D8:
+ psFileName = "../../media/d3d8.psh";
+ vsFileName = "../../media/d3d8.vsh";
+ break;
+ case video::EDT_DIRECT3D9:
+ if (UseHighLevelShaders)
+ {
+ // Cg can also handle this syntax
+ psFileName = "../../media/d3d9.hlsl";
+ vsFileName = psFileName; // both shaders are in the same file
+ }
+ else
+ {
+ psFileName = "../../media/d3d9.psh";
+ vsFileName = "../../media/d3d9.vsh";
+ }
+ break;
+
+ case video::EDT_OPENGL:
+ if (UseHighLevelShaders)
+ {
+ if (!UseCgShaders)
+ {
+ psFileName = "../../media/opengl.frag";
+ vsFileName = "../../media/opengl.vert";
+ }
+ else
+ {
+ // Use HLSL syntax for Cg
+ psFileName = "../../media/d3d9.hlsl";
+ vsFileName = psFileName; // both shaders are in the same file
+ }
+ }
+ else
+ {
+ psFileName = "../../media/opengl.psh";
+ vsFileName = "../../media/opengl.vsh";
+ }
+ break;
+ }
+
+ /*
+ In addition, we check if the hardware and the selected renderer is
+ capable of executing the shaders we want. If not, we simply set the
+ filename string to 0. This is not necessary, but useful in this
+ example: For example, if the hardware is able to execute vertex shaders
+ but not pixel shaders, we create a new material which only uses the
+ vertex shader, and no pixel shader. Otherwise, if we would tell the
+ engine to create this material and the engine sees that the hardware
+ wouldn't be able to fulfill the request completely, it would not
+ create any new material at all. So in this example you would see at
+ least the vertex shader in action, without the pixel shader.
+ */
+
+ if (!driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) &&
+ !driver->queryFeature(video::EVDF_ARB_FRAGMENT_PROGRAM_1))
+ {
+ device->getLogger()->log("WARNING: Pixel shaders disabled "\
+ "because of missing driver/hardware support.");
+ psFileName = "";
+ }
+
+ if (!driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1) &&
+ !driver->queryFeature(video::EVDF_ARB_VERTEX_PROGRAM_1))
+ {
+ device->getLogger()->log("WARNING: Vertex shaders disabled "\
+ "because of missing driver/hardware support.");
+ vsFileName = "";
+ }
+
+ /*
+ Now lets create the new materials. As you maybe know from previous
+ examples, a material type in the Irrlicht engine is set by simply
+ changing the MaterialType value in the SMaterial struct. And this value
+ is just a simple 32 bit value, like video::EMT_SOLID. So we only need
+ the engine to create a new value for us which we can set there. To do
+ this, we get a pointer to the IGPUProgrammingServices and call
+ addShaderMaterialFromFiles(), which returns such a new 32 bit value.
+ That's all.
+
+ The parameters to this method are the following: First, the names of
+ the files containing the code of the vertex and the pixel shader. If
+ you would use addShaderMaterial() instead, you would not need file
+ names, then you could write the code of the shader directly as string.
+ The following parameter is a pointer to the IShaderConstantSetCallBack
+ class we wrote at the beginning of this tutorial. If you don't want to
+ set constants, set this to 0. The last parameter tells the engine which
+ material it should use as base material.
+
+ To demonstrate this, we create two materials with a different base
+ material, one with EMT_SOLID and one with EMT_TRANSPARENT_ADD_COLOR.
+ */
+
+ // create materials
+
+ video::IGPUProgrammingServices* gpu = driver->getGPUProgrammingServices();
+ s32 newMaterialType1 = 0;
+ s32 newMaterialType2 = 0;
+
+ if (gpu)
+ {
+ MyShaderCallBack* mc = new MyShaderCallBack();
+
+ // create the shaders depending on if the user wanted high level
+ // or low level shaders:
+
+ if (UseHighLevelShaders)
+ {
+ // Choose the desired shader type. Default is the native
+ // shader type for the driver, for Cg pass the special
+ // enum value EGSL_CG
+ const video::E_GPU_SHADING_LANGUAGE shadingLanguage =
+ UseCgShaders ? video::EGSL_CG:video::EGSL_DEFAULT;
+
+ // create material from high level shaders (hlsl, glsl or cg)
+
+ newMaterialType1 = gpu->addHighLevelShaderMaterialFromFiles(
+ vsFileName, "vertexMain", video::EVST_VS_1_1,
+ psFileName, "pixelMain", video::EPST_PS_1_1,
+ mc, video::EMT_SOLID, 0, shadingLanguage);
+
+ newMaterialType2 = gpu->addHighLevelShaderMaterialFromFiles(
+ vsFileName, "vertexMain", video::EVST_VS_1_1,
+ psFileName, "pixelMain", video::EPST_PS_1_1,
+ mc, video::EMT_TRANSPARENT_ADD_COLOR, 0 , shadingLanguage);
+ }
+ else
+ {
+ // create material from low level shaders (asm or arb_asm)
+
+ newMaterialType1 = gpu->addShaderMaterialFromFiles(vsFileName,
+ psFileName, mc, video::EMT_SOLID);
+
+ newMaterialType2 = gpu->addShaderMaterialFromFiles(vsFileName,
+ psFileName, mc, video::EMT_TRANSPARENT_ADD_COLOR);
+ }
+
+ mc->drop();
+ }
+
+ /*
+ Now it's time for testing the materials. We create a test cube and set
+ the material we created. In addition, we add a text scene node to the
+ cube and a rotation animator to make it look more interesting and
+ important.
+ */
+
+ // create test scene node 1, with the new created material type 1
+
+ scene::ISceneNode* node = smgr->addCubeSceneNode(50);
+ node->setPosition(core::vector3df(0,0,0));
+ node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+ node->setMaterialFlag(video::EMF_LIGHTING, false);
+ node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType1);
+
+ smgr->addTextSceneNode(gui->getBuiltInFont(),
+ L"PS & VS & EMT_SOLID",
+ video::SColor(255,255,255,255), node);
+
+ scene::ISceneNodeAnimator* anim = smgr->createRotationAnimator(
+ core::vector3df(0,0.3f,0));
+ node->addAnimator(anim);
+ anim->drop();
+
+ /*
+ Same for the second cube, but with the second material we created.
+ */
+
+ // create test scene node 2, with the new created material type 2
+
+ node = smgr->addCubeSceneNode(50);
+ node->setPosition(core::vector3df(0,-10,50));
+ node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+ node->setMaterialFlag(video::EMF_LIGHTING, false);
+ node->setMaterialFlag(video::EMF_BLEND_OPERATION, true);
+ node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType2);
+
+ smgr->addTextSceneNode(gui->getBuiltInFont(),
+ L"PS & VS & EMT_TRANSPARENT",
+ video::SColor(255,255,255,255), node);
+
+ anim = smgr->createRotationAnimator(core::vector3df(0,0.3f,0));
+ node->addAnimator(anim);
+ anim->drop();
+
+ /*
+ Then we add a third cube without a shader on it, to be able to compare
+ the cubes.
+ */
+
+ // add a scene node with no shader
+
+ node = smgr->addCubeSceneNode(50);
+ node->setPosition(core::vector3df(0,50,25));
+ node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+ node->setMaterialFlag(video::EMF_LIGHTING, false);
+ smgr->addTextSceneNode(gui->getBuiltInFont(), L"NO SHADER",
+ video::SColor(255,255,255,255), node);
+
+ /*
+ And last, we add a skybox and a user controlled camera to the scene.
+ For the skybox textures, we disable mipmap generation, because we don't
+ need mipmaps on it.
+ */
+
+ // add a nice skybox
+
+ driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
+
+ smgr->addSkyBoxSceneNode(
+ driver->getTexture("../../media/irrlicht2_up.jpg"),
+ driver->getTexture("../../media/irrlicht2_dn.jpg"),
+ driver->getTexture("../../media/irrlicht2_lf.jpg"),
+ driver->getTexture("../../media/irrlicht2_rt.jpg"),
+ driver->getTexture("../../media/irrlicht2_ft.jpg"),
+ driver->getTexture("../../media/irrlicht2_bk.jpg"));
+
+ driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true);
+
+ // add a camera and disable the mouse cursor
+
+ scene::ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS();
+ cam->setPosition(core::vector3df(-100,50,100));
+ cam->setTarget(core::vector3df(0,0,0));
+ device->getCursorControl()->setVisible(false);
+
+ /*
+ Now draw everything. That's all.
+ */
+
+ int lastFPS = -1;
+
+ while(device->run())
+ if (device->isWindowActive())
+ {
+ driver->beginScene(true, true, video::SColor(255,0,0,0));
+ smgr->drawAll();
+ driver->endScene();
+
+ int fps = driver->getFPS();
+
+ if (lastFPS != fps)
+ {
+ core::stringw str = L"Irrlicht Engine - Vertex and pixel shader example [";
+ str += driver->getName();
+ str += "] FPS:";
+ str += fps;
+
+ device->setWindowCaption(str.c_str());
+ lastFPS = fps;
+ }
+ }
+
+ device->drop();
+
+ return 0;
+}
+
+/*
+Compile and run this, and I hope you have fun with your new little shader
+writing tool :).
+**/
diff --git a/examples/10.Shaders/tutorial.html b/examples/10.Shaders/tutorial.html new file mode 100644 index 0000000..b2dc71f --- /dev/null +++ b/examples/10.Shaders/tutorial.html @@ -0,0 +1,210 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 10: Shaders</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 10: Shaders </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/010shot.jpg" alt="010shot.jpg"/> +</div> + <p>This tutorial shows how to use shaders for D3D8, D3D9, OpenGL, and Cg with the engine and how to create new material types with them. It also shows how to disable the generation of mipmaps at texture loading, and how to use text scene nodes.</p> +<p>This tutorial does not explain how shaders work. I would recommend to read the D3D, OpenGL, or Cg documentation, to search a tutorial, or to read a book about this.</p> +<p>At first, we need to include all headers and do the stuff we always do, like in nearly all other tutorials: </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include <iostream></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> Because we want to use some interesting shaders in this tutorials, we need to set some data for them to make them able to compute nice colors. In this example, we'll use a simple vertex shader which will calculate the color of the vertex based on the position of the camera. For this, the shader needs the following data: The inverted world matrix for transforming the normal, the clip matrix for transforming the position, the camera position and the world position of the object for the calculation of the angle of light, and the color of the light. To be able to tell the shader all this data every frame, we have to derive a class from the IShaderConstantSetCallBack interface and override its only method, namely OnSetConstants(). This method will be called every time the material is set. The method setVertexShaderConstant() of the IMaterialRendererServices interface is used to set the data the shader needs. If the user chose to use a High Level shader language like HLSL instead of Assembler in this example, you have to set the variable name as parameter instead of the register index. </p><div class="fragment"><div class="line">IrrlichtDevice* device = 0;</div><div class="line"><span class="keywordtype">bool</span> UseHighLevelShaders = <span class="keyword">false</span>;</div><div class="line"><span class="keywordtype">bool</span> UseCgShaders = <span class="keyword">false</span>;</div><div class="line"></div><div class="line"><span class="keyword">class </span>MyShaderCallBack : <span class="keyword">public</span> video::IShaderConstantSetCallBack</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> OnSetConstants(video::IMaterialRendererServices* services,</div><div class="line"> s32 userData)</div><div class="line"> {</div><div class="line"> video::IVideoDriver* driver = services->getVideoDriver();</div><div class="line"></div><div class="line"> <span class="comment">// set inverted world matrix</span></div><div class="line"> <span class="comment">// if we are using highlevel shaders (the user can select this when</span></div><div class="line"> <span class="comment">// starting the program), we must set the constants by name.</span></div><div class="line"></div><div class="line"> core::matrix4 invWorld = driver->getTransform(video::ETS_WORLD);</div><div class="line"> invWorld.makeInverse();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (UseHighLevelShaders)</div><div class="line"> services->setVertexShaderConstant(<span class="stringliteral">"mInvWorld"</span>, invWorld.pointer(), 16);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> services->setVertexShaderConstant(invWorld.pointer(), 0, 4);</div><div class="line"></div><div class="line"> <span class="comment">// set clip matrix</span></div><div class="line"></div><div class="line"> core::matrix4 worldViewProj;</div><div class="line"> worldViewProj = driver->getTransform(video::ETS_PROJECTION);</div><div class="line"> worldViewProj *= driver->getTransform(video::ETS_VIEW);</div><div class="line"> worldViewProj *= driver->getTransform(video::ETS_WORLD);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (UseHighLevelShaders)</div><div class="line"> services->setVertexShaderConstant(<span class="stringliteral">"mWorldViewProj"</span>, worldViewProj.pointer(), 16);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> services->setVertexShaderConstant(worldViewProj.pointer(), 4, 4);</div><div class="line"></div><div class="line"> <span class="comment">// set camera position</span></div><div class="line"></div><div class="line"> core::vector3df pos = device->getSceneManager()-></div><div class="line"> getActiveCamera()->getAbsolutePosition();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (UseHighLevelShaders)</div><div class="line"> services->setVertexShaderConstant(<span class="stringliteral">"mLightPos"</span>, reinterpret_cast<f32*>(&pos), 3);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> services->setVertexShaderConstant(reinterpret_cast<f32*>(&pos), 8, 1);</div><div class="line"></div><div class="line"> <span class="comment">// set light color</span></div><div class="line"></div><div class="line"> video::SColorf col(0.0f,1.0f,1.0f,0.0f);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (UseHighLevelShaders)</div><div class="line"> services->setVertexShaderConstant(<span class="stringliteral">"mLightColor"</span>,</div><div class="line"> reinterpret_cast<f32*>(&col), 4);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> services->setVertexShaderConstant(reinterpret_cast<f32*>(&col), 9, 1);</div><div class="line"></div><div class="line"> <span class="comment">// set transposed world matrix</span></div><div class="line"></div><div class="line"> core::matrix4 world = driver->getTransform(video::ETS_WORLD);</div><div class="line"> world = world.getTransposed();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (UseHighLevelShaders)</div><div class="line"> {</div><div class="line"> services->setVertexShaderConstant(<span class="stringliteral">"mTransWorld"</span>, world.pointer(), 16);</div><div class="line"></div><div class="line"> <span class="comment">// set texture, for textures you can use both an int and a float setPixelShaderConstant interfaces (You need it only for an OpenGL driver).</span></div><div class="line"> s32 TextureLayerID = 0;</div><div class="line"> <span class="keywordflow">if</span> (UseHighLevelShaders)</div><div class="line"> services->setPixelShaderConstant(<span class="stringliteral">"myTexture"</span>, &TextureLayerID, 1);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> services->setVertexShaderConstant(world.pointer(), 10, 4);</div><div class="line"> }</div><div class="line">};</div></div><!-- fragment --><p> The next few lines start up the engine just like in most other tutorials before. But in addition, we ask the user if he wants to use high level shaders in this example, if he selected a driver which is capable of doing so. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> <span class="comment">// ask the user if we should use high level shaders for this example</span></div><div class="line"> <span class="keywordflow">if</span> (driverType == video::EDT_DIRECT3D9 ||</div><div class="line"> driverType == video::EDT_OPENGL)</div><div class="line"> {</div><div class="line"> <span class="keywordtype">char</span> i;</div><div class="line"> printf(<span class="stringliteral">"Please press 'y' if you want to use high level shaders.\n"</span>);</div><div class="line"> std::cin >> i;</div><div class="line"> <span class="keywordflow">if</span> (i == <span class="charliteral">'y'</span>)</div><div class="line"> {</div><div class="line"> UseHighLevelShaders = <span class="keyword">true</span>;</div><div class="line"> printf(<span class="stringliteral">"Please press 'y' if you want to use Cg shaders.\n"</span>);</div><div class="line"> std::cin >> i;</div><div class="line"> <span class="keywordflow">if</span> (i == <span class="charliteral">'y'</span>)</div><div class="line"> UseCgShaders = <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// create device</span></div><div class="line"> device = createDevice(driverType, core::dimension2d<u32>(640, 480));</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div><div class="line"></div><div class="line"> video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line"> scene::ISceneManager* smgr = device->getSceneManager();</div><div class="line"> gui::IGUIEnvironment* gui = device->getGUIEnvironment();</div><div class="line"></div><div class="line"> <span class="comment">// Make sure we don't try Cg without support for it</span></div><div class="line"> <span class="keywordflow">if</span> (UseCgShaders && !driver->queryFeature(video::EVDF_CG))</div><div class="line"> {</div><div class="line"> printf(<span class="stringliteral">"Warning: No Cg support, disabling.\n"</span>);</div><div class="line"> UseCgShaders=<span class="keyword">false</span>;</div><div class="line"> }</div></div><!-- fragment --><p> Now for the more interesting parts. If we are using Direct3D, we want to load vertex and pixel shader programs, if we have OpenGL, we want to use ARB fragment and vertex programs. I wrote the corresponding programs down into the files d3d8.ps, d3d8.vs, d3d9.ps, d3d9.vs, opengl.ps and opengl.vs. We only need the right filenames now. This is done in the following switch. Note, that it is not necessary to write the shaders into text files, like in this example. You can even write the shaders directly as strings into the cpp source file, and use later addShaderMaterial() instead of addShaderMaterialFromFiles(). </p><div class="fragment"><div class="line">io::path vsFileName; <span class="comment">// filename for the vertex shader</span></div><div class="line">io::path psFileName; <span class="comment">// filename for the pixel shader</span></div><div class="line"></div><div class="line"><span class="keywordflow">switch</span>(driverType)</div><div class="line">{</div><div class="line"><span class="keywordflow">case</span> video::EDT_DIRECT3D8:</div><div class="line"> psFileName = <span class="stringliteral">"../../media/d3d8.psh"</span>;</div><div class="line"> vsFileName = <span class="stringliteral">"../../media/d3d8.vsh"</span>;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"><span class="keywordflow">case</span> video::EDT_DIRECT3D9:</div><div class="line"> <span class="keywordflow">if</span> (UseHighLevelShaders)</div><div class="line"> {</div><div class="line"> <span class="comment">// Cg can also handle this syntax</span></div><div class="line"> psFileName = <span class="stringliteral">"../../media/d3d9.hlsl"</span>;</div><div class="line"> vsFileName = psFileName; <span class="comment">// both shaders are in the same file</span></div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> psFileName = <span class="stringliteral">"../../media/d3d9.psh"</span>;</div><div class="line"> vsFileName = <span class="stringliteral">"../../media/d3d9.vsh"</span>;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"><span class="keywordflow">case</span> video::EDT_OPENGL:</div><div class="line"> <span class="keywordflow">if</span> (UseHighLevelShaders)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (!UseCgShaders)</div><div class="line"> {</div><div class="line"> psFileName = <span class="stringliteral">"../../media/opengl.frag"</span>;</div><div class="line"> vsFileName = <span class="stringliteral">"../../media/opengl.vert"</span>;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> <span class="comment">// Use HLSL syntax for Cg</span></div><div class="line"> psFileName = <span class="stringliteral">"../../media/d3d9.hlsl"</span>;</div><div class="line"> vsFileName = psFileName; <span class="comment">// both shaders are in the same file</span></div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> psFileName = <span class="stringliteral">"../../media/opengl.psh"</span>;</div><div class="line"> vsFileName = <span class="stringliteral">"../../media/opengl.vsh"</span>;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line">}</div></div><!-- fragment --><p> In addition, we check if the hardware and the selected renderer is capable of executing the shaders we want. If not, we simply set the filename string to 0. This is not necessary, but useful in this example: For example, if the hardware is able to execute vertex shaders but not pixel shaders, we create a new material which only uses the vertex shader, and no pixel shader. Otherwise, if we would tell the engine to create this material and the engine sees that the hardware wouldn't be able to fulfill the request completely, it would not create any new material at all. So in this example you would see at least the vertex shader in action, without the pixel shader. </p><div class="fragment"><div class="line"><span class="keywordflow">if</span> (!driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) &&</div><div class="line"> !driver->queryFeature(video::EVDF_ARB_FRAGMENT_PROGRAM_1))</div><div class="line">{</div><div class="line"> device->getLogger()->log(<span class="stringliteral">"WARNING: Pixel shaders disabled "</span>\</div><div class="line"> <span class="stringliteral">"because of missing driver/hardware support."</span>);</div><div class="line"> psFileName = <span class="stringliteral">""</span>;</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (!driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1) &&</div><div class="line"> !driver->queryFeature(video::EVDF_ARB_VERTEX_PROGRAM_1))</div><div class="line">{</div><div class="line"> device->getLogger()->log(<span class="stringliteral">"WARNING: Vertex shaders disabled "</span>\</div><div class="line"> <span class="stringliteral">"because of missing driver/hardware support."</span>);</div><div class="line"> vsFileName = <span class="stringliteral">""</span>;</div><div class="line">}</div></div><!-- fragment --><p> Now lets create the new materials. As you maybe know from previous examples, a material type in the Irrlicht engine is set by simply changing the MaterialType value in the SMaterial struct. And this value is just a simple 32 bit value, like video::EMT_SOLID. So we only need the engine to create a new value for us which we can set there. To do this, we get a pointer to the IGPUProgrammingServices and call addShaderMaterialFromFiles(), which returns such a new 32 bit value. That's all.</p> +<p>The parameters to this method are the following: First, the names of the files containing the code of the vertex and the pixel shader. If you would use addShaderMaterial() instead, you would not need file names, then you could write the code of the shader directly as string. The following parameter is a pointer to the IShaderConstantSetCallBack class we wrote at the beginning of this tutorial. If you don't want to set constants, set this to 0. The last parameter tells the engine which material it should use as base material.</p> +<p>To demonstrate this, we create two materials with a different base material, one with EMT_SOLID and one with EMT_TRANSPARENT_ADD_COLOR. </p><div class="fragment"><div class="line"><span class="comment">// create materials</span></div><div class="line"></div><div class="line">video::IGPUProgrammingServices* gpu = driver->getGPUProgrammingServices();</div><div class="line">s32 newMaterialType1 = 0;</div><div class="line">s32 newMaterialType2 = 0;</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (gpu)</div><div class="line">{</div><div class="line"> MyShaderCallBack* mc = <span class="keyword">new</span> MyShaderCallBack();</div><div class="line"></div><div class="line"> <span class="comment">// create the shaders depending on if the user wanted high level</span></div><div class="line"> <span class="comment">// or low level shaders:</span></div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (UseHighLevelShaders)</div><div class="line"> {</div><div class="line"> <span class="comment">// Choose the desired shader type. Default is the native</span></div><div class="line"> <span class="comment">// shader type for the driver, for Cg pass the special</span></div><div class="line"> <span class="comment">// enum value EGSL_CG</span></div><div class="line"> <span class="keyword">const</span> video::E_GPU_SHADING_LANGUAGE shadingLanguage =</div><div class="line"> UseCgShaders ? video::EGSL_CG:video::EGSL_DEFAULT;</div><div class="line"></div><div class="line"> <span class="comment">// create material from high level shaders (hlsl, glsl or cg)</span></div><div class="line"></div><div class="line"> newMaterialType1 = gpu->addHighLevelShaderMaterialFromFiles(</div><div class="line"> vsFileName, <span class="stringliteral">"vertexMain"</span>, video::EVST_VS_1_1,</div><div class="line"> psFileName, <span class="stringliteral">"pixelMain"</span>, video::EPST_PS_1_1,</div><div class="line"> mc, video::EMT_SOLID, 0, shadingLanguage);</div><div class="line"></div><div class="line"> newMaterialType2 = gpu->addHighLevelShaderMaterialFromFiles(</div><div class="line"> vsFileName, <span class="stringliteral">"vertexMain"</span>, video::EVST_VS_1_1,</div><div class="line"> psFileName, <span class="stringliteral">"pixelMain"</span>, video::EPST_PS_1_1,</div><div class="line"> mc, video::EMT_TRANSPARENT_ADD_COLOR, 0 , shadingLanguage);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> <span class="comment">// create material from low level shaders (asm or arb_asm)</span></div><div class="line"></div><div class="line"> newMaterialType1 = gpu->addShaderMaterialFromFiles(vsFileName,</div><div class="line"> psFileName, mc, video::EMT_SOLID);</div><div class="line"></div><div class="line"> newMaterialType2 = gpu->addShaderMaterialFromFiles(vsFileName,</div><div class="line"> psFileName, mc, video::EMT_TRANSPARENT_ADD_COLOR);</div><div class="line"> }</div><div class="line"></div><div class="line"> mc->drop();</div><div class="line">}</div></div><!-- fragment --><p> Now it's time for testing the materials. We create a test cube and set the material we created. In addition, we add a text scene node to the cube and a rotation animator to make it look more interesting and important. </p><div class="fragment"><div class="line"><span class="comment">// create test scene node 1, with the new created material type 1</span></div><div class="line"></div><div class="line">scene::ISceneNode* node = smgr->addCubeSceneNode(50);</div><div class="line">node->setPosition(core::vector3df(0,0,0));</div><div class="line">node->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/wall.bmp"</span>));</div><div class="line">node->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line">node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType1);</div><div class="line"></div><div class="line">smgr->addTextSceneNode(gui->getBuiltInFont(),</div><div class="line"> L<span class="stringliteral">"PS & VS & EMT_SOLID"</span>,</div><div class="line"> video::SColor(255,255,255,255), node);</div><div class="line"></div><div class="line">scene::ISceneNodeAnimator* anim = smgr->createRotationAnimator(</div><div class="line"> core::vector3df(0,0.3f,0));</div><div class="line">node->addAnimator(anim);</div><div class="line">anim->drop();</div></div><!-- fragment --><p> Same for the second cube, but with the second material we created. </p><div class="fragment"><div class="line"><span class="comment">// create test scene node 2, with the new created material type 2</span></div><div class="line"></div><div class="line">node = smgr->addCubeSceneNode(50);</div><div class="line">node->setPosition(core::vector3df(0,-10,50));</div><div class="line">node->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/wall.bmp"</span>));</div><div class="line">node->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line">node->setMaterialFlag(video::EMF_BLEND_OPERATION, <span class="keyword">true</span>);</div><div class="line">node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType2);</div><div class="line"></div><div class="line">smgr->addTextSceneNode(gui->getBuiltInFont(),</div><div class="line"> L<span class="stringliteral">"PS & VS & EMT_TRANSPARENT"</span>,</div><div class="line"> video::SColor(255,255,255,255), node);</div><div class="line"></div><div class="line">anim = smgr->createRotationAnimator(core::vector3df(0,0.3f,0));</div><div class="line">node->addAnimator(anim);</div><div class="line">anim->drop();</div></div><!-- fragment --><p> Then we add a third cube without a shader on it, to be able to compare the cubes. </p><div class="fragment"><div class="line"><span class="comment">// add a scene node with no shader</span></div><div class="line"></div><div class="line">node = smgr->addCubeSceneNode(50);</div><div class="line">node->setPosition(core::vector3df(0,50,25));</div><div class="line">node->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/wall.bmp"</span>));</div><div class="line">node->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line">smgr->addTextSceneNode(gui->getBuiltInFont(), L<span class="stringliteral">"NO SHADER"</span>,</div><div class="line"> video::SColor(255,255,255,255), node);</div></div><!-- fragment --><p> And last, we add a skybox and a user controlled camera to the scene. For the skybox textures, we disable mipmap generation, because we don't need mipmaps on it. </p><div class="fragment"><div class="line"><span class="comment">// add a nice skybox</span></div><div class="line"></div><div class="line">driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, <span class="keyword">false</span>);</div><div class="line"></div><div class="line">smgr->addSkyBoxSceneNode(</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_up.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_dn.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_lf.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_rt.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_ft.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_bk.jpg"</span>));</div><div class="line"></div><div class="line">driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, <span class="keyword">true</span>);</div><div class="line"></div><div class="line"><span class="comment">// add a camera and disable the mouse cursor</span></div><div class="line"></div><div class="line">scene::ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS();</div><div class="line">cam->setPosition(core::vector3df(-100,50,100));</div><div class="line">cam->setTarget(core::vector3df(0,0,0));</div><div class="line">device->getCursorControl()->setVisible(<span class="keyword">false</span>);</div></div><!-- fragment --><p> Now draw everything. That's all. </p><div class="fragment"><div class="line"> <span class="keywordtype">int</span> lastFPS = -1;</div><div class="line"></div><div class="line"> <span class="keywordflow">while</span>(device->run())</div><div class="line"> <span class="keywordflow">if</span> (device->isWindowActive())</div><div class="line"> {</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, video::SColor(255,0,0,0));</div><div class="line"> smgr->drawAll();</div><div class="line"> driver->endScene();</div><div class="line"></div><div class="line"> <span class="keywordtype">int</span> fps = driver->getFPS();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (lastFPS != fps)</div><div class="line"> {</div><div class="line"> core::stringw str = L<span class="stringliteral">"Irrlicht Engine - Vertex and pixel shader example ["</span>;</div><div class="line"> str += driver->getName();</div><div class="line"> str += <span class="stringliteral">"] FPS:"</span>;</div><div class="line"> str += fps;</div><div class="line"></div><div class="line"> device->setWindowCaption(str.c_str());</div><div class="line"> lastFPS = fps;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> device->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --><p> Compile and run this, and I hope you have fun with your new little shader writing tool :). </p> +</div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/11.PerPixelLighting/Makefile b/examples/11.PerPixelLighting/Makefile new file mode 100644 index 0000000..affdc02 --- /dev/null +++ b/examples/11.PerPixelLighting/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 11.PerPixelLighting
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/11.PerPixelLighting/PerPixelLighting.cbp b/examples/11.PerPixelLighting/PerPixelLighting.cbp new file mode 100644 index 0000000..709dd85 --- /dev/null +++ b/examples/11.PerPixelLighting/PerPixelLighting.cbp @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 11 Per-Pixel Lighting" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/PerPixelLighting" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/PerPixelLighting" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/11.PerPixelLighting/PerPixelLighting.dev b/examples/11.PerPixelLighting/PerPixelLighting.dev new file mode 100644 index 0000000..c83a502 --- /dev/null +++ b/examples/11.PerPixelLighting/PerPixelLighting.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 11 Per-Pixel Lighting
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=11.PerPixelLighting.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/11.PerPixelLighting/PerPixelLighting.vcproj b/examples/11.PerPixelLighting/PerPixelLighting.vcproj new file mode 100644 index 0000000..94d7e6a --- /dev/null +++ b/examples/11.PerPixelLighting/PerPixelLighting.vcproj @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="11.PerPixelLighting"
+ ProjectGUID="{EC388ECA-E430-477A-A969-66FE5F84508A}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/PerPixelLighting.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/PerPixelLighting.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/PerPixelLighting.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/PerPixelLighting.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/PerPixelLighting.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/PerPixelLighting.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/11.PerPixelLighting/PerPixelLighting_vc10.vcxproj b/examples/11.PerPixelLighting/PerPixelLighting_vc10.vcxproj new file mode 100644 index 0000000..2179bc4 --- /dev/null +++ b/examples/11.PerPixelLighting/PerPixelLighting_vc10.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>11.PerPixelLighting</ProjectName>
+ <ProjectGuid>{C4B42409-542D-4EFC-9E6B-44713FD47A33}</ProjectGuid>
+ <RootNamespace>PerPixelLighting</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/PerPixelLighting.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/PerPixelLighting.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\11.PerPixelLighting.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/PerPixelLighting.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/PerPixelLighting.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\11.PerPixelLighting.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/11.PerPixelLighting/PerPixelLighting_vc11.vcxproj b/examples/11.PerPixelLighting/PerPixelLighting_vc11.vcxproj new file mode 100644 index 0000000..2179bc4 --- /dev/null +++ b/examples/11.PerPixelLighting/PerPixelLighting_vc11.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>11.PerPixelLighting</ProjectName>
+ <ProjectGuid>{C4B42409-542D-4EFC-9E6B-44713FD47A33}</ProjectGuid>
+ <RootNamespace>PerPixelLighting</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/PerPixelLighting.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/PerPixelLighting.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\11.PerPixelLighting.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/PerPixelLighting.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/PerPixelLighting.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\11.PerPixelLighting.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/11.PerPixelLighting/PerPixelLighting_vc12.vcxproj b/examples/11.PerPixelLighting/PerPixelLighting_vc12.vcxproj new file mode 100644 index 0000000..ca2c3f4 --- /dev/null +++ b/examples/11.PerPixelLighting/PerPixelLighting_vc12.vcxproj @@ -0,0 +1,235 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>11.PerPixelLighting</ProjectName>
+ <ProjectGuid>{C4B42409-542D-4EFC-9E6B-44713FD47A33}</ProjectGuid>
+ <RootNamespace>PerPixelLighting</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/PerPixelLighting.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/PerPixelLighting.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\11.PerPixelLighting.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/PerPixelLighting.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/PerPixelLighting.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\11.PerPixelLighting.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/11.PerPixelLighting/PerPixelLighting_vc8.vcproj b/examples/11.PerPixelLighting/PerPixelLighting_vc8.vcproj new file mode 100644 index 0000000..b6830db --- /dev/null +++ b/examples/11.PerPixelLighting/PerPixelLighting_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="11.PerPixelLighting_vc8"
+ ProjectGUID="{C4B42409-542D-4EFC-9E6B-44713FD47A33}"
+ RootNamespace="PerPixelLighting_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/PerPixelLighting.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/PerPixelLighting.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/PerPixelLighting.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/PerPixelLighting.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/PerPixelLighting.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/PerPixelLighting.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/11.PerPixelLighting/PerPixelLighting_vc9.vcproj b/examples/11.PerPixelLighting/PerPixelLighting_vc9.vcproj new file mode 100644 index 0000000..c9ed033 --- /dev/null +++ b/examples/11.PerPixelLighting/PerPixelLighting_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="11.PerPixelLighting_vc9"
+ ProjectGUID="{C4B42409-542D-4EFC-9E6B-44713FD47A33}"
+ RootNamespace="PerPixelLighting_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/PerPixelLighting.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/PerPixelLighting.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/PerPixelLighting.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/PerPixelLighting.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/PerPixelLighting.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/PerPixelLighting.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/11.PerPixelLighting/main.cpp b/examples/11.PerPixelLighting/main.cpp new file mode 100644 index 0000000..227aa97 --- /dev/null +++ b/examples/11.PerPixelLighting/main.cpp @@ -0,0 +1,487 @@ +/** Example 011 Per-Pixel Lighting
+
+This tutorial shows how to use one of the built in more complex materials in
+irrlicht: Per pixel lighted surfaces using normal maps and parallax mapping. It
+will also show how to use fog and moving particle systems. And don't panic: You
+do not need any experience with shaders to use these materials in Irrlicht.
+
+At first, we need to include all headers and do the stuff we always do, like in
+nearly all other tutorials.
+*/
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+/*
+For this example, we need an event receiver, to make it possible for the user
+to switch between the three available material types. In addition, the event
+receiver will create some small GUI window which displays what material is
+currently being used. There is nothing special done in this class, so maybe you
+want to skip reading it.
+*/
+class MyEventReceiver : public IEventReceiver
+{
+public:
+
+ MyEventReceiver(scene::ISceneNode* room,scene::ISceneNode* earth,
+ gui::IGUIEnvironment* env, video::IVideoDriver* driver)
+ {
+ // store pointer to room so we can change its drawing mode
+ Room = room;
+ Earth = earth;
+ Driver = driver;
+
+ // set a nicer font
+ gui::IGUISkin* skin = env->getSkin();
+ gui::IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp");
+ if (font)
+ skin->setFont(font);
+
+ // add window and listbox
+ gui::IGUIWindow* window = env->addWindow(
+ core::rect<s32>(460,375,630,470), false, L"Use 'E' + 'R' to change");
+
+ ListBox = env->addListBox(
+ core::rect<s32>(2,22,165,88), window);
+
+ ListBox->addItem(L"Diffuse");
+ ListBox->addItem(L"Bump mapping");
+ ListBox->addItem(L"Parallax mapping");
+ ListBox->setSelected(1);
+
+ // create problem text
+ ProblemText = env->addStaticText(
+ L"Your hardware or this renderer is not able to use the "\
+ L"needed shaders for this material. Using fall back materials.",
+ core::rect<s32>(150,20,470,80));
+
+ ProblemText->setOverrideColor(video::SColor(100,255,255,255));
+
+ // set start material (prefer parallax mapping if available)
+ video::IMaterialRenderer* renderer =
+ Driver->getMaterialRenderer(video::EMT_PARALLAX_MAP_SOLID);
+ if (renderer && renderer->getRenderCapability() == 0)
+ ListBox->setSelected(2);
+
+ // set the material which is selected in the listbox
+ setMaterial();
+ }
+
+ bool OnEvent(const SEvent& event)
+ {
+ // check if user presses the key 'E' or 'R'
+ if (event.EventType == irr::EET_KEY_INPUT_EVENT &&
+ !event.KeyInput.PressedDown && Room && ListBox)
+ {
+ // change selected item in listbox
+
+ int sel = ListBox->getSelected();
+ if (event.KeyInput.Key == irr::KEY_KEY_R)
+ ++sel;
+ else
+ if (event.KeyInput.Key == irr::KEY_KEY_E)
+ --sel;
+ else
+ return false;
+
+ if (sel > 2) sel = 0;
+ if (sel < 0) sel = 2;
+ ListBox->setSelected(sel);
+
+ // set the material which is selected in the listbox
+ setMaterial();
+ }
+
+ return false;
+ }
+
+private:
+
+ // sets the material of the room mesh the the one set in the
+ // list box.
+ void setMaterial()
+ {
+ video::E_MATERIAL_TYPE type = video::EMT_SOLID;
+
+ // change material setting
+ switch(ListBox->getSelected())
+ {
+ case 0: type = video::EMT_SOLID;
+ break;
+ case 1: type = video::EMT_NORMAL_MAP_SOLID;
+ break;
+ case 2: type = video::EMT_PARALLAX_MAP_SOLID;
+ break;
+ }
+
+ Room->setMaterialType(type);
+
+ // change material setting
+ switch(ListBox->getSelected())
+ {
+ case 0: type = video::EMT_TRANSPARENT_VERTEX_ALPHA;
+ break;
+ case 1: type = video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA;
+ break;
+ case 2: type = video::EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA;
+ break;
+ }
+
+ Earth->setMaterialType(type);
+
+ /*
+ We need to add a warning if the materials will not be able to
+ be displayed 100% correctly. This is no problem, they will be
+ rendered using fall back materials, but at least the user
+ should know that it would look better on better hardware. We
+ simply check if the material renderer is able to draw at full
+ quality on the current hardware. The
+ IMaterialRenderer::getRenderCapability() returns 0 if this is
+ the case.
+ */
+ video::IMaterialRenderer* renderer = Driver->getMaterialRenderer(type);
+
+ // display some problem text when problem
+ if (!renderer || renderer->getRenderCapability() != 0)
+ ProblemText->setVisible(true);
+ else
+ ProblemText->setVisible(false);
+ }
+
+private:
+
+ gui::IGUIStaticText* ProblemText;
+ gui::IGUIListBox* ListBox;
+
+ scene::ISceneNode* Room;
+ scene::ISceneNode* Earth;
+ video::IVideoDriver* Driver;
+};
+
+
+/*
+Now for the real fun. We create an Irrlicht Device and start to setup the scene.
+*/
+int main()
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ // create device
+
+ IrrlichtDevice* device = createDevice(driverType,
+ core::dimension2d<u32>(640, 480));
+
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ /*
+ Before we start with the interesting stuff, we do some simple things:
+ Store pointers to the most important parts of the engine (video driver,
+ scene manager, gui environment) to safe us from typing too much, add an
+ irrlicht engine logo to the window and a user controlled first person
+ shooter style camera. Also, we let the engine know that it should store
+ all textures in 32 bit. This necessary because for parallax mapping, we
+ need 32 bit textures.
+ */
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* smgr = device->getSceneManager();
+ gui::IGUIEnvironment* env = device->getGUIEnvironment();
+
+ driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);
+
+ // add irrlicht logo
+ env->addImage(driver->getTexture("../../media/irrlichtlogo3.png"),
+ core::position2d<s32>(10,10));
+
+ // add camera
+ scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS();
+ camera->setPosition(core::vector3df(-200,200,-200));
+
+ // disable mouse cursor
+ device->getCursorControl()->setVisible(false);
+
+ /*
+ Because we want the whole scene to look a little bit scarier, we add
+ some fog to it. This is done by a call to IVideoDriver::setFog(). There
+ you can set various fog settings. In this example, we use pixel fog,
+ because it will work well with the materials we'll use in this example.
+ Please note that you will have to set the material flag EMF_FOG_ENABLE
+ to 'true' in every scene node which should be affected by this fog.
+ */
+ driver->setFog(video::SColor(0,138,125,81), video::EFT_FOG_LINEAR, 250, 1000, .003f, true, false);
+
+ /*
+ To be able to display something interesting, we load a mesh from a .3ds
+ file which is a room I modeled with anim8or. It is the same room as
+ from the specialFX example. Maybe you remember from that tutorial, I am
+ no good modeler at all and so I totally messed up the texture mapping
+ in this model, but we can simply repair it with the
+ IMeshManipulator::makePlanarTextureMapping() method.
+ */
+
+ scene::IAnimatedMesh* roomMesh = smgr->getMesh("../../media/room.3ds");
+ scene::ISceneNode* room = 0;
+ scene::ISceneNode* earth = 0;
+
+ if (roomMesh)
+ {
+ // The Room mesh doesn't have proper Texture Mapping on the
+ // floor, so we can recreate them on runtime
+ smgr->getMeshManipulator()->makePlanarTextureMapping(
+ roomMesh->getMesh(0), 0.003f);
+
+ /*
+ Now for the first exciting thing: If we successfully loaded the
+ mesh we need to apply textures to it. Because we want this room
+ to be displayed with a very cool material, we have to do a
+ little bit more than just set the textures. Instead of only
+ loading a color map as usual, we also load a height map which
+ is simply a grayscale texture. From this height map, we create
+ a normal map which we will set as second texture of the room.
+ If you already have a normal map, you could directly set it,
+ but I simply didn't find a nice normal map for this texture.
+ The normal map texture is being generated by the
+ makeNormalMapTexture method of the VideoDriver. The second
+ parameter specifies the height of the heightmap. If you set it
+ to a bigger value, the map will look more rocky.
+ */
+
+ video::ITexture* normalMap =
+ driver->getTexture("../../media/rockwall_height.bmp");
+
+ if (normalMap)
+ driver->makeNormalMapTexture(normalMap, 9.0f);
+/*
+ // The Normal Map and the displacement map/height map in the alpha channel
+ video::ITexture* normalMap =
+ driver->getTexture("../../media/rockwall_NRM.tga");
+*/
+ /*
+ But just setting color and normal map is not everything. The
+ material we want to use needs some additional informations per
+ vertex like tangents and binormals. Because we are too lazy to
+ calculate that information now, we let Irrlicht do this for us.
+ That's why we call IMeshManipulator::createMeshWithTangents().
+ It creates a mesh copy with tangents and binormals from another
+ mesh. After we've done that, we simply create a standard
+ mesh scene node with this mesh copy, set color and normal map
+ and adjust some other material settings. Note that we set
+ EMF_FOG_ENABLE to true to enable fog in the room.
+ */
+
+ scene::IMesh* tangentMesh = smgr->getMeshManipulator()->
+ createMeshWithTangents(roomMesh->getMesh(0));
+
+ room = smgr->addMeshSceneNode(tangentMesh);
+ room->setMaterialTexture(0,
+ driver->getTexture("../../media/rockwall.jpg"));
+ room->setMaterialTexture(1, normalMap);
+
+ // Stones don't glitter..
+ room->getMaterial(0).SpecularColor.set(0,0,0,0);
+ room->getMaterial(0).Shininess = 0.f;
+
+ room->setMaterialFlag(video::EMF_FOG_ENABLE, true);
+ room->setMaterialType(video::EMT_PARALLAX_MAP_SOLID);
+ // adjust height for parallax effect
+ room->getMaterial(0).MaterialTypeParam = 1.f / 64.f;
+
+ // drop mesh because we created it with a create.. call.
+ tangentMesh->drop();
+ }
+
+ /*
+ After we've created a room shaded by per pixel lighting, we add a
+ sphere into it with the same material, but we'll make it transparent.
+ In addition, because the sphere looks somehow like a familiar planet,
+ we make it rotate. The procedure is similar as before. The difference
+ is that we are loading the mesh from an .x file which already contains
+ a color map so we do not need to load it manually. But the sphere is a
+ little bit too small for our needs, so we scale it by the factor 50.
+ */
+
+ // add earth sphere
+
+ scene::IAnimatedMesh* earthMesh = smgr->getMesh("../../media/earth.x");
+ if (earthMesh)
+ {
+ //perform various task with the mesh manipulator
+ scene::IMeshManipulator *manipulator = smgr->getMeshManipulator();
+
+ // create mesh copy with tangent informations from original earth.x mesh
+ scene::IMesh* tangentSphereMesh =
+ manipulator->createMeshWithTangents(earthMesh->getMesh(0));
+
+ // set the alpha value of all vertices to 200
+ manipulator->setVertexColorAlpha(tangentSphereMesh, 200);
+
+ // scale the mesh by factor 50
+ core::matrix4 m;
+ m.setScale ( core::vector3df(50,50,50) );
+ manipulator->transform( tangentSphereMesh, m );
+
+ earth = smgr->addMeshSceneNode(tangentSphereMesh);
+
+ earth->setPosition(core::vector3df(-70,130,45));
+
+ // load heightmap, create normal map from it and set it
+ video::ITexture* earthNormalMap = driver->getTexture("../../media/earthbump.jpg");
+ if (earthNormalMap)
+ {
+ driver->makeNormalMapTexture(earthNormalMap, 20.0f);
+ earth->setMaterialTexture(1, earthNormalMap);
+ earth->setMaterialType(video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA);
+ }
+
+ // adjust material settings
+ earth->setMaterialFlag(video::EMF_FOG_ENABLE, true);
+
+ // add rotation animator
+ scene::ISceneNodeAnimator* anim =
+ smgr->createRotationAnimator(core::vector3df(0,0.1f,0));
+ earth->addAnimator(anim);
+ anim->drop();
+
+ // drop mesh because we created it with a create.. call.
+ tangentSphereMesh->drop();
+ }
+
+ /*
+ Per pixel lighted materials only look cool when there are moving
+ lights. So we add some. And because moving lights alone are so boring,
+ we add billboards to them, and a whole particle system to one of them.
+ We start with the first light which is red and has only the billboard
+ attached.
+ */
+
+ // add light 1 (more green)
+ scene::ILightSceneNode* light1 =
+ smgr->addLightSceneNode(0, core::vector3df(0,0,0),
+ video::SColorf(0.5f, 1.0f, 0.5f, 0.0f), 800.0f);
+
+ light1->setDebugDataVisible ( scene::EDS_BBOX );
+
+
+ // add fly circle animator to light 1
+ scene::ISceneNodeAnimator* anim =
+ smgr->createFlyCircleAnimator (core::vector3df(50,300,0),190.0f, -0.003f);
+ light1->addAnimator(anim);
+ anim->drop();
+
+ // attach billboard to the light
+ scene::IBillboardSceneNode* bill =
+ smgr->addBillboardSceneNode(light1, core::dimension2d<f32>(60, 60));
+
+ bill->setMaterialFlag(video::EMF_LIGHTING, false);
+ bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
+ bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+ bill->setMaterialTexture(0, driver->getTexture("../../media/particlegreen.jpg"));
+
+ /*
+ Now the same again, with the second light. The difference is that we
+ add a particle system to it too. And because the light moves, the
+ particles of the particlesystem will follow. If you want to know more
+ about how particle systems are created in Irrlicht, take a look at the
+ specialFx example. Maybe you will have noticed that we only add 2
+ lights, this has a simple reason: The low end version of this material
+ was written in ps1.1 and vs1.1, which doesn't allow more lights. You
+ could add a third light to the scene, but it won't be used to shade the
+ walls. But of course, this will change in future versions of Irrlicht
+ where higher versions of pixel/vertex shaders will be implemented too.
+ */
+
+ // add light 2 (red)
+ scene::ISceneNode* light2 =
+ smgr->addLightSceneNode(0, core::vector3df(0,0,0),
+ video::SColorf(1.0f, 0.2f, 0.2f, 0.0f), 800.0f);
+
+ // add fly circle animator to light 2
+ anim = smgr->createFlyCircleAnimator(core::vector3df(0,150,0), 200.0f,
+ 0.001f, core::vector3df(0.2f, 0.9f, 0.f));
+ light2->addAnimator(anim);
+ anim->drop();
+
+ // attach billboard to light
+ bill = smgr->addBillboardSceneNode(light2, core::dimension2d<f32>(120, 120));
+ bill->setMaterialFlag(video::EMF_LIGHTING, false);
+ bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
+ bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+ bill->setMaterialTexture(0, driver->getTexture("../../media/particlered.bmp"));
+
+ // add particle system
+ scene::IParticleSystemSceneNode* ps =
+ smgr->addParticleSystemSceneNode(false, light2);
+
+ // create and set emitter
+ scene::IParticleEmitter* em = ps->createBoxEmitter(
+ core::aabbox3d<f32>(-3,0,-3,3,1,3),
+ core::vector3df(0.0f,0.03f,0.0f),
+ 80,100,
+ video::SColor(10,255,255,255), video::SColor(10,255,255,255),
+ 400,1100);
+ em->setMinStartSize(core::dimension2d<f32>(30.0f, 40.0f));
+ em->setMaxStartSize(core::dimension2d<f32>(30.0f, 40.0f));
+
+ ps->setEmitter(em);
+ em->drop();
+
+ // create and set affector
+ scene::IParticleAffector* paf = ps->createFadeOutParticleAffector();
+ ps->addAffector(paf);
+ paf->drop();
+
+ // adjust some material settings
+ ps->setMaterialFlag(video::EMF_LIGHTING, false);
+ ps->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
+ ps->setMaterialTexture(0, driver->getTexture("../../media/fireball.bmp"));
+ ps->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+
+ MyEventReceiver receiver(room, earth, env, driver);
+ device->setEventReceiver(&receiver);
+
+ /*
+ Finally, draw everything. That's it.
+ */
+
+ int lastFPS = -1;
+
+ while(device->run())
+ if (device->isWindowActive())
+ {
+ driver->beginScene(true, true, 0);
+
+ smgr->drawAll();
+ env->drawAll();
+
+ driver->endScene();
+
+ int fps = driver->getFPS();
+
+ if (lastFPS != fps)
+ {
+ core::stringw str = L"Per pixel lighting example - Irrlicht Engine [";
+ str += driver->getName();
+ str += "] FPS:";
+ str += fps;
+
+ device->setWindowCaption(str.c_str());
+ lastFPS = fps;
+ }
+ }
+
+ device->drop();
+
+ return 0;
+}
+
+/*
+**/
diff --git a/examples/11.PerPixelLighting/tutorial.html b/examples/11.PerPixelLighting/tutorial.html new file mode 100644 index 0000000..fb092d0 --- /dev/null +++ b/examples/11.PerPixelLighting/tutorial.html @@ -0,0 +1,206 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 11: Per-Pixel Lighting</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 11: Per-Pixel Lighting </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/011shot.jpg" alt="011shot.jpg"/> +</div> + <p>This tutorial shows how to use one of the built in more complex materials in irrlicht: Per pixel lighted surfaces using normal maps and parallax mapping. It will also show how to use fog and moving particle systems. And don't panic: You do not need any experience with shaders to use these materials in Irrlicht.</p> +<p>At first, we need to include all headers and do the stuff we always do, like in nearly all other tutorials. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> For this example, we need an event receiver, to make it possible for the user to switch between the three available material types. In addition, the event receiver will create some small GUI window which displays what material is currently being used. There is nothing special done in this class, so maybe you want to skip reading it. </p><div class="fragment"><div class="line"><span class="keyword">class </span>MyEventReceiver : <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"></div><div class="line"> MyEventReceiver(scene::ISceneNode* room,scene::ISceneNode* earth,</div><div class="line"> gui::IGUIEnvironment* env, video::IVideoDriver* driver)</div><div class="line"> {</div><div class="line"> <span class="comment">// store pointer to room so we can change its drawing mode</span></div><div class="line"> Room = room;</div><div class="line"> Earth = earth;</div><div class="line"> Driver = driver;</div><div class="line"></div><div class="line"> <span class="comment">// set a nicer font</span></div><div class="line"> gui::IGUISkin* skin = env->getSkin();</div><div class="line"> gui::IGUIFont* font = env->getFont(<span class="stringliteral">"../../media/fonthaettenschweiler.bmp"</span>);</div><div class="line"> <span class="keywordflow">if</span> (font)</div><div class="line"> skin->setFont(font);</div><div class="line"></div><div class="line"> <span class="comment">// add window and listbox</span></div><div class="line"> gui::IGUIWindow* window = env->addWindow(</div><div class="line"> core::rect<s32>(460,375,630,470), <span class="keyword">false</span>, L<span class="stringliteral">"Use 'E' + 'R' to change"</span>);</div><div class="line"></div><div class="line"> ListBox = env->addListBox(</div><div class="line"> core::rect<s32>(2,22,165,88), window);</div><div class="line"></div><div class="line"> ListBox->addItem(L<span class="stringliteral">"Diffuse"</span>);</div><div class="line"> ListBox->addItem(L<span class="stringliteral">"Bump mapping"</span>);</div><div class="line"> ListBox->addItem(L<span class="stringliteral">"Parallax mapping"</span>);</div><div class="line"> ListBox->setSelected(1);</div><div class="line"></div><div class="line"> <span class="comment">// create problem text</span></div><div class="line"> ProblemText = env->addStaticText(</div><div class="line"> L<span class="stringliteral">"Your hardware or this renderer is not able to use the "</span>\</div><div class="line"> L<span class="stringliteral">"needed shaders for this material. Using fall back materials."</span>,</div><div class="line"> core::rect<s32>(150,20,470,80));</div><div class="line"></div><div class="line"> ProblemText->setOverrideColor(video::SColor(100,255,255,255));</div><div class="line"></div><div class="line"> <span class="comment">// set start material (prefer parallax mapping if available)</span></div><div class="line"> video::IMaterialRenderer* renderer =</div><div class="line"> Driver->getMaterialRenderer(video::EMT_PARALLAX_MAP_SOLID);</div><div class="line"> <span class="keywordflow">if</span> (renderer && renderer->getRenderCapability() == 0)</div><div class="line"> ListBox->setSelected(2);</div><div class="line"></div><div class="line"> <span class="comment">// set the material which is selected in the listbox</span></div><div class="line"> setMaterial();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent& event)</div><div class="line"> {</div><div class="line"> <span class="comment">// check if user presses the key 'E' or 'R'</span></div><div class="line"> <span class="keywordflow">if</span> (event.EventType == irr::EET_KEY_INPUT_EVENT &&</div><div class="line"> !event.KeyInput.PressedDown && Room && ListBox)</div><div class="line"> {</div><div class="line"> <span class="comment">// change selected item in listbox</span></div><div class="line"></div><div class="line"> <span class="keywordtype">int</span> sel = ListBox->getSelected();</div><div class="line"> <span class="keywordflow">if</span> (event.KeyInput.Key == irr::KEY_KEY_R)</div><div class="line"> ++sel;</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> (event.KeyInput.Key == irr::KEY_KEY_E)</div><div class="line"> --sel;</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (sel > 2) sel = 0;</div><div class="line"> <span class="keywordflow">if</span> (sel < 0) sel = 2;</div><div class="line"> ListBox->setSelected(sel);</div><div class="line"></div><div class="line"> <span class="comment">// set the material which is selected in the listbox</span></div><div class="line"> setMaterial();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"></div><div class="line"> <span class="comment">// sets the material of the room mesh the the one set in the</span></div><div class="line"> <span class="comment">// list box.</span></div><div class="line"> <span class="keywordtype">void</span> setMaterial()</div><div class="line"> {</div><div class="line"> video::E_MATERIAL_TYPE type = video::EMT_SOLID;</div><div class="line"></div><div class="line"> <span class="comment">// change material setting</span></div><div class="line"> <span class="keywordflow">switch</span>(ListBox->getSelected())</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> 0: type = video::EMT_SOLID;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> 1: type = video::EMT_NORMAL_MAP_SOLID;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> 2: type = video::EMT_PARALLAX_MAP_SOLID;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> Room->setMaterialType(type);</div><div class="line"></div><div class="line"> <span class="comment">// change material setting</span></div><div class="line"> <span class="keywordflow">switch</span>(ListBox->getSelected())</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> 0: type = video::EMT_TRANSPARENT_VERTEX_ALPHA;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> 1: type = video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> 2: type = video::EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> Earth->setMaterialType(type);</div></div><!-- fragment --><p> We need to add a warning if the materials will not be able to be displayed 100% correctly. This is no problem, they will be rendered using fall back materials, but at least the user should know that it would look better on better hardware. We simply check if the material renderer is able to draw at full quality on the current hardware. The IMaterialRenderer::getRenderCapability() returns 0 if this is the case. </p><div class="fragment"><div class="line"> video::IMaterialRenderer* renderer = Driver->getMaterialRenderer(type);</div><div class="line"></div><div class="line"> <span class="comment">// display some problem text when problem</span></div><div class="line"> <span class="keywordflow">if</span> (!renderer || renderer->getRenderCapability() != 0)</div><div class="line"> ProblemText->setVisible(<span class="keyword">true</span>);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> ProblemText->setVisible(<span class="keyword">false</span>);</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"></div><div class="line"> gui::IGUIStaticText* ProblemText;</div><div class="line"> gui::IGUIListBox* ListBox;</div><div class="line"></div><div class="line"> scene::ISceneNode* Room;</div><div class="line"> scene::ISceneNode* Earth;</div><div class="line"> video::IVideoDriver* Driver;</div><div class="line">};</div></div><!-- fragment --><p> Now for the real fun. We create an Irrlicht Device and start to setup the scene. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> <span class="comment">// create device</span></div><div class="line"></div><div class="line"> IrrlichtDevice* device = createDevice(driverType,</div><div class="line"> core::dimension2d<u32>(640, 480));</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div></div><!-- fragment --><p> Before we start with the interesting stuff, we do some simple things: Store pointers to the most important parts of the engine (video driver, scene manager, gui environment) to safe us from typing too much, add an irrlicht engine logo to the window and a user controlled first person shooter style camera. Also, we let the engine know that it should store all textures in 32 bit. This necessary because for parallax mapping, we need 32 bit textures. </p><div class="fragment"><div class="line">video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line">scene::ISceneManager* smgr = device->getSceneManager();</div><div class="line">gui::IGUIEnvironment* env = device->getGUIEnvironment();</div><div class="line"></div><div class="line">driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, <span class="keyword">true</span>);</div><div class="line"></div><div class="line"><span class="comment">// add irrlicht logo</span></div><div class="line">env->addImage(driver->getTexture(<span class="stringliteral">"../../media/irrlichtlogo3.png"</span>),</div><div class="line"> core::position2d<s32>(10,10));</div><div class="line"></div><div class="line"><span class="comment">// add camera</span></div><div class="line">scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS();</div><div class="line">camera->setPosition(core::vector3df(-200,200,-200));</div><div class="line"></div><div class="line"><span class="comment">// disable mouse cursor</span></div><div class="line">device->getCursorControl()->setVisible(<span class="keyword">false</span>);</div></div><!-- fragment --><p> Because we want the whole scene to look a little bit scarier, we add some fog to it. This is done by a call to IVideoDriver::setFog(). There you can set various fog settings. In this example, we use pixel fog, because it will work well with the materials we'll use in this example. Please note that you will have to set the material flag EMF_FOG_ENABLE to 'true' in every scene node which should be affected by this fog. </p><div class="fragment"><div class="line">driver->setFog(video::SColor(0,138,125,81), video::EFT_FOG_LINEAR, 250, 1000, .003f, <span class="keyword">true</span>, <span class="keyword">false</span>);</div></div><!-- fragment --><p> To be able to display something interesting, we load a mesh from a .3ds file which is a room I modeled with anim8or. It is the same room as from the specialFX example. Maybe you remember from that tutorial, I am no good modeler at all and so I totally messed up the texture mapping in this model, but we can simply repair it with the IMeshManipulator::makePlanarTextureMapping() method. </p><div class="fragment"><div class="line">scene::IAnimatedMesh* roomMesh = smgr->getMesh(<span class="stringliteral">"../../media/room.3ds"</span>);</div><div class="line">scene::ISceneNode* room = 0;</div><div class="line">scene::ISceneNode* earth = 0;</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (roomMesh)</div><div class="line">{</div><div class="line"> <span class="comment">// The Room mesh doesn't have proper Texture Mapping on the</span></div><div class="line"> <span class="comment">// floor, so we can recreate them on runtime</span></div><div class="line"> smgr->getMeshManipulator()->makePlanarTextureMapping(</div><div class="line"> roomMesh->getMesh(0), 0.003f);</div></div><!-- fragment --><p> Now for the first exciting thing: If we successfully loaded the mesh we need to apply textures to it. Because we want this room to be displayed with a very cool material, we have to do a little bit more than just set the textures. Instead of only loading a color map as usual, we also load a height map which is simply a grayscale texture. From this height map, we create a normal map which we will set as second texture of the room. If you already have a normal map, you could directly set it, but I simply didn't find a nice normal map for this texture. The normal map texture is being generated by the makeNormalMapTexture method of the VideoDriver. The second parameter specifies the height of the heightmap. If you set it to a bigger value, the map will look more rocky. </p><div class="fragment"><div class="line">video::ITexture* normalMap =</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/rockwall_height.bmp"</span>);</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (normalMap)</div><div class="line"> driver->makeNormalMapTexture(normalMap, 9.0f);</div></div><!-- fragment --><p> The Normal Map and the displacement map/height map in the alpha channel video::ITexture* normalMap = driver->getTexture("../../media/rockwall_NRM.tga"); </p><div class="fragment"></div><!-- fragment --><p> But just setting color and normal map is not everything. The material we want to use needs some additional informations per vertex like tangents and binormals. Because we are too lazy to calculate that information now, we let Irrlicht do this for us. That's why we call IMeshManipulator::createMeshWithTangents(). It creates a mesh copy with tangents and binormals from another mesh. After we've done that, we simply create a standard mesh scene node with this mesh copy, set color and normal map and adjust some other material settings. Note that we set EMF_FOG_ENABLE to true to enable fog in the room. </p><div class="fragment"><div class="line"> scene::IMesh* tangentMesh = smgr->getMeshManipulator()-></div><div class="line"> createMeshWithTangents(roomMesh->getMesh(0));</div><div class="line"></div><div class="line"> room = smgr->addMeshSceneNode(tangentMesh);</div><div class="line"> room->setMaterialTexture(0,</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/rockwall.jpg"</span>));</div><div class="line"> room->setMaterialTexture(1, normalMap);</div><div class="line"></div><div class="line"> <span class="comment">// Stones don't glitter..</span></div><div class="line"> room->getMaterial(0).SpecularColor.set(0,0,0,0);</div><div class="line"> room->getMaterial(0).Shininess = 0.f;</div><div class="line"></div><div class="line"> room->setMaterialFlag(video::EMF_FOG_ENABLE, <span class="keyword">true</span>);</div><div class="line"> room->setMaterialType(video::EMT_PARALLAX_MAP_SOLID);</div><div class="line"> <span class="comment">// adjust height for parallax effect</span></div><div class="line"> room->getMaterial(0).MaterialTypeParam = 1.f / 64.f;</div><div class="line"></div><div class="line"> <span class="comment">// drop mesh because we created it with a create.. call.</span></div><div class="line"> tangentMesh->drop();</div><div class="line">}</div></div><!-- fragment --><p> After we've created a room shaded by per pixel lighting, we add a sphere into it with the same material, but we'll make it transparent. In addition, because the sphere looks somehow like a familiar planet, we make it rotate. The procedure is similar as before. The difference is that we are loading the mesh from an .x file which already contains a color map so we do not need to load it manually. But the sphere is a little bit too small for our needs, so we scale it by the factor 50. </p><div class="fragment"><div class="line"><span class="comment">// add earth sphere</span></div><div class="line"></div><div class="line">scene::IAnimatedMesh* earthMesh = smgr->getMesh(<span class="stringliteral">"../../media/earth.x"</span>);</div><div class="line"><span class="keywordflow">if</span> (earthMesh)</div><div class="line">{</div><div class="line"> <span class="comment">//perform various task with the mesh manipulator</span></div><div class="line"> scene::IMeshManipulator *manipulator = smgr->getMeshManipulator();</div><div class="line"></div><div class="line"> <span class="comment">// create mesh copy with tangent informations from original earth.x mesh</span></div><div class="line"> scene::IMesh* tangentSphereMesh =</div><div class="line"> manipulator->createMeshWithTangents(earthMesh->getMesh(0));</div><div class="line"></div><div class="line"> <span class="comment">// set the alpha value of all vertices to 200</span></div><div class="line"> manipulator->setVertexColorAlpha(tangentSphereMesh, 200);</div><div class="line"></div><div class="line"> <span class="comment">// scale the mesh by factor 50</span></div><div class="line"> core::matrix4 m;</div><div class="line"> m.setScale ( core::vector3df(50,50,50) );</div><div class="line"> manipulator->transform( tangentSphereMesh, m );</div><div class="line"></div><div class="line"> earth = smgr->addMeshSceneNode(tangentSphereMesh);</div><div class="line"></div><div class="line"> earth->setPosition(core::vector3df(-70,130,45));</div><div class="line"></div><div class="line"> <span class="comment">// load heightmap, create normal map from it and set it</span></div><div class="line"> video::ITexture* earthNormalMap = driver->getTexture(<span class="stringliteral">"../../media/earthbump.jpg"</span>);</div><div class="line"> <span class="keywordflow">if</span> (earthNormalMap)</div><div class="line"> {</div><div class="line"> driver->makeNormalMapTexture(earthNormalMap, 20.0f);</div><div class="line"> earth->setMaterialTexture(1, earthNormalMap);</div><div class="line"> earth->setMaterialType(video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// adjust material settings</span></div><div class="line"> earth->setMaterialFlag(video::EMF_FOG_ENABLE, <span class="keyword">true</span>);</div><div class="line"></div><div class="line"> <span class="comment">// add rotation animator</span></div><div class="line"> scene::ISceneNodeAnimator* anim =</div><div class="line"> smgr->createRotationAnimator(core::vector3df(0,0.1f,0));</div><div class="line"> earth->addAnimator(anim);</div><div class="line"> anim->drop();</div><div class="line"></div><div class="line"> <span class="comment">// drop mesh because we created it with a create.. call.</span></div><div class="line"> tangentSphereMesh->drop();</div><div class="line">}</div></div><!-- fragment --><p> Per pixel lighted materials only look cool when there are moving lights. So we add some. And because moving lights alone are so boring, we add billboards to them, and a whole particle system to one of them. We start with the first light which is red and has only the billboard attached. </p><div class="fragment"><div class="line"><span class="comment">// add light 1 (more green)</span></div><div class="line">scene::ILightSceneNode* light1 =</div><div class="line"> smgr->addLightSceneNode(0, core::vector3df(0,0,0),</div><div class="line"> video::SColorf(0.5f, 1.0f, 0.5f, 0.0f), 800.0f);</div><div class="line"></div><div class="line">light1->setDebugDataVisible ( scene::EDS_BBOX );</div><div class="line"></div><div class="line"></div><div class="line"><span class="comment">// add fly circle animator to light 1</span></div><div class="line">scene::ISceneNodeAnimator* anim =</div><div class="line"> smgr->createFlyCircleAnimator (core::vector3df(50,300,0),190.0f, -0.003f);</div><div class="line">light1->addAnimator(anim);</div><div class="line">anim->drop();</div><div class="line"></div><div class="line"><span class="comment">// attach billboard to the light</span></div><div class="line">scene::IBillboardSceneNode* bill =</div><div class="line"> smgr->addBillboardSceneNode(light1, core::dimension2d<f32>(60, 60));</div><div class="line"></div><div class="line">bill->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line">bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, <span class="keyword">false</span>);</div><div class="line">bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);</div><div class="line">bill->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/particlegreen.jpg"</span>));</div></div><!-- fragment --><p> Now the same again, with the second light. The difference is that we add a particle system to it too. And because the light moves, the particles of the particlesystem will follow. If you want to know more about how particle systems are created in Irrlicht, take a look at the specialFx example. Maybe you will have noticed that we only add 2 lights, this has a simple reason: The low end version of this material was written in ps1.1 and vs1.1, which doesn't allow more lights. You could add a third light to the scene, but it won't be used to shade the walls. But of course, this will change in future versions of Irrlicht where higher versions of pixel/vertex shaders will be implemented too. </p><div class="fragment"><div class="line"><span class="comment">// add light 2 (red)</span></div><div class="line">scene::ISceneNode* light2 =</div><div class="line"> smgr->addLightSceneNode(0, core::vector3df(0,0,0),</div><div class="line"> video::SColorf(1.0f, 0.2f, 0.2f, 0.0f), 800.0f);</div><div class="line"></div><div class="line"><span class="comment">// add fly circle animator to light 2</span></div><div class="line">anim = smgr->createFlyCircleAnimator(core::vector3df(0,150,0), 200.0f,</div><div class="line"> 0.001f, core::vector3df(0.2f, 0.9f, 0.f));</div><div class="line">light2->addAnimator(anim);</div><div class="line">anim->drop();</div><div class="line"></div><div class="line"><span class="comment">// attach billboard to light</span></div><div class="line">bill = smgr->addBillboardSceneNode(light2, core::dimension2d<f32>(120, 120));</div><div class="line">bill->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line">bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, <span class="keyword">false</span>);</div><div class="line">bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);</div><div class="line">bill->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/particlered.bmp"</span>));</div><div class="line"></div><div class="line"><span class="comment">// add particle system</span></div><div class="line">scene::IParticleSystemSceneNode* ps =</div><div class="line"> smgr->addParticleSystemSceneNode(<span class="keyword">false</span>, light2);</div><div class="line"></div><div class="line"><span class="comment">// create and set emitter</span></div><div class="line">scene::IParticleEmitter* em = ps->createBoxEmitter(</div><div class="line"> core::aabbox3d<f32>(-3,0,-3,3,1,3),</div><div class="line"> core::vector3df(0.0f,0.03f,0.0f),</div><div class="line"> 80,100,</div><div class="line"> video::SColor(10,255,255,255), video::SColor(10,255,255,255),</div><div class="line"> 400,1100);</div><div class="line">em->setMinStartSize(core::dimension2d<f32>(30.0f, 40.0f));</div><div class="line">em->setMaxStartSize(core::dimension2d<f32>(30.0f, 40.0f));</div><div class="line"></div><div class="line">ps->setEmitter(em);</div><div class="line">em->drop();</div><div class="line"></div><div class="line"><span class="comment">// create and set affector</span></div><div class="line">scene::IParticleAffector* paf = ps->createFadeOutParticleAffector();</div><div class="line">ps->addAffector(paf);</div><div class="line">paf->drop();</div><div class="line"></div><div class="line"><span class="comment">// adjust some material settings</span></div><div class="line">ps->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line">ps->setMaterialFlag(video::EMF_ZWRITE_ENABLE, <span class="keyword">false</span>);</div><div class="line">ps->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/fireball.bmp"</span>));</div><div class="line">ps->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);</div><div class="line"></div><div class="line">MyEventReceiver receiver(room, earth, env, driver);</div><div class="line">device->setEventReceiver(&receiver);</div></div><!-- fragment --><p> Finally, draw everything. That's it. </p><div class="fragment"><div class="line"> <span class="keywordtype">int</span> lastFPS = -1;</div><div class="line"></div><div class="line"> <span class="keywordflow">while</span>(device->run())</div><div class="line"> <span class="keywordflow">if</span> (device->isWindowActive())</div><div class="line"> {</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, 0);</div><div class="line"></div><div class="line"> smgr->drawAll();</div><div class="line"> env->drawAll();</div><div class="line"></div><div class="line"> driver->endScene();</div><div class="line"></div><div class="line"> <span class="keywordtype">int</span> fps = driver->getFPS();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (lastFPS != fps)</div><div class="line"> {</div><div class="line"> core::stringw str = L<span class="stringliteral">"Per pixel lighting example - Irrlicht Engine ["</span>;</div><div class="line"> str += driver->getName();</div><div class="line"> str += <span class="stringliteral">"] FPS:"</span>;</div><div class="line"> str += fps;</div><div class="line"></div><div class="line"> device->setWindowCaption(str.c_str());</div><div class="line"> lastFPS = fps;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> device->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/12.TerrainRendering/Makefile b/examples/12.TerrainRendering/Makefile new file mode 100644 index 0000000..92b529f --- /dev/null +++ b/examples/12.TerrainRendering/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 12.TerrainRendering
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/12.TerrainRendering/TerrainRendering.cbp b/examples/12.TerrainRendering/TerrainRendering.cbp new file mode 100644 index 0000000..2bf6dea --- /dev/null +++ b/examples/12.TerrainRendering/TerrainRendering.cbp @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 12 Terrain Rendering" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/TerrainRendering" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/TerrainRendering" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-w" /> + <Add option="-g" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/12.TerrainRendering/TerrainRendering.dev b/examples/12.TerrainRendering/TerrainRendering.dev new file mode 100644 index 0000000..678e536 --- /dev/null +++ b/examples/12.TerrainRendering/TerrainRendering.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 12 Terrain Rendering
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=12.TerrainRendering.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/12.TerrainRendering/TerrainRendering.vcproj b/examples/12.TerrainRendering/TerrainRendering.vcproj new file mode 100644 index 0000000..2200562 --- /dev/null +++ b/examples/12.TerrainRendering/TerrainRendering.vcproj @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="12.TerrainRendering"
+ ProjectGUID="{D70CD59D-853A-4343-9DE0-A73B3D48914D}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/TerrainRendering.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/TerrainRendering.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/TerrainRendering.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/TerrainRendering.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/TerrainRendering.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/TerrainRendering.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/12.TerrainRendering/TerrainRendering_vc10.vcxproj b/examples/12.TerrainRendering/TerrainRendering_vc10.vcxproj new file mode 100644 index 0000000..22bd8b6 --- /dev/null +++ b/examples/12.TerrainRendering/TerrainRendering_vc10.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>12.TerrainRendering</ProjectName>
+ <ProjectGuid>{3A5B74E5-6390-43B0-A459-2793B81FFD31}</ProjectGuid>
+ <RootNamespace>TerrainRendering</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/TerrainRendering.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/TerrainRendering.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\12.TerrainRendering.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/TerrainRendering.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/TerrainRendering.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\12.TerrainRendering.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/12.TerrainRendering/TerrainRendering_vc11.vcxproj b/examples/12.TerrainRendering/TerrainRendering_vc11.vcxproj new file mode 100644 index 0000000..22bd8b6 --- /dev/null +++ b/examples/12.TerrainRendering/TerrainRendering_vc11.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>12.TerrainRendering</ProjectName>
+ <ProjectGuid>{3A5B74E5-6390-43B0-A459-2793B81FFD31}</ProjectGuid>
+ <RootNamespace>TerrainRendering</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/TerrainRendering.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/TerrainRendering.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\12.TerrainRendering.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/TerrainRendering.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/TerrainRendering.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\12.TerrainRendering.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/12.TerrainRendering/TerrainRendering_vc12.vcxproj b/examples/12.TerrainRendering/TerrainRendering_vc12.vcxproj new file mode 100644 index 0000000..4fb6b9b --- /dev/null +++ b/examples/12.TerrainRendering/TerrainRendering_vc12.vcxproj @@ -0,0 +1,235 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>12.TerrainRendering</ProjectName>
+ <ProjectGuid>{3A5B74E5-6390-43B0-A459-2793B81FFD31}</ProjectGuid>
+ <RootNamespace>TerrainRendering</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/TerrainRendering.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/TerrainRendering.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\12.TerrainRendering.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/TerrainRendering.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/TerrainRendering.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\12.TerrainRendering.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/12.TerrainRendering/TerrainRendering_vc8.vcproj b/examples/12.TerrainRendering/TerrainRendering_vc8.vcproj new file mode 100644 index 0000000..757e2f6 --- /dev/null +++ b/examples/12.TerrainRendering/TerrainRendering_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="12.TerrainRendering_vc8"
+ ProjectGUID="{3A5B74E5-6390-43B0-A459-2793B81FFD31}"
+ RootNamespace="TerrainRendering_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/TerrainRendering.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/TerrainRendering.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/TerrainRendering.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/TerrainRendering.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/TerrainRendering.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/TerrainRendering.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/12.TerrainRendering/TerrainRendering_vc9.vcproj b/examples/12.TerrainRendering/TerrainRendering_vc9.vcproj new file mode 100644 index 0000000..8a7f2f1 --- /dev/null +++ b/examples/12.TerrainRendering/TerrainRendering_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="12.TerrainRendering_vc9"
+ ProjectGUID="{3A5B74E5-6390-43B0-A459-2793B81FFD31}"
+ RootNamespace="TerrainRendering_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/TerrainRendering.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/TerrainRendering.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/TerrainRendering.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/TerrainRendering.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/TerrainRendering.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/TerrainRendering.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/12.TerrainRendering/main.cpp b/examples/12.TerrainRendering/main.cpp new file mode 100644 index 0000000..d829244 --- /dev/null +++ b/examples/12.TerrainRendering/main.cpp @@ -0,0 +1,285 @@ +/** Example 012 Terrain Rendering
+
+This tutorial will briefly show how to use the terrain renderer of Irrlicht. It
+will also show the terrain renderer triangle selector to be able to do
+collision detection with terrain.
+
+Note that the Terrain Renderer in Irrlicht is based on Spintz'
+GeoMipMapSceneNode, lots of thanks go to him. DeusXL provided a new elegant
+simple solution for building larger area on small heightmaps -> terrain
+smoothing.
+
+In the beginning there is nothing special. We include the needed header files
+and create an event listener to listen if the user presses a key: The 'W' key
+switches to wireframe mode, the 'P' key to pointcloud mode, and the 'D' key
+toggles between solid and detail mapped material.
+*/
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+
+class MyEventReceiver : public IEventReceiver
+{
+public:
+
+ MyEventReceiver(scene::ISceneNode* terrain, scene::ISceneNode* skybox, scene::ISceneNode* skydome) :
+ Terrain(terrain), Skybox(skybox), Skydome(skydome), showBox(true), showDebug(false)
+ {
+ Skybox->setVisible(showBox);
+ Skydome->setVisible(!showBox);
+ }
+
+ bool OnEvent(const SEvent& event)
+ {
+ // check if user presses the key 'W' or 'D'
+ if (event.EventType == irr::EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown)
+ {
+ switch (event.KeyInput.Key)
+ {
+ case irr::KEY_KEY_W: // switch wire frame mode
+ Terrain->setMaterialFlag(video::EMF_WIREFRAME,
+ !Terrain->getMaterial(0).Wireframe);
+ Terrain->setMaterialFlag(video::EMF_POINTCLOUD, false);
+ return true;
+ case irr::KEY_KEY_P: // switch wire frame mode
+ Terrain->setMaterialFlag(video::EMF_POINTCLOUD,
+ !Terrain->getMaterial(0).PointCloud);
+ Terrain->setMaterialFlag(video::EMF_WIREFRAME, false);
+ return true;
+ case irr::KEY_KEY_D: // toggle detail map
+ Terrain->setMaterialType(
+ Terrain->getMaterial(0).MaterialType == video::EMT_SOLID ?
+ video::EMT_DETAIL_MAP : video::EMT_SOLID);
+ return true;
+ case irr::KEY_KEY_S: // toggle skies
+ showBox=!showBox;
+ Skybox->setVisible(showBox);
+ Skydome->setVisible(!showBox);
+ return true;
+ case irr::KEY_KEY_X: // toggle debug information
+ showDebug=!showDebug;
+ Terrain->setDebugDataVisible(showDebug?scene::EDS_BBOX_ALL:scene::EDS_OFF);
+ return true;
+ default:
+ break;
+ }
+ }
+
+ return false;
+ }
+
+private:
+ scene::ISceneNode* Terrain;
+ scene::ISceneNode* Skybox;
+ scene::ISceneNode* Skydome;
+ bool showBox;
+ bool showDebug;
+};
+
+
+/*
+The start of the main function starts like in most other example. We ask the
+user for the desired renderer and start it up. This time with the advanced
+parameter handling.
+*/
+int main()
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ // create device with full flexibility over creation parameters
+ // you can add more parameters if desired, check irr::SIrrlichtCreationParameters
+ irr::SIrrlichtCreationParameters params;
+ params.DriverType=driverType;
+ params.WindowSize=core::dimension2d<u32>(640, 480);
+ IrrlichtDevice* device = createDeviceEx(params);
+
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+
+ /*
+ First, we add standard stuff to the scene: A nice irrlicht engine
+ logo, a small help text, a user controlled camera, and we disable
+ the mouse cursor.
+ */
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* smgr = device->getSceneManager();
+ gui::IGUIEnvironment* env = device->getGUIEnvironment();
+
+ driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);
+
+ // add irrlicht logo
+ env->addImage(driver->getTexture("../../media/irrlichtlogo2.png"),
+ core::position2d<s32>(10,10));
+
+ //set other font
+ env->getSkin()->setFont(env->getFont("../../media/fontlucida.png"));
+
+ // add some help text
+ env->addStaticText(
+ L"Press 'W' to change wireframe mode\nPress 'D' to toggle detail map\nPress 'S' to toggle skybox/skydome",
+ core::rect<s32>(10,421,250,475), true, true, 0, -1, true);
+
+ // add camera
+ scene::ICameraSceneNode* camera =
+ smgr->addCameraSceneNodeFPS(0,100.0f,1.2f);
+
+ camera->setPosition(core::vector3df(2700*2,255*2,2600*2));
+ camera->setTarget(core::vector3df(2397*2,343*2,2700*2));
+ camera->setFarValue(42000.0f);
+
+ // disable mouse cursor
+ device->getCursorControl()->setVisible(false);
+
+ /*
+ Here comes the terrain renderer scene node: We add it just like any
+ other scene node to the scene using
+ ISceneManager::addTerrainSceneNode(). The only parameter we use is a
+ file name to the heightmap we use. A heightmap is simply a gray scale
+ texture. The terrain renderer loads it and creates the 3D terrain from
+ it.
+
+ To make the terrain look more big, we change the scale factor of
+ it to (40, 4.4, 40). Because we don't have any dynamic lights in the
+ scene, we switch off the lighting, and we set the file
+ terrain-texture.jpg as texture for the terrain and detailmap3.jpg as
+ second texture, called detail map. At last, we set the scale values for
+ the texture: The first texture will be repeated only one time over the
+ whole terrain, and the second one (detail map) 20 times.
+ */
+
+ // add terrain scene node
+ scene::ITerrainSceneNode* terrain = smgr->addTerrainSceneNode(
+ "../../media/terrain-heightmap.bmp",
+ 0, // parent node
+ -1, // node id
+ core::vector3df(0.f, 0.f, 0.f), // position
+ core::vector3df(0.f, 0.f, 0.f), // rotation
+ core::vector3df(40.f, 4.4f, 40.f), // scale
+ video::SColor ( 255, 255, 255, 255 ), // vertexColor
+ 5, // maxLOD
+ scene::ETPS_17, // patchSize
+ 4 // smoothFactor
+ );
+
+ terrain->setMaterialFlag(video::EMF_LIGHTING, false);
+
+ terrain->setMaterialTexture(0,
+ driver->getTexture("../../media/terrain-texture.jpg"));
+ terrain->setMaterialTexture(1,
+ driver->getTexture("../../media/detailmap3.jpg"));
+
+ terrain->setMaterialType(video::EMT_DETAIL_MAP);
+
+ terrain->scaleTexture(1.0f, 20.0f);
+
+ /*
+ To be able to do collision with the terrain, we create a triangle selector.
+ If you want to know what triangle selectors do, just take a look into the
+ collision tutorial. The terrain triangle selector works together with the
+ terrain. To demonstrate this, we create a collision response animator
+ and attach it to the camera, so that the camera will not be able to fly
+ through the terrain.
+ */
+
+ // create triangle selector for the terrain
+ scene::ITriangleSelector* selector
+ = smgr->createTerrainTriangleSelector(terrain, 0);
+ terrain->setTriangleSelector(selector);
+
+ // create collision response animator and attach it to the camera
+ scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
+ selector, camera, core::vector3df(60,100,60),
+ core::vector3df(0,0,0),
+ core::vector3df(0,50,0));
+ selector->drop();
+ camera->addAnimator(anim);
+ anim->drop();
+
+ /* If you need access to the terrain data you can also do this directly via the following code fragment.
+ */
+ scene::CDynamicMeshBuffer* buffer = new scene::CDynamicMeshBuffer(video::EVT_2TCOORDS, video::EIT_16BIT);
+ terrain->getMeshBufferForLOD(*buffer, 0);
+ video::S3DVertex2TCoords* data = (video::S3DVertex2TCoords*)buffer->getVertexBuffer().getData();
+ // Work on data or get the IndexBuffer with a similar call.
+ buffer->drop(); // When done drop the buffer again.
+
+ /*
+ To make the user be able to switch between normal and wireframe mode,
+ we create an instance of the event receiver from above and let Irrlicht
+ know about it. In addition, we add the skybox which we already used in
+ lots of Irrlicht examples and a skydome, which is shown mutually
+ exclusive with the skybox by pressing 'S'.
+ */
+
+ // create skybox and skydome
+ driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
+
+ scene::ISceneNode* skybox=smgr->addSkyBoxSceneNode(
+ driver->getTexture("../../media/irrlicht2_up.jpg"),
+ driver->getTexture("../../media/irrlicht2_dn.jpg"),
+ driver->getTexture("../../media/irrlicht2_lf.jpg"),
+ driver->getTexture("../../media/irrlicht2_rt.jpg"),
+ driver->getTexture("../../media/irrlicht2_ft.jpg"),
+ driver->getTexture("../../media/irrlicht2_bk.jpg"));
+ scene::ISceneNode* skydome=smgr->addSkyDomeSceneNode(driver->getTexture("../../media/skydome.jpg"),16,8,0.95f,2.0f);
+
+ driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true);
+
+ // create event receiver
+ MyEventReceiver receiver(terrain, skybox, skydome);
+ device->setEventReceiver(&receiver);
+
+ /*
+ That's it, draw everything.
+ */
+
+ int lastFPS = -1;
+
+ while(device->run())
+ if (device->isWindowActive())
+ {
+ driver->beginScene(true, true, 0 );
+
+ smgr->drawAll();
+ env->drawAll();
+
+ driver->endScene();
+
+ // display frames per second in window title
+ int fps = driver->getFPS();
+ if (lastFPS != fps)
+ {
+ core::stringw str = L"Terrain Renderer - Irrlicht Engine [";
+ str += driver->getName();
+ str += "] FPS:";
+ str += fps;
+ // Also print terrain height of current camera position
+ // We can use camera position because terrain is located at coordinate origin
+ str += " Height: ";
+ str += terrain->getHeight(camera->getAbsolutePosition().X,
+ camera->getAbsolutePosition().Z);
+
+ device->setWindowCaption(str.c_str());
+ lastFPS = fps;
+ }
+ }
+
+ device->drop();
+
+ return 0;
+}
+
+/*
+Now you know how to use terrain in Irrlicht.
+**/
diff --git a/examples/12.TerrainRendering/tutorial.html b/examples/12.TerrainRendering/tutorial.html new file mode 100644 index 0000000..515ff84 --- /dev/null +++ b/examples/12.TerrainRendering/tutorial.html @@ -0,0 +1,209 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 12: Terrain Rendering</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 12: Terrain Rendering </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/012shot.jpg" alt="012shot.jpg"/> +</div> + <p>This tutorial will briefly show how to use the terrain renderer of Irrlicht. It will also show the terrain renderer triangle selector to be able to do collision detection with terrain.</p> +<p>Note that the Terrain Renderer in Irrlicht is based on Spintz' GeoMipMapSceneNode, lots of thanks go to him. DeusXL provided a new elegant simple solution for building larger area on small heightmaps -> terrain smoothing.</p> +<p>In the beginning there is nothing special. We include the needed header files and create an event listener to listen if the user presses a key: The 'W' key switches to wireframe mode, the 'P' key to pointcloud mode, and the 'D' key toggles between solid and detail mapped material. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"></div><div class="line"><span class="keyword">class </span>MyEventReceiver : <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"></div><div class="line"> MyEventReceiver(scene::ISceneNode* terrain, scene::ISceneNode* skybox, scene::ISceneNode* skydome) :</div><div class="line"> Terrain(terrain), Skybox(skybox), Skydome(skydome), showBox(true), showDebug(false)</div><div class="line"> {</div><div class="line"> Skybox->setVisible(showBox);</div><div class="line"> Skydome->setVisible(!showBox);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent& event)</div><div class="line"> {</div><div class="line"> <span class="comment">// check if user presses the key 'W' or 'D'</span></div><div class="line"> <span class="keywordflow">if</span> (event.EventType == irr::EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">switch</span> (event.KeyInput.Key)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> irr::KEY_KEY_W: <span class="comment">// switch wire frame mode</span></div><div class="line"> Terrain->setMaterialFlag(video::EMF_WIREFRAME,</div><div class="line"> !Terrain->getMaterial(0).Wireframe);</div><div class="line"> Terrain->setMaterialFlag(video::EMF_POINTCLOUD, <span class="keyword">false</span>);</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> <span class="keywordflow">case</span> irr::KEY_KEY_P: <span class="comment">// switch wire frame mode</span></div><div class="line"> Terrain->setMaterialFlag(video::EMF_POINTCLOUD,</div><div class="line"> !Terrain->getMaterial(0).PointCloud);</div><div class="line"> Terrain->setMaterialFlag(video::EMF_WIREFRAME, <span class="keyword">false</span>);</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> <span class="keywordflow">case</span> irr::KEY_KEY_D: <span class="comment">// toggle detail map</span></div><div class="line"> Terrain->setMaterialType(</div><div class="line"> Terrain->getMaterial(0).MaterialType == video::EMT_SOLID ?</div><div class="line"> video::EMT_DETAIL_MAP : video::EMT_SOLID);</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> <span class="keywordflow">case</span> irr::KEY_KEY_S: <span class="comment">// toggle skies</span></div><div class="line"> showBox=!showBox;</div><div class="line"> Skybox->setVisible(showBox);</div><div class="line"> Skydome->setVisible(!showBox);</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> <span class="keywordflow">case</span> irr::KEY_KEY_X: <span class="comment">// toggle debug information</span></div><div class="line"> showDebug=!showDebug;</div><div class="line"> Terrain->setDebugDataVisible(showDebug?scene::EDS_BBOX_ALL:scene::EDS_OFF);</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> <span class="keywordflow">default</span>:</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"> scene::ISceneNode* Terrain;</div><div class="line"> scene::ISceneNode* Skybox;</div><div class="line"> scene::ISceneNode* Skydome;</div><div class="line"> <span class="keywordtype">bool</span> showBox;</div><div class="line"> <span class="keywordtype">bool</span> showDebug;</div><div class="line">};</div></div><!-- fragment --><p> The start of the main function starts like in most other example. We ask the user for the desired renderer and start it up. This time with the advanced parameter handling. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> <span class="comment">// create device with full flexibility over creation parameters</span></div><div class="line"> <span class="comment">// you can add more parameters if desired, check irr::SIrrlichtCreationParameters</span></div><div class="line"> irr::SIrrlichtCreationParameters params;</div><div class="line"> params.DriverType=driverType;</div><div class="line"> params.WindowSize=core::dimension2d<u32>(640, 480);</div><div class="line"> IrrlichtDevice* device = createDeviceEx(params);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div></div><!-- fragment --><p> First, we add standard stuff to the scene: A nice irrlicht engine logo, a small help text, a user controlled camera, and we disable the mouse cursor. </p><div class="fragment"><div class="line">video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line">scene::ISceneManager* smgr = device->getSceneManager();</div><div class="line">gui::IGUIEnvironment* env = device->getGUIEnvironment();</div><div class="line"></div><div class="line">driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, <span class="keyword">true</span>);</div><div class="line"></div><div class="line"><span class="comment">// add irrlicht logo</span></div><div class="line">env->addImage(driver->getTexture(<span class="stringliteral">"../../media/irrlichtlogo2.png"</span>),</div><div class="line"> core::position2d<s32>(10,10));</div><div class="line"></div><div class="line"><span class="comment">//set other font</span></div><div class="line">env->getSkin()->setFont(env->getFont(<span class="stringliteral">"../../media/fontlucida.png"</span>));</div><div class="line"></div><div class="line"><span class="comment">// add some help text</span></div><div class="line">env->addStaticText(</div><div class="line"> L<span class="stringliteral">"Press 'W' to change wireframe mode\nPress 'D' to toggle detail map\nPress 'S' to toggle skybox/skydome"</span>,</div><div class="line"> core::rect<s32>(10,421,250,475), <span class="keyword">true</span>, <span class="keyword">true</span>, 0, -1, <span class="keyword">true</span>);</div><div class="line"></div><div class="line"><span class="comment">// add camera</span></div><div class="line">scene::ICameraSceneNode* camera =</div><div class="line"> smgr->addCameraSceneNodeFPS(0,100.0f,1.2f);</div><div class="line"></div><div class="line">camera->setPosition(core::vector3df(2700*2,255*2,2600*2));</div><div class="line">camera->setTarget(core::vector3df(2397*2,343*2,2700*2));</div><div class="line">camera->setFarValue(42000.0f);</div><div class="line"></div><div class="line"><span class="comment">// disable mouse cursor</span></div><div class="line">device->getCursorControl()->setVisible(<span class="keyword">false</span>);</div></div><!-- fragment --><p> Here comes the terrain renderer scene node: We add it just like any other scene node to the scene using ISceneManager::addTerrainSceneNode(). The only parameter we use is a file name to the heightmap we use. A heightmap is simply a gray scale texture. The terrain renderer loads it and creates the 3D terrain from it.</p> +<p>To make the terrain look more big, we change the scale factor of it to (40, 4.4, 40). Because we don't have any dynamic lights in the scene, we switch off the lighting, and we set the file terrain-texture.jpg as texture for the terrain and detailmap3.jpg as second texture, called detail map. At last, we set the scale values for the texture: The first texture will be repeated only one time over the whole terrain, and the second one (detail map) 20 times. </p><div class="fragment"><div class="line"><span class="comment">// add terrain scene node</span></div><div class="line">scene::ITerrainSceneNode* terrain = smgr->addTerrainSceneNode(</div><div class="line"> <span class="stringliteral">"../../media/terrain-heightmap.bmp"</span>,</div><div class="line"> 0, <span class="comment">// parent node</span></div><div class="line"> -1, <span class="comment">// node id</span></div><div class="line"> core::vector3df(0.f, 0.f, 0.f), <span class="comment">// position</span></div><div class="line"> core::vector3df(0.f, 0.f, 0.f), <span class="comment">// rotation</span></div><div class="line"> core::vector3df(40.f, 4.4f, 40.f), <span class="comment">// scale</span></div><div class="line"> video::SColor ( 255, 255, 255, 255 ), <span class="comment">// vertexColor</span></div><div class="line"> 5, <span class="comment">// maxLOD</span></div><div class="line"> scene::ETPS_17, <span class="comment">// patchSize</span></div><div class="line"> 4 <span class="comment">// smoothFactor</span></div><div class="line"> );</div><div class="line"></div><div class="line">terrain->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"></div><div class="line">terrain->setMaterialTexture(0,</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/terrain-texture.jpg"</span>));</div><div class="line">terrain->setMaterialTexture(1,</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/detailmap3.jpg"</span>));</div><div class="line"></div><div class="line">terrain->setMaterialType(video::EMT_DETAIL_MAP);</div><div class="line"></div><div class="line">terrain->scaleTexture(1.0f, 20.0f);</div></div><!-- fragment --><p> To be able to do collision with the terrain, we create a triangle selector. If you want to know what triangle selectors do, just take a look into the collision tutorial. The terrain triangle selector works together with the terrain. To demonstrate this, we create a collision response animator and attach it to the camera, so that the camera will not be able to fly through the terrain. </p><div class="fragment"><div class="line"><span class="comment">// create triangle selector for the terrain </span></div><div class="line">scene::ITriangleSelector* selector</div><div class="line"> = smgr->createTerrainTriangleSelector(terrain, 0);</div><div class="line">terrain->setTriangleSelector(selector);</div><div class="line"></div><div class="line"><span class="comment">// create collision response animator and attach it to the camera</span></div><div class="line">scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(</div><div class="line"> selector, camera, core::vector3df(60,100,60),</div><div class="line"> core::vector3df(0,0,0),</div><div class="line"> core::vector3df(0,50,0));</div><div class="line">selector->drop();</div><div class="line">camera->addAnimator(anim);</div><div class="line">anim->drop();</div></div><!-- fragment --><p> If you need access to the terrain data you can also do this directly via the following code fragment. </p><div class="fragment"><div class="line">scene::CDynamicMeshBuffer* buffer = <span class="keyword">new</span> scene::CDynamicMeshBuffer(video::EVT_2TCOORDS, video::EIT_16BIT);</div><div class="line">terrain->getMeshBufferForLOD(*buffer, 0);</div><div class="line">video::S3DVertex2TCoords* data = (video::S3DVertex2TCoords*)buffer->getVertexBuffer().getData();</div><div class="line"><span class="comment">// Work on data or get the IndexBuffer with a similar call.</span></div><div class="line">buffer->drop(); <span class="comment">// When done drop the buffer again.</span></div></div><!-- fragment --><p> To make the user be able to switch between normal and wireframe mode, we create an instance of the event receiver from above and let Irrlicht know about it. In addition, we add the skybox which we already used in lots of Irrlicht examples and a skydome, which is shown mutually exclusive with the skybox by pressing 'S'. </p><div class="fragment"><div class="line"><span class="comment">// create skybox and skydome</span></div><div class="line">driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, <span class="keyword">false</span>);</div><div class="line"></div><div class="line">scene::ISceneNode* skybox=smgr->addSkyBoxSceneNode(</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_up.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_dn.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_lf.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_rt.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_ft.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_bk.jpg"</span>));</div><div class="line">scene::ISceneNode* skydome=smgr->addSkyDomeSceneNode(driver->getTexture(<span class="stringliteral">"../../media/skydome.jpg"</span>),16,8,0.95f,2.0f);</div><div class="line"></div><div class="line">driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, <span class="keyword">true</span>);</div><div class="line"></div><div class="line"><span class="comment">// create event receiver</span></div><div class="line">MyEventReceiver receiver(terrain, skybox, skydome);</div><div class="line">device->setEventReceiver(&receiver);</div></div><!-- fragment --><p> That's it, draw everything. </p><div class="fragment"><div class="line"> <span class="keywordtype">int</span> lastFPS = -1;</div><div class="line"></div><div class="line"> <span class="keywordflow">while</span>(device->run())</div><div class="line"> <span class="keywordflow">if</span> (device->isWindowActive())</div><div class="line"> {</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, 0 );</div><div class="line"></div><div class="line"> smgr->drawAll();</div><div class="line"> env->drawAll();</div><div class="line"></div><div class="line"> driver->endScene();</div><div class="line"></div><div class="line"> <span class="comment">// display frames per second in window title</span></div><div class="line"> <span class="keywordtype">int</span> fps = driver->getFPS();</div><div class="line"> <span class="keywordflow">if</span> (lastFPS != fps)</div><div class="line"> {</div><div class="line"> core::stringw str = L<span class="stringliteral">"Terrain Renderer - Irrlicht Engine ["</span>;</div><div class="line"> str += driver->getName();</div><div class="line"> str += <span class="stringliteral">"] FPS:"</span>;</div><div class="line"> str += fps;</div><div class="line"> <span class="comment">// Also print terrain height of current camera position</span></div><div class="line"> <span class="comment">// We can use camera position because terrain is located at coordinate origin</span></div><div class="line"> str += <span class="stringliteral">" Height: "</span>;</div><div class="line"> str += terrain->getHeight(camera->getAbsolutePosition().X,</div><div class="line"> camera->getAbsolutePosition().Z);</div><div class="line"></div><div class="line"> device->setWindowCaption(str.c_str());</div><div class="line"> lastFPS = fps;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> device->drop();</div><div class="line"> </div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --><p> Now you know how to use terrain in Irrlicht. </p> +</div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/13.RenderToTexture/Makefile b/examples/13.RenderToTexture/Makefile new file mode 100644 index 0000000..7888648 --- /dev/null +++ b/examples/13.RenderToTexture/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 13.RenderToTexture
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/13.RenderToTexture/RenderToTexture.cbp b/examples/13.RenderToTexture/RenderToTexture.cbp new file mode 100644 index 0000000..78c760b --- /dev/null +++ b/examples/13.RenderToTexture/RenderToTexture.cbp @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 13 Render to Texture" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/RenderToTexture" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/RenderToTexture" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/13.RenderToTexture/RenderToTexture.dev b/examples/13.RenderToTexture/RenderToTexture.dev new file mode 100644 index 0000000..0ebdf28 --- /dev/null +++ b/examples/13.RenderToTexture/RenderToTexture.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 13 Render To Texture
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=13.RenderToTexture.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/13.RenderToTexture/RenderToTexture.vcproj b/examples/13.RenderToTexture/RenderToTexture.vcproj new file mode 100644 index 0000000..8fd8e6c --- /dev/null +++ b/examples/13.RenderToTexture/RenderToTexture.vcproj @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="13.RenderToTexture"
+ ProjectGUID="{AFC223BD-4371-4A8B-A90B-0D338BD2DEBB}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/RenderToTexture.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/RenderToTexture.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/RenderToTexture.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/RenderToTexture.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/RenderToTexture.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/RenderToTexture.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/13.RenderToTexture/RenderToTexture_vc10.vcxproj b/examples/13.RenderToTexture/RenderToTexture_vc10.vcxproj new file mode 100644 index 0000000..b41b277 --- /dev/null +++ b/examples/13.RenderToTexture/RenderToTexture_vc10.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>13.RenderToTexture</ProjectName>
+ <ProjectGuid>{0914E5C8-5352-467B-8421-C9EB35BD5596}</ProjectGuid>
+ <RootNamespace>RenderToTexture</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/RenderToTexture.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/RenderToTexture.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\13.RenderToTexture.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/RenderToTexture.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/RenderToTexture.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\13.RenderToTexture.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/13.RenderToTexture/RenderToTexture_vc11.vcxproj b/examples/13.RenderToTexture/RenderToTexture_vc11.vcxproj new file mode 100644 index 0000000..b41b277 --- /dev/null +++ b/examples/13.RenderToTexture/RenderToTexture_vc11.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>13.RenderToTexture</ProjectName>
+ <ProjectGuid>{0914E5C8-5352-467B-8421-C9EB35BD5596}</ProjectGuid>
+ <RootNamespace>RenderToTexture</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/RenderToTexture.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/RenderToTexture.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\13.RenderToTexture.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/RenderToTexture.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/RenderToTexture.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\13.RenderToTexture.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/13.RenderToTexture/RenderToTexture_vc12.vcxproj b/examples/13.RenderToTexture/RenderToTexture_vc12.vcxproj new file mode 100644 index 0000000..5ede2ae --- /dev/null +++ b/examples/13.RenderToTexture/RenderToTexture_vc12.vcxproj @@ -0,0 +1,235 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>13.RenderToTexture</ProjectName>
+ <ProjectGuid>{0914E5C8-5352-467B-8421-C9EB35BD5596}</ProjectGuid>
+ <RootNamespace>RenderToTexture</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/RenderToTexture.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/RenderToTexture.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\13.RenderToTexture.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/RenderToTexture.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/RenderToTexture.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\13.RenderToTexture.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/13.RenderToTexture/RenderToTexture_vc8.vcproj b/examples/13.RenderToTexture/RenderToTexture_vc8.vcproj new file mode 100644 index 0000000..dc2840c --- /dev/null +++ b/examples/13.RenderToTexture/RenderToTexture_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="13.RenderToTexture_vc8"
+ ProjectGUID="{0914E5C8-5352-467B-8421-C9EB35BD5596}"
+ RootNamespace="RenderToTexture_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/RenderToTexture.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/RenderToTexture.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/RenderToTexture.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/RenderToTexture.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/RenderToTexture.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/RenderToTexture.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/13.RenderToTexture/RenderToTexture_vc9.vcproj b/examples/13.RenderToTexture/RenderToTexture_vc9.vcproj new file mode 100644 index 0000000..7ee213b --- /dev/null +++ b/examples/13.RenderToTexture/RenderToTexture_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="13.RenderToTexture_vc9"
+ ProjectGUID="{0914E5C8-5352-467B-8421-C9EB35BD5596}"
+ RootNamespace="RenderToTexture_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/RenderToTexture.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/RenderToTexture.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/RenderToTexture.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/RenderToTexture.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/RenderToTexture.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/RenderToTexture.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/13.RenderToTexture/main.cpp b/examples/13.RenderToTexture/main.cpp new file mode 100644 index 0000000..35ea009 --- /dev/null +++ b/examples/13.RenderToTexture/main.cpp @@ -0,0 +1,211 @@ +/** Example 013 Render To Texture
+
+This tutorial shows how to render to a texture using Irrlicht. Render to
+texture is a feature with which it is possible to create nice special effects.
+In addition, this tutorial shows how to enable specular highlights.
+
+In the beginning, everything as usual. Include the needed headers, ask the user
+for the rendering driver, create the Irrlicht Device:
+*/
+
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+int main()
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ // create device and exit if creation failed
+
+ IrrlichtDevice *device =
+ createDevice(driverType, core::dimension2d<u32>(640, 480),
+ 16, false, false);
+
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* smgr = device->getSceneManager();
+ gui::IGUIEnvironment* env = device->getGUIEnvironment();
+
+ /*
+ Now, we load an animated mesh to be displayed. As in most examples,
+ we'll take the fairy md2 model. The difference here: We set the
+ shininess of the model to a value other than 0 which is the default
+ value. This enables specular highlights on the model if dynamic
+ lighting is on. The value influences the size of the highlights.
+ */
+
+ // load and display animated fairy mesh
+
+ scene::IAnimatedMeshSceneNode* fairy = smgr->addAnimatedMeshSceneNode(
+ smgr->getMesh("../../media/faerie.md2"));
+
+ if (fairy)
+ {
+ fairy->setMaterialTexture(0,
+ driver->getTexture("../../media/faerie2.bmp")); // set diffuse texture
+ fairy->setMaterialFlag(video::EMF_LIGHTING, true); // enable dynamic lighting
+ fairy->getMaterial(0).Shininess = 20.0f; // set size of specular highlights
+ fairy->setPosition(core::vector3df(-10,0,-100));
+ fairy->setMD2Animation ( scene::EMAT_STAND );
+ }
+
+ /*
+ To make specular highlights appear on the model, we need a dynamic
+ light in the scene. We add one directly in vicinity of the model. In
+ addition, to make the model not that dark, we set the ambient light to
+ gray.
+ */
+
+ // add white light
+ smgr->addLightSceneNode(0, core::vector3df(-15,5,-105),
+ video::SColorf(1.0f, 1.0f, 1.0f));
+
+ // set ambient light
+ smgr->setAmbientLight(video::SColor(0,60,60,60));
+
+ /*
+ The next is just some standard stuff: Add a test cube and let it rotate
+ to make the scene more interesting. The user defined camera and cursor
+ setup is made later on, right before the render loop.
+ */
+
+ // create test cube
+ scene::ISceneNode* test = smgr->addCubeSceneNode(60);
+
+ // let the cube rotate and set some light settings
+ scene::ISceneNodeAnimator* anim = smgr->createRotationAnimator(
+ core::vector3df(0.3f, 0.3f,0));
+
+ test->setPosition(core::vector3df(-100,0,-100));
+ test->setMaterialFlag(video::EMF_LIGHTING, false); // disable dynamic lighting
+ test->addAnimator(anim);
+ anim->drop();
+
+ // set window caption
+ device->setWindowCaption(L"Irrlicht Engine - Render to Texture and Specular Highlights example");
+
+ /*
+ To test out the render to texture feature, we need a render target
+ texture. These are not like standard textures, but need to be created
+ first. To create one, we call IVideoDriver::addRenderTargetTexture()
+ and specify the size of the texture. Please don't use sizes bigger than
+ the frame buffer for this, because the render target shares the zbuffer
+ with the frame buffer.
+ Because we want to render the scene not from the user camera into the
+ texture, we add another fixed camera to the scene. But before we do all
+ this, we check if the current running driver is able to render to
+ textures. If it is not, we simply display a warning text.
+ */
+
+ // create render target
+ video::ITexture* rt = 0;
+ scene::ICameraSceneNode* fixedCam = 0;
+
+
+ if (driver->queryFeature(video::EVDF_RENDER_TO_TARGET))
+ {
+ rt = driver->addRenderTargetTexture(core::dimension2d<u32>(256,256), "RTT1");
+ test->setMaterialTexture(0, rt); // set material of cube to render target
+
+ // add fixed camera
+ fixedCam = smgr->addCameraSceneNode(0, core::vector3df(10,10,-80),
+ core::vector3df(-10,10,-100));
+ }
+ else
+ {
+ // create problem text
+ gui::IGUISkin* skin = env->getSkin();
+ gui::IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp");
+ if (font)
+ skin->setFont(font);
+
+ gui::IGUIStaticText* text = env->addStaticText(
+ L"Your hardware or this renderer is not able to use the "\
+ L"render to texture feature. RTT Disabled.",
+ core::rect<s32>(150,20,470,60));
+
+ text->setOverrideColor(video::SColor(100,255,255,255));
+ }
+
+ // add fps camera
+ scene::ICameraSceneNode* fpsCamera = smgr->addCameraSceneNodeFPS();
+ fpsCamera->setPosition(core::vector3df(-50,50,-150));
+
+ // disable mouse cursor
+ device->getCursorControl()->setVisible(false);
+
+ /*
+ Nearly finished. Now we need to draw everything. Every frame, we draw
+ the scene twice. Once from the fixed camera into the render target
+ texture and once as usual. When rendering into the render target, we
+ need to disable the visibility of the test cube, because it has the
+ render target texture applied to it. That's it, wasn't too complicated
+ I hope. :)
+ */
+
+ int lastFPS = -1;
+
+ while(device->run())
+ if (device->isWindowActive())
+ {
+ driver->beginScene(true, true, 0);
+
+ if (rt)
+ {
+ // draw scene into render target
+
+ // set render target texture
+ driver->setRenderTarget(rt, true, true, video::SColor(0,0,0,255));
+
+ // make cube invisible and set fixed camera as active camera
+ test->setVisible(false);
+ smgr->setActiveCamera(fixedCam);
+
+ // draw whole scene into render buffer
+ smgr->drawAll();
+
+ // set back old render target
+ // The buffer might have been distorted, so clear it
+ driver->setRenderTarget(0, true, true, 0);
+
+ // make the cube visible and set the user controlled camera as active one
+ test->setVisible(true);
+ smgr->setActiveCamera(fpsCamera);
+ }
+
+ // draw scene normally
+ smgr->drawAll();
+ env->drawAll();
+
+ driver->endScene();
+
+ // display frames per second in window title
+ int fps = driver->getFPS();
+ if (lastFPS != fps)
+ {
+ core::stringw str = L"Irrlicht Engine - Render to Texture and Specular Highlights example";
+ str += " FPS:";
+ str += fps;
+
+ device->setWindowCaption(str.c_str());
+ lastFPS = fps;
+ }
+ }
+
+ device->drop(); // drop device
+ return 0;
+}
+
+/*
+**/
diff --git a/examples/13.RenderToTexture/tutorial.html b/examples/13.RenderToTexture/tutorial.html new file mode 100644 index 0000000..edd510e --- /dev/null +++ b/examples/13.RenderToTexture/tutorial.html @@ -0,0 +1,206 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 13: Render To Texture</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 13: Render To Texture </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/013shot.jpg" alt="013shot.jpg"/> +</div> + <p>This tutorial shows how to render to a texture using Irrlicht. Render to texture is a feature with which it is possible to create nice special effects. In addition, this tutorial shows how to enable specular highlights.</p> +<p>In the beginning, everything as usual. Include the needed headers, ask the user for the rendering driver, create the Irrlicht Device: </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> <span class="comment">// create device and exit if creation failed</span></div><div class="line"></div><div class="line"> IrrlichtDevice *device =</div><div class="line"> createDevice(driverType, core::dimension2d<u32>(640, 480),</div><div class="line"> 16, <span class="keyword">false</span>, <span class="keyword">false</span>);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div><div class="line"></div><div class="line"> video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line"> scene::ISceneManager* smgr = device->getSceneManager();</div><div class="line"> gui::IGUIEnvironment* env = device->getGUIEnvironment();</div></div><!-- fragment --><p> Now, we load an animated mesh to be displayed. As in most examples, we'll take the fairy md2 model. The difference here: We set the shininess of the model to a value other than 0 which is the default value. This enables specular highlights on the model if dynamic lighting is on. The value influences the size of the highlights. </p><div class="fragment"><div class="line"><span class="comment">// load and display animated fairy mesh</span></div><div class="line"></div><div class="line">scene::IAnimatedMeshSceneNode* fairy = smgr->addAnimatedMeshSceneNode(</div><div class="line"> smgr->getMesh(<span class="stringliteral">"../../media/faerie.md2"</span>));</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (fairy)</div><div class="line">{</div><div class="line"> fairy->setMaterialTexture(0,</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/faerie2.bmp"</span>)); <span class="comment">// set diffuse texture</span></div><div class="line"> fairy->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">true</span>); <span class="comment">// enable dynamic lighting</span></div><div class="line"> fairy->getMaterial(0).Shininess = 20.0f; <span class="comment">// set size of specular highlights</span></div><div class="line"> fairy->setPosition(core::vector3df(-10,0,-100));</div><div class="line"> fairy->setMD2Animation ( scene::EMAT_STAND );</div><div class="line">}</div></div><!-- fragment --><p> To make specular highlights appear on the model, we need a dynamic light in the scene. We add one directly in vicinity of the model. In addition, to make the model not that dark, we set the ambient light to gray. </p><div class="fragment"><div class="line"><span class="comment">// add white light</span></div><div class="line">smgr->addLightSceneNode(0, core::vector3df(-15,5,-105),</div><div class="line"> video::SColorf(1.0f, 1.0f, 1.0f));</div><div class="line"></div><div class="line"><span class="comment">// set ambient light</span></div><div class="line">smgr->setAmbientLight(video::SColor(0,60,60,60));</div></div><!-- fragment --><p> The next is just some standard stuff: Add a test cube and let it rotate to make the scene more interesting. The user defined camera and cursor setup is made later on, right before the render loop. </p><div class="fragment"><div class="line"><span class="comment">// create test cube</span></div><div class="line">scene::ISceneNode* test = smgr->addCubeSceneNode(60);</div><div class="line"></div><div class="line"><span class="comment">// let the cube rotate and set some light settings</span></div><div class="line">scene::ISceneNodeAnimator* anim = smgr->createRotationAnimator(</div><div class="line"> core::vector3df(0.3f, 0.3f,0));</div><div class="line"></div><div class="line">test->setPosition(core::vector3df(-100,0,-100));</div><div class="line">test->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>); <span class="comment">// disable dynamic lighting</span></div><div class="line">test->addAnimator(anim);</div><div class="line">anim->drop();</div><div class="line"></div><div class="line"><span class="comment">// set window caption</span></div><div class="line">device->setWindowCaption(L<span class="stringliteral">"Irrlicht Engine - Render to Texture and Specular Highlights example"</span>);</div></div><!-- fragment --><p> To test out the render to texture feature, we need a render target texture. These are not like standard textures, but need to be created first. To create one, we call IVideoDriver::addRenderTargetTexture() and specify the size of the texture. Please don't use sizes bigger than the frame buffer for this, because the render target shares the zbuffer with the frame buffer. Because we want to render the scene not from the user camera into the texture, we add another fixed camera to the scene. But before we do all this, we check if the current running driver is able to render to textures. If it is not, we simply display a warning text. </p><div class="fragment"><div class="line"><span class="comment">// create render target</span></div><div class="line">video::ITexture* rt = 0;</div><div class="line">scene::ICameraSceneNode* fixedCam = 0;</div><div class="line"></div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (driver->queryFeature(video::EVDF_RENDER_TO_TARGET))</div><div class="line">{</div><div class="line"> rt = driver->addRenderTargetTexture(core::dimension2d<u32>(256,256), <span class="stringliteral">"RTT1"</span>);</div><div class="line"> test->setMaterialTexture(0, rt); <span class="comment">// set material of cube to render target</span></div><div class="line"></div><div class="line"> <span class="comment">// add fixed camera</span></div><div class="line"> fixedCam = smgr->addCameraSceneNode(0, core::vector3df(10,10,-80),</div><div class="line"> core::vector3df(-10,10,-100));</div><div class="line">}</div><div class="line"><span class="keywordflow">else</span></div><div class="line">{</div><div class="line"> <span class="comment">// create problem text</span></div><div class="line"> gui::IGUISkin* skin = env->getSkin();</div><div class="line"> gui::IGUIFont* font = env->getFont(<span class="stringliteral">"../../media/fonthaettenschweiler.bmp"</span>);</div><div class="line"> <span class="keywordflow">if</span> (font)</div><div class="line"> skin->setFont(font);</div><div class="line"></div><div class="line"> gui::IGUIStaticText* text = env->addStaticText(</div><div class="line"> L<span class="stringliteral">"Your hardware or this renderer is not able to use the "</span>\</div><div class="line"> L<span class="stringliteral">"render to texture feature. RTT Disabled."</span>,</div><div class="line"> core::rect<s32>(150,20,470,60));</div><div class="line"></div><div class="line"> text->setOverrideColor(video::SColor(100,255,255,255));</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// add fps camera</span></div><div class="line">scene::ICameraSceneNode* fpsCamera = smgr->addCameraSceneNodeFPS();</div><div class="line">fpsCamera->setPosition(core::vector3df(-50,50,-150));</div><div class="line"></div><div class="line"><span class="comment">// disable mouse cursor</span></div><div class="line">device->getCursorControl()->setVisible(<span class="keyword">false</span>);</div></div><!-- fragment --><p> Nearly finished. Now we need to draw everything. Every frame, we draw the scene twice. Once from the fixed camera into the render target texture and once as usual. When rendering into the render target, we need to disable the visibility of the test cube, because it has the render target texture applied to it. That's it, wasn't too complicated I hope. :) </p><div class="fragment"><div class="line"> <span class="keywordtype">int</span> lastFPS = -1;</div><div class="line"></div><div class="line"> <span class="keywordflow">while</span>(device->run())</div><div class="line"> <span class="keywordflow">if</span> (device->isWindowActive())</div><div class="line"> {</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, 0);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (rt)</div><div class="line"> {</div><div class="line"> <span class="comment">// draw scene into render target</span></div><div class="line"> </div><div class="line"> <span class="comment">// set render target texture</span></div><div class="line"> driver->setRenderTarget(rt, <span class="keyword">true</span>, <span class="keyword">true</span>, video::SColor(0,0,0,255));</div><div class="line"></div><div class="line"> <span class="comment">// make cube invisible and set fixed camera as active camera</span></div><div class="line"> test->setVisible(<span class="keyword">false</span>);</div><div class="line"> smgr->setActiveCamera(fixedCam);</div><div class="line"></div><div class="line"> <span class="comment">// draw whole scene into render buffer</span></div><div class="line"> smgr->drawAll();</div><div class="line"></div><div class="line"> <span class="comment">// set back old render target</span></div><div class="line"> <span class="comment">// The buffer might have been distorted, so clear it</span></div><div class="line"> driver->setRenderTarget(0, <span class="keyword">true</span>, <span class="keyword">true</span>, 0);</div><div class="line"></div><div class="line"> <span class="comment">// make the cube visible and set the user controlled camera as active one</span></div><div class="line"> test->setVisible(<span class="keyword">true</span>);</div><div class="line"> smgr->setActiveCamera(fpsCamera);</div><div class="line"> }</div><div class="line"> </div><div class="line"> <span class="comment">// draw scene normally</span></div><div class="line"> smgr->drawAll();</div><div class="line"> env->drawAll();</div><div class="line"></div><div class="line"> driver->endScene();</div><div class="line"></div><div class="line"> <span class="comment">// display frames per second in window title</span></div><div class="line"> <span class="keywordtype">int</span> fps = driver->getFPS();</div><div class="line"> <span class="keywordflow">if</span> (lastFPS != fps)</div><div class="line"> {</div><div class="line"> core::stringw str = L<span class="stringliteral">"Irrlicht Engine - Render to Texture and Specular Highlights example"</span>;</div><div class="line"> str += <span class="stringliteral">" FPS:"</span>;</div><div class="line"> str += fps;</div><div class="line"></div><div class="line"> device->setWindowCaption(str.c_str());</div><div class="line"> lastFPS = fps;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> device->drop(); <span class="comment">// drop device</span></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/14.Win32Window/Makefile b/examples/14.Win32Window/Makefile new file mode 100644 index 0000000..e76f2ff --- /dev/null +++ b/examples/14.Win32Window/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 14.Win32Window
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/14.Win32Window/Win32Window.cbp b/examples/14.Win32Window/Win32Window.cbp new file mode 100644 index 0000000..06f310b --- /dev/null +++ b/examples/14.Win32Window/Win32Window.cbp @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 14 Win32 Window" /> + <Option platforms="Windows;" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="..\..\bin\Win32-gcc\Win32Window" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectCompilerOptionsRelation="0" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add library="opengl32" /> + <Add library="gdi32" /> + <Add directory="..\..\lib\Win32-gcc" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="..\..\include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/14.Win32Window/Win32Window.dev b/examples/14.Win32Window/Win32Window.dev new file mode 100644 index 0000000..6192563 --- /dev/null +++ b/examples/14.Win32Window/Win32Window.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 14 Win32 Window
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=14.Win32Window.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/14.Win32Window/Win32Window.vcproj b/examples/14.Win32Window/Win32Window.vcproj new file mode 100644 index 0000000..c8576c7 --- /dev/null +++ b/examples/14.Win32Window/Win32Window.vcproj @@ -0,0 +1,165 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="14.Win32Window"
+ ProjectGUID="{3A73BAFE-60DE-4E40-9E37-710760BC25C6}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/Win32Window.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="opengl32.lib"
+ OutputFile="..\..\bin\Win32-VisualStudio\14.Win32Window.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/Win32Window.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Win32Window.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/Win32Window.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="opengl32.lib"
+ OutputFile="..\..\bin\Win32-VisualStudio\14.Win32Window.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Win32Window.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Win32Window.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/14.Win32Window/Win32Window_vc10.vcxproj b/examples/14.Win32Window/Win32Window_vc10.vcxproj new file mode 100644 index 0000000..0ea47db --- /dev/null +++ b/examples/14.Win32Window/Win32Window_vc10.vcxproj @@ -0,0 +1,239 @@ +ďťż<?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">
+ <ProjectName>14.Win32Window</ProjectName>
+ <ProjectGuid>{772FBE05-D05A-467B-9842-BEC409EEA8D0}</ProjectGuid>
+ <RootNamespace>Win32Window</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win32-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win64-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win32-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win64-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/14.Win32Window/Win32Window_vc11.vcxproj b/examples/14.Win32Window/Win32Window_vc11.vcxproj new file mode 100644 index 0000000..0ea47db --- /dev/null +++ b/examples/14.Win32Window/Win32Window_vc11.vcxproj @@ -0,0 +1,239 @@ +ďťż<?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">
+ <ProjectName>14.Win32Window</ProjectName>
+ <ProjectGuid>{772FBE05-D05A-467B-9842-BEC409EEA8D0}</ProjectGuid>
+ <RootNamespace>Win32Window</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win32-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win64-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win32-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win64-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/14.Win32Window/Win32Window_vc12.vcxproj b/examples/14.Win32Window/Win32Window_vc12.vcxproj new file mode 100644 index 0000000..814a398 --- /dev/null +++ b/examples/14.Win32Window/Win32Window_vc12.vcxproj @@ -0,0 +1,239 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>14.Win32Window</ProjectName>
+ <ProjectGuid>{772FBE05-D05A-467B-9842-BEC409EEA8D0}</ProjectGuid>
+ <RootNamespace>Win32Window</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win32-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win64-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win32-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win64-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/14.Win32Window/Win32Window_vc8.vcproj b/examples/14.Win32Window/Win32Window_vc8.vcproj new file mode 100644 index 0000000..efbf43d --- /dev/null +++ b/examples/14.Win32Window/Win32Window_vc8.vcproj @@ -0,0 +1,232 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="14.Win32Window_vc8"
+ ProjectGUID="{772FBE05-D05A-467B-9842-BEC409EEA8D0}"
+ RootNamespace="Win32Window_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Win32Window.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/Win32Window.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="kernel32.lib user32.lib gdi32.lib opengl32.lib"
+ OutputFile="..\..\bin\Win32-VisualStudio\14.Win32Window.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/Win32Window.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Win32Window.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/Win32Window.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\14.Win32Window.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Win32Window.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/14.Win32Window/Win32Window_vc9.vcproj b/examples/14.Win32Window/Win32Window_vc9.vcproj new file mode 100644 index 0000000..2902fba --- /dev/null +++ b/examples/14.Win32Window/Win32Window_vc9.vcproj @@ -0,0 +1,232 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="14.Win32Window_vc9"
+ ProjectGUID="{772FBE05-D05A-467B-9842-BEC409EEA8D0}"
+ RootNamespace="Win32Window_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Win32Window.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/Win32Window.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="kernel32.lib user32.lib gdi32.lib opengl32.lib"
+ OutputFile="..\..\bin\Win32-VisualStudio\14.Win32Window.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/Win32Window.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Win32Window.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/Win32Window.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="opengl32.lib"
+ OutputFile="..\..\bin\Win32-VisualStudio\14.Win32Window.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Win32Window.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/14.Win32Window/main.cpp b/examples/14.Win32Window/main.cpp new file mode 100644 index 0000000..33d111e --- /dev/null +++ b/examples/14.Win32Window/main.cpp @@ -0,0 +1,251 @@ +/** Example 014 Win32 Window
+
+This example only runs under MS Windows and demonstrates that Irrlicht can
+render inside a win32 window. MFC and .NET Windows.Forms windows are possible,
+too.
+
+In the beginning, we create a windows window using the windows API. I'm not
+going to explain this code, because it is windows specific. See the MSDN or a
+windows book for details.
+*/
+
+#include <irrlicht.h>
+#ifndef _IRR_WINDOWS_
+#error Windows only example
+#else
+#include <windows.h> // this example only runs with windows
+#include <iostream>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#pragma comment(lib, "irrlicht.lib")
+
+HWND hOKButton;
+HWND hWnd;
+
+static LRESULT CALLBACK CustomWndProc(HWND hWnd, UINT message,
+ WPARAM wParam, LPARAM lParam)
+{
+ switch (message)
+ {
+ case WM_COMMAND:
+ {
+ HWND hwndCtl = (HWND)lParam;
+ int code = HIWORD(wParam);
+
+ if (hwndCtl == hOKButton)
+ {
+ DestroyWindow(hWnd);
+ PostQuitMessage(0);
+ return 0;
+ }
+ }
+ break;
+ case WM_DESTROY:
+ PostQuitMessage(0);
+ return 0;
+
+ }
+
+ return DefWindowProc(hWnd, message, wParam, lParam);
+}
+
+
+/*
+ Now ask for the driver and create the Windows specific window.
+*/
+int main()
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ printf("Select the render window (some dead window may exist too):\n"\
+ " (a) Window with button (via CreationParam)\n"\
+ " (b) Window with button (via beginScene)\n"\
+ " (c) Own Irrlicht window (default behavior)\n"\
+ " (otherKey) exit\n\n");
+
+ char key;
+ std::cin >> key;
+ if (key != 'a' && key != 'b' && key != 'c')
+ return 1;
+
+ HINSTANCE hInstance = 0;
+ // create dialog
+
+ const char* Win32ClassName = "CIrrlichtWindowsTestDialog";
+
+ WNDCLASSEX wcex;
+ wcex.cbSize = sizeof(WNDCLASSEX);
+ wcex.style = CS_HREDRAW | CS_VREDRAW;
+ wcex.lpfnWndProc = (WNDPROC)CustomWndProc;
+ wcex.cbClsExtra = 0;
+ wcex.cbWndExtra = DLGWINDOWEXTRA;
+ wcex.hInstance = hInstance;
+ wcex.hIcon = NULL;
+ wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW);
+ wcex.lpszMenuName = 0;
+ wcex.lpszClassName = Win32ClassName;
+ wcex.hIconSm = 0;
+
+ RegisterClassEx(&wcex);
+
+ DWORD style = WS_SYSMENU | WS_BORDER | WS_CAPTION |
+ WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SIZEBOX;
+
+ int windowWidth = 440;
+ int windowHeight = 380;
+
+ hWnd = CreateWindow( Win32ClassName, "Irrlicht Win32 window example",
+ style, 100, 100, windowWidth, windowHeight,
+ NULL, NULL, hInstance, NULL);
+
+ RECT clientRect;
+ GetClientRect(hWnd, &clientRect);
+ windowWidth = clientRect.right;
+ windowHeight = clientRect.bottom;
+
+ // create ok button
+
+ hOKButton = CreateWindow("BUTTON", "OK - Close", WS_CHILD | WS_VISIBLE | BS_TEXT,
+ windowWidth - 160, windowHeight - 40, 150, 30, hWnd, NULL, hInstance, NULL);
+
+ // create some text
+
+ CreateWindow("STATIC", "This is Irrlicht running inside a standard Win32 window.\n"\
+ "Also mixing with MFC and .NET Windows.Forms is possible.",
+ WS_CHILD | WS_VISIBLE, 20, 20, 400, 40, hWnd, NULL, hInstance, NULL);
+
+ // create window to put irrlicht in
+
+ HWND hIrrlichtWindow = CreateWindow("BUTTON", "",
+ WS_CHILD | WS_VISIBLE | BS_OWNERDRAW,
+ 50, 80, 320, 220, hWnd, NULL, hInstance, NULL);
+ video::SExposedVideoData videodata((key=='b')?hIrrlichtWindow:0);
+
+ /*
+ So now that we have some window, we can create an Irrlicht device
+ inside of it. We use Irrlicht createEx() function for this. We only
+ need the handle (HWND) to that window, set it as windowsID parameter
+ and start up the engine as usual. That's it.
+ */
+ // create irrlicht device in the button window
+
+ irr::SIrrlichtCreationParameters param;
+ param.DriverType = driverType;
+ if (key=='a')
+ param.WindowId = reinterpret_cast<void*>(hIrrlichtWindow);
+
+ irr::IrrlichtDevice* device = irr::createDeviceEx(param);
+ if (!device)
+ return 1;
+
+ // setup a simple 3d scene
+
+ irr::scene::ISceneManager* smgr = device->getSceneManager();
+ video::IVideoDriver* driver = device->getVideoDriver();
+
+ if (driverType==video::EDT_OPENGL)
+ {
+ HDC HDc=GetDC(hIrrlichtWindow);
+ PIXELFORMATDESCRIPTOR pfd={0};
+ pfd.nSize=sizeof(PIXELFORMATDESCRIPTOR);
+ int pf = GetPixelFormat(HDc);
+ DescribePixelFormat(HDc, pf, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
+ pfd.dwFlags |= PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW;
+ pfd.cDepthBits=16;
+ pf = ChoosePixelFormat(HDc, &pfd);
+ SetPixelFormat(HDc, pf, &pfd);
+ videodata.OpenGLWin32.HDc = HDc;
+ videodata.OpenGLWin32.HRc=wglCreateContext(HDc);
+ wglShareLists((HGLRC)driver->getExposedVideoData().OpenGLWin32.HRc, (HGLRC)videodata.OpenGLWin32.HRc);
+ }
+ scene::ICameraSceneNode* cam = smgr->addCameraSceneNode();
+ cam->setTarget(core::vector3df(0,0,0));
+
+ scene::ISceneNodeAnimator* anim =
+ smgr->createFlyCircleAnimator(core::vector3df(0,15,0), 30.0f);
+ cam->addAnimator(anim);
+ anim->drop();
+
+ scene::ISceneNode* cube = smgr->addCubeSceneNode(20);
+
+ cube->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+ cube->setMaterialTexture(1, driver->getTexture("../../media/water.jpg"));
+ cube->setMaterialFlag( video::EMF_LIGHTING, false );
+ cube->setMaterialType( video::EMT_REFLECTION_2_LAYER );
+
+ smgr->addSkyBoxSceneNode(
+ driver->getTexture("../../media/irrlicht2_up.jpg"),
+ driver->getTexture("../../media/irrlicht2_dn.jpg"),
+ driver->getTexture("../../media/irrlicht2_lf.jpg"),
+ driver->getTexture("../../media/irrlicht2_rt.jpg"),
+ driver->getTexture("../../media/irrlicht2_ft.jpg"),
+ driver->getTexture("../../media/irrlicht2_bk.jpg"));
+
+ // show and execute dialog
+
+ ShowWindow(hWnd , SW_SHOW);
+ UpdateWindow(hWnd);
+
+ // do message queue
+
+ /*
+ Now the only thing missing is the drawing loop using
+ IrrlichtDevice::run(). We do this as usual. But instead of this, there
+ is another possibility: You can also simply use your own message loop
+ using GetMessage, DispatchMessage and whatever. Calling
+ Device->run() will cause Irrlicht to dispatch messages internally too.
+ You need not call Device->run() if you want to do your own message
+ dispatching loop, but Irrlicht will not be able to fetch user input
+ then and you have to do it on your own using the window messages,
+ DirectInput, or whatever.
+ */
+
+ while (device->run())
+ {
+ driver->beginScene(true, true, 0, videodata);
+ smgr->drawAll();
+ driver->endScene();
+ }
+
+ /*
+ The alternative, own message dispatching loop without Device->run()
+ would look like this:
+ */
+
+ /*MSG msg;
+ while (true)
+ {
+ if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
+ {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+
+ if (msg.message == WM_QUIT)
+ break;
+ }
+
+ // advance virtual time
+ device->getTimer()->tick();
+
+ // draw engine picture
+ driver->beginScene(true, true, 0, (key=='c')?hIrrlichtWindow:0);
+ smgr->drawAll();
+ driver->endScene();
+ }*/
+
+ device->closeDevice();
+ device->drop();
+
+ return 0;
+}
+#endif // if windows
+
+/*
+That's it, Irrlicht now runs in your own windows window.
+**/
diff --git a/examples/14.Win32Window/tutorial.html b/examples/14.Win32Window/tutorial.html new file mode 100644 index 0000000..819e8ec --- /dev/null +++ b/examples/14.Win32Window/tutorial.html @@ -0,0 +1,210 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 14: Win32 Window</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 14: Win32 Window </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/014shot.jpg" alt="014shot.jpg"/> +</div> + <p>This example only runs under MS Windows and demonstrates that Irrlicht can render inside a win32 window. MFC and .NET Windows.Forms windows are possible, too.</p> +<p>In the beginning, we create a windows window using the windows API. I'm not going to explain this code, because it is windows specific. See the MSDN or a windows book for details. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#ifndef _IRR_WINDOWS_</span></div><div class="line"><span class="preprocessor">#error Windows only example</span></div><div class="line"><span class="preprocessor">#else</span></div><div class="line"><span class="preprocessor">#include <windows.h></span> <span class="comment">// this example only runs with windows</span></div><div class="line"><span class="preprocessor">#include <iostream></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"></div><div class="line"><span class="preprocessor">#pragma comment(lib, "irrlicht.lib")</span></div><div class="line"></div><div class="line">HWND hOKButton;</div><div class="line">HWND hWnd;</div><div class="line"></div><div class="line"><span class="keyword">static</span> LRESULT CALLBACK CustomWndProc(HWND hWnd, UINT message,</div><div class="line"> WPARAM wParam, LPARAM lParam)</div><div class="line">{</div><div class="line"> <span class="keywordflow">switch</span> (message)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> WM_COMMAND:</div><div class="line"> {</div><div class="line"> HWND hwndCtl = (HWND)lParam;</div><div class="line"> <span class="keywordtype">int</span> code = HIWORD(wParam);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (hwndCtl == hOKButton)</div><div class="line"> {</div><div class="line"> DestroyWindow(hWnd);</div><div class="line"> PostQuitMessage(0);</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> WM_DESTROY:</div><div class="line"> PostQuitMessage(0);</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line"></div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> DefWindowProc(hWnd, message, wParam, lParam);</div><div class="line">}</div></div><!-- fragment --><p> Now ask for the driver and create the Windows specific window. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> printf(<span class="stringliteral">"Select the render window (some dead window may exist too):\n"</span>\</div><div class="line"> <span class="stringliteral">" (a) Window with button (via CreationParam)\n"</span>\</div><div class="line"> <span class="stringliteral">" (b) Window with button (via beginScene)\n"</span>\</div><div class="line"> <span class="stringliteral">" (c) Own Irrlicht window (default behavior)\n"</span>\</div><div class="line"> <span class="stringliteral">" (otherKey) exit\n\n"</span>);</div><div class="line"></div><div class="line"> <span class="keywordtype">char</span> key;</div><div class="line"> std::cin >> key;</div><div class="line"> <span class="keywordflow">if</span> (key != <span class="charliteral">'a'</span> && key != <span class="charliteral">'b'</span> && key != <span class="charliteral">'c'</span>)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> HINSTANCE hInstance = 0;</div><div class="line"> <span class="comment">// create dialog</span></div><div class="line"></div><div class="line"> <span class="keyword">const</span> <span class="keywordtype">char</span>* Win32ClassName = <span class="stringliteral">"CIrrlichtWindowsTestDialog"</span>;</div><div class="line"></div><div class="line"> WNDCLASSEX wcex;</div><div class="line"> wcex.cbSize = <span class="keyword">sizeof</span>(WNDCLASSEX);</div><div class="line"> wcex.style = CS_HREDRAW | CS_VREDRAW;</div><div class="line"> wcex.lpfnWndProc = (WNDPROC)CustomWndProc;</div><div class="line"> wcex.cbClsExtra = 0;</div><div class="line"> wcex.cbWndExtra = DLGWINDOWEXTRA;</div><div class="line"> wcex.hInstance = hInstance;</div><div class="line"> wcex.hIcon = NULL;</div><div class="line"> wcex.hCursor = LoadCursor(NULL, IDC_ARROW);</div><div class="line"> wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW);</div><div class="line"> wcex.lpszMenuName = 0;</div><div class="line"> wcex.lpszClassName = Win32ClassName;</div><div class="line"> wcex.hIconSm = 0;</div><div class="line"></div><div class="line"> RegisterClassEx(&wcex);</div><div class="line"></div><div class="line"> DWORD style = WS_SYSMENU | WS_BORDER | WS_CAPTION |</div><div class="line"> WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SIZEBOX;</div><div class="line"></div><div class="line"> <span class="keywordtype">int</span> windowWidth = 440;</div><div class="line"> <span class="keywordtype">int</span> windowHeight = 380;</div><div class="line"></div><div class="line"> hWnd = CreateWindow( Win32ClassName, <span class="stringliteral">"Irrlicht Win32 window example"</span>,</div><div class="line"> style, 100, 100, windowWidth, windowHeight,</div><div class="line"> NULL, NULL, hInstance, NULL);</div><div class="line"></div><div class="line"> RECT clientRect;</div><div class="line"> GetClientRect(hWnd, &clientRect);</div><div class="line"> windowWidth = clientRect.right;</div><div class="line"> windowHeight = clientRect.bottom;</div><div class="line"></div><div class="line"> <span class="comment">// create ok button</span></div><div class="line"></div><div class="line"> hOKButton = CreateWindow(<span class="stringliteral">"BUTTON"</span>, <span class="stringliteral">"OK - Close"</span>, WS_CHILD | WS_VISIBLE | BS_TEXT,</div><div class="line"> windowWidth - 160, windowHeight - 40, 150, 30, hWnd, NULL, hInstance, NULL);</div><div class="line"></div><div class="line"> <span class="comment">// create some text</span></div><div class="line"></div><div class="line"> CreateWindow(<span class="stringliteral">"STATIC"</span>, <span class="stringliteral">"This is Irrlicht running inside a standard Win32 window.\n"</span>\</div><div class="line"> <span class="stringliteral">"Also mixing with MFC and .NET Windows.Forms is possible."</span>,</div><div class="line"> WS_CHILD | WS_VISIBLE, 20, 20, 400, 40, hWnd, NULL, hInstance, NULL);</div><div class="line"></div><div class="line"> <span class="comment">// create window to put irrlicht in</span></div><div class="line"></div><div class="line"> HWND hIrrlichtWindow = CreateWindow(<span class="stringliteral">"BUTTON"</span>, <span class="stringliteral">""</span>,</div><div class="line"> WS_CHILD | WS_VISIBLE | BS_OWNERDRAW,</div><div class="line"> 50, 80, 320, 220, hWnd, NULL, hInstance, NULL);</div><div class="line"> video::SExposedVideoData videodata((key==<span class="charliteral">'b'</span>)?hIrrlichtWindow:0);</div></div><!-- fragment --><p> So now that we have some window, we can create an Irrlicht device inside of it. We use Irrlicht createEx() function for this. We only need the handle (HWND) to that window, set it as windowsID parameter and start up the engine as usual. That's it. </p><div class="fragment"><div class="line"><span class="comment">// create irrlicht device in the button window</span></div><div class="line"></div><div class="line">irr::SIrrlichtCreationParameters param;</div><div class="line">param.DriverType = driverType;</div><div class="line"><span class="keywordflow">if</span> (key==<span class="charliteral">'a'</span>)</div><div class="line"> param.WindowId = <span class="keyword">reinterpret_cast<</span><span class="keywordtype">void</span>*<span class="keyword">></span>(hIrrlichtWindow);</div><div class="line"></div><div class="line">irr::IrrlichtDevice* device = irr::createDeviceEx(param);</div><div class="line"><span class="keywordflow">if</span> (!device)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"><span class="comment">// setup a simple 3d scene</span></div><div class="line"></div><div class="line">irr::scene::ISceneManager* smgr = device->getSceneManager();</div><div class="line">video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (driverType==video::EDT_OPENGL)</div><div class="line">{</div><div class="line"> HDC HDc=GetDC(hIrrlichtWindow);</div><div class="line"> PIXELFORMATDESCRIPTOR pfd={0};</div><div class="line"> pfd.nSize=<span class="keyword">sizeof</span>(PIXELFORMATDESCRIPTOR);</div><div class="line"> <span class="keywordtype">int</span> pf = GetPixelFormat(HDc);</div><div class="line"> DescribePixelFormat(HDc, pf, <span class="keyword">sizeof</span>(PIXELFORMATDESCRIPTOR), &pfd);</div><div class="line"> pfd.dwFlags |= PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW;</div><div class="line"> pfd.cDepthBits=16;</div><div class="line"> pf = ChoosePixelFormat(HDc, &pfd);</div><div class="line"> SetPixelFormat(HDc, pf, &pfd);</div><div class="line"> videodata.OpenGLWin32.HDc = HDc;</div><div class="line"> videodata.OpenGLWin32.HRc=wglCreateContext(HDc);</div><div class="line"> wglShareLists((HGLRC)driver->getExposedVideoData().OpenGLWin32.HRc, (HGLRC)videodata.OpenGLWin32.HRc);</div><div class="line">}</div><div class="line">scene::ICameraSceneNode* cam = smgr->addCameraSceneNode();</div><div class="line">cam->setTarget(core::vector3df(0,0,0));</div><div class="line"></div><div class="line">scene::ISceneNodeAnimator* anim =</div><div class="line"> smgr->createFlyCircleAnimator(core::vector3df(0,15,0), 30.0f);</div><div class="line">cam->addAnimator(anim);</div><div class="line">anim->drop();</div><div class="line"></div><div class="line">scene::ISceneNode* cube = smgr->addCubeSceneNode(20);</div><div class="line"></div><div class="line">cube->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/wall.bmp"</span>));</div><div class="line">cube->setMaterialTexture(1, driver->getTexture(<span class="stringliteral">"../../media/water.jpg"</span>));</div><div class="line">cube->setMaterialFlag( video::EMF_LIGHTING, <span class="keyword">false</span> );</div><div class="line">cube->setMaterialType( video::EMT_REFLECTION_2_LAYER );</div><div class="line"></div><div class="line">smgr->addSkyBoxSceneNode(</div><div class="line">driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_up.jpg"</span>),</div><div class="line">driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_dn.jpg"</span>),</div><div class="line">driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_lf.jpg"</span>),</div><div class="line">driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_rt.jpg"</span>),</div><div class="line">driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_ft.jpg"</span>),</div><div class="line">driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_bk.jpg"</span>));</div><div class="line"></div><div class="line"><span class="comment">// show and execute dialog</span></div><div class="line"></div><div class="line">ShowWindow(hWnd , SW_SHOW);</div><div class="line">UpdateWindow(hWnd);</div><div class="line"></div><div class="line"><span class="comment">// do message queue</span></div></div><!-- fragment --><p> Now the only thing missing is the drawing loop using IrrlichtDevice::run(). We do this as usual. But instead of this, there is another possibility: You can also simply use your own message loop using GetMessage, DispatchMessage and whatever. Calling Device->run() will cause Irrlicht to dispatch messages internally too. You need not call Device->run() if you want to do your own message dispatching loop, but Irrlicht will not be able to fetch user input then and you have to do it on your own using the window messages, DirectInput, or whatever. </p><div class="fragment"><div class="line"><span class="keywordflow">while</span> (device->run())</div><div class="line">{</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, 0, videodata);</div><div class="line"> smgr->drawAll();</div><div class="line"> driver->endScene();</div><div class="line">}</div></div><!-- fragment --><p> The alternative, own message dispatching loop without Device->run() would look like this: </p><div class="fragment"></div><!-- fragment --><p> MSG msg; while (true) { if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg);</p> +<p>if (msg.message == WM_QUIT) break; }</p> +<p>advance virtual time device->getTimer()->tick();</p> +<p>draw engine picture driver->beginScene(true, true, 0, (key=='c')?hIrrlichtWindow:0); smgr->drawAll(); driver->endScene(); }</p><div class="fragment"><div class="line"> device->closeDevice();</div><div class="line"> device->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div><div class="line"><span class="preprocessor">#endif // if windows</span></div></div><!-- fragment --><p> That's it, Irrlicht now runs in your own windows window. </p> +</div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/15.LoadIrrFile/LoadIrrFile.cbp b/examples/15.LoadIrrFile/LoadIrrFile.cbp new file mode 100644 index 0000000..a087158 --- /dev/null +++ b/examples/15.LoadIrrFile/LoadIrrFile.cbp @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 15 Load .irr File" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/LoadIrrFile" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/LoadIrrFile" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/15.LoadIrrFile/LoadIrrFile.dev b/examples/15.LoadIrrFile/LoadIrrFile.dev new file mode 100644 index 0000000..b43fe68 --- /dev/null +++ b/examples/15.LoadIrrFile/LoadIrrFile.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 15 Load .irr File
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=15.LoadIrrFile.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/15.LoadIrrFile/LoadIrrFile.vcproj b/examples/15.LoadIrrFile/LoadIrrFile.vcproj new file mode 100644 index 0000000..fef4626 --- /dev/null +++ b/examples/15.LoadIrrFile/LoadIrrFile.vcproj @@ -0,0 +1,162 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="15.LoadIrrFile"
+ ProjectGUID="{1AD3DB5E-D751-42D5-8F3E-7C3010539F5C}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/LoadIrrFile.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/LoadIrrFile.pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/LoadIrrFile.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/LoadIrrFile.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/LoadIrrFile.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/LoadIrrFile.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/15.LoadIrrFile/LoadIrrFile_vc10.vcxproj b/examples/15.LoadIrrFile/LoadIrrFile_vc10.vcxproj new file mode 100644 index 0000000..db6dec2 --- /dev/null +++ b/examples/15.LoadIrrFile/LoadIrrFile_vc10.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>15.LoadIrrFile</ProjectName>
+ <ProjectGuid>{78C9F424-523C-49AC-94B7-823AA4A26BF9}</ProjectGuid>
+ <RootNamespace>LoadIrrFile</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/LoadIrrFile.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/LoadIrrFile.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\15.LoadIrrFile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/LoadIrrFile.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/LoadIrrFile.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\15.LoadIrrFile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/15.LoadIrrFile/LoadIrrFile_vc11.vcxproj b/examples/15.LoadIrrFile/LoadIrrFile_vc11.vcxproj new file mode 100644 index 0000000..db6dec2 --- /dev/null +++ b/examples/15.LoadIrrFile/LoadIrrFile_vc11.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>15.LoadIrrFile</ProjectName>
+ <ProjectGuid>{78C9F424-523C-49AC-94B7-823AA4A26BF9}</ProjectGuid>
+ <RootNamespace>LoadIrrFile</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/LoadIrrFile.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/LoadIrrFile.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\15.LoadIrrFile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/LoadIrrFile.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/LoadIrrFile.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\15.LoadIrrFile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/15.LoadIrrFile/LoadIrrFile_vc12.vcxproj b/examples/15.LoadIrrFile/LoadIrrFile_vc12.vcxproj new file mode 100644 index 0000000..97b4c71 --- /dev/null +++ b/examples/15.LoadIrrFile/LoadIrrFile_vc12.vcxproj @@ -0,0 +1,235 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>15.LoadIrrFile</ProjectName>
+ <ProjectGuid>{78C9F424-523C-49AC-94B7-823AA4A26BF9}</ProjectGuid>
+ <RootNamespace>LoadIrrFile</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/LoadIrrFile.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/LoadIrrFile.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\15.LoadIrrFile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/LoadIrrFile.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/LoadIrrFile.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\15.LoadIrrFile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/15.LoadIrrFile/LoadIrrFile_vc8.vcproj b/examples/15.LoadIrrFile/LoadIrrFile_vc8.vcproj new file mode 100644 index 0000000..d78a263 --- /dev/null +++ b/examples/15.LoadIrrFile/LoadIrrFile_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="15.LoadIrrFile_vc8"
+ ProjectGUID="{78C9F424-523C-49AC-94B7-823AA4A26BF9}"
+ RootNamespace="LoadIrrFile_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/LoadIrrFile.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/LoadIrrFile.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/LoadIrrFile.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/LoadIrrFile.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/LoadIrrFile.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/LoadIrrFile.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/15.LoadIrrFile/LoadIrrFile_vc9.vcproj b/examples/15.LoadIrrFile/LoadIrrFile_vc9.vcproj new file mode 100644 index 0000000..a7bea1b --- /dev/null +++ b/examples/15.LoadIrrFile/LoadIrrFile_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="15.LoadIrrFile_vc9"
+ ProjectGUID="{78C9F424-523C-49AC-94B7-823AA4A26BF9}"
+ RootNamespace="LoadIrrFile_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/LoadIrrFile.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/LoadIrrFile.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/LoadIrrFile.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/LoadIrrFile.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/LoadIrrFile.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/LoadIrrFile.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/15.LoadIrrFile/Makefile b/examples/15.LoadIrrFile/Makefile new file mode 100644 index 0000000..f00e494 --- /dev/null +++ b/examples/15.LoadIrrFile/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 15.LoadIrrFile
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/15.LoadIrrFile/main.cpp b/examples/15.LoadIrrFile/main.cpp new file mode 100644 index 0000000..42327cd --- /dev/null +++ b/examples/15.LoadIrrFile/main.cpp @@ -0,0 +1,173 @@ +/** Example 015 Loading Scenes from .irr Files
+
+Since version 1.1, Irrlicht is able to save and load
+the full scene graph into an .irr file, an xml based
+format. There is an editor available to edit
+those files, named irrEdit (http://www.ambiera.com/irredit)
+which can also be used as world and particle editor.
+This tutorial shows how to use .irr files.
+
+Lets start: Create an Irrlicht device and setup the window.
+*/
+
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+int main(int argc, char** argv)
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ // create device and exit if creation failed
+
+ IrrlichtDevice* device =
+ createDevice(driverType, core::dimension2d<u32>(640, 480));
+
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ device->setWindowCaption(L"Load .irr file example");
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* smgr = device->getSceneManager();
+
+ /*
+ Now load our .irr file.
+ .irr files can store the whole scene graph including animators,
+ materials and particle systems. And there is also the possibility to
+ store arbitrary user data for every scene node in that file. To keep
+ this example simple, we are simply loading the scene here. See the
+ documentation at ISceneManager::loadScene and ISceneManager::saveScene
+ for more information. So to load and display a complicated huge scene,
+ we only need a single call to loadScene().
+ */
+
+ // load the scene
+ if (argc>1)
+ smgr->loadScene(argv[1]);
+ else
+ smgr->loadScene("../../media/example.irr");
+
+ /*
+ Now we'll create a camera, and give it a collision response animator
+ that's built from the mesh nodes in the scene we just loaded.
+ */
+ scene::ICameraSceneNode * camera = smgr->addCameraSceneNodeFPS(0, 50.f, 0.1f);
+
+ // Create a meta triangle selector to hold several triangle selectors.
+ scene::IMetaTriangleSelector * meta = smgr->createMetaTriangleSelector();
+
+ /*
+ Now we will find all the nodes in the scene and create triangle
+ selectors for all suitable nodes. Typically, you would want to make a
+ more informed decision about which nodes to performs collision checks
+ on; you could capture that information in the node name or Id.
+ */
+ core::array<scene::ISceneNode *> nodes;
+ smgr->getSceneNodesFromType(scene::ESNT_ANY, nodes); // Find all nodes
+
+ for (u32 i=0; i < nodes.size(); ++i)
+ {
+ scene::ISceneNode * node = nodes[i];
+ scene::ITriangleSelector * selector = 0;
+
+ switch(node->getType())
+ {
+ case scene::ESNT_CUBE:
+ case scene::ESNT_ANIMATED_MESH:
+ // Because the selector won't animate with the mesh,
+ // and is only being used for camera collision, we'll just use an approximate
+ // bounding box instead of ((scene::IAnimatedMeshSceneNode*)node)->getMesh(0)
+ selector = smgr->createTriangleSelectorFromBoundingBox(node);
+ break;
+
+ case scene::ESNT_MESH:
+ case scene::ESNT_SPHERE: // Derived from IMeshSceneNode
+ selector = smgr->createTriangleSelector(((scene::IMeshSceneNode*)node)->getMesh(), node);
+ break;
+
+ case scene::ESNT_TERRAIN:
+ selector = smgr->createTerrainTriangleSelector((scene::ITerrainSceneNode*)node);
+ break;
+
+ case scene::ESNT_OCTREE:
+ selector = smgr->createOctreeTriangleSelector(((scene::IMeshSceneNode*)node)->getMesh(), node);
+ break;
+
+ default:
+ // Don't create a selector for this node type
+ break;
+ }
+
+ if(selector)
+ {
+ // Add it to the meta selector, which will take a reference to it
+ meta->addTriangleSelector(selector);
+ // And drop my reference to it, so that the meta selector owns it.
+ selector->drop();
+ }
+ }
+
+ /*
+ Now that the mesh scene nodes have had triangle selectors created and added
+ to the meta selector, create a collision response animator from that meta selector.
+ */
+ scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
+ meta, camera, core::vector3df(5,5,5),
+ core::vector3df(0,0,0));
+ meta->drop(); // I'm done with the meta selector now
+
+ camera->addAnimator(anim);
+ anim->drop(); // I'm done with the animator now
+
+ // And set the camera position so that it doesn't start off stuck in the geometry
+ camera->setPosition(core::vector3df(0.f, 20.f, 0.f));
+
+ // Point the camera at the cube node, by finding the first node of type ESNT_CUBE
+ scene::ISceneNode * cube = smgr->getSceneNodeFromType(scene::ESNT_CUBE);
+ if(cube)
+ camera->setTarget(cube->getAbsolutePosition());
+
+ /*
+ That's it. Draw everything and finish as usual.
+ */
+
+ int lastFPS = -1;
+
+ while(device->run())
+ if (device->isWindowActive())
+ {
+ driver->beginScene(true, true, video::SColor(0,200,200,200));
+ smgr->drawAll();
+ driver->endScene();
+
+ int fps = driver->getFPS();
+
+ if (lastFPS != fps)
+ {
+ core::stringw str = L"Load Irrlicht File example - Irrlicht Engine [";
+ str += driver->getName();
+ str += "] FPS:";
+ str += fps;
+
+ device->setWindowCaption(str.c_str());
+ lastFPS = fps;
+ }
+
+ }
+
+ device->drop();
+
+ return 0;
+}
+
+/*
+**/
diff --git a/examples/15.LoadIrrFile/tutorial.html b/examples/15.LoadIrrFile/tutorial.html new file mode 100644 index 0000000..a9b2868 --- /dev/null +++ b/examples/15.LoadIrrFile/tutorial.html @@ -0,0 +1,206 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 15: Loading Scenes from .irr Files</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 15: Loading Scenes from .irr Files </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/015shot.jpg" alt="015shot.jpg"/> +</div> + <p>Since version 1.1, Irrlicht is able to save and load the full scene graph into an .irr file, an xml based format. There is an editor available to edit those files, named irrEdit (<a href="http://www.ambiera.com/irredit">http://www.ambiera.com/irredit</a>) which can also be used as world and particle editor. This tutorial shows how to use .irr files.</p> +<p>Lets start: Create an Irrlicht device and setup the window. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>** argv)</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> <span class="comment">// create device and exit if creation failed</span></div><div class="line"></div><div class="line"> IrrlichtDevice* device =</div><div class="line"> createDevice(driverType, core::dimension2d<u32>(640, 480));</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div><div class="line"></div><div class="line"> device->setWindowCaption(L<span class="stringliteral">"Load .irr file example"</span>);</div><div class="line"></div><div class="line"> video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line"> scene::ISceneManager* smgr = device->getSceneManager();</div></div><!-- fragment --><p> Now load our .irr file. .irr files can store the whole scene graph including animators, materials and particle systems. And there is also the possibility to store arbitrary user data for every scene node in that file. To keep this example simple, we are simply loading the scene here. See the documentation at ISceneManager::loadScene and ISceneManager::saveScene for more information. So to load and display a complicated huge scene, we only need a single call to loadScene(). </p><div class="fragment"><div class="line"><span class="comment">// load the scene</span></div><div class="line"><span class="keywordflow">if</span> (argc>1)</div><div class="line"> smgr->loadScene(argv[1]);</div><div class="line"><span class="keywordflow">else</span></div><div class="line"> smgr->loadScene(<span class="stringliteral">"../../media/example.irr"</span>);</div></div><!-- fragment --><p> Now we'll create a camera, and give it a collision response animator that's built from the mesh nodes in the scene we just loaded. </p><div class="fragment"><div class="line">scene::ICameraSceneNode * camera = smgr->addCameraSceneNodeFPS(0, 50.f, 0.1f);</div><div class="line"></div><div class="line"><span class="comment">// Create a meta triangle selector to hold several triangle selectors.</span></div><div class="line">scene::IMetaTriangleSelector * meta = smgr->createMetaTriangleSelector();</div></div><!-- fragment --><p> Now we will find all the nodes in the scene and create triangle selectors for all suitable nodes. Typically, you would want to make a more informed decision about which nodes to performs collision checks on; you could capture that information in the node name or Id. </p><div class="fragment"><div class="line">core::array<scene::ISceneNode *> nodes;</div><div class="line">smgr->getSceneNodesFromType(scene::ESNT_ANY, nodes); <span class="comment">// Find all nodes</span></div><div class="line"></div><div class="line"><span class="keywordflow">for</span> (u32 i=0; i < nodes.size(); ++i)</div><div class="line">{</div><div class="line"> scene::ISceneNode * node = nodes[i];</div><div class="line"> scene::ITriangleSelector * selector = 0;</div><div class="line"></div><div class="line"> <span class="keywordflow">switch</span>(node->getType())</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> scene::ESNT_CUBE:</div><div class="line"> <span class="keywordflow">case</span> scene::ESNT_ANIMATED_MESH:</div><div class="line"> <span class="comment">// Because the selector won't animate with the mesh,</span></div><div class="line"> <span class="comment">// and is only being used for camera collision, we'll just use an approximate</span></div><div class="line"> <span class="comment">// bounding box instead of ((scene::IAnimatedMeshSceneNode*)node)->getMesh(0)</span></div><div class="line"> selector = smgr->createTriangleSelectorFromBoundingBox(node);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> scene::ESNT_MESH:</div><div class="line"> <span class="keywordflow">case</span> scene::ESNT_SPHERE: <span class="comment">// Derived from IMeshSceneNode</span></div><div class="line"> selector = smgr->createTriangleSelector(((scene::IMeshSceneNode*)node)->getMesh(), node);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> scene::ESNT_TERRAIN:</div><div class="line"> selector = smgr->createTerrainTriangleSelector((scene::ITerrainSceneNode*)node);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> scene::ESNT_OCTREE:</div><div class="line"> selector = smgr->createOctreeTriangleSelector(((scene::IMeshSceneNode*)node)->getMesh(), node);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">default</span>:</div><div class="line"> <span class="comment">// Don't create a selector for this node type</span></div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span>(selector)</div><div class="line"> {</div><div class="line"> <span class="comment">// Add it to the meta selector, which will take a reference to it</span></div><div class="line"> meta->addTriangleSelector(selector);</div><div class="line"> <span class="comment">// And drop my reference to it, so that the meta selector owns it.</span></div><div class="line"> selector->drop();</div><div class="line"> }</div><div class="line">}</div></div><!-- fragment --><p> Now that the mesh scene nodes have had triangle selectors created and added to the meta selector, create a collision response animator from that meta selector. </p><div class="fragment"><div class="line">scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(</div><div class="line"> meta, camera, core::vector3df(5,5,5),</div><div class="line"> core::vector3df(0,0,0));</div><div class="line">meta->drop(); <span class="comment">// I'm done with the meta selector now</span></div><div class="line"></div><div class="line">camera->addAnimator(anim);</div><div class="line">anim->drop(); <span class="comment">// I'm done with the animator now</span></div><div class="line"></div><div class="line"><span class="comment">// And set the camera position so that it doesn't start off stuck in the geometry</span></div><div class="line">camera->setPosition(core::vector3df(0.f, 20.f, 0.f));</div><div class="line"></div><div class="line"><span class="comment">// Point the camera at the cube node, by finding the first node of type ESNT_CUBE</span></div><div class="line">scene::ISceneNode * cube = smgr->getSceneNodeFromType(scene::ESNT_CUBE);</div><div class="line"><span class="keywordflow">if</span>(cube)</div><div class="line"> camera->setTarget(cube->getAbsolutePosition());</div></div><!-- fragment --><p> That's it. Draw everything and finish as usual. </p><div class="fragment"><div class="line"> <span class="keywordtype">int</span> lastFPS = -1;</div><div class="line"></div><div class="line"> <span class="keywordflow">while</span>(device->run())</div><div class="line"> <span class="keywordflow">if</span> (device->isWindowActive())</div><div class="line"> {</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, video::SColor(0,200,200,200));</div><div class="line"> smgr->drawAll();</div><div class="line"> driver->endScene();</div><div class="line"></div><div class="line"> <span class="keywordtype">int</span> fps = driver->getFPS();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (lastFPS != fps)</div><div class="line"> {</div><div class="line"> core::stringw str = L<span class="stringliteral">"Load Irrlicht File example - Irrlicht Engine ["</span>;</div><div class="line"> str += driver->getName();</div><div class="line"> str += <span class="stringliteral">"] FPS:"</span>;</div><div class="line"> str += fps;</div><div class="line"></div><div class="line"> device->setWindowCaption(str.c_str());</div><div class="line"> lastFPS = fps;</div><div class="line"> }</div><div class="line"></div><div class="line"> }</div><div class="line"></div><div class="line"> device->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/16.Quake3MapShader/Makefile b/examples/16.Quake3MapShader/Makefile new file mode 100644 index 0000000..952b309 --- /dev/null +++ b/examples/16.Quake3MapShader/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 16.Quake3MapShader
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/16.Quake3MapShader/Quake3MapShader.cbp b/examples/16.Quake3MapShader/Quake3MapShader.cbp new file mode 100644 index 0000000..544f80f --- /dev/null +++ b/examples/16.Quake3MapShader/Quake3MapShader.cbp @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 16 Quake 3 Map Shader" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/Q3MapShader" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/Q3MapShader" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + <Add directory="../../lib/Linux" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/16.Quake3MapShader/Quake3MapShader.dev b/examples/16.Quake3MapShader/Quake3MapShader.dev new file mode 100644 index 0000000..14ebb42 --- /dev/null +++ b/examples/16.Quake3MapShader/Quake3MapShader.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 16 Quake3 Map Shader
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=16.Quake3MapShader.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/16.Quake3MapShader/Quake3MapShader.vcproj b/examples/16.Quake3MapShader/Quake3MapShader.vcproj new file mode 100644 index 0000000..de658b3 --- /dev/null +++ b/examples/16.Quake3MapShader/Quake3MapShader.vcproj @@ -0,0 +1,133 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="16.Quake3MapShader"
+ ProjectGUID="{EB3B38EA-5CE7-4983-845B-880661E69D09}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/Quake3MapShader.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/QIfist /Oa"
+ Optimization="3"
+ GlobalOptimizations="TRUE"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="TRUE"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="TRUE"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="4"
+ BufferSecurityCheck="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"
+ CallingConvention="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="FALSE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/16.Quake3MapShader/Quake3MapShader_vc10.vcxproj b/examples/16.Quake3MapShader/Quake3MapShader_vc10.vcxproj new file mode 100644 index 0000000..b5564f8 --- /dev/null +++ b/examples/16.Quake3MapShader/Quake3MapShader_vc10.vcxproj @@ -0,0 +1,194 @@ +ďťż<?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">
+ <ProjectName>16.Quake3MapShader</ProjectName>
+ <ProjectGuid>{EB3B38EA-5CE7-4983-845B-880661E69D09}</ProjectGuid>
+ <RootNamespace>16.Quake3MapShader</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\16.Quake3MapShader.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\16.Quake3MapShader.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/16.Quake3MapShader/Quake3MapShader_vc11.vcxproj b/examples/16.Quake3MapShader/Quake3MapShader_vc11.vcxproj new file mode 100644 index 0000000..b5564f8 --- /dev/null +++ b/examples/16.Quake3MapShader/Quake3MapShader_vc11.vcxproj @@ -0,0 +1,194 @@ +ďťż<?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">
+ <ProjectName>16.Quake3MapShader</ProjectName>
+ <ProjectGuid>{EB3B38EA-5CE7-4983-845B-880661E69D09}</ProjectGuid>
+ <RootNamespace>16.Quake3MapShader</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\16.Quake3MapShader.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\16.Quake3MapShader.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/16.Quake3MapShader/Quake3MapShader_vc12.vcxproj b/examples/16.Quake3MapShader/Quake3MapShader_vc12.vcxproj new file mode 100644 index 0000000..e41579e --- /dev/null +++ b/examples/16.Quake3MapShader/Quake3MapShader_vc12.vcxproj @@ -0,0 +1,194 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>16.Quake3MapShader</ProjectName>
+ <ProjectGuid>{EB3B38EA-5CE7-4983-845B-880661E69D09}</ProjectGuid>
+ <RootNamespace>16.Quake3MapShader</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\16.Quake3MapShader.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\16.Quake3MapShader.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/16.Quake3MapShader/Quake3MapShader_vc8.vcproj b/examples/16.Quake3MapShader/Quake3MapShader_vc8.vcproj new file mode 100644 index 0000000..65fc83c --- /dev/null +++ b/examples/16.Quake3MapShader/Quake3MapShader_vc8.vcproj @@ -0,0 +1,190 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="16.Quake3MapShader_vc8"
+ ProjectGUID="{EB3B38EA-5CE7-4983-845B-880661E69D09}"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <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"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/Quake3MapShader.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ CallingConvention="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe"
+ LinkIncremental="0"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/16.Quake3MapShader/Quake3MapShader_vc9.vcproj b/examples/16.Quake3MapShader/Quake3MapShader_vc9.vcproj new file mode 100644 index 0000000..a533ce0 --- /dev/null +++ b/examples/16.Quake3MapShader/Quake3MapShader_vc9.vcproj @@ -0,0 +1,188 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="16.Quake3MapShader_vc9"
+ ProjectGUID="{EB3B38EA-5CE7-4983-845B-880661E69D09}"
+ RootNamespace="16.Quake3MapShader_vc9"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <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"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/Quake3MapShader.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="0"
+ CallingConvention="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe"
+ LinkIncremental="0"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/16.Quake3MapShader/main.cpp b/examples/16.Quake3MapShader/main.cpp new file mode 100644 index 0000000..6391705 --- /dev/null +++ b/examples/16.Quake3MapShader/main.cpp @@ -0,0 +1,389 @@ +/** Example 016 Quake3 Map Shader Support
+
+This Tutorial shows how to load a Quake 3 map into the
+engine, create a SceneNode for optimizing the speed of
+rendering and how to create a user controlled camera.
+
+Lets start like the HelloWorld example: We include
+the irrlicht header files and an additional file to be able
+to ask the user for a driver type using the console.
+*/
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+/*
+ define which Quake3 Level should be loaded
+*/
+#define IRRLICHT_QUAKE3_ARENA
+//#define ORIGINAL_QUAKE3_ARENA
+//#define CUSTOM_QUAKE3_ARENA
+//#define SHOW_SHADER_NAME
+
+#ifdef ORIGINAL_QUAKE3_ARENA
+ #define QUAKE3_STORAGE_FORMAT addFolderFileArchive
+ #define QUAKE3_STORAGE_1 "/baseq3/"
+ #ifdef CUSTOM_QUAKE3_ARENA
+ #define QUAKE3_STORAGE_2 "/cf/"
+ #define QUAKE3_MAP_NAME "maps/cf.bsp"
+ #else
+ #define QUAKE3_MAP_NAME "maps/q3dm8.bsp"
+ #endif
+#endif
+
+#ifdef IRRLICHT_QUAKE3_ARENA
+ #define QUAKE3_STORAGE_FORMAT addFileArchive
+ #define QUAKE3_STORAGE_1 "../../media/map-20kdm2.pk3"
+ #define QUAKE3_MAP_NAME "maps/20kdm2.bsp"
+#endif
+
+using namespace irr;
+using namespace scene;
+
+/*
+Again, to be able to use the Irrlicht.DLL file, we need to link with the
+Irrlicht.lib. We could set this option in the project settings, but
+to make it easy, we use a pragma comment lib:
+*/
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+
+/*
+A class to produce a series of screenshots
+*/
+class CScreenShotFactory : public IEventReceiver
+{
+public:
+
+ CScreenShotFactory( IrrlichtDevice *device, const c8 * templateName, ISceneNode* node )
+ : Device(device), Number(0), FilenameTemplate(templateName), Node(node)
+ {
+ FilenameTemplate.replace ( '/', '_' );
+ FilenameTemplate.replace ( '\\', '_' );
+ }
+
+ bool OnEvent(const SEvent& event)
+ {
+ // check if user presses the key F9
+ if ((event.EventType == EET_KEY_INPUT_EVENT) &&
+ event.KeyInput.PressedDown)
+ {
+ if (event.KeyInput.Key == KEY_F9)
+ {
+ video::IImage* image = Device->getVideoDriver()->createScreenShot();
+ if (image)
+ {
+ c8 buf[256];
+ snprintf(buf, 256, "%s_shot%04d.jpg",
+ FilenameTemplate.c_str(),
+ ++Number);
+ Device->getVideoDriver()->writeImageToFile(image, buf, 85 );
+ image->drop();
+ }
+ }
+ else
+ if (event.KeyInput.Key == KEY_F8)
+ {
+ if (Node->isDebugDataVisible())
+ Node->setDebugDataVisible(scene::EDS_OFF);
+ else
+ Node->setDebugDataVisible(scene::EDS_BBOX_ALL);
+ }
+ }
+ return false;
+ }
+
+private:
+ IrrlichtDevice *Device;
+ u32 Number;
+ core::stringc FilenameTemplate;
+ ISceneNode* Node;
+};
+
+
+/*
+Ok, lets start.
+*/
+
+int IRRCALLCONV main(int argc, char* argv[])
+{
+ /*
+ Like in the HelloWorld example, we create an IrrlichtDevice with
+ createDevice(). The difference now is that we ask the user to select
+ which hardware accelerated driver to use. The Software device would be
+ too slow to draw a huge Quake 3 map, but just for the fun of it, we make
+ this decision possible too.
+ */
+
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ // create device and exit if creation failed
+ const core::dimension2du videoDim(800,600);
+
+ IrrlichtDevice *device = createDevice(driverType, videoDim, 32, false );
+
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ const char* mapname=0;
+ if (argc>2)
+ mapname = argv[2];
+ else
+ mapname = QUAKE3_MAP_NAME;
+
+ /*
+ Get a pointer to the video driver and the SceneManager so that
+ we do not always have to write device->getVideoDriver() and
+ device->getSceneManager().
+ */
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* smgr = device->getSceneManager();
+ gui::IGUIEnvironment* gui = device->getGUIEnvironment();
+
+ //! add our private media directory to the file system
+ device->getFileSystem()->addFileArchive("../../media/");
+
+ /*
+ To display the Quake 3 map, we first need to load it. Quake 3 maps
+ are packed into .pk3 files, which are nothing other than .zip files.
+ So we add the .pk3 file to our FileSystem. After it was added,
+ we are able to read from the files in that archive as they would
+ directly be stored on disk.
+ */
+ if (argc>2)
+ device->getFileSystem()->QUAKE3_STORAGE_FORMAT(argv[1]);
+ else
+ device->getFileSystem()->QUAKE3_STORAGE_FORMAT(QUAKE3_STORAGE_1);
+#ifdef QUAKE3_STORAGE_2
+ device->getFileSystem()->QUAKE3_STORAGE_FORMAT(QUAKE3_STORAGE_2);
+#endif
+
+ // Quake3 Shader controls Z-Writing
+ smgr->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true);
+
+ /*
+ Now we can load the mesh by calling getMesh(). We get a pointer returned
+ to a IAnimatedMesh. As you know, Quake 3 maps are not really animated,
+ they are only a huge chunk of static geometry with some materials
+ attached. Hence the IAnimated mesh consists of only one frame,
+ so we get the "first frame" of the "animation", which is our quake level
+ and create an Octree scene node with it, using addOctreeSceneNode().
+ The Octree optimizes the scene a little bit, trying to draw only geometry
+ which is currently visible. An alternative to the Octree would be a
+ AnimatedMeshSceneNode, which would draw always the complete geometry of
+ the mesh, without optimization. Try it out: Write addAnimatedMeshSceneNode
+ instead of addOctreeSceneNode and compare the primitives drawn by the
+ video driver. (There is a getPrimitiveCountDrawed() method in the
+ IVideoDriver class). Note that this optimization with the Octree is only
+ useful when drawing huge meshes consisting of lots of geometry.
+ */
+ scene::IQ3LevelMesh* const mesh =
+ (scene::IQ3LevelMesh*) smgr->getMesh(mapname);
+
+ /*
+ add the geometry mesh to the Scene ( polygon & patches )
+ The Geometry mesh is optimised for faster drawing
+ */
+ scene::ISceneNode* node = 0;
+ if (mesh)
+ {
+ scene::IMesh * const geometry = mesh->getMesh(quake3::E_Q3_MESH_GEOMETRY);
+ node = smgr->addOctreeSceneNode(geometry, 0, -1, 4096);
+ }
+
+ // create an event receiver for making screenshots
+ CScreenShotFactory screenshotFactory(device, mapname, node);
+ device->setEventReceiver(&screenshotFactory);
+
+ /*
+ now construct SceneNodes for each Shader
+ The Objects are stored in the quake mesh scene::E_Q3_MESH_ITEMS
+ and the Shader ID is stored in the MaterialParameters
+ mostly dark looking skulls and moving lava.. or green flashing tubes?
+ */
+ if ( mesh )
+ {
+ // the additional mesh can be quite huge and is unoptimized
+ const scene::IMesh * const additional_mesh = mesh->getMesh(quake3::E_Q3_MESH_ITEMS);
+
+#ifdef SHOW_SHADER_NAME
+ gui::IGUIFont *font = device->getGUIEnvironment()->getFont("../../media/fontlucida.png");
+ u32 count = 0;
+#endif
+
+ for ( u32 i = 0; i!= additional_mesh->getMeshBufferCount(); ++i )
+ {
+ const IMeshBuffer* meshBuffer = additional_mesh->getMeshBuffer(i);
+ const video::SMaterial& material = meshBuffer->getMaterial();
+
+ // The ShaderIndex is stored in the material parameter
+ const s32 shaderIndex = (s32) material.MaterialTypeParam2;
+
+ // the meshbuffer can be rendered without additional support, or it has no shader
+ const quake3::IShader *shader = mesh->getShader(shaderIndex);
+ if (0 == shader)
+ {
+ continue;
+ }
+
+ // we can dump the shader to the console in its
+ // original but already parsed layout in a pretty
+ // printers way.. commented out, because the console
+ // would be full...
+ // quake3::dumpShader ( Shader );
+
+ node = smgr->addQuake3SceneNode(meshBuffer, shader);
+
+#ifdef SHOW_SHADER_NAME
+ count += 1;
+ core::stringw name( node->getName() );
+ node = smgr->addBillboardTextSceneNode(
+ font, name.c_str(), node,
+ core::dimension2d<f32>(80.0f, 8.0f),
+ core::vector3df(0, 10, 0));
+#endif
+ }
+ }
+
+ /*
+ Now we only need a Camera to look at the Quake 3 map. And we want to
+ create a user controlled camera. There are some different cameras
+ available in the Irrlicht engine. For example the Maya Camera which can
+ be controlled comparable to the camera in Maya: Rotate with left mouse
+ button pressed, Zoom with both buttons pressed, translate with right
+ mouse button pressed. This could be created with
+ addCameraSceneNodeMaya(). But for this example, we want to create a
+ camera which behaves like the ones in first person shooter games (FPS).
+ */
+
+ scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS();
+
+ /*
+ so we need a good starting Position in the level.
+ we can ask the Quake3 Loader for all entities with class_name
+ "info_player_deathmatch"
+ we choose a random launch
+ */
+ if ( mesh )
+ {
+ quake3::tQ3EntityList &entityList = mesh->getEntityList();
+
+ quake3::IEntity search;
+ search.name = "info_player_deathmatch";
+
+ s32 index = entityList.binary_search(search);
+ if (index >= 0)
+ {
+ s32 notEndList;
+ do
+ {
+ const quake3::SVarGroup *group = entityList[index].getGroup(1);
+
+ u32 parsepos = 0;
+ const core::vector3df pos =
+ quake3::getAsVector3df(group->get("origin"), parsepos);
+
+ parsepos = 0;
+ const f32 angle = quake3::getAsFloat(group->get("angle"), parsepos);
+
+ core::vector3df target(0.f, 0.f, 1.f);
+ target.rotateXZBy(angle);
+
+ camera->setPosition(pos);
+ camera->setTarget(pos + target);
+
+ ++index;
+/*
+ notEndList = ( index < (s32) entityList.size () &&
+ entityList[index].name == search.name &&
+ (device->getTimer()->getRealTime() >> 3 ) & 1
+ );
+*/
+ notEndList = index == 2;
+ } while ( notEndList );
+ }
+ }
+
+ /*
+ The mouse cursor needs not to be visible, so we make it invisible.
+ */
+
+ device->getCursorControl()->setVisible(false);
+
+ // load the engine logo
+ gui->addImage(driver->getTexture("irrlichtlogo2.png"),
+ core::position2d<s32>(10, 10));
+
+ // show the driver logo
+ const core::position2di pos(videoDim.Width - 128, videoDim.Height - 64);
+
+ switch ( driverType )
+ {
+ case video::EDT_BURNINGSVIDEO:
+ gui->addImage(driver->getTexture("burninglogo.png"), pos);
+ break;
+ case video::EDT_OPENGL:
+ gui->addImage(driver->getTexture("opengllogo.png"), pos);
+ break;
+ case video::EDT_DIRECT3D8:
+ case video::EDT_DIRECT3D9:
+ gui->addImage(driver->getTexture("directxlogo.png"), pos);
+ break;
+ }
+
+ /*
+ We have done everything, so lets draw it. We also write the current
+ frames per second and the drawn primitives to the caption of the
+ window. The 'if (device->isWindowActive())' line is optional, but
+ prevents the engine render to set the position of the mouse cursor
+ after task switching when other program are active.
+ */
+ int lastFPS = -1;
+
+ while(device->run())
+ if (device->isWindowActive())
+ {
+ driver->beginScene(true, true, video::SColor(255,20,20,40));
+ smgr->drawAll();
+ gui->drawAll();
+ driver->endScene();
+
+ int fps = driver->getFPS();
+ //if (lastFPS != fps)
+ {
+ io::IAttributes * const attr = smgr->getParameters();
+ core::stringw str = L"Q3 [";
+ str += driver->getName();
+ str += "] FPS:";
+ str += fps;
+#ifdef _IRR_SCENEMANAGER_DEBUG
+ str += " Cull:";
+ str += attr->getAttributeAsInt("calls");
+ str += "/";
+ str += attr->getAttributeAsInt("culled");
+ str += " Draw: ";
+ str += attr->getAttributeAsInt("drawn_solid");
+ str += "/";
+ str += attr->getAttributeAsInt("drawn_transparent");
+ str += "/";
+ str += attr->getAttributeAsInt("drawn_transparent_effect");
+#endif
+ device->setWindowCaption(str.c_str());
+ lastFPS = fps;
+ }
+ }
+
+ /*
+ In the end, delete the Irrlicht device.
+ */
+ device->drop();
+
+ return 0;
+}
+
+/*
+**/
diff --git a/examples/16.Quake3MapShader/tutorial.html b/examples/16.Quake3MapShader/tutorial.html new file mode 100644 index 0000000..5198340 --- /dev/null +++ b/examples/16.Quake3MapShader/tutorial.html @@ -0,0 +1,206 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 16: Quake3 Map Shader Support</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 16: Quake3 Map Shader Support </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/016shot.jpg" alt="016shot.jpg"/> +</div> + <p>This Tutorial shows how to load a Quake 3 map into the engine, create a SceneNode for optimizing the speed of rendering and how to create a user controlled camera.</p> +<p>Lets start like the HelloWorld example: We include the irrlicht header files and an additional file to be able to ask the user for a driver type using the console. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div></div><!-- fragment --><p> define which Quake3 Level should be loaded </p><div class="fragment"><div class="line"><span class="preprocessor">#define IRRLICHT_QUAKE3_ARENA</span></div><div class="line"><span class="comment">//#define ORIGINAL_QUAKE3_ARENA</span></div><div class="line"><span class="comment">//#define CUSTOM_QUAKE3_ARENA</span></div><div class="line"><span class="comment">//#define SHOW_SHADER_NAME</span></div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef ORIGINAL_QUAKE3_ARENA</span></div><div class="line"><span class="preprocessor"> #define QUAKE3_STORAGE_FORMAT addFolderFileArchive</span></div><div class="line"><span class="preprocessor"> #define QUAKE3_STORAGE_1 "/baseq3/"</span></div><div class="line"><span class="preprocessor"> #ifdef CUSTOM_QUAKE3_ARENA</span></div><div class="line"><span class="preprocessor"> #define QUAKE3_STORAGE_2 "/cf/"</span></div><div class="line"><span class="preprocessor"> #define QUAKE3_MAP_NAME "maps/cf.bsp"</span></div><div class="line"><span class="preprocessor"> #else</span></div><div class="line"><span class="preprocessor"> #define QUAKE3_MAP_NAME "maps/q3dm8.bsp"</span></div><div class="line"><span class="preprocessor"> #endif</span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef IRRLICHT_QUAKE3_ARENA</span></div><div class="line"><span class="preprocessor"> #define QUAKE3_STORAGE_FORMAT addFileArchive</span></div><div class="line"><span class="preprocessor"> #define QUAKE3_STORAGE_1 "../../media/map-20kdm2.pk3"</span></div><div class="line"><span class="preprocessor"> #define QUAKE3_MAP_NAME "maps/20kdm2.bsp"</span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"><span class="keyword">using namespace </span>scene;</div></div><!-- fragment --><p> Again, to be able to use the Irrlicht.DLL file, we need to link with the Irrlicht.lib. We could set this option in the project settings, but to make it easy, we use a pragma comment lib: </p><div class="fragment"><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> A class to produce a series of screenshots </p><div class="fragment"><div class="line"><span class="keyword">class </span>CScreenShotFactory : <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"></div><div class="line"> CScreenShotFactory( IrrlichtDevice *device, <span class="keyword">const</span> c8 * templateName, ISceneNode* node )</div><div class="line"> : Device(device), Number(0), FilenameTemplate(templateName), Node(node)</div><div class="line"> {</div><div class="line"> FilenameTemplate.replace ( <span class="charliteral">'/'</span>, <span class="charliteral">'_'</span> );</div><div class="line"> FilenameTemplate.replace ( <span class="charliteral">'\\'</span>, <span class="charliteral">'_'</span> );</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent& event)</div><div class="line"> {</div><div class="line"> <span class="comment">// check if user presses the key F9</span></div><div class="line"> <span class="keywordflow">if</span> ((event.EventType == EET_KEY_INPUT_EVENT) &&</div><div class="line"> event.KeyInput.PressedDown)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (event.KeyInput.Key == KEY_F9)</div><div class="line"> {</div><div class="line"> video::IImage* image = Device->getVideoDriver()->createScreenShot();</div><div class="line"> <span class="keywordflow">if</span> (image)</div><div class="line"> {</div><div class="line"> c8 buf[256];</div><div class="line"> snprintf(buf, 256, <span class="stringliteral">"%s_shot%04d.jpg"</span>,</div><div class="line"> FilenameTemplate.c_str(),</div><div class="line"> ++Number);</div><div class="line"> Device->getVideoDriver()->writeImageToFile(image, buf, 85 );</div><div class="line"> image->drop();</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> (event.KeyInput.Key == KEY_F8)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (Node->isDebugDataVisible())</div><div class="line"> Node->setDebugDataVisible(scene::EDS_OFF);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> Node->setDebugDataVisible(scene::EDS_BBOX_ALL);</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"> IrrlichtDevice *Device;</div><div class="line"> u32 Number;</div><div class="line"> core::stringc FilenameTemplate;</div><div class="line"> ISceneNode* Node;</div><div class="line">};</div></div><!-- fragment --><p> Ok, lets start. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> IRRCALLCONV main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>* argv[])</div><div class="line">{</div></div><!-- fragment --><p> Like in the HelloWorld example, we create an IrrlichtDevice with createDevice(). The difference now is that we ask the user to select which hardware accelerated driver to use. The Software device would be too slow to draw a huge Quake 3 map, but just for the fun of it, we make this decision possible too. </p><div class="fragment"><div class="line"><span class="comment">// ask user for driver</span></div><div class="line">video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"><span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"><span class="comment">// create device and exit if creation failed</span></div><div class="line"><span class="keyword">const</span> core::dimension2du videoDim(800,600);</div><div class="line"></div><div class="line">IrrlichtDevice *device = createDevice(driverType, videoDim, 32, <span class="keyword">false</span> );</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div><div class="line"></div><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span>* mapname=0;</div><div class="line"><span class="keywordflow">if</span> (argc>2)</div><div class="line"> mapname = argv[2];</div><div class="line"><span class="keywordflow">else</span></div><div class="line"> mapname = QUAKE3_MAP_NAME;</div></div><!-- fragment --><p> Get a pointer to the video driver and the SceneManager so that we do not always have to write device->getVideoDriver() and device->getSceneManager(). </p><div class="fragment"><div class="line">video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line">scene::ISceneManager* smgr = device->getSceneManager();</div><div class="line">gui::IGUIEnvironment* gui = device->getGUIEnvironment();</div><div class="line"></div><div class="line">device->getFileSystem()->addFileArchive(<span class="stringliteral">"../../media/"</span>);</div></div><!-- fragment --><p> To display the Quake 3 map, we first need to load it. Quake 3 maps are packed into .pk3 files, which are nothing other than .zip files. So we add the .pk3 file to our FileSystem. After it was added, we are able to read from the files in that archive as they would directly be stored on disk. </p><div class="fragment"><div class="line"> <span class="keywordflow">if</span> (argc>2)</div><div class="line"> device->getFileSystem()->QUAKE3_STORAGE_FORMAT(argv[1]);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> device->getFileSystem()->QUAKE3_STORAGE_FORMAT(QUAKE3_STORAGE_1);</div><div class="line"><span class="preprocessor">#ifdef QUAKE3_STORAGE_2</span></div><div class="line"> device->getFileSystem()->QUAKE3_STORAGE_FORMAT(QUAKE3_STORAGE_2);</div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"> <span class="comment">// Quake3 Shader controls Z-Writing</span></div><div class="line"> smgr->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, <span class="keyword">true</span>);</div></div><!-- fragment --><p> Now we can load the mesh by calling getMesh(). We get a pointer returned to a IAnimatedMesh. As you know, Quake 3 maps are not really animated, they are only a huge chunk of static geometry with some materials attached. Hence the IAnimated mesh consists of only one frame, so we get the "first frame" of the "animation", which is our quake level and create an Octree scene node with it, using addOctreeSceneNode(). The Octree optimizes the scene a little bit, trying to draw only geometry which is currently visible. An alternative to the Octree would be a AnimatedMeshSceneNode, which would draw always the complete geometry of the mesh, without optimization. Try it out: Write addAnimatedMeshSceneNode instead of addOctreeSceneNode and compare the primitives drawn by the video driver. (There is a getPrimitiveCountDrawed() method in the IVideoDriver class). Note that this optimization with the Octree is only useful when drawing huge meshes consisting of lots of geometry. </p><div class="fragment"><div class="line">scene::IQ3LevelMesh* <span class="keyword">const</span> mesh =</div><div class="line"> (scene::IQ3LevelMesh*) smgr->getMesh(mapname);</div></div><!-- fragment --><p> add the geometry mesh to the Scene ( polygon & patches ) The Geometry mesh is optimised for faster drawing </p><div class="fragment"><div class="line">scene::ISceneNode* node = 0;</div><div class="line"><span class="keywordflow">if</span> (mesh)</div><div class="line">{</div><div class="line"> scene::IMesh * <span class="keyword">const</span> geometry = mesh->getMesh(quake3::E_Q3_MESH_GEOMETRY);</div><div class="line"> node = smgr->addOctreeSceneNode(geometry, 0, -1, 4096);</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// create an event receiver for making screenshots</span></div><div class="line">CScreenShotFactory screenshotFactory(device, mapname, node);</div><div class="line">device->setEventReceiver(&screenshotFactory);</div></div><!-- fragment --><p> now construct SceneNodes for each Shader The Objects are stored in the quake mesh scene::E_Q3_MESH_ITEMS and the Shader ID is stored in the MaterialParameters mostly dark looking skulls and moving lava.. or green flashing tubes? </p><div class="fragment"><div class="line"> <span class="keywordflow">if</span> ( mesh )</div><div class="line"> {</div><div class="line"> <span class="comment">// the additional mesh can be quite huge and is unoptimized</span></div><div class="line"> <span class="keyword">const</span> scene::IMesh * <span class="keyword">const</span> additional_mesh = mesh->getMesh(quake3::E_Q3_MESH_ITEMS);</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef SHOW_SHADER_NAME</span></div><div class="line"> gui::IGUIFont *font = device->getGUIEnvironment()->getFont(<span class="stringliteral">"../../media/fontlucida.png"</span>);</div><div class="line"> u32 count = 0;</div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"> <span class="keywordflow">for</span> ( u32 i = 0; i!= additional_mesh->getMeshBufferCount(); ++i )</div><div class="line"> {</div><div class="line"> <span class="keyword">const</span> IMeshBuffer* meshBuffer = additional_mesh->getMeshBuffer(i);</div><div class="line"> <span class="keyword">const</span> video::SMaterial& material = meshBuffer->getMaterial();</div><div class="line"></div><div class="line"> <span class="comment">// The ShaderIndex is stored in the material parameter</span></div><div class="line"> <span class="keyword">const</span> s32 shaderIndex = (s32) material.MaterialTypeParam2;</div><div class="line"></div><div class="line"> <span class="comment">// the meshbuffer can be rendered without additional support, or it has no shader</span></div><div class="line"> <span class="keyword">const</span> quake3::IShader *shader = mesh->getShader(shaderIndex);</div><div class="line"> <span class="keywordflow">if</span> (0 == shader)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">continue</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// we can dump the shader to the console in its</span></div><div class="line"> <span class="comment">// original but already parsed layout in a pretty</span></div><div class="line"> <span class="comment">// printers way.. commented out, because the console</span></div><div class="line"> <span class="comment">// would be full...</span></div><div class="line"> <span class="comment">// quake3::dumpShader ( Shader );</span></div><div class="line"></div><div class="line"> node = smgr->addQuake3SceneNode(meshBuffer, shader);</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef SHOW_SHADER_NAME</span></div><div class="line"> count += 1;</div><div class="line"> core::stringw name( node->getName() );</div><div class="line"> node = smgr->addBillboardTextSceneNode(</div><div class="line"> font, name.c_str(), node,</div><div class="line"> core::dimension2d<f32>(80.0f, 8.0f),</div><div class="line"> core::vector3df(0, 10, 0));</div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"> }</div><div class="line"> }</div></div><!-- fragment --><p> Now we only need a Camera to look at the Quake 3 map. And we want to create a user controlled camera. There are some different cameras available in the Irrlicht engine. For example the Maya Camera which can be controlled comparable to the camera in Maya: Rotate with left mouse button pressed, Zoom with both buttons pressed, translate with right mouse button pressed. This could be created with addCameraSceneNodeMaya(). But for this example, we want to create a camera which behaves like the ones in first person shooter games (FPS). </p><div class="fragment"><div class="line">scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS();</div></div><!-- fragment --><p> so we need a good starting Position in the level. we can ask the Quake3 Loader for all entities with class_name "info_player_deathmatch" we choose a random launch </p><div class="fragment"><div class="line"><span class="keywordflow">if</span> ( mesh )</div><div class="line">{</div><div class="line"> quake3::tQ3EntityList &entityList = mesh->getEntityList();</div><div class="line"></div><div class="line"> quake3::IEntity search;</div><div class="line"> search.name = <span class="stringliteral">"info_player_deathmatch"</span>;</div><div class="line"></div><div class="line"> s32 index = entityList.binary_search(search);</div><div class="line"> <span class="keywordflow">if</span> (index >= 0)</div><div class="line"> {</div><div class="line"> s32 notEndList;</div><div class="line"> <span class="keywordflow">do</span></div><div class="line"> {</div><div class="line"> <span class="keyword">const</span> quake3::SVarGroup *group = entityList[index].getGroup(1);</div><div class="line"></div><div class="line"> u32 parsepos = 0;</div><div class="line"> <span class="keyword">const</span> core::vector3df pos =</div><div class="line"> quake3::getAsVector3df(group->get(<span class="stringliteral">"origin"</span>), parsepos);</div><div class="line"></div><div class="line"> parsepos = 0;</div><div class="line"> <span class="keyword">const</span> f32 angle = quake3::getAsFloat(group->get(<span class="stringliteral">"angle"</span>), parsepos);</div><div class="line"></div><div class="line"> core::vector3df target(0.f, 0.f, 1.f);</div><div class="line"> target.rotateXZBy(angle);</div><div class="line"></div><div class="line"> camera->setPosition(pos);</div><div class="line"> camera->setTarget(pos + target);</div><div class="line"></div><div class="line"> ++index;</div></div><!-- fragment --><p> notEndList = ( index < (s32) entityList.size () && entityList[index].name == search.name && (device->getTimer()->getRealTime() >> 3 ) & 1 ); </p><div class="fragment"><div class="line"> notEndList = index == 2;</div><div class="line"> } <span class="keywordflow">while</span> ( notEndList );</div><div class="line"> }</div><div class="line">}</div></div><!-- fragment --><p> The mouse cursor needs not to be visible, so we make it invisible. </p><div class="fragment"><div class="line">device->getCursorControl()->setVisible(<span class="keyword">false</span>);</div><div class="line"></div><div class="line"><span class="comment">// load the engine logo</span></div><div class="line">gui->addImage(driver->getTexture(<span class="stringliteral">"irrlichtlogo2.png"</span>),</div><div class="line"> core::position2d<s32>(10, 10));</div><div class="line"></div><div class="line"><span class="comment">// show the driver logo</span></div><div class="line"><span class="keyword">const</span> core::position2di pos(videoDim.Width - 128, videoDim.Height - 64);</div><div class="line"></div><div class="line"><span class="keywordflow">switch</span> ( driverType )</div><div class="line">{</div><div class="line"> <span class="keywordflow">case</span> video::EDT_BURNINGSVIDEO:</div><div class="line"> gui->addImage(driver->getTexture(<span class="stringliteral">"burninglogo.png"</span>), pos);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> video::EDT_OPENGL:</div><div class="line"> gui->addImage(driver->getTexture(<span class="stringliteral">"opengllogo.png"</span>), pos);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> video::EDT_DIRECT3D8:</div><div class="line"> <span class="keywordflow">case</span> video::EDT_DIRECT3D9:</div><div class="line"> gui->addImage(driver->getTexture(<span class="stringliteral">"directxlogo.png"</span>), pos);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line">}</div></div><!-- fragment --><p> We have done everything, so lets draw it. We also write the current frames per second and the drawn primitives to the caption of the window. The 'if (device->isWindowActive())' line is optional, but prevents the engine render to set the position of the mouse cursor after task switching when other program are active. </p><div class="fragment"><div class="line"> <span class="keywordtype">int</span> lastFPS = -1;</div><div class="line"></div><div class="line"> <span class="keywordflow">while</span>(device->run())</div><div class="line"> <span class="keywordflow">if</span> (device->isWindowActive())</div><div class="line"> {</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, video::SColor(255,20,20,40));</div><div class="line"> smgr->drawAll();</div><div class="line"> gui->drawAll();</div><div class="line"> driver->endScene();</div><div class="line"></div><div class="line"> <span class="keywordtype">int</span> fps = driver->getFPS();</div><div class="line"> <span class="comment">//if (lastFPS != fps)</span></div><div class="line"> {</div><div class="line"> io::IAttributes * <span class="keyword">const</span> attr = smgr->getParameters();</div><div class="line"> core::stringw str = L<span class="stringliteral">"Q3 ["</span>;</div><div class="line"> str += driver->getName();</div><div class="line"> str += <span class="stringliteral">"] FPS:"</span>;</div><div class="line"> str += fps;</div><div class="line"><span class="preprocessor">#ifdef _IRR_SCENEMANAGER_DEBUG </span></div><div class="line"> str += <span class="stringliteral">" Cull:"</span>;</div><div class="line"> str += attr->getAttributeAsInt(<span class="stringliteral">"calls"</span>);</div><div class="line"> str += <span class="stringliteral">"/"</span>;</div><div class="line"> str += attr->getAttributeAsInt(<span class="stringliteral">"culled"</span>);</div><div class="line"> str += <span class="stringliteral">" Draw: "</span>;</div><div class="line"> str += attr->getAttributeAsInt(<span class="stringliteral">"drawn_solid"</span>);</div><div class="line"> str += <span class="stringliteral">"/"</span>;</div><div class="line"> str += attr->getAttributeAsInt(<span class="stringliteral">"drawn_transparent"</span>);</div><div class="line"> str += <span class="stringliteral">"/"</span>;</div><div class="line"> str += attr->getAttributeAsInt(<span class="stringliteral">"drawn_transparent_effect"</span>);</div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"> device->setWindowCaption(str.c_str());</div><div class="line"> lastFPS = fps;</div><div class="line"> }</div><div class="line"> }</div></div><!-- fragment --><p> In the end, delete the Irrlicht device. </p><div class="fragment"><div class="line"> device->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v8.vcproj b/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v8.vcproj new file mode 100644 index 0000000..be07354 --- /dev/null +++ b/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v8.vcproj @@ -0,0 +1,185 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="17.HelloWorld for Windows Mobile on PC"
+ ProjectGUID="{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}"
+ RootNamespace="My17HelloWorldforWindowsMobileonPC"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ 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;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\17.HelloWorld_Mobile on PC.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\17.HelloWorld_Mobile on PC.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v9.vcproj b/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v9.vcproj new file mode 100644 index 0000000..acdc249 --- /dev/null +++ b/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v9.vcproj @@ -0,0 +1,184 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="17.HelloWorld_Mobile_v9"
+ ProjectGUID="{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}"
+ RootNamespace="My17HelloWorldforWindowsMobileonPC"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ 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;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\17.HelloWorld_Mobile on PC.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\17.HelloWorld_Mobile on PC.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc10.vcxproj b/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc10.vcxproj new file mode 100644 index 0000000..0f04740 --- /dev/null +++ b/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc10.vcxproj @@ -0,0 +1,180 @@ +ďťż<?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">
+ <ProjectName>17.HelloWorld_Mobile</ProjectName>
+ <ProjectGuid>{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}</ProjectGuid>
+ <RootNamespace>My17HelloWorldforWindowsMobileonPC</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <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>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <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>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\17.HelloWorld_Mobile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\17.HelloWorld_Mobile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\17.HelloWorld_Mobile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\17.HelloWorld_Mobile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc11.vcxproj b/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc11.vcxproj new file mode 100644 index 0000000..0f04740 --- /dev/null +++ b/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc11.vcxproj @@ -0,0 +1,180 @@ +ďťż<?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">
+ <ProjectName>17.HelloWorld_Mobile</ProjectName>
+ <ProjectGuid>{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}</ProjectGuid>
+ <RootNamespace>My17HelloWorldforWindowsMobileonPC</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <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>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <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>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\17.HelloWorld_Mobile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\17.HelloWorld_Mobile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\17.HelloWorld_Mobile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\17.HelloWorld_Mobile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc12.vcxproj b/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc12.vcxproj new file mode 100644 index 0000000..30079f8 --- /dev/null +++ b/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc12.vcxproj @@ -0,0 +1,180 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>17.HelloWorld_Mobile</ProjectName>
+ <ProjectGuid>{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}</ProjectGuid>
+ <RootNamespace>My17HelloWorldforWindowsMobileonPC</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <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>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <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>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\17.HelloWorld_Mobile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\17.HelloWorld_Mobile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\17.HelloWorld_Mobile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\17.HelloWorld_Mobile.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/17.HelloWorld_Mobile/HelloWorld_mobile.sln b/examples/17.HelloWorld_Mobile/HelloWorld_mobile.sln new file mode 100644 index 0000000..31932b7 --- /dev/null +++ b/examples/17.HelloWorld_Mobile/HelloWorld_mobile.sln @@ -0,0 +1,33 @@ +ďťż
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld_mobile", "HelloWorld_mobile.vcproj", "{AD95D5D7-91D2-4030-B28D-23A6FE5C0359}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\..\source\Irrlicht\Irrlicht_mobile6.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Windows Mobile 6 Professional SDK (ARMV4I) = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
+ Release|Windows Mobile 6 Professional SDK (ARMV4I) = Release|Windows Mobile 6 Professional SDK (ARMV4I)
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
+ {AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
+ {AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
+ {AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)
+ {AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
+ {AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/examples/17.HelloWorld_Mobile/HelloWorld_mobile.vcproj b/examples/17.HelloWorld_Mobile/HelloWorld_mobile.vcproj new file mode 100644 index 0000000..dcaca9e --- /dev/null +++ b/examples/17.HelloWorld_Mobile/HelloWorld_mobile.vcproj @@ -0,0 +1,198 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="17.HelloWorld_mobile"
+ ProjectGUID="{AD95D5D7-91D2-4030-B28D-23A6FE5C0359}"
+ RootNamespace="17.HelloWorld_mobile"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Windows Mobile 6 Professional SDK (ARMV4I)"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
+ OutputDirectory="..\..\bin\WinCE-visualstudio\"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"
+ MinimalRebuild="true"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ EnableFloatingPointEmulation="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES)"
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions=" /subsystem:windowsce,5.02"
+ OutputFile="$(OutDir)\17.HelloWorld_mobile.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\lib\WinCE-visualstudio\"
+ DelayLoadDLLs="$(NOINHERIT)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/HelloWorld_mobile.pdb"
+ SubSystem="0"
+ StackReserveSize="65536"
+ StackCommitSize="4096"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory="%CSIDL_PROGRAM_FILES%\irrlicht\bin\wince-visualstudio"
+ RegisterOutput="0"
+ AdditionalFiles="sydney.md2|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;sydney.bmp|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;ninja.b3d|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;nskinbl.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlichtlogo3.png|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;terrain-heightmap.bmp|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;terrain-texture.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;detailmap3.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlicht2_up.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlicht2_dn.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlicht2_lf.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlicht2_rt.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlicht2_ft.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlicht2_bk.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;skydome.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlicht.dll|$(InputDir)$(OutDir)|%CSIDL_PROGRAM_FILES%\irrlicht\bin\wince-visualstudio|0"
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
+ OutputDirectory="..\..\bin\WinCE-visualstudio\"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ Optimization="2"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="0"
+ EnableFloatingPointEmulation="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES)"
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions=" /subsystem:windowsce,5.02"
+ OutputFile="$(OutDir)\17.HelloWorld_mobile.exe"
+ LinkIncremental="0"
+ AdditionalLibraryDirectories="..\..\lib\WinCE-visualstudio\"
+ DelayLoadDLLs="$(NOINHERIT)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/HelloWorld_mobile.pdb"
+ SubSystem="0"
+ StackReserveSize="65536"
+ StackCommitSize="4096"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory="%CSIDL_PROGRAM_FILES%\irrlicht\bin\wince-visualstudio"
+ RegisterOutput="0"
+ AdditionalFiles="sydney.md2|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;sydney.bmp|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;ninja.b3d|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;nskinbl.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlichtlogo3.png|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;terrain-heightmap.bmp|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;terrain-texture.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;detailmap3.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlicht2_up.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlicht2_dn.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlicht2_lf.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlicht2_rt.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlicht2_ft.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlicht2_bk.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;skydome.jpg|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlicht.dll|$(InputDir)$(OutDir)|%CSIDL_PROGRAM_FILES%\irrlicht\bin\wince-visualstudio|0"
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/17.HelloWorld_Mobile/main.cpp b/examples/17.HelloWorld_Mobile/main.cpp new file mode 100644 index 0000000..4fc15cd --- /dev/null +++ b/examples/17.HelloWorld_Mobile/main.cpp @@ -0,0 +1,503 @@ +/** Example 017 Helloworld mobile
+ This example show Hello World for Windows mobile.
+ It compiles on other platform too. The only differences between the original
+ examples are. You need a GUI, because otherwise you can't quit the application.
+ You need a Filesystem, which is relative based to your executable.
+*/
+
+#include <irrlicht.h>
+
+#if defined ( _IRR_WINDOWS_ )
+ #include <windows.h>
+#endif
+
+using namespace irr;
+using namespace core;
+using namespace scene;
+using namespace video;
+using namespace io;
+using namespace gui;
+
+#pragma comment(lib, "Irrlicht.lib")
+
+class EventReceiver_basic : public IEventReceiver
+{
+private:
+ IrrlichtDevice *Device;
+public:
+ EventReceiver_basic ( IrrlichtDevice *device ): Device ( device ) {}
+
+ virtual bool OnEvent(const SEvent& event)
+ {
+ if (event.EventType == EET_GUI_EVENT)
+ {
+ s32 id = event.GUIEvent.Caller->getID();
+
+ switch(event.GUIEvent.EventType)
+ {
+ case EGET_BUTTON_CLICKED:
+ if (id == 2)
+ {
+ Device->closeDevice();
+ return true;
+ } break;
+ }
+ }
+
+ return false;
+ }
+};
+
+class CSampleSceneNode : public ISceneNode
+{
+ aabbox3d<f32> Box;
+ S3DVertex Vertices[4];
+ SMaterial Material;
+public:
+
+ CSampleSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id)
+ : ISceneNode(parent, mgr, id)
+ {
+ Material.Wireframe = false;
+ Material.Lighting = false;
+
+ Vertices[0] = S3DVertex(0,0,10, 1,1,0, SColor(255,0,255,255), 0, 1);
+ Vertices[1] = S3DVertex(10,0,-10, 1,0,0, SColor(255,255,0,255), 1, 1);
+ Vertices[2] = S3DVertex(0,20,0, 0,1,1, SColor(255,255,255,0), 1, 0);
+ Vertices[3] = S3DVertex(-10,0,-10, 0,0,1, SColor(255,0,255,0), 0, 0);
+ Box.reset(Vertices[0].Pos);
+ for (s32 i=1; i<4; ++i)
+ Box.addInternalPoint(Vertices[i].Pos);
+ }
+ virtual void OnRegisterSceneNode()
+ {
+ if (IsVisible)
+ SceneManager->registerNodeForRendering(this);
+
+ ISceneNode::OnRegisterSceneNode();
+ }
+
+ virtual void render()
+ {
+ u16 indices[] = { 0,2,3, 2,1,3, 1,0,3, 2,0,1 };
+ IVideoDriver* driver = SceneManager->getVideoDriver();
+
+ driver->setMaterial(Material);
+ driver->setTransform(ETS_WORLD, AbsoluteTransformation);
+ driver->drawIndexedTriangleList(&Vertices[0], 4, &indices[0], 4);
+ }
+
+ virtual const aabbox3d<f32>& getBoundingBox() const
+ {
+ return Box;
+ }
+
+ virtual u32 getMaterialCount()
+ {
+ return 1;
+ }
+
+ virtual SMaterial& getMaterial(u32 i)
+ {
+ return Material;
+ }
+};
+
+/*!
+ Startup a Windows Mobile Device
+*/
+IrrlichtDevice *startup()
+{
+ // both software and burnings video can be used
+ E_DRIVER_TYPE driverType = EDT_SOFTWARE; // EDT_BURNINGSVIDEO;
+
+ // create device
+ IrrlichtDevice *device = 0;
+
+#if defined (_IRR_USE_WINDOWS_CE_DEVICE_)
+ // set to standard mobile fullscreen 240x320
+ device = createDevice(driverType, dimension2d<u32>(240, 320), 16, true );
+#else
+ // on PC. use window mode
+ device = createDevice(driverType, dimension2d<u32>(240, 320), 16, false );
+#endif
+ if ( 0 == device )
+ return 0;
+
+ IVideoDriver* driver = device->getVideoDriver();
+ ISceneManager* smgr = device->getSceneManager();
+ IGUIEnvironment* guienv = device->getGUIEnvironment();
+
+ // set the filesystem relative to the executable
+#if defined (_IRR_WINDOWS_)
+ {
+ wchar_t buf[255];
+ GetModuleFileNameW ( 0, buf, 255 );
+
+ io::path base = buf;
+ base = base.subString ( 0, base.findLast ( '\\' ) + 1 );
+ device->getFileSystem()->addFileArchive ( base );
+ }
+#endif
+
+ IGUIStaticText *text = guienv->addStaticText(L"FPS: 25",
+ rect<s32>(140,15,200,30), false, false, 0, 100 );
+
+ guienv->addButton(core::rect<int>(200,10,238,30), 0, 2, L"Quit");
+
+ // add irrlicht logo
+ guienv->addImage(driver->getTexture("../../media/irrlichtlogo3.png"),
+ core::position2d<s32>(0,-2));
+ return device;
+}
+
+/*!
+*/
+int run ( IrrlichtDevice *device )
+{
+ while(device->run())
+ if (device->isWindowActive())
+ {
+ device->getVideoDriver()->beginScene(true, true, SColor(0,100,100,100));
+ device->getSceneManager()->drawAll();
+ device->getGUIEnvironment()->drawAll();
+ device->getVideoDriver()->endScene ();
+
+ IGUIElement *stat = device->getGUIEnvironment()->
+ getRootGUIElement()->getElementFromId ( 100 );
+ if ( stat )
+ {
+ stringw str = L"FPS: ";
+ str += (s32)device->getVideoDriver()->getFPS();
+
+ stat->setText ( str.c_str() );
+ }
+ }
+
+ device->drop();
+ return 0;
+}
+
+/*!
+*/
+int example_customscenenode()
+{
+ // create device
+ IrrlichtDevice *device = startup();
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ // create engine and camera
+ EventReceiver_basic receiver(device);
+ device->setEventReceiver(&receiver);
+
+ IVideoDriver* driver = device->getVideoDriver();
+ ISceneManager* smgr = device->getSceneManager();
+ IGUIEnvironment* guienv = device->getGUIEnvironment();
+
+
+ smgr->addCameraSceneNode(0, vector3df(0,-40,0), vector3df(0,0,0));
+
+ CSampleSceneNode *myNode =
+ new CSampleSceneNode(smgr->getRootSceneNode(), smgr, 666);
+
+ ISceneNodeAnimator* anim =
+ smgr->createRotationAnimator(vector3df(0.8f, 0, 0.8f));
+
+ if(anim)
+ {
+ myNode->addAnimator(anim);
+ anim->drop();
+ anim = 0; // As I shouldn't refer to it again, ensure that I can't
+ }
+
+ myNode->drop();
+ myNode = 0; // As I shouldn't refer to it again, ensure that I can't
+
+ return run ( device );
+}
+
+class EventReceiver_terrain : public IEventReceiver
+{
+public:
+
+ EventReceiver_terrain(IrrlichtDevice *device, scene::ISceneNode* terrain, scene::ISceneNode* skybox, scene::ISceneNode* skydome) :
+ Device ( device ), Terrain(terrain), Skybox(skybox), Skydome(skydome), showBox(true)
+ {
+ Skybox->setVisible(true);
+ Skydome->setVisible(false);
+ }
+
+ bool OnEvent(const SEvent& event)
+ {
+ if (event.EventType == EET_GUI_EVENT)
+ {
+ s32 id = event.GUIEvent.Caller->getID();
+
+ switch(event.GUIEvent.EventType)
+ {
+ case EGET_BUTTON_CLICKED:
+ if (id == 2)
+ {
+ Device->closeDevice();
+ return true;
+ } break;
+ }
+ }
+
+ // check if user presses the key 'W' or 'D'
+ if (event.EventType == irr::EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown)
+ {
+ switch (event.KeyInput.Key)
+ {
+ case irr::KEY_KEY_W: // switch wire frame mode
+ Terrain->setMaterialFlag(video::EMF_WIREFRAME,
+ !Terrain->getMaterial(0).Wireframe);
+ Terrain->setMaterialFlag(video::EMF_POINTCLOUD, false);
+ return true;
+ case irr::KEY_KEY_P: // switch wire frame mode
+ Terrain->setMaterialFlag(video::EMF_POINTCLOUD,
+ !Terrain->getMaterial(0).PointCloud);
+ Terrain->setMaterialFlag(video::EMF_WIREFRAME, false);
+ return true;
+ case irr::KEY_KEY_D: // toggle detail map
+ Terrain->setMaterialType(
+ Terrain->getMaterial(0).MaterialType == video::EMT_SOLID ?
+ video::EMT_DETAIL_MAP : video::EMT_SOLID);
+ return true;
+ case irr::KEY_KEY_S: // toggle skies
+ showBox=!showBox;
+ Skybox->setVisible(showBox);
+ Skydome->setVisible(!showBox);
+ return true;
+ default:
+ break;
+ }
+ }
+
+ return false;
+ }
+
+private:
+ IrrlichtDevice *Device;
+ scene::ISceneNode* Terrain;
+ scene::ISceneNode* Skybox;
+ scene::ISceneNode* Skydome;
+ bool showBox;
+};
+
+
+/*
+The start of the main function starts like in most other example. We ask the user
+for the desired renderer and start it up. This time with the advanced parameter handling.
+*/
+int example_terrain()
+{
+ // create device
+ IrrlichtDevice *device = startup();
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ /*
+ First, we add standard stuff to the scene: A nice irrlicht engine
+ logo, a small help text, a user controlled camera, and we disable
+ the mouse cursor.
+ */
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* smgr = device->getSceneManager();
+ gui::IGUIEnvironment* env = device->getGUIEnvironment();
+
+
+ //set other font
+ //env->getSkin()->setFont(env->getFont("../../media/fontlucida.png"));
+
+ // add some help text
+ env->addStaticText(
+ L"Press 'W' to change wireframe mode\nPress 'D' to toggle detail map\nPress 'S' to toggle skybox/skydome",
+ core::rect<s32>(5,250,235,320), true, true, 0, -1, true);
+
+ // add camera
+ scene::ICameraSceneNode* camera =
+ smgr->addCameraSceneNodeFPS(0,100.0f,1.2f);
+
+ camera->setPosition(core::vector3df(2700*2,255*2,2600*2));
+ camera->setTarget(core::vector3df(2397*2,343*2,2700*2));
+ camera->setFarValue(42000.0f);
+
+ // disable mouse cursor
+ device->getCursorControl()->setVisible(false);
+
+ /*
+ Here comes the terrain renderer scene node: We add it just like any
+ other scene node to the scene using
+ ISceneManager::addTerrainSceneNode(). The only parameter we use is a
+ file name to the heightmap we use. A heightmap is simply a gray scale
+ texture. The terrain renderer loads it and creates the 3D terrain from
+ it.
+
+ To make the terrain look more big, we change the scale factor of
+ it to (40, 4.4, 40). Because we don't have any dynamic lights in the
+ scene, we switch off the lighting, and we set the file
+ terrain-texture.jpg as texture for the terrain and detailmap3.jpg as
+ second texture, called detail map. At last, we set the scale values for
+ the texture: The first texture will be repeated only one time over the
+ whole terrain, and the second one (detail map) 20 times.
+ */
+
+ // add terrain scene node
+ scene::ITerrainSceneNode* terrain = smgr->addTerrainSceneNode(
+ "../../media/terrain-heightmap.bmp",
+ 0, // parent node
+ -1, // node id
+ core::vector3df(0.f, 0.f, 0.f), // position
+ core::vector3df(0.f, 0.f, 0.f), // rotation
+ core::vector3df(40.f, 4.4f, 40.f), // scale
+ video::SColor ( 255, 255, 255, 255 ), // vertexColor
+ 5, // maxLOD
+ scene::ETPS_17, // patchSize
+ 4 // smoothFactor
+ );
+
+ if ( terrain )
+ {
+ terrain->setMaterialFlag(video::EMF_LIGHTING, false);
+
+ terrain->setMaterialTexture(0,
+ driver->getTexture("../../media/terrain-texture.jpg"));
+ terrain->setMaterialTexture(1,
+ driver->getTexture("../../media/detailmap3.jpg"));
+
+ terrain->setMaterialType(video::EMT_DETAIL_MAP);
+
+ terrain->scaleTexture(1.0f, 20.0f);
+ //terrain->setDebugDataVisible ( true );
+
+ /*
+ To be able to do collision with the terrain, we create a triangle selector.
+ If you want to know what triangle selectors do, just take a look into the
+ collision tutorial. The terrain triangle selector works together with the
+ terrain. To demonstrate this, we create a collision response animator
+ and attach it to the camera, so that the camera will not be able to fly
+ through the terrain.
+ */
+
+ // create triangle selector for the terrain
+ scene::ITriangleSelector* selector
+ = smgr->createTerrainTriangleSelector(terrain, 0);
+ terrain->setTriangleSelector(selector);
+
+ // create collision response animator and attach it to the camera
+ scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
+ selector, camera, core::vector3df(60,100,60),
+ core::vector3df(0,0,0),
+ core::vector3df(0,50,0));
+ selector->drop();
+ camera->addAnimator(anim);
+ anim->drop();
+
+ /* If you need access to the terrain data you can also do this directly via the following code fragment.
+ */
+ scene::CDynamicMeshBuffer* buffer = new scene::CDynamicMeshBuffer(video::EVT_2TCOORDS, video::EIT_16BIT);
+ terrain->getMeshBufferForLOD(*buffer, 0);
+ video::S3DVertex2TCoords* data = (video::S3DVertex2TCoords*)buffer->getVertexBuffer().getData();
+ // Work on data or get the IndexBuffer with a similar call.
+ buffer->drop(); // When done drop the buffer again.
+ }
+
+ /*
+ To make the user be able to switch between normal and wireframe mode,
+ we create an instance of the event receiver from above and let Irrlicht
+ know about it. In addition, we add the skybox which we already used in
+ lots of Irrlicht examples and a skydome, which is shown mutually
+ exclusive with the skybox by pressing 'S'.
+ */
+
+ // create skybox and skydome
+ driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
+
+ scene::ISceneNode* skybox=smgr->addSkyBoxSceneNode(
+ driver->getTexture("../../media/irrlicht2_up.jpg"),
+ driver->getTexture("../../media/irrlicht2_dn.jpg"),
+ driver->getTexture("../../media/irrlicht2_lf.jpg"),
+ driver->getTexture("../../media/irrlicht2_rt.jpg"),
+ driver->getTexture("../../media/irrlicht2_ft.jpg"),
+ driver->getTexture("../../media/irrlicht2_bk.jpg"));
+ scene::ISceneNode* skydome=smgr->addSkyDomeSceneNode(driver->getTexture("../../media/skydome.jpg"),16,8,0.95f,2.0f);
+
+ driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true);
+
+ // create event receiver
+ EventReceiver_terrain receiver( device, terrain, skybox, skydome);
+ device->setEventReceiver(&receiver);
+
+ return run ( device );
+}
+
+/*
+*/
+int example_helloworld()
+{
+ // create device
+ IrrlichtDevice *device = startup();
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ IVideoDriver* driver = device->getVideoDriver();
+ ISceneManager* smgr = device->getSceneManager();
+ IGUIEnvironment* guienv = device->getGUIEnvironment();
+
+ IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
+ if (!mesh)
+ {
+ device->drop();
+ return 1;
+ }
+ IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
+
+ /*
+ To let the mesh look a little bit nicer, we change its material. We
+ disable lighting because we do not have a dynamic light in here, and
+ the mesh would be totally black otherwise. Then we set the frame loop,
+ such that the predefined STAND animation is used. And last, we apply a
+ texture to the mesh. Without it the mesh would be drawn using only a
+ color.
+ */
+ if (node)
+ {
+ node->setMaterialFlag(EMF_LIGHTING, false);
+ node->setMD2Animation(scene::EMAT_STAND);
+ node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") );
+ }
+
+ /*
+ To look at the mesh, we place a camera into 3d space at the position
+ (0, 30, -40). The camera looks from there to (0,5,0), which is
+ approximately the place where our md2 model is.
+ */
+ smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));
+
+ EventReceiver_basic receiver(device);
+ device->setEventReceiver(&receiver);
+
+ return run ( device );
+
+}
+
+#if defined (_IRR_USE_WINDOWS_CE_DEVICE_)
+ #pragma comment(linker, "/subsystem:WINDOWSCE /ENTRY:main")
+#elif defined (_IRR_WINDOWS_)
+ #pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
+#endif
+
+/*
+*/
+int main()
+{
+ example_helloworld ();
+ example_customscenenode();
+ //example_terrain();
+}
+
+/*
+**/
diff --git a/examples/17.HelloWorld_Mobile/tutorial.html b/examples/17.HelloWorld_Mobile/tutorial.html new file mode 100644 index 0000000..e7f7f94 --- /dev/null +++ b/examples/17.HelloWorld_Mobile/tutorial.html @@ -0,0 +1,206 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 17: Helloworld mobile</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 17: Helloworld mobile </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/017shot.jpg" alt="017shot.jpg"/> +</div> + This example show Hello World for Windows mobile. It compiles on other platform too. The only differences between the original examples are. You need a GUI, because otherwise you can't quit the application. You need a Filesystem, which is relative based to your executable. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"></div><div class="line"><span class="preprocessor">#if defined ( _IRR_WINDOWS_ )</span></div><div class="line"><span class="preprocessor"> #include <windows.h></span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"><span class="keyword">using namespace </span>core;</div><div class="line"><span class="keyword">using namespace </span>scene;</div><div class="line"><span class="keyword">using namespace </span>video;</div><div class="line"><span class="keyword">using namespace </span>io;</div><div class="line"><span class="keyword">using namespace </span>gui;</div><div class="line"></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"></div><div class="line"><span class="keyword">class </span>EventReceiver_basic : <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"><span class="keyword">private</span>:</div><div class="line"> IrrlichtDevice *Device;</div><div class="line"><span class="keyword">public</span>:</div><div class="line"> EventReceiver_basic ( IrrlichtDevice *device ): Device ( device ) {}</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent& event)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (event.EventType == EET_GUI_EVENT)</div><div class="line"> {</div><div class="line"> s32 <span class="keywordtype">id</span> = <span class="keyword">event</span>.GUIEvent.Caller->getID();</div><div class="line"></div><div class="line"> <span class="keywordflow">switch</span>(event.GUIEvent.EventType)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> EGET_BUTTON_CLICKED:</div><div class="line"> <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == 2)</div><div class="line"> {</div><div class="line"> Device->closeDevice();</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> } <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line">};</div><div class="line"></div><div class="line"><span class="keyword">class </span>CSampleSceneNode : <span class="keyword">public</span> ISceneNode</div><div class="line">{</div><div class="line"> aabbox3d<f32> Box;</div><div class="line"> S3DVertex Vertices[4];</div><div class="line"> SMaterial Material;</div><div class="line"><span class="keyword">public</span>:</div><div class="line"></div><div class="line"> CSampleSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 <span class="keywordtype">id</span>)</div><div class="line"> : ISceneNode(parent, mgr, id)</div><div class="line"> {</div><div class="line"> Material.Wireframe = <span class="keyword">false</span>;</div><div class="line"> Material.Lighting = <span class="keyword">false</span>;</div><div class="line"></div><div class="line"> Vertices[0] = S3DVertex(0,0,10, 1,1,0, SColor(255,0,255,255), 0, 1);</div><div class="line"> Vertices[1] = S3DVertex(10,0,-10, 1,0,0, SColor(255,255,0,255), 1, 1);</div><div class="line"> Vertices[2] = S3DVertex(0,20,0, 0,1,1, SColor(255,255,255,0), 1, 0);</div><div class="line"> Vertices[3] = S3DVertex(-10,0,-10, 0,0,1, SColor(255,0,255,0), 0, 0);</div><div class="line"> Box.reset(Vertices[0].Pos);</div><div class="line"> <span class="keywordflow">for</span> (s32 i=1; i<4; ++i)</div><div class="line"> Box.addInternalPoint(Vertices[i].Pos);</div><div class="line"> }</div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> OnRegisterSceneNode()</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (IsVisible)</div><div class="line"> SceneManager->registerNodeForRendering(<span class="keyword">this</span>);</div><div class="line"></div><div class="line"> ISceneNode::OnRegisterSceneNode();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> render()</div><div class="line"> {</div><div class="line"> u16 indices[] = { 0,2,3, 2,1,3, 1,0,3, 2,0,1 };</div><div class="line"> IVideoDriver* driver = SceneManager->getVideoDriver();</div><div class="line"></div><div class="line"> driver->setMaterial(Material);</div><div class="line"> driver->setTransform(ETS_WORLD, AbsoluteTransformation);</div><div class="line"> driver->drawIndexedTriangleList(&Vertices[0], 4, &indices[0], 4);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> <span class="keyword">const</span> aabbox3d<f32>& getBoundingBox()<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> <span class="keywordflow">return</span> Box;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> u32 getMaterialCount()</div><div class="line"> {</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> SMaterial& getMaterial(u32 i)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">return</span> Material;</div><div class="line"> } </div><div class="line">};</div></div><!-- fragment --><p> ! Startup a Windows Mobile Device </p><div class="fragment"><div class="line">IrrlichtDevice *startup()</div><div class="line">{</div><div class="line"> <span class="comment">// both software and burnings video can be used</span></div><div class="line"> E_DRIVER_TYPE driverType = EDT_SOFTWARE; <span class="comment">// EDT_BURNINGSVIDEO;</span></div><div class="line"></div><div class="line"> <span class="comment">// create device</span></div><div class="line"> IrrlichtDevice *device = 0;</div><div class="line"></div><div class="line"><span class="preprocessor">#if defined (_IRR_USE_WINDOWS_CE_DEVICE_)</span></div><div class="line"> <span class="comment">// set to standard mobile fullscreen 240x320</span></div><div class="line"> device = createDevice(driverType, dimension2d<u32>(240, 320), 16, <span class="keyword">true</span> );</div><div class="line"><span class="preprocessor">#else</span></div><div class="line"> <span class="comment">// on PC. use window mode</span></div><div class="line"> device = createDevice(driverType, dimension2d<u32>(240, 320), 16, <span class="keyword">false</span> );</div><div class="line"><span class="preprocessor">#endif </span></div><div class="line"> <span class="keywordflow">if</span> ( 0 == device )</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line"></div><div class="line"> IVideoDriver* driver = device->getVideoDriver();</div><div class="line"> ISceneManager* smgr = device->getSceneManager();</div><div class="line"> IGUIEnvironment* guienv = device->getGUIEnvironment();</div><div class="line"></div><div class="line"> <span class="comment">// set the filesystem relative to the executable</span></div><div class="line"><span class="preprocessor">#if defined (_IRR_WINDOWS_)</span></div><div class="line"> {</div><div class="line"> <span class="keywordtype">wchar_t</span> buf[255];</div><div class="line"> GetModuleFileNameW ( 0, buf, 255 );</div><div class="line"></div><div class="line"> io::path base = buf;</div><div class="line"> base = base.subString ( 0, base.findLast ( <span class="charliteral">'\\'</span> ) + 1 );</div><div class="line"> device->getFileSystem()->addFileArchive ( base );</div><div class="line"> }</div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"> IGUIStaticText *text = guienv->addStaticText(L<span class="stringliteral">"FPS: 25"</span>,</div><div class="line"> rect<s32>(140,15,200,30), <span class="keyword">false</span>, <span class="keyword">false</span>, 0, 100 );</div><div class="line"></div><div class="line"> guienv->addButton(core::rect<int>(200,10,238,30), 0, 2, L<span class="stringliteral">"Quit"</span>);</div><div class="line"></div><div class="line"> <span class="comment">// add irrlicht logo</span></div><div class="line"> guienv->addImage(driver->getTexture(<span class="stringliteral">"../../media/irrlichtlogo3.png"</span>),</div><div class="line"> core::position2d<s32>(0,-2));</div><div class="line"> <span class="keywordflow">return</span> device;</div><div class="line">}</div></div><!-- fragment --><p> ! </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> run ( IrrlichtDevice *device )</div><div class="line">{</div><div class="line"> <span class="keywordflow">while</span>(device->run())</div><div class="line"> <span class="keywordflow">if</span> (device->isWindowActive())</div><div class="line"> {</div><div class="line"> device->getVideoDriver()->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, SColor(0,100,100,100));</div><div class="line"> device->getSceneManager()->drawAll();</div><div class="line"> device->getGUIEnvironment()->drawAll();</div><div class="line"> device->getVideoDriver()->endScene ();</div><div class="line"></div><div class="line"> IGUIElement *stat = device->getGUIEnvironment()-></div><div class="line"> getRootGUIElement()->getElementFromId ( 100 );</div><div class="line"> <span class="keywordflow">if</span> ( stat )</div><div class="line"> {</div><div class="line"> stringw str = L<span class="stringliteral">"FPS: "</span>;</div><div class="line"> str += (s32)device->getVideoDriver()->getFPS();</div><div class="line"></div><div class="line"> stat->setText ( str.c_str() );</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> device->drop();</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --><p> ! </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> example_customscenenode()</div><div class="line">{</div><div class="line"> <span class="comment">// create device</span></div><div class="line"> IrrlichtDevice *device = startup();</div><div class="line"> <span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div><div class="line"></div><div class="line"> <span class="comment">// create engine and camera</span></div><div class="line"> EventReceiver_basic receiver(device);</div><div class="line"> device->setEventReceiver(&receiver);</div><div class="line"> </div><div class="line"> IVideoDriver* driver = device->getVideoDriver();</div><div class="line"> ISceneManager* smgr = device->getSceneManager();</div><div class="line"> IGUIEnvironment* guienv = device->getGUIEnvironment();</div><div class="line"></div><div class="line"></div><div class="line"> smgr->addCameraSceneNode(0, vector3df(0,-40,0), vector3df(0,0,0));</div><div class="line"></div><div class="line"> CSampleSceneNode *myNode = </div><div class="line"> <span class="keyword">new</span> CSampleSceneNode(smgr->getRootSceneNode(), smgr, 666);</div><div class="line"></div><div class="line"> ISceneNodeAnimator* anim = </div><div class="line"> smgr->createRotationAnimator(vector3df(0.8f, 0, 0.8f));</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span>(anim)</div><div class="line"> {</div><div class="line"> myNode->addAnimator(anim);</div><div class="line"> anim->drop();</div><div class="line"> anim = 0; <span class="comment">// As I shouldn't refer to it again, ensure that I can't</span></div><div class="line"> }</div><div class="line"></div><div class="line"> myNode->drop();</div><div class="line"> myNode = 0; <span class="comment">// As I shouldn't refer to it again, ensure that I can't</span></div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> run ( device );</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keyword">class </span>EventReceiver_terrain : <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"></div><div class="line"> EventReceiver_terrain(IrrlichtDevice *device, scene::ISceneNode* terrain, scene::ISceneNode* skybox, scene::ISceneNode* skydome) :</div><div class="line"> Device ( device ), Terrain(terrain), Skybox(skybox), Skydome(skydome), showBox(true)</div><div class="line"> {</div><div class="line"> Skybox->setVisible(<span class="keyword">true</span>);</div><div class="line"> Skydome->setVisible(<span class="keyword">false</span>);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent& event)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (event.EventType == EET_GUI_EVENT)</div><div class="line"> {</div><div class="line"> s32 <span class="keywordtype">id</span> = <span class="keyword">event</span>.GUIEvent.Caller->getID();</div><div class="line"></div><div class="line"> <span class="keywordflow">switch</span>(event.GUIEvent.EventType)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> EGET_BUTTON_CLICKED:</div><div class="line"> <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == 2)</div><div class="line"> {</div><div class="line"> Device->closeDevice();</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> } <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// check if user presses the key 'W' or 'D'</span></div><div class="line"> <span class="keywordflow">if</span> (event.EventType == irr::EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">switch</span> (event.KeyInput.Key)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> irr::KEY_KEY_W: <span class="comment">// switch wire frame mode</span></div><div class="line"> Terrain->setMaterialFlag(video::EMF_WIREFRAME,</div><div class="line"> !Terrain->getMaterial(0).Wireframe);</div><div class="line"> Terrain->setMaterialFlag(video::EMF_POINTCLOUD, <span class="keyword">false</span>);</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> <span class="keywordflow">case</span> irr::KEY_KEY_P: <span class="comment">// switch wire frame mode</span></div><div class="line"> Terrain->setMaterialFlag(video::EMF_POINTCLOUD,</div><div class="line"> !Terrain->getMaterial(0).PointCloud);</div><div class="line"> Terrain->setMaterialFlag(video::EMF_WIREFRAME, <span class="keyword">false</span>);</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> <span class="keywordflow">case</span> irr::KEY_KEY_D: <span class="comment">// toggle detail map</span></div><div class="line"> Terrain->setMaterialType(</div><div class="line"> Terrain->getMaterial(0).MaterialType == video::EMT_SOLID ?</div><div class="line"> video::EMT_DETAIL_MAP : video::EMT_SOLID);</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> <span class="keywordflow">case</span> irr::KEY_KEY_S: <span class="comment">// toggle skies</span></div><div class="line"> showBox=!showBox;</div><div class="line"> Skybox->setVisible(showBox);</div><div class="line"> Skydome->setVisible(!showBox);</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> <span class="keywordflow">default</span>:</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"> IrrlichtDevice *Device;</div><div class="line"> scene::ISceneNode* Terrain;</div><div class="line"> scene::ISceneNode* Skybox;</div><div class="line"> scene::ISceneNode* Skydome;</div><div class="line"> <span class="keywordtype">bool</span> showBox;</div><div class="line">};</div></div><!-- fragment --><p> The start of the main function starts like in most other example. We ask the user for the desired renderer and start it up. This time with the advanced parameter handling. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> example_terrain()</div><div class="line">{</div><div class="line"> <span class="comment">// create device</span></div><div class="line"> IrrlichtDevice *device = startup();</div><div class="line"> <span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div></div><!-- fragment --><p> First, we add standard stuff to the scene: A nice irrlicht engine logo, a small help text, a user controlled camera, and we disable the mouse cursor. </p><div class="fragment"><div class="line">video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line">scene::ISceneManager* smgr = device->getSceneManager();</div><div class="line">gui::IGUIEnvironment* env = device->getGUIEnvironment();</div><div class="line"></div><div class="line"></div><div class="line"><span class="comment">//set other font</span></div><div class="line"><span class="comment">//env->getSkin()->setFont(env->getFont("../../media/fontlucida.png"));</span></div><div class="line"></div><div class="line"><span class="comment">// add some help text</span></div><div class="line">env->addStaticText(</div><div class="line"> L<span class="stringliteral">"Press 'W' to change wireframe mode\nPress 'D' to toggle detail map\nPress 'S' to toggle skybox/skydome"</span>,</div><div class="line"> core::rect<s32>(5,250,235,320), <span class="keyword">true</span>, <span class="keyword">true</span>, 0, -1, <span class="keyword">true</span>);</div><div class="line"></div><div class="line"><span class="comment">// add camera</span></div><div class="line">scene::ICameraSceneNode* camera =</div><div class="line"> smgr->addCameraSceneNodeFPS(0,100.0f,1.2f);</div><div class="line"></div><div class="line">camera->setPosition(core::vector3df(2700*2,255*2,2600*2));</div><div class="line">camera->setTarget(core::vector3df(2397*2,343*2,2700*2));</div><div class="line">camera->setFarValue(42000.0f);</div><div class="line"></div><div class="line"><span class="comment">// disable mouse cursor</span></div><div class="line">device->getCursorControl()->setVisible(<span class="keyword">false</span>);</div></div><!-- fragment --><p> Here comes the terrain renderer scene node: We add it just like any other scene node to the scene using ISceneManager::addTerrainSceneNode(). The only parameter we use is a file name to the heightmap we use. A heightmap is simply a gray scale texture. The terrain renderer loads it and creates the 3D terrain from it.</p> +<p>To make the terrain look more big, we change the scale factor of it to (40, 4.4, 40). Because we don't have any dynamic lights in the scene, we switch off the lighting, and we set the file terrain-texture.jpg as texture for the terrain and detailmap3.jpg as second texture, called detail map. At last, we set the scale values for the texture: The first texture will be repeated only one time over the whole terrain, and the second one (detail map) 20 times. </p><div class="fragment"><div class="line"><span class="comment">// add terrain scene node</span></div><div class="line">scene::ITerrainSceneNode* terrain = smgr->addTerrainSceneNode(</div><div class="line"> <span class="stringliteral">"../../media/terrain-heightmap.bmp"</span>,</div><div class="line"> 0, <span class="comment">// parent node</span></div><div class="line"> -1, <span class="comment">// node id</span></div><div class="line"> core::vector3df(0.f, 0.f, 0.f), <span class="comment">// position</span></div><div class="line"> core::vector3df(0.f, 0.f, 0.f), <span class="comment">// rotation</span></div><div class="line"> core::vector3df(40.f, 4.4f, 40.f), <span class="comment">// scale</span></div><div class="line"> video::SColor ( 255, 255, 255, 255 ), <span class="comment">// vertexColor</span></div><div class="line"> 5, <span class="comment">// maxLOD</span></div><div class="line"> scene::ETPS_17, <span class="comment">// patchSize</span></div><div class="line"> 4 <span class="comment">// smoothFactor</span></div><div class="line"> );</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> ( terrain )</div><div class="line">{</div><div class="line"> terrain->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"></div><div class="line"> terrain->setMaterialTexture(0,</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/terrain-texture.jpg"</span>));</div><div class="line"> terrain->setMaterialTexture(1,</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/detailmap3.jpg"</span>));</div><div class="line"> </div><div class="line"> terrain->setMaterialType(video::EMT_DETAIL_MAP);</div><div class="line"></div><div class="line"> terrain->scaleTexture(1.0f, 20.0f);</div><div class="line"> <span class="comment">//terrain->setDebugDataVisible ( true );</span></div></div><!-- fragment --><p> To be able to do collision with the terrain, we create a triangle selector. If you want to know what triangle selectors do, just take a look into the collision tutorial. The terrain triangle selector works together with the terrain. To demonstrate this, we create a collision response animator and attach it to the camera, so that the camera will not be able to fly through the terrain. </p><div class="fragment"><div class="line"><span class="comment">// create triangle selector for the terrain </span></div><div class="line">scene::ITriangleSelector* selector</div><div class="line"> = smgr->createTerrainTriangleSelector(terrain, 0);</div><div class="line">terrain->setTriangleSelector(selector);</div><div class="line"></div><div class="line"><span class="comment">// create collision response animator and attach it to the camera</span></div><div class="line">scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(</div><div class="line"> selector, camera, core::vector3df(60,100,60),</div><div class="line"> core::vector3df(0,0,0),</div><div class="line"> core::vector3df(0,50,0));</div><div class="line">selector->drop();</div><div class="line">camera->addAnimator(anim);</div><div class="line">anim->drop();</div></div><!-- fragment --><p> If you need access to the terrain data you can also do this directly via the following code fragment. </p><div class="fragment"><div class="line"> scene::CDynamicMeshBuffer* buffer = <span class="keyword">new</span> scene::CDynamicMeshBuffer(video::EVT_2TCOORDS, video::EIT_16BIT);</div><div class="line"> terrain->getMeshBufferForLOD(*buffer, 0);</div><div class="line"> video::S3DVertex2TCoords* data = (video::S3DVertex2TCoords*)buffer->getVertexBuffer().getData();</div><div class="line"> <span class="comment">// Work on data or get the IndexBuffer with a similar call.</span></div><div class="line"> buffer->drop(); <span class="comment">// When done drop the buffer again.</span></div><div class="line">}</div></div><!-- fragment --><p> To make the user be able to switch between normal and wireframe mode, we create an instance of the event receiver from above and let Irrlicht know about it. In addition, we add the skybox which we already used in lots of Irrlicht examples and a skydome, which is shown mutually exclusive with the skybox by pressing 'S'. </p><div class="fragment"><div class="line"> <span class="comment">// create skybox and skydome</span></div><div class="line"> driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, <span class="keyword">false</span>);</div><div class="line"></div><div class="line"> scene::ISceneNode* skybox=smgr->addSkyBoxSceneNode(</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_up.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_dn.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_lf.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_rt.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_ft.jpg"</span>),</div><div class="line"> driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_bk.jpg"</span>));</div><div class="line"> scene::ISceneNode* skydome=smgr->addSkyDomeSceneNode(driver->getTexture(<span class="stringliteral">"../../media/skydome.jpg"</span>),16,8,0.95f,2.0f);</div><div class="line"></div><div class="line"> driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, <span class="keyword">true</span>);</div><div class="line"></div><div class="line"> <span class="comment">// create event receiver</span></div><div class="line"> EventReceiver_terrain receiver( device, terrain, skybox, skydome);</div><div class="line"> device->setEventReceiver(&receiver);</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> run ( device );</div><div class="line">}</div></div><!-- fragment --> <div class="fragment"><div class="line"><span class="keywordtype">int</span> example_helloworld()</div><div class="line">{</div><div class="line"> <span class="comment">// create device</span></div><div class="line"> IrrlichtDevice *device = startup();</div><div class="line"> <span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div><div class="line"></div><div class="line"> IVideoDriver* driver = device->getVideoDriver();</div><div class="line"> ISceneManager* smgr = device->getSceneManager();</div><div class="line"> IGUIEnvironment* guienv = device->getGUIEnvironment();</div><div class="line"></div><div class="line"> IAnimatedMesh* mesh = smgr->getMesh(<span class="stringliteral">"../../media/sydney.md2"</span>);</div><div class="line"> <span class="keywordflow">if</span> (!mesh)</div><div class="line"> {</div><div class="line"> device->drop();</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"> }</div><div class="line"> IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );</div></div><!-- fragment --><p> To let the mesh look a little bit nicer, we change its material. We disable lighting because we do not have a dynamic light in here, and the mesh would be totally black otherwise. Then we set the frame loop, such that the predefined STAND animation is used. And last, we apply a texture to the mesh. Without it the mesh would be drawn using only a color. </p><div class="fragment"><div class="line"><span class="keywordflow">if</span> (node)</div><div class="line">{</div><div class="line"> node->setMaterialFlag(EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"> node->setMD2Animation(scene::EMAT_STAND);</div><div class="line"> node->setMaterialTexture( 0, driver->getTexture(<span class="stringliteral">"../../media/sydney.bmp"</span>) );</div><div class="line">}</div></div><!-- fragment --><p> To look at the mesh, we place a camera into 3d space at the position (0, 30, -40). The camera looks from there to (0,5,0), which is approximately the place where our md2 model is. </p><div class="fragment"><div class="line"> smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));</div><div class="line"></div><div class="line"> EventReceiver_basic receiver(device);</div><div class="line"> device->setEventReceiver(&receiver);</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> run ( device );</div><div class="line"></div><div class="line">}</div><div class="line"></div><div class="line"><span class="preprocessor">#if defined (_IRR_USE_WINDOWS_CE_DEVICE_)</span></div><div class="line"><span class="preprocessor"> #pragma comment(linker, "/subsystem:WINDOWSCE /ENTRY:main") </span></div><div class="line"><span class="preprocessor">#elif defined (_IRR_WINDOWS_)</span></div><div class="line"><span class="preprocessor"> #pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")</span></div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --> <div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> example_helloworld ();</div><div class="line"> example_customscenenode();</div><div class="line"> <span class="comment">//example_terrain();</span></div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/18.SplitScreen/Makefile b/examples/18.SplitScreen/Makefile new file mode 100644 index 0000000..5ad6913 --- /dev/null +++ b/examples/18.SplitScreen/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 18.SplitScreen
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/18.SplitScreen/SplitScreen.cbp b/examples/18.SplitScreen/SplitScreen.cbp new file mode 100644 index 0000000..e1574a6 --- /dev/null +++ b/examples/18.SplitScreen/SplitScreen.cbp @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 18 Split Screen" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/SplitScreen" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/SplitScreen" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/18.SplitScreen/SplitScreen.dev b/examples/18.SplitScreen/SplitScreen.dev new file mode 100644 index 0000000..cd843c6 --- /dev/null +++ b/examples/18.SplitScreen/SplitScreen.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 18 SplitScreen
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=18.SplitScreen.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/18.SplitScreen/SplitScreen.vcproj b/examples/18.SplitScreen/SplitScreen.vcproj new file mode 100644 index 0000000..46cb6b7 --- /dev/null +++ b/examples/18.SplitScreen/SplitScreen.vcproj @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="18.SplitScreen"
+ ProjectGUID="{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\18.SplitScreen.exe"
+ LinkIncremental="0"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/SplitScreen.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/QIfist /Oa"
+ Optimization="3"
+ GlobalOptimizations="TRUE"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="TRUE"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="TRUE"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="4"
+ BufferSecurityCheck="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"
+ CallingConvention="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\18.SplitScreen.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="FALSE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/18.SplitScreen/SplitScreen_vc10.vcxproj b/examples/18.SplitScreen/SplitScreen_vc10.vcxproj new file mode 100644 index 0000000..e4707c5 --- /dev/null +++ b/examples/18.SplitScreen/SplitScreen_vc10.vcxproj @@ -0,0 +1,194 @@ +ďťż<?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">
+ <ProjectName>18.SplitScreen</ProjectName>
+ <ProjectGuid>{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}</ProjectGuid>
+ <RootNamespace>18.SplitScreen</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\18.SplitScreen.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)SplitScreen.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\18.SplitScreen.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)SplitScreen.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\18.SplitScreen.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\18.SplitScreen.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/18.SplitScreen/SplitScreen_vc11.vcxproj b/examples/18.SplitScreen/SplitScreen_vc11.vcxproj new file mode 100644 index 0000000..e4707c5 --- /dev/null +++ b/examples/18.SplitScreen/SplitScreen_vc11.vcxproj @@ -0,0 +1,194 @@ +ďťż<?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">
+ <ProjectName>18.SplitScreen</ProjectName>
+ <ProjectGuid>{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}</ProjectGuid>
+ <RootNamespace>18.SplitScreen</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\18.SplitScreen.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)SplitScreen.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\18.SplitScreen.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)SplitScreen.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\18.SplitScreen.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\18.SplitScreen.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/18.SplitScreen/SplitScreen_vc12.vcxproj b/examples/18.SplitScreen/SplitScreen_vc12.vcxproj new file mode 100644 index 0000000..1c6c62d --- /dev/null +++ b/examples/18.SplitScreen/SplitScreen_vc12.vcxproj @@ -0,0 +1,194 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>18.SplitScreen</ProjectName>
+ <ProjectGuid>{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}</ProjectGuid>
+ <RootNamespace>18.SplitScreen</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\18.SplitScreen.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)SplitScreen.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\18.SplitScreen.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)SplitScreen.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\18.SplitScreen.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\18.SplitScreen.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/18.SplitScreen/SplitScreen_vc8.vcproj b/examples/18.SplitScreen/SplitScreen_vc8.vcproj new file mode 100644 index 0000000..906b950 --- /dev/null +++ b/examples/18.SplitScreen/SplitScreen_vc8.vcproj @@ -0,0 +1,189 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="18.SplitScreen_vc8"
+ ProjectGUID="{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <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"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\18.SplitScreen.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/SplitScreen.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\18.SplitScreen.exe"
+ LinkIncremental="0"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/18.SplitScreen/SplitScreen_vc9.vcproj b/examples/18.SplitScreen/SplitScreen_vc9.vcproj new file mode 100644 index 0000000..86f6552 --- /dev/null +++ b/examples/18.SplitScreen/SplitScreen_vc9.vcproj @@ -0,0 +1,188 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="18.SplitScreen_vc9"
+ ProjectGUID="{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
+ RootNamespace="18.SplitScreen_vc9"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <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"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\18.SplitScreen.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/SplitScreen.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="0"
+ CallingConvention="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\18.SplitScreen.exe"
+ LinkIncremental="0"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/18.SplitScreen/main.cpp b/examples/18.SplitScreen/main.cpp new file mode 100644 index 0000000..32266c5 --- /dev/null +++ b/examples/18.SplitScreen/main.cpp @@ -0,0 +1,244 @@ +/** Example 018 Splitscreen
+
+A tutorial by Max Winkel.
+
+In this tutorial we'll learn how to use splitscreen (e.g. for racing-games)
+with Irrlicht. We'll create a viewport divided
+into 4 parts, with 3 fixed cameras and one user-controlled.
+
+Ok, let's start with the headers (I think there's
+nothing to say about it)
+*/
+
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+//Namespaces for the engine
+using namespace irr;
+using namespace core;
+using namespace video;
+using namespace scene;
+
+/*
+Now we'll define the resolution in a constant for use in
+initializing the device and setting up the viewport. In addition
+we set up a global variable saying splitscreen is active or not.
+*/
+//Resolution
+const int ResX=800;
+const int ResY=600;
+const bool fullScreen=false;
+
+//Use SplitScreen?
+bool SplitScreen=true;
+
+/*
+Now we need four pointers to our cameras which are created later:
+*/
+//cameras
+ICameraSceneNode *camera[4]={0,0,0,0};
+/*
+In our event-receiver we switch the SplitScreen-variable,
+whenever the user press the S-key. All other events are sent
+to the FPS camera.
+*/
+
+class MyEventReceiver : public IEventReceiver
+{
+ public:
+ virtual bool OnEvent(const SEvent& event)
+ {
+ //Key S enables/disables SplitScreen
+ if (event.EventType == irr::EET_KEY_INPUT_EVENT &&
+ event.KeyInput.Key == KEY_KEY_S && event.KeyInput.PressedDown)
+ {
+ SplitScreen = !SplitScreen;
+ return true;
+ }
+ //Send all other events to camera4
+ if (camera[3])
+ return camera[3]->OnEvent(event);
+ return false;
+ }
+};
+
+/*
+Ok, now the main-function:
+First, we initialize the device, get the SourceManager and
+VideoDriver, load an animated mesh from .md2 and a map from
+.pk3. Because that's old stuff, I won't explain every step.
+Just take care of the maps position.
+*/
+int main()
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ //Instance of the EventReceiver
+ MyEventReceiver receiver;
+
+ //Initialise the engine
+ IrrlichtDevice *device = createDevice(driverType,
+ dimension2du(ResX,ResY), 32, fullScreen,
+ false, false, &receiver);
+ if (!device)
+ return 1;
+
+ ISceneManager *smgr = device->getSceneManager();
+ IVideoDriver *driver = device->getVideoDriver();
+
+ //Load model
+ IAnimatedMesh *model = smgr->getMesh("../../media/sydney.md2");
+ if (!model)
+ return 1;
+ IAnimatedMeshSceneNode *model_node = smgr->addAnimatedMeshSceneNode(model);
+ //Load texture
+ if (model_node)
+ {
+ ITexture *texture = driver->getTexture("../../media/sydney.bmp");
+ model_node->setMaterialTexture(0,texture);
+ model_node->setMD2Animation(scene::EMAT_RUN);
+ //Disable lighting (we've got no light)
+ model_node->setMaterialFlag(EMF_LIGHTING,false);
+ }
+
+ //Load map
+ device->getFileSystem()->addFileArchive("../../media/map-20kdm2.pk3");
+ IAnimatedMesh *map = smgr->getMesh("20kdm2.bsp");
+ if (map)
+ {
+ ISceneNode *map_node = smgr->addOctreeSceneNode(map->getMesh(0));
+ //Set position
+ map_node->setPosition(vector3df(-850,-220,-850));
+ }
+
+/*
+Now we create our four cameras. One is looking at the model
+from the front, one from the top and one from the side. In
+addition there's a FPS-camera which can be controlled by the
+user.
+*/
+ // Create 3 fixed and one user-controlled cameras
+ //Front
+ camera[0] = smgr->addCameraSceneNode(0, vector3df(50,0,0), vector3df(0,0,0));
+ //Top
+ camera[1] = smgr->addCameraSceneNode(0, vector3df(0,50,0), vector3df(0,0,0));
+ //Left
+ camera[2] = smgr->addCameraSceneNode(0, vector3df(0,0,50), vector3df(0,0,0));
+ //User-controlled
+ camera[3] = smgr->addCameraSceneNodeFPS();
+ // don't start at sydney's position
+ if (camera[3])
+ camera[3]->setPosition(core::vector3df(-50,0,-50));
+
+/*
+Create a variable for counting the fps and hide the mouse:
+*/
+ //Hide mouse
+ device->getCursorControl()->setVisible(false);
+ //We want to count the fps
+ int lastFPS = -1;
+
+/*
+There wasn't much new stuff - till now!
+Only by defining four cameras, the game won't be splitscreen.
+To do this you need several steps:
+ - Set the viewport to the whole screen
+ - Begin a new scene (Clear screen)
+
+ - The following 3 steps are repeated for every viewport in the splitscreen
+ - Set the viewport to the area you wish
+ - Activate the camera which should be "linked" with the viewport
+ - Render all objects
+
+ - If you have a GUI:
+ - Set the viewport the whole screen
+ - Display the GUI
+ - End scene
+
+Sounds a little complicated, but you'll see it isn't:
+*/
+
+ while(device->run())
+ {
+ //Set the viewpoint to the whole screen and begin scene
+ driver->setViewPort(rect<s32>(0,0,ResX,ResY));
+ driver->beginScene(true,true,SColor(255,100,100,100));
+ //If SplitScreen is used
+ if (SplitScreen)
+ {
+ //Activate camera1
+ smgr->setActiveCamera(camera[0]);
+ //Set viewpoint to the first quarter (left top)
+ driver->setViewPort(rect<s32>(0,0,ResX/2,ResY/2));
+ //Draw scene
+ smgr->drawAll();
+ //Activate camera2
+ smgr->setActiveCamera(camera[1]);
+ //Set viewpoint to the second quarter (right top)
+ driver->setViewPort(rect<s32>(ResX/2,0,ResX,ResY/2));
+ //Draw scene
+ smgr->drawAll();
+ //Activate camera3
+ smgr->setActiveCamera(camera[2]);
+ //Set viewpoint to the third quarter (left bottom)
+ driver->setViewPort(rect<s32>(0,ResY/2,ResX/2,ResY));
+ //Draw scene
+ smgr->drawAll();
+ //Set viewport the last quarter (right bottom)
+ driver->setViewPort(rect<s32>(ResX/2,ResY/2,ResX,ResY));
+ }
+ //Activate camera4
+ smgr->setActiveCamera(camera[3]);
+ //Draw scene
+ smgr->drawAll();
+ driver->endScene();
+
+ /*
+ As you can probably see, the image is rendered for every
+ viewport separately. That means, that you'll loose much performance.
+ Ok, if you're asking "How do I have to set the viewport
+ to get this or that screen?", don't panic. It's really
+ easy: In the rect-function you define 4 coordinates:
+ - X-coordinate of the corner left top
+ - Y-coordinate of the corner left top
+ - X-coordinate of the corner right bottom
+ - Y-coordinate of the corner right bottom
+
+ That means, if you want to split the screen into 2 viewports
+ you would give the following coordinates:
+ - 1st viewport: 0,0,ResX/2,ResY
+ - 2nd viewport: ResX/2,0,ResX,ResY
+
+ If you didn't fully understand, just play around with the example
+ to check out what happens.
+
+ Now we just view the current fps and shut down the engine,
+ when the user wants to:
+ */
+ //Get and show fps
+ if (driver->getFPS() != lastFPS)
+ {
+ lastFPS = driver->getFPS();
+ core::stringw tmp = L"Irrlicht SplitScreen-Example (FPS: ";
+ tmp += lastFPS;
+ tmp += ")";
+ device->setWindowCaption(tmp.c_str());
+ }
+ }
+ //Delete device
+ device->drop();
+ return 0;
+}
+/*
+That's it! Just compile and play around with the program.
+Note: With the S-Key you can switch between using splitscreen
+and not.
+**/
+
diff --git a/examples/18.SplitScreen/tutorial.html b/examples/18.SplitScreen/tutorial.html new file mode 100644 index 0000000..4ddcdbd --- /dev/null +++ b/examples/18.SplitScreen/tutorial.html @@ -0,0 +1,236 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 18: Splitscreen</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 18: Splitscreen </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/018shot.jpg" alt="018shot.jpg"/> +</div> + <p>A tutorial by Max Winkel.</p> +<p>In this tutorial we'll learn how to use splitscreen (e.g. for racing-games) with Irrlicht. We'll create a viewport divided into 4 parts, with 3 fixed cameras and one user-controlled.</p> +<p>Ok, let's start with the headers (I think there's nothing to say about it) </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"><span class="comment">//Namespaces for the engine</span></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"><span class="keyword">using namespace </span>core;</div><div class="line"><span class="keyword">using namespace </span>video;</div><div class="line"><span class="keyword">using namespace </span>scene;</div></div><!-- fragment --><p> Now we'll define the resolution in a constant for use in initializing the device and setting up the viewport. In addition we set up a global variable saying splitscreen is active or not. </p><div class="fragment"><div class="line"><span class="comment">//Resolution</span></div><div class="line"><span class="keyword">const</span> <span class="keywordtype">int</span> ResX=800;</div><div class="line"><span class="keyword">const</span> <span class="keywordtype">int</span> ResY=600;</div><div class="line"><span class="keyword">const</span> <span class="keywordtype">bool</span> fullScreen=<span class="keyword">false</span>;</div><div class="line"></div><div class="line"><span class="comment">//Use SplitScreen?</span></div><div class="line"><span class="keywordtype">bool</span> SplitScreen=<span class="keyword">true</span>;</div></div><!-- fragment --><p> Now we need four pointers to our cameras which are created later: </p><div class="fragment"><div class="line"><span class="comment">//cameras</span></div><div class="line">ICameraSceneNode *camera[4]={0,0,0,0};</div></div><!-- fragment --><p> In our event-receiver we switch the SplitScreen-variable, whenever the user press the S-key. All other events are sent to the FPS camera. </p><div class="fragment"><div class="line"><span class="keyword">class </span>MyEventReceiver : <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"> <span class="keyword">public</span>:</div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent& event)</div><div class="line"> {</div><div class="line"> <span class="comment">//Key S enables/disables SplitScreen</span></div><div class="line"> <span class="keywordflow">if</span> (event.EventType == irr::EET_KEY_INPUT_EVENT &&</div><div class="line"> event.KeyInput.Key == KEY_KEY_S && event.KeyInput.PressedDown)</div><div class="line"> {</div><div class="line"> SplitScreen = !SplitScreen;</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"> <span class="comment">//Send all other events to camera4</span></div><div class="line"> <span class="keywordflow">if</span> (camera[3])</div><div class="line"> <span class="keywordflow">return</span> camera[3]->OnEvent(event);</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line">};</div></div><!-- fragment --><p> Ok, now the main-function: First, we initialize the device, get the SourceManager and VideoDriver, load an animated mesh from .md2 and a map from .pk3. Because that's old stuff, I won't explain every step. Just take care of the maps position. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> <span class="comment">//Instance of the EventReceiver</span></div><div class="line"> MyEventReceiver receiver;</div><div class="line"></div><div class="line"> <span class="comment">//Initialise the engine</span></div><div class="line"> IrrlichtDevice *device = createDevice(driverType,</div><div class="line"> dimension2du(ResX,ResY), 32, fullScreen,</div><div class="line"> <span class="keyword">false</span>, <span class="keyword">false</span>, &receiver);</div><div class="line"> <span class="keywordflow">if</span> (!device)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> ISceneManager *smgr = device->getSceneManager();</div><div class="line"> IVideoDriver *driver = device->getVideoDriver();</div><div class="line"></div><div class="line"> <span class="comment">//Load model</span></div><div class="line"> IAnimatedMesh *model = smgr->getMesh(<span class="stringliteral">"../../media/sydney.md2"</span>);</div><div class="line"> <span class="keywordflow">if</span> (!model)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"> IAnimatedMeshSceneNode *model_node = smgr->addAnimatedMeshSceneNode(model);</div><div class="line"> <span class="comment">//Load texture</span></div><div class="line"> <span class="keywordflow">if</span> (model_node)</div><div class="line"> {</div><div class="line"> ITexture *texture = driver->getTexture(<span class="stringliteral">"../../media/sydney.bmp"</span>);</div><div class="line"> model_node->setMaterialTexture(0,texture);</div><div class="line"> model_node->setMD2Animation(scene::EMAT_RUN);</div><div class="line"> <span class="comment">//Disable lighting (we've got no light)</span></div><div class="line"> model_node->setMaterialFlag(EMF_LIGHTING,<span class="keyword">false</span>);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">//Load map</span></div><div class="line"> device->getFileSystem()->addFileArchive(<span class="stringliteral">"../../media/map-20kdm2.pk3"</span>);</div><div class="line"> IAnimatedMesh *map = smgr->getMesh(<span class="stringliteral">"20kdm2.bsp"</span>);</div><div class="line"> <span class="keywordflow">if</span> (map)</div><div class="line"> {</div><div class="line"> ISceneNode *map_node = smgr->addOctreeSceneNode(map->getMesh(0));</div><div class="line"> <span class="comment">//Set position</span></div><div class="line"> map_node->setPosition(vector3df(-850,-220,-850));</div><div class="line"> }</div></div><!-- fragment --><p> Now we create our four cameras. One is looking at the model from the front, one from the top and one from the side. In addition there's a FPS-camera which can be controlled by the user. </p><div class="fragment"><div class="line"><span class="comment">// Create 3 fixed and one user-controlled cameras</span></div><div class="line"><span class="comment">//Front</span></div><div class="line">camera[0] = smgr->addCameraSceneNode(0, vector3df(50,0,0), vector3df(0,0,0));</div><div class="line"><span class="comment">//Top</span></div><div class="line">camera[1] = smgr->addCameraSceneNode(0, vector3df(0,50,0), vector3df(0,0,0));</div><div class="line"><span class="comment">//Left</span></div><div class="line">camera[2] = smgr->addCameraSceneNode(0, vector3df(0,0,50), vector3df(0,0,0));</div><div class="line"><span class="comment">//User-controlled</span></div><div class="line">camera[3] = smgr->addCameraSceneNodeFPS();</div><div class="line"><span class="comment">// don't start at sydney's position</span></div><div class="line"><span class="keywordflow">if</span> (camera[3])</div><div class="line"> camera[3]->setPosition(core::vector3df(-50,0,-50));</div></div><!-- fragment --><p> Create a variable for counting the fps and hide the mouse: </p><div class="fragment"><div class="line"><span class="comment">//Hide mouse</span></div><div class="line">device->getCursorControl()->setVisible(<span class="keyword">false</span>);</div><div class="line"><span class="comment">//We want to count the fps</span></div><div class="line"><span class="keywordtype">int</span> lastFPS = -1;</div></div><!-- fragment --><p> There wasn't much new stuff - till now! Only by defining four cameras, the game won't be splitscreen. To do this you need several steps:</p><ul> +<li>Set the viewport to the whole screen</li> +<li>Begin a new scene (Clear screen)</li> +<li>The following 3 steps are repeated for every viewport in the splitscreen<ul> +<li>Set the viewport to the area you wish</li> +<li>Activate the camera which should be "linked" with the viewport</li> +<li>Render all objects</li> +</ul> +</li> +<li>If you have a GUI:<ul> +<li>Set the viewport the whole screen</li> +<li>Display the GUI</li> +</ul> +</li> +<li>End scene</li> +</ul> +<p>Sounds a little complicated, but you'll see it isn't: </p><div class="fragment"><div class="line"><span class="keywordflow">while</span>(device->run())</div><div class="line">{</div><div class="line"> <span class="comment">//Set the viewpoint to the whole screen and begin scene</span></div><div class="line"> driver->setViewPort(rect<s32>(0,0,ResX,ResY));</div><div class="line"> driver->beginScene(<span class="keyword">true</span>,<span class="keyword">true</span>,SColor(255,100,100,100));</div><div class="line"> <span class="comment">//If SplitScreen is used</span></div><div class="line"> <span class="keywordflow">if</span> (SplitScreen)</div><div class="line"> {</div><div class="line"> <span class="comment">//Activate camera1</span></div><div class="line"> smgr->setActiveCamera(camera[0]);</div><div class="line"> <span class="comment">//Set viewpoint to the first quarter (left top)</span></div><div class="line"> driver->setViewPort(rect<s32>(0,0,ResX/2,ResY/2));</div><div class="line"> <span class="comment">//Draw scene</span></div><div class="line"> smgr->drawAll();</div><div class="line"> <span class="comment">//Activate camera2</span></div><div class="line"> smgr->setActiveCamera(camera[1]);</div><div class="line"> <span class="comment">//Set viewpoint to the second quarter (right top)</span></div><div class="line"> driver->setViewPort(rect<s32>(ResX/2,0,ResX,ResY/2));</div><div class="line"> <span class="comment">//Draw scene</span></div><div class="line"> smgr->drawAll();</div><div class="line"> <span class="comment">//Activate camera3</span></div><div class="line"> smgr->setActiveCamera(camera[2]);</div><div class="line"> <span class="comment">//Set viewpoint to the third quarter (left bottom)</span></div><div class="line"> driver->setViewPort(rect<s32>(0,ResY/2,ResX/2,ResY));</div><div class="line"> <span class="comment">//Draw scene</span></div><div class="line"> smgr->drawAll();</div><div class="line"> <span class="comment">//Set viewport the last quarter (right bottom)</span></div><div class="line"> driver->setViewPort(rect<s32>(ResX/2,ResY/2,ResX,ResY));</div><div class="line"> }</div><div class="line"> <span class="comment">//Activate camera4</span></div><div class="line"> smgr->setActiveCamera(camera[3]);</div><div class="line"> <span class="comment">//Draw scene</span></div><div class="line"> smgr->drawAll();</div><div class="line"> driver->endScene();</div></div><!-- fragment --><p> As you can probably see, the image is rendered for every viewport separately. That means, that you'll loose much performance. Ok, if you're asking "How do I have to set the viewport + to get this or that screen?", don't panic. It's really easy: In the rect-function you define 4 coordinates:</p><ul> +<li>X-coordinate of the corner left top</li> +<li>Y-coordinate of the corner left top</li> +<li>X-coordinate of the corner right bottom</li> +<li>Y-coordinate of the corner right bottom</li> +</ul> +<p>That means, if you want to split the screen into 2 viewports you would give the following coordinates:</p><ul> +<li>1st viewport: 0,0,ResX/2,ResY</li> +<li>2nd viewport: ResX/2,0,ResX,ResY</li> +</ul> +<p>If you didn't fully understand, just play around with the example to check out what happens.</p> +<p>Now we just view the current fps and shut down the engine, when the user wants to: </p><div class="fragment"><div class="line"> <span class="comment">//Get and show fps</span></div><div class="line"> <span class="keywordflow">if</span> (driver->getFPS() != lastFPS)</div><div class="line"> {</div><div class="line"> lastFPS = driver->getFPS();</div><div class="line"> core::stringw tmp = L<span class="stringliteral">"Irrlicht SplitScreen-Example (FPS: "</span>;</div><div class="line"> tmp += lastFPS;</div><div class="line"> tmp += <span class="stringliteral">")"</span>;</div><div class="line"> device->setWindowCaption(tmp.c_str());</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="comment">//Delete device</span></div><div class="line"> device->drop();</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --><p> That's it! Just compile and play around with the program. Note: With the S-Key you can switch between using splitscreen and not. </p> +</div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/19.MouseAndJoystick/Makefile b/examples/19.MouseAndJoystick/Makefile new file mode 100644 index 0000000..2462ea8 --- /dev/null +++ b/examples/19.MouseAndJoystick/Makefile @@ -0,0 +1,39 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 19.MouseAndJoystick
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+#CXXFLAGS = -O3 -ffast-math
+CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/19.MouseAndJoystick/MouseAndJoystick.cbp b/examples/19.MouseAndJoystick/MouseAndJoystick.cbp new file mode 100644 index 0000000..7400072 --- /dev/null +++ b/examples/19.MouseAndJoystick/MouseAndJoystick.cbp @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 19 MouseAndJoystick" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/MouseAndJoystick" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/MouseAndJoystick" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/19.MouseAndJoystick/MouseAndJoystick.dev b/examples/19.MouseAndJoystick/MouseAndJoystick.dev new file mode 100644 index 0000000..cac8418 --- /dev/null +++ b/examples/19.MouseAndJoystick/MouseAndJoystick.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 04 MouseAndJoystick
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=19.MouseAndJoystick.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/19.MouseAndJoystick/MouseAndJoystick.vcproj b/examples/19.MouseAndJoystick/MouseAndJoystick.vcproj new file mode 100644 index 0000000..84d8396 --- /dev/null +++ b/examples/19.MouseAndJoystick/MouseAndJoystick.vcproj @@ -0,0 +1,162 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="19.MouseAndJoystick"
+ ProjectGUID="{FE853A36-E0D1-4AC5-A792-B643E70D2953}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/MouseAndJoystick.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/MouseAndJoystick.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/MouseAndJoystick.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/MouseAndJoystick.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/MouseAndJoystick.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/19.MouseAndJoystick/MouseAndJoystick_vc10.vcxproj b/examples/19.MouseAndJoystick/MouseAndJoystick_vc10.vcxproj new file mode 100644 index 0000000..16c3a38 --- /dev/null +++ b/examples/19.MouseAndJoystick/MouseAndJoystick_vc10.vcxproj @@ -0,0 +1,231 @@ +ďťż<?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">
+ <ProjectName>19.MouseAndJoystick</ProjectName>
+ <ProjectGuid>{FE853A36-E0D1-4AC5-A792-B643E70D2953}</ProjectGuid>
+ <RootNamespace>MouseAndJoystick</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/MouseAndJoystick.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/MouseAndJoystick.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\19.MouseAndJoystick.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/MouseAndJoystick.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/MouseAndJoystick.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\19.MouseAndJoystick.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/19.MouseAndJoystick/MouseAndJoystick_vc11.vcxproj b/examples/19.MouseAndJoystick/MouseAndJoystick_vc11.vcxproj new file mode 100644 index 0000000..16c3a38 --- /dev/null +++ b/examples/19.MouseAndJoystick/MouseAndJoystick_vc11.vcxproj @@ -0,0 +1,231 @@ +ďťż<?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">
+ <ProjectName>19.MouseAndJoystick</ProjectName>
+ <ProjectGuid>{FE853A36-E0D1-4AC5-A792-B643E70D2953}</ProjectGuid>
+ <RootNamespace>MouseAndJoystick</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/MouseAndJoystick.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/MouseAndJoystick.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\19.MouseAndJoystick.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/MouseAndJoystick.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/MouseAndJoystick.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\19.MouseAndJoystick.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/19.MouseAndJoystick/MouseAndJoystick_vc12.vcxproj b/examples/19.MouseAndJoystick/MouseAndJoystick_vc12.vcxproj new file mode 100644 index 0000000..24dca69 --- /dev/null +++ b/examples/19.MouseAndJoystick/MouseAndJoystick_vc12.vcxproj @@ -0,0 +1,231 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>19.MouseAndJoystick</ProjectName>
+ <ProjectGuid>{FE853A36-E0D1-4AC5-A792-B643E70D2953}</ProjectGuid>
+ <RootNamespace>MouseAndJoystick</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/MouseAndJoystick.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/MouseAndJoystick.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\19.MouseAndJoystick.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/MouseAndJoystick.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/MouseAndJoystick.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\19.MouseAndJoystick.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/19.MouseAndJoystick/MouseAndJoystick_vc8.vcproj b/examples/19.MouseAndJoystick/MouseAndJoystick_vc8.vcproj new file mode 100644 index 0000000..51b7fac --- /dev/null +++ b/examples/19.MouseAndJoystick/MouseAndJoystick_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="19.MouseAndJoystick_vc8"
+ ProjectGUID="{FE853A36-E0D1-4AC5-A792-B643E70D2953}"
+ RootNamespace="MouseAndJoystick_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/MouseAndJoystick.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/MouseAndJoystick.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/MouseAndJoystick.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/MouseAndJoystick.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/MouseAndJoystick.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/MouseAndJoystick.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/19.MouseAndJoystick/MouseAndJoystick_vc9.vcproj b/examples/19.MouseAndJoystick/MouseAndJoystick_vc9.vcproj new file mode 100644 index 0000000..e121452 --- /dev/null +++ b/examples/19.MouseAndJoystick/MouseAndJoystick_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="19.MouseAndJoystick_vc9"
+ ProjectGUID="{FE853A36-E0D1-4AC5-A792-B643E70D2953}"
+ RootNamespace="MouseAndJoystick_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/MouseAndJoystick.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/MouseAndJoystick.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/MouseAndJoystick.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/MouseAndJoystick.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/MouseAndJoystick.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/MouseAndJoystick.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/19.MouseAndJoystick/main.cpp b/examples/19.MouseAndJoystick/main.cpp new file mode 100644 index 0000000..4563278 --- /dev/null +++ b/examples/19.MouseAndJoystick/main.cpp @@ -0,0 +1,285 @@ +/** Example 019 Mouse and Joystick
+
+This tutorial builds on example 04.Movement which showed how to
+handle keyboard events in Irrlicht. Here we'll handle mouse events
+and joystick events, if you have a joystick connected and a device
+that supports joysticks. These are currently Windows, Linux and SDL
+devices.
+*/
+
+#ifdef _MSC_VER
+// We'll define this to stop MSVC complaining about sprintf().
+#define _CRT_SECURE_NO_WARNINGS
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+/*
+Just as we did in example 04.Movement, we'll store the latest state of the
+mouse and the first joystick, updating them as we receive events.
+*/
+class MyEventReceiver : public IEventReceiver
+{
+public:
+ // We'll create a struct to record info on the mouse state
+ struct SMouseState
+ {
+ core::position2di Position;
+ bool LeftButtonDown;
+ SMouseState() : LeftButtonDown(false) { }
+ } MouseState;
+
+ // This is the one method that we have to implement
+ virtual bool OnEvent(const SEvent& event)
+ {
+ // Remember the mouse state
+ if (event.EventType == irr::EET_MOUSE_INPUT_EVENT)
+ {
+ switch(event.MouseInput.Event)
+ {
+ case EMIE_LMOUSE_PRESSED_DOWN:
+ MouseState.LeftButtonDown = true;
+ break;
+
+ case EMIE_LMOUSE_LEFT_UP:
+ MouseState.LeftButtonDown = false;
+ break;
+
+ case EMIE_MOUSE_MOVED:
+ MouseState.Position.X = event.MouseInput.X;
+ MouseState.Position.Y = event.MouseInput.Y;
+ break;
+
+ default:
+ // We won't use the wheel
+ break;
+ }
+ }
+
+ // The state of each connected joystick is sent to us
+ // once every run() of the Irrlicht device. Store the
+ // state of the first joystick, ignoring other joysticks.
+ // This is currently only supported on Windows and Linux.
+ if (event.EventType == irr::EET_JOYSTICK_INPUT_EVENT
+ && event.JoystickEvent.Joystick == 0)
+ {
+ JoystickState = event.JoystickEvent;
+ }
+
+ return false;
+ }
+
+ const SEvent::SJoystickEvent & GetJoystickState(void) const
+ {
+ return JoystickState;
+ }
+
+ const SMouseState & GetMouseState(void) const
+ {
+ return MouseState;
+ }
+
+
+ MyEventReceiver()
+ {
+ }
+
+private:
+ SEvent::SJoystickEvent JoystickState;
+};
+
+
+/*
+The event receiver for keeping the pressed keys is ready, the actual responses
+will be made inside the render loop, right before drawing the scene. So lets
+just create an irr::IrrlichtDevice and the scene node we want to move. We also
+create some other additional scene nodes, to show that there are also some
+different possibilities to move and animate scene nodes.
+*/
+int main()
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ // create device
+ MyEventReceiver receiver;
+
+ IrrlichtDevice* device = createDevice(driverType,
+ core::dimension2d<u32>(640, 480), 16, false, false, false, &receiver);
+
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+
+ core::array<SJoystickInfo> joystickInfo;
+ if(device->activateJoysticks(joystickInfo))
+ {
+ std::cout << "Joystick support is enabled and " << joystickInfo.size() << " joystick(s) are present." << std::endl;
+
+ for(u32 joystick = 0; joystick < joystickInfo.size(); ++joystick)
+ {
+ std::cout << "Joystick " << joystick << ":" << std::endl;
+ std::cout << "\tName: '" << joystickInfo[joystick].Name.c_str() << "'" << std::endl;
+ std::cout << "\tAxes: " << joystickInfo[joystick].Axes << std::endl;
+ std::cout << "\tButtons: " << joystickInfo[joystick].Buttons << std::endl;
+
+ std::cout << "\tHat is: ";
+
+ switch(joystickInfo[joystick].PovHat)
+ {
+ case SJoystickInfo::POV_HAT_PRESENT:
+ std::cout << "present" << std::endl;
+ break;
+
+ case SJoystickInfo::POV_HAT_ABSENT:
+ std::cout << "absent" << std::endl;
+ break;
+
+ case SJoystickInfo::POV_HAT_UNKNOWN:
+ default:
+ std::cout << "unknown" << std::endl;
+ break;
+ }
+ }
+ }
+ else
+ {
+ std::cout << "Joystick support is not enabled." << std::endl;
+ }
+
+ core::stringw tmp = L"Irrlicht Joystick Example (";
+ tmp += joystickInfo.size();
+ tmp += " joysticks)";
+ device->setWindowCaption(tmp.c_str());
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* smgr = device->getSceneManager();
+
+ /*
+ We'll create an arrow mesh and move it around either with the joystick axis/hat,
+ or make it follow the mouse pointer. */
+ scene::ISceneNode * node = smgr->addMeshSceneNode(
+ smgr->addArrowMesh( "Arrow",
+ video::SColor(255, 255, 0, 0),
+ video::SColor(255, 0, 255, 0),
+ 16,16,
+ 2.f, 1.3f,
+ 0.1f, 0.6f
+ )
+ );
+ node->setMaterialFlag(video::EMF_LIGHTING, false);
+
+ scene::ICameraSceneNode * camera = smgr->addCameraSceneNode();
+ camera->setPosition(core::vector3df(0, 0, -10));
+
+ // As in example 04, we'll use framerate independent movement.
+ u32 then = device->getTimer()->getTime();
+ const f32 MOVEMENT_SPEED = 5.f;
+
+ while(device->run())
+ {
+ // Work out a frame delta time.
+ const u32 now = device->getTimer()->getTime();
+ const f32 frameDeltaTime = (f32)(now - then) / 1000.f; // Time in seconds
+ then = now;
+
+ bool movedWithJoystick = false;
+ core::vector3df nodePosition = node->getPosition();
+
+ if(joystickInfo.size() > 0)
+ {
+ f32 moveHorizontal = 0.f; // Range is -1.f for full left to +1.f for full right
+ f32 moveVertical = 0.f; // -1.f for full down to +1.f for full up.
+
+ const SEvent::SJoystickEvent & joystickData = receiver.GetJoystickState();
+
+ // We receive the full analog range of the axes, and so have to implement our
+ // own dead zone. This is an empirical value, since some joysticks have more
+ // jitter or creep around the center point than others. We'll use 5% of the
+ // range as the dead zone, but generally you would want to give the user the
+ // option to change this.
+ const f32 DEAD_ZONE = 0.05f;
+
+ moveHorizontal =
+ (f32)joystickData.Axis[SEvent::SJoystickEvent::AXIS_X] / 32767.f;
+ if(fabs(moveHorizontal) < DEAD_ZONE)
+ moveHorizontal = 0.f;
+
+ moveVertical =
+ (f32)joystickData.Axis[SEvent::SJoystickEvent::AXIS_Y] / -32767.f;
+ if(fabs(moveVertical) < DEAD_ZONE)
+ moveVertical = 0.f;
+
+ // POV hat info is only currently supported on Windows, but the value is
+ // guaranteed to be 65535 if it's not supported, so we can check its range.
+ const u16 povDegrees = joystickData.POV / 100;
+ if(povDegrees < 360)
+ {
+ if(povDegrees > 0 && povDegrees < 180)
+ moveHorizontal = 1.f;
+ else if(povDegrees > 180)
+ moveHorizontal = -1.f;
+
+ if(povDegrees > 90 && povDegrees < 270)
+ moveVertical = -1.f;
+ else if(povDegrees > 270 || povDegrees < 90)
+ moveVertical = +1.f;
+ }
+
+ if(!core::equals(moveHorizontal, 0.f) || !core::equals(moveVertical, 0.f))
+ {
+ nodePosition.X += MOVEMENT_SPEED * frameDeltaTime * moveHorizontal;
+ nodePosition.Y += MOVEMENT_SPEED * frameDeltaTime * moveVertical;
+ movedWithJoystick = true;
+ }
+ }
+
+ // If the arrow node isn't being moved with the joystick, then have it follow the mouse cursor.
+ if(!movedWithJoystick)
+ {
+ // Create a ray through the mouse cursor.
+ core::line3df ray = smgr->getSceneCollisionManager()->getRayFromScreenCoordinates(
+ receiver.GetMouseState().Position, camera);
+
+ // And intersect the ray with a plane around the node facing towards the camera.
+ core::plane3df plane(nodePosition, core::vector3df(0, 0, -1));
+ core::vector3df mousePosition;
+ if(plane.getIntersectionWithLine(ray.start, ray.getVector(), mousePosition))
+ {
+ // We now have a mouse position in 3d space; move towards it.
+ core::vector3df toMousePosition(mousePosition - nodePosition);
+ const f32 availableMovement = MOVEMENT_SPEED * frameDeltaTime;
+
+ if(toMousePosition.getLength() <= availableMovement)
+ nodePosition = mousePosition; // Jump to the final position
+ else
+ nodePosition += toMousePosition.normalize() * availableMovement; // Move towards it
+ }
+ }
+
+ node->setPosition(nodePosition);
+
+ // Turn lighting on and off depending on whether the left mouse button is down.
+ node->setMaterialFlag(video::EMF_LIGHTING, receiver.GetMouseState().LeftButtonDown);
+
+ driver->beginScene(true, true, video::SColor(255,113,113,133));
+ smgr->drawAll(); // draw the 3d scene
+ driver->endScene();
+ }
+
+ /*
+ In the end, delete the Irrlicht device.
+ */
+ device->drop();
+
+ return 0;
+}
+
+/*
+**/
diff --git a/examples/19.MouseAndJoystick/tutorial.html b/examples/19.MouseAndJoystick/tutorial.html new file mode 100644 index 0000000..fccc53d --- /dev/null +++ b/examples/19.MouseAndJoystick/tutorial.html @@ -0,0 +1,205 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 19: Mouse and Joystick</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 19: Mouse and Joystick </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/019shot.jpg" alt="019shot.jpg"/> +</div> + <p>This tutorial builds on example 04.Movement which showed how to handle keyboard events in Irrlicht. Here we'll handle mouse events and joystick events, if you have a joystick connected and a device that supports joysticks. These are currently Windows, Linux and SDL devices. </p><div class="fragment"><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="comment">// We'll define this to stop MSVC complaining about sprintf().</span></div><div class="line"><span class="preprocessor">#define _CRT_SECURE_NO_WARNINGS</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div></div><!-- fragment --><p> Just as we did in example 04.Movement, we'll store the latest state of the mouse and the first joystick, updating them as we receive events. </p><div class="fragment"><div class="line"><span class="keyword">class </span>MyEventReceiver : <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"> <span class="comment">// We'll create a struct to record info on the mouse state</span></div><div class="line"> <span class="keyword">struct </span>SMouseState</div><div class="line"> {</div><div class="line"> core::position2di Position;</div><div class="line"> <span class="keywordtype">bool</span> LeftButtonDown;</div><div class="line"> SMouseState() : LeftButtonDown(false) { }</div><div class="line"> } MouseState;</div><div class="line"></div><div class="line"> <span class="comment">// This is the one method that we have to implement</span></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent& event)</div><div class="line"> {</div><div class="line"> <span class="comment">// Remember the mouse state</span></div><div class="line"> <span class="keywordflow">if</span> (event.EventType == irr::EET_MOUSE_INPUT_EVENT)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">switch</span>(event.MouseInput.Event)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> EMIE_LMOUSE_PRESSED_DOWN:</div><div class="line"> MouseState.LeftButtonDown = <span class="keyword">true</span>;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EMIE_LMOUSE_LEFT_UP:</div><div class="line"> MouseState.LeftButtonDown = <span class="keyword">false</span>;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EMIE_MOUSE_MOVED:</div><div class="line"> MouseState.Position.X = <span class="keyword">event</span>.MouseInput.X;</div><div class="line"> MouseState.Position.Y = <span class="keyword">event</span>.MouseInput.Y;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">default</span>:</div><div class="line"> <span class="comment">// We won't use the wheel</span></div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// The state of each connected joystick is sent to us</span></div><div class="line"> <span class="comment">// once every run() of the Irrlicht device. Store the</span></div><div class="line"> <span class="comment">// state of the first joystick, ignoring other joysticks.</span></div><div class="line"> <span class="comment">// This is currently only supported on Windows and Linux.</span></div><div class="line"> <span class="keywordflow">if</span> (event.EventType == irr::EET_JOYSTICK_INPUT_EVENT</div><div class="line"> && event.JoystickEvent.Joystick == 0)</div><div class="line"> {</div><div class="line"> JoystickState = <span class="keyword">event</span>.JoystickEvent;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">const</span> SEvent::SJoystickEvent & GetJoystickState(<span class="keywordtype">void</span>)<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> <span class="keywordflow">return</span> JoystickState;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">const</span> SMouseState & GetMouseState(<span class="keywordtype">void</span>)<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> <span class="keywordflow">return</span> MouseState;</div><div class="line"> }</div><div class="line"></div><div class="line"></div><div class="line"> MyEventReceiver()</div><div class="line"> {</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"> SEvent::SJoystickEvent JoystickState;</div><div class="line">};</div></div><!-- fragment --><p> The event receiver for keeping the pressed keys is ready, the actual responses will be made inside the render loop, right before drawing the scene. So lets just create an irr::IrrlichtDevice and the scene node we want to move. We also create some other additional scene nodes, to show that there are also some different possibilities to move and animate scene nodes. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> <span class="comment">// create device</span></div><div class="line"> MyEventReceiver receiver;</div><div class="line"></div><div class="line"> IrrlichtDevice* device = createDevice(driverType,</div><div class="line"> core::dimension2d<u32>(640, 480), 16, <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">false</span>, &receiver);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div><div class="line"></div><div class="line"></div><div class="line"> core::array<SJoystickInfo> joystickInfo;</div><div class="line"> <span class="keywordflow">if</span>(device->activateJoysticks(joystickInfo))</div><div class="line"> {</div><div class="line"> std::cout << <span class="stringliteral">"Joystick support is enabled and "</span> << joystickInfo.size() << <span class="stringliteral">" joystick(s) are present."</span> << std::endl;</div><div class="line"></div><div class="line"> <span class="keywordflow">for</span>(u32 joystick = 0; joystick < joystickInfo.size(); ++joystick)</div><div class="line"> {</div><div class="line"> std::cout << <span class="stringliteral">"Joystick "</span> << joystick << <span class="stringliteral">":"</span> << std::endl;</div><div class="line"> std::cout << <span class="stringliteral">"\tName: '"</span> << joystickInfo[joystick].Name.c_str() << <span class="stringliteral">"'"</span> << std::endl;</div><div class="line"> std::cout << <span class="stringliteral">"\tAxes: "</span> << joystickInfo[joystick].Axes << std::endl;</div><div class="line"> std::cout << <span class="stringliteral">"\tButtons: "</span> << joystickInfo[joystick].Buttons << std::endl;</div><div class="line"></div><div class="line"> std::cout << <span class="stringliteral">"\tHat is: "</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">switch</span>(joystickInfo[joystick].PovHat)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> SJoystickInfo::POV_HAT_PRESENT:</div><div class="line"> std::cout << <span class="stringliteral">"present"</span> << std::endl;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> SJoystickInfo::POV_HAT_ABSENT:</div><div class="line"> std::cout << <span class="stringliteral">"absent"</span> << std::endl;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> SJoystickInfo::POV_HAT_UNKNOWN:</div><div class="line"> <span class="keywordflow">default</span>:</div><div class="line"> std::cout << <span class="stringliteral">"unknown"</span> << std::endl;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> std::cout << <span class="stringliteral">"Joystick support is not enabled."</span> << std::endl;</div><div class="line"> }</div><div class="line"></div><div class="line"> core::stringw tmp = L<span class="stringliteral">"Irrlicht Joystick Example ("</span>;</div><div class="line"> tmp += joystickInfo.size();</div><div class="line"> tmp += <span class="stringliteral">" joysticks)"</span>;</div><div class="line"> device->setWindowCaption(tmp.c_str());</div><div class="line"></div><div class="line"> video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line"> scene::ISceneManager* smgr = device->getSceneManager();</div></div><!-- fragment --><p> We'll create an arrow mesh and move it around either with the joystick axis/hat, or make it follow the mouse pointer.</p><div class="fragment"><div class="line">scene::ISceneNode * node = smgr->addMeshSceneNode(</div><div class="line"> smgr->addArrowMesh( <span class="stringliteral">"Arrow"</span>,</div><div class="line"> video::SColor(255, 255, 0, 0),</div><div class="line"> video::SColor(255, 0, 255, 0),</div><div class="line"> 16,16,</div><div class="line"> 2.f, 1.3f,</div><div class="line"> 0.1f, 0.6f</div><div class="line"> )</div><div class="line"> );</div><div class="line">node->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"></div><div class="line">scene::ICameraSceneNode * camera = smgr->addCameraSceneNode();</div><div class="line">camera->setPosition(core::vector3df(0, 0, -10));</div><div class="line"></div><div class="line"><span class="comment">// As in example 04, we'll use framerate independent movement.</span></div><div class="line">u32 then = device->getTimer()->getTime();</div><div class="line"><span class="keyword">const</span> f32 MOVEMENT_SPEED = 5.f;</div><div class="line"></div><div class="line"><span class="keywordflow">while</span>(device->run())</div><div class="line">{</div><div class="line"> <span class="comment">// Work out a frame delta time.</span></div><div class="line"> <span class="keyword">const</span> u32 now = device->getTimer()->getTime();</div><div class="line"> <span class="keyword">const</span> f32 frameDeltaTime = (f32)(now - then) / 1000.f; <span class="comment">// Time in seconds</span></div><div class="line"> then = now;</div><div class="line"></div><div class="line"> <span class="keywordtype">bool</span> movedWithJoystick = <span class="keyword">false</span>;</div><div class="line"> core::vector3df nodePosition = node->getPosition();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span>(joystickInfo.size() > 0)</div><div class="line"> {</div><div class="line"> f32 moveHorizontal = 0.f; <span class="comment">// Range is -1.f for full left to +1.f for full right</span></div><div class="line"> f32 moveVertical = 0.f; <span class="comment">// -1.f for full down to +1.f for full up.</span></div><div class="line"></div><div class="line"> <span class="keyword">const</span> SEvent::SJoystickEvent & joystickData = receiver.GetJoystickState();</div><div class="line"></div><div class="line"> <span class="comment">// We receive the full analog range of the axes, and so have to implement our</span></div><div class="line"> <span class="comment">// own dead zone. This is an empirical value, since some joysticks have more</span></div><div class="line"> <span class="comment">// jitter or creep around the center point than others. We'll use 5% of the</span></div><div class="line"> <span class="comment">// range as the dead zone, but generally you would want to give the user the</span></div><div class="line"> <span class="comment">// option to change this.</span></div><div class="line"> <span class="keyword">const</span> f32 DEAD_ZONE = 0.05f;</div><div class="line"></div><div class="line"> moveHorizontal =</div><div class="line"> (f32)joystickData.Axis[SEvent::SJoystickEvent::AXIS_X] / 32767.f;</div><div class="line"> <span class="keywordflow">if</span>(fabs(moveHorizontal) < DEAD_ZONE)</div><div class="line"> moveHorizontal = 0.f;</div><div class="line"></div><div class="line"> moveVertical =</div><div class="line"> (f32)joystickData.Axis[SEvent::SJoystickEvent::AXIS_Y] / -32767.f;</div><div class="line"> <span class="keywordflow">if</span>(fabs(moveVertical) < DEAD_ZONE)</div><div class="line"> moveVertical = 0.f;</div><div class="line"></div><div class="line"> <span class="comment">// POV hat info is only currently supported on Windows, but the value is</span></div><div class="line"> <span class="comment">// guaranteed to be 65535 if it's not supported, so we can check its range.</span></div><div class="line"> <span class="keyword">const</span> u16 povDegrees = joystickData.POV / 100;</div><div class="line"> <span class="keywordflow">if</span>(povDegrees < 360)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span>(povDegrees > 0 && povDegrees < 180)</div><div class="line"> moveHorizontal = 1.f;</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span>(povDegrees > 180)</div><div class="line"> moveHorizontal = -1.f;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span>(povDegrees > 90 && povDegrees < 270)</div><div class="line"> moveVertical = -1.f;</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span>(povDegrees > 270 || povDegrees < 90)</div><div class="line"> moveVertical = +1.f;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span>(!core::equals(moveHorizontal, 0.f) || !core::equals(moveVertical, 0.f))</div><div class="line"> {</div><div class="line"> nodePosition.X += MOVEMENT_SPEED * frameDeltaTime * moveHorizontal;</div><div class="line"> nodePosition.Y += MOVEMENT_SPEED * frameDeltaTime * moveVertical;</div><div class="line"> movedWithJoystick = <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// If the arrow node isn't being moved with the joystick, then have it follow the mouse cursor.</span></div><div class="line"> <span class="keywordflow">if</span>(!movedWithJoystick)</div><div class="line"> {</div><div class="line"> <span class="comment">// Create a ray through the mouse cursor.</span></div><div class="line"> core::line3df ray = smgr->getSceneCollisionManager()->getRayFromScreenCoordinates(</div><div class="line"> receiver.GetMouseState().Position, camera);</div><div class="line"></div><div class="line"> <span class="comment">// And intersect the ray with a plane around the node facing towards the camera.</span></div><div class="line"> core::plane3df plane(nodePosition, core::vector3df(0, 0, -1));</div><div class="line"> core::vector3df mousePosition;</div><div class="line"> <span class="keywordflow">if</span>(plane.getIntersectionWithLine(ray.start, ray.getVector(), mousePosition))</div><div class="line"> {</div><div class="line"> <span class="comment">// We now have a mouse position in 3d space; move towards it.</span></div><div class="line"> core::vector3df toMousePosition(mousePosition - nodePosition);</div><div class="line"> <span class="keyword">const</span> f32 availableMovement = MOVEMENT_SPEED * frameDeltaTime;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span>(toMousePosition.getLength() <= availableMovement)</div><div class="line"> nodePosition = mousePosition; <span class="comment">// Jump to the final position</span></div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> nodePosition += toMousePosition.normalize() * availableMovement; <span class="comment">// Move towards it</span></div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> node->setPosition(nodePosition);</div><div class="line"></div><div class="line"> <span class="comment">// Turn lighting on and off depending on whether the left mouse button is down.</span></div><div class="line"> node->setMaterialFlag(video::EMF_LIGHTING, receiver.GetMouseState().LeftButtonDown);</div><div class="line"></div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, video::SColor(255,113,113,133));</div><div class="line"> smgr->drawAll(); <span class="comment">// draw the 3d scene</span></div><div class="line"> driver->endScene();</div><div class="line">}</div></div><!-- fragment --><p> In the end, delete the Irrlicht device. </p><div class="fragment"><div class="line"> device->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/20.ManagedLights/Makefile b/examples/20.ManagedLights/Makefile new file mode 100644 index 0000000..1a40866 --- /dev/null +++ b/examples/20.ManagedLights/Makefile @@ -0,0 +1,39 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 20.ManagedLights
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+#CXXFLAGS = -O3 -ffast-math
+CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/20.ManagedLights/ManagedLights.cbp b/examples/20.ManagedLights/ManagedLights.cbp new file mode 100644 index 0000000..5c94e99 --- /dev/null +++ b/examples/20.ManagedLights/ManagedLights.cbp @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 20 ManagedLights" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/ManagedLights" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/ManagedLights" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/20.ManagedLights/ManagedLights.dev b/examples/20.ManagedLights/ManagedLights.dev new file mode 100644 index 0000000..9804fee --- /dev/null +++ b/examples/20.ManagedLights/ManagedLights.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 20 ManagedLights
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=20.ManagedLights.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/20.ManagedLights/ManagedLights.vcproj b/examples/20.ManagedLights/ManagedLights.vcproj new file mode 100644 index 0000000..850a8d2 --- /dev/null +++ b/examples/20.ManagedLights/ManagedLights.vcproj @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="20.ManagedLights"
+ ProjectGUID="{16007FE2-142B-47F8-93E1-519BA3F39E71}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/ManagedLights.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\20.ManagedLights.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/ManagedLights.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/ManagedLights.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/ManagedLights.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\20.ManagedLights.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/ManagedLights.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/ManagedLights.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/20.ManagedLights/ManagedLights_vc10.vcxproj b/examples/20.ManagedLights/ManagedLights_vc10.vcxproj new file mode 100644 index 0000000..53568a9 --- /dev/null +++ b/examples/20.ManagedLights/ManagedLights_vc10.vcxproj @@ -0,0 +1,234 @@ +ďťż<?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">
+ <ProjectName>20.ManagedLights</ProjectName>
+ <ProjectGuid>{16007FE2-142B-47F8-93E1-519BA3F39E71}</ProjectGuid>
+ <RootNamespace>ManagedLights</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/ManagedLights.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>..\..\Lib\Win32-visualstudio\Irrlicht.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win32-VisualStudio\20.ManagedLights.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/ManagedLights.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>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>
+ <OutputFile>..\..\bin\Win64-VisualStudio\20.ManagedLights.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/ManagedLights.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\20.ManagedLights.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/ManagedLights.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\20.ManagedLights.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <AdditionalDependencies>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>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/20.ManagedLights/ManagedLights_vc11.vcxproj b/examples/20.ManagedLights/ManagedLights_vc11.vcxproj new file mode 100644 index 0000000..53568a9 --- /dev/null +++ b/examples/20.ManagedLights/ManagedLights_vc11.vcxproj @@ -0,0 +1,234 @@ +ďťż<?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">
+ <ProjectName>20.ManagedLights</ProjectName>
+ <ProjectGuid>{16007FE2-142B-47F8-93E1-519BA3F39E71}</ProjectGuid>
+ <RootNamespace>ManagedLights</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/ManagedLights.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>..\..\Lib\Win32-visualstudio\Irrlicht.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win32-VisualStudio\20.ManagedLights.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/ManagedLights.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>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>
+ <OutputFile>..\..\bin\Win64-VisualStudio\20.ManagedLights.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/ManagedLights.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\20.ManagedLights.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/ManagedLights.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\20.ManagedLights.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <AdditionalDependencies>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>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/20.ManagedLights/ManagedLights_vc12.vcxproj b/examples/20.ManagedLights/ManagedLights_vc12.vcxproj new file mode 100644 index 0000000..287f1b9 --- /dev/null +++ b/examples/20.ManagedLights/ManagedLights_vc12.vcxproj @@ -0,0 +1,234 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>20.ManagedLights</ProjectName>
+ <ProjectGuid>{16007FE2-142B-47F8-93E1-519BA3F39E71}</ProjectGuid>
+ <RootNamespace>ManagedLights</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/ManagedLights.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>..\..\Lib\Win32-visualstudio\Irrlicht.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win32-VisualStudio\20.ManagedLights.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/ManagedLights.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>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>
+ <OutputFile>..\..\bin\Win64-VisualStudio\20.ManagedLights.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/ManagedLights.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\20.ManagedLights.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/ManagedLights.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\20.ManagedLights.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <AdditionalDependencies>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>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/20.ManagedLights/ManagedLights_vc8.vcproj b/examples/20.ManagedLights/ManagedLights_vc8.vcproj new file mode 100644 index 0000000..2f37f63 --- /dev/null +++ b/examples/20.ManagedLights/ManagedLights_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="20.ManagedLights_vc8"
+ ProjectGUID="{16007FE2-142B-47F8-93E1-519BA3F39E71}"
+ RootNamespace="ManagedLights_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/ManagedLights.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/ManagedLights.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\20.ManagedLights.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/ManagedLights.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/ManagedLights.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/ManagedLights.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\20.ManagedLights.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/ManagedLights.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/20.ManagedLights/ManagedLights_vc9.vcproj b/examples/20.ManagedLights/ManagedLights_vc9.vcproj new file mode 100644 index 0000000..736faa6 --- /dev/null +++ b/examples/20.ManagedLights/ManagedLights_vc9.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="20.ManagedLights_vc9"
+ ProjectGUID="{16007FE2-142B-47F8-93E1-519BA3F39E71}"
+ RootNamespace="ManagedLights_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/ManagedLights.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/ManagedLights.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\Lib\Win32-visualstudio\Irrlicht.lib"
+ OutputFile="..\..\bin\Win32-VisualStudio\20.ManagedLights.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/ManagedLights.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/ManagedLights.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/ManagedLights.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\20.ManagedLights.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/ManagedLights.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/20.ManagedLights/main.cpp b/examples/20.ManagedLights/main.cpp new file mode 100644 index 0000000..f67337a --- /dev/null +++ b/examples/20.ManagedLights/main.cpp @@ -0,0 +1,386 @@ +/** Example 020 Managed Lights
+
+Written by Colin MacDonald. This tutorial explains the use of the Light Manager
+of Irrlicht. It enables the use of more dynamic light sources than the actual
+hardware supports. Further applications of the Light Manager, such as per scene
+node callbacks, are left out for simplicity of the example.
+*/
+
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+using namespace core;
+
+#if defined(_MSC_VER)
+#pragma comment(lib, "Irrlicht.lib")
+#endif // MSC_VER
+
+/*
+ Normally, you are limited to 8 dynamic lights per scene: this is a hardware limit. If you
+ want to use more dynamic lights in your scene, then you can register an optional light
+ manager that allows you to to turn lights on and off at specific point during rendering.
+ You are still limited to 8 lights, but the limit is per scene node.
+
+ This is completely optional: if you do not register a light manager, then a default
+ distance-based scheme will be used to prioritise hardware lights based on their distance
+ from the active camera.
+
+ NO_MANAGEMENT disables the light manager and shows Irrlicht's default light behaviour.
+ The 8 lights nearest to the camera will be turned on, and other lights will be turned off.
+ In this example, this produces a funky looking but incoherent light display.
+
+ LIGHTS_NEAREST_NODE shows an implementation that turns on a limited number of lights
+ per mesh scene node. If finds the 3 lights that are nearest to the node being rendered,
+ and turns them on, turning all other lights off. This works, but as it operates on every
+ light for every node, it does not scale well with many lights. The flickering you can see
+ in this demo is due to the lights swapping their relative positions from the cubes
+ (a deliberate demonstration of the limitations of this technique).
+
+ LIGHTS_IN_ZONE shows a technique for turning on lights based on a 'zone'. Each empty scene
+ node is considered to be the parent of a zone. When nodes are rendered, they turn off all
+ lights, then find their parent 'zone' and turn on all lights that are inside that zone, i.e.
+ are descendents of it in the scene graph. This produces true 'local' lighting for each cube
+ in this example. You could use a similar technique to locally light all meshes in (e.g.)
+ a room, without the lights spilling out to other rooms.
+
+ This light manager is also an event receiver; this is purely for simplicity in this example,
+ it's neither necessary nor recommended for a real application.
+*/
+class CMyLightManager : public scene::ILightManager, public IEventReceiver
+{
+ typedef enum
+ {
+ NO_MANAGEMENT,
+ LIGHTS_NEAREST_NODE,
+ LIGHTS_IN_ZONE
+ }
+ LightManagementMode;
+
+ LightManagementMode Mode;
+ LightManagementMode RequestedMode;
+
+ // These data represent the state information that this light manager
+ // is interested in.
+ scene::ISceneManager * SceneManager;
+ core::array<scene::ISceneNode*> * SceneLightList;
+ scene::E_SCENE_NODE_RENDER_PASS CurrentRenderPass;
+ scene::ISceneNode * CurrentSceneNode;
+
+public:
+ CMyLightManager(scene::ISceneManager* sceneManager)
+ : Mode(NO_MANAGEMENT), RequestedMode(NO_MANAGEMENT),
+ SceneManager(sceneManager), SceneLightList(0),
+ CurrentRenderPass(scene::ESNRP_NONE), CurrentSceneNode(0)
+ { }
+
+ // The input receiver interface, which just switches light management strategy
+ bool OnEvent(const SEvent & event)
+ {
+ bool handled = false;
+
+ if (event.EventType == irr::EET_KEY_INPUT_EVENT && event.KeyInput.PressedDown)
+ {
+ handled = true;
+ switch(event.KeyInput.Key)
+ {
+ case irr::KEY_KEY_1:
+ RequestedMode = NO_MANAGEMENT;
+ break;
+ case irr::KEY_KEY_2:
+ RequestedMode = LIGHTS_NEAREST_NODE;
+ break;
+ case irr::KEY_KEY_3:
+ RequestedMode = LIGHTS_IN_ZONE;
+ break;
+ default:
+ handled = false;
+ break;
+ }
+
+ if(NO_MANAGEMENT == RequestedMode)
+ SceneManager->setLightManager(0); // Show that it's safe to register the light manager
+ else
+ SceneManager->setLightManager(this);
+ }
+
+ return handled;
+ }
+
+
+ // This is called before the first scene node is rendered.
+ virtual void OnPreRender(core::array<scene::ISceneNode*> & lightList)
+ {
+ // Update the mode; changing it here ensures that it's consistent throughout a render
+ Mode = RequestedMode;
+
+ // Store the light list. I am free to alter this list until the end of OnPostRender().
+ SceneLightList = &lightList;
+ }
+
+ // Called after the last scene node is rendered.
+ virtual void OnPostRender()
+ {
+ // Since light management might be switched off in the event handler, we'll turn all
+ // lights on to ensure that they are in a consistent state. You wouldn't normally have
+ // to do this when using a light manager, since you'd continue to do light management
+ // yourself.
+ for (u32 i = 0; i < SceneLightList->size(); i++)
+ (*SceneLightList)[i]->setVisible(true);
+ }
+
+ virtual void OnRenderPassPreRender(scene::E_SCENE_NODE_RENDER_PASS renderPass)
+ {
+ // I don't have to do anything here except remember which render pass I am in.
+ CurrentRenderPass = renderPass;
+ }
+
+ virtual void OnRenderPassPostRender(scene::E_SCENE_NODE_RENDER_PASS renderPass)
+ {
+ // I only want solid nodes to be lit, so after the solid pass, turn all lights off.
+ if (scene::ESNRP_SOLID == renderPass)
+ {
+ for (u32 i = 0; i < SceneLightList->size(); ++i)
+ (*SceneLightList)[i]->setVisible(false);
+ }
+ }
+
+ // This is called before the specified scene node is rendered
+ virtual void OnNodePreRender(scene::ISceneNode* node)
+ {
+ CurrentSceneNode = node;
+
+ // This light manager only considers solid objects, but you are free to manipulate
+ // lights during any phase, depending on your requirements.
+ if (scene::ESNRP_SOLID != CurrentRenderPass)
+ return;
+
+ // And in fact for this example, I only want to consider lighting for cube scene
+ // nodes. You will probably want to deal with lighting for (at least) mesh /
+ // animated mesh scene nodes as well.
+ if (node->getType() != scene::ESNT_CUBE)
+ return;
+
+ if (LIGHTS_NEAREST_NODE == Mode)
+ {
+ // This is a naive implementation that prioritises every light in the scene
+ // by its proximity to the node being rendered. This produces some flickering
+ // when lights orbit closer to a cube than its 'zone' lights.
+ const vector3df nodePosition = node->getAbsolutePosition();
+
+ // Sort the light list by prioritising them based on their distance from the node
+ // that's about to be rendered.
+ array<LightDistanceElement> sortingArray;
+ sortingArray.reallocate(SceneLightList->size());
+
+ u32 i;
+ for(i = 0; i < SceneLightList->size(); ++i)
+ {
+ scene::ISceneNode* lightNode = (*SceneLightList)[i];
+ const f64 distance = lightNode->getAbsolutePosition().getDistanceFromSQ(nodePosition);
+ sortingArray.push_back(LightDistanceElement(lightNode, distance));
+ }
+
+ sortingArray.sort();
+
+ // The list is now sorted by proximity to the node.
+ // Turn on the three nearest lights, and turn the others off.
+ for(i = 0; i < sortingArray.size(); ++i)
+ sortingArray[i].node->setVisible(i < 3);
+ }
+ else if(LIGHTS_IN_ZONE == Mode)
+ {
+ // Empty scene nodes are used to represent 'zones'. For each solid mesh that
+ // is being rendered, turn off all lights, then find its 'zone' parent, and turn
+ // on all lights that are found under that node in the scene graph.
+ // This is a general purpose algorithm that doesn't use any special
+ // knowledge of how this particular scene graph is organised.
+ for (u32 i = 0; i < SceneLightList->size(); ++i)
+ {
+ if ((*SceneLightList)[i]->getType() != scene::ESNT_LIGHT)
+ continue;
+ scene::ILightSceneNode* lightNode = static_cast<scene::ILightSceneNode*>((*SceneLightList)[i]);
+ video::SLight & lightData = lightNode->getLightData();
+
+ if (video::ELT_DIRECTIONAL != lightData.Type)
+ lightNode->setVisible(false);
+ }
+
+ scene::ISceneNode * parentZone = findZone(node);
+ if (parentZone)
+ turnOnZoneLights(parentZone);
+ }
+ }
+
+ // Called after the specified scene node is rendered
+ virtual void OnNodePostRender(scene::ISceneNode* node)
+ {
+ // I don't need to do any light management after individual node rendering.
+ }
+
+private:
+
+ // Find the empty scene node that is the parent of the specified node
+ scene::ISceneNode * findZone(scene::ISceneNode * node)
+ {
+ if (!node)
+ return 0;
+
+ if (node->getType() == scene::ESNT_EMPTY)
+ return node;
+
+ return findZone(node->getParent());
+ }
+
+ // Turn on all lights that are children (directly or indirectly) of the
+ // specified scene node.
+ void turnOnZoneLights(scene::ISceneNode * node)
+ {
+ core::list<scene::ISceneNode*> const & children = node->getChildren();
+ for (core::list<scene::ISceneNode*>::ConstIterator child = children.begin();
+ child != children.end(); ++child)
+ {
+ if ((*child)->getType() == scene::ESNT_LIGHT)
+ (*child)->setVisible(true);
+ else // Assume that lights don't have any children that are also lights
+ turnOnZoneLights(*child);
+ }
+ }
+
+
+ // A utility class to aid in sorting scene nodes into a distance order
+ class LightDistanceElement
+ {
+ public:
+ LightDistanceElement() {};
+
+ LightDistanceElement(scene::ISceneNode* n, f64 d)
+ : node(n), distance(d) { }
+
+ scene::ISceneNode* node;
+ f64 distance;
+
+ // Lower distance elements are sorted to the start of the array
+ bool operator < (const LightDistanceElement& other) const
+ {
+ return (distance < other.distance);
+ }
+ };
+};
+
+
+/*
+*/
+int main(int argumentCount, char * argumentValues[])
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ IrrlichtDevice *device = createDevice(driverType,
+ dimension2d<u32>(640, 480), 32);
+
+ if(!device)
+ return -1;
+
+ f32 const lightRadius = 60.f; // Enough to reach the far side of each 'zone'
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* smgr = device->getSceneManager();
+ gui::IGUIEnvironment* guienv = device->getGUIEnvironment();
+
+ gui::IGUISkin* skin = guienv->getSkin();
+ if (skin)
+ {
+ skin->setColor(gui::EGDC_BUTTON_TEXT, video::SColor(255, 255, 255, 255));
+ gui::IGUIFont* font = guienv->getFont("../../media/fontlucida.png");
+ if(font)
+ skin->setFont(font);
+ }
+
+ guienv->addStaticText(L"1 - No light management", core::rect<s32>(10,10,200,30));
+ guienv->addStaticText(L"2 - Closest 3 lights", core::rect<s32>(10,30,200,50));
+ guienv->addStaticText(L"3 - Lights in zone", core::rect<s32>(10,50,200,70));
+
+/*
+Add several "zones". You could use this technique to light individual rooms, for example.
+*/
+ for(f32 zoneX = -100.f; zoneX <= 100.f; zoneX += 50.f)
+ for(f32 zoneY = -60.f; zoneY <= 60.f; zoneY += 60.f)
+ {
+ // Start with an empty scene node, which we will use to represent a zone.
+ scene::ISceneNode * zoneRoot = smgr->addEmptySceneNode();
+ zoneRoot->setPosition(vector3df(zoneX, zoneY, 0));
+
+ // Each zone contains a rotating cube
+ scene::IMeshSceneNode * node = smgr->addCubeSceneNode(15, zoneRoot);
+ scene::ISceneNodeAnimator * rotation = smgr->createRotationAnimator(vector3df(0.25f, 0.5f, 0.75f));
+ node->addAnimator(rotation);
+ rotation->drop();
+
+ // And each cube has three lights attached to it. The lights are attached to billboards so
+ // that we can see where they are. The billboards are attached to the cube, so that the
+ // lights are indirect descendents of the same empty scene node as the cube.
+ scene::IBillboardSceneNode * billboard = smgr->addBillboardSceneNode(node);
+ billboard->setPosition(vector3df(0, -14, 30));
+ billboard->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );
+ billboard->setMaterialTexture(0, driver->getTexture("../../media/particle.bmp"));
+ billboard->setMaterialFlag(video::EMF_LIGHTING, false);
+ smgr->addLightSceneNode(billboard, vector3df(0, 0, 0), video::SColorf(1, 0, 0), lightRadius);
+
+ billboard = smgr->addBillboardSceneNode(node);
+ billboard->setPosition(vector3df(-21, -14, -21));
+ billboard->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );
+ billboard->setMaterialTexture(0, driver->getTexture("../../media/particle.bmp"));
+ billboard->setMaterialFlag(video::EMF_LIGHTING, false);
+ smgr->addLightSceneNode(billboard, vector3df(0, 0, 0), video::SColorf(0, 1, 0), lightRadius);
+
+ billboard = smgr->addBillboardSceneNode(node);
+ billboard->setPosition(vector3df(21, -14, -21));
+ billboard->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );
+ billboard->setMaterialTexture(0, driver->getTexture("../../media/particle.bmp"));
+ billboard->setMaterialFlag(video::EMF_LIGHTING, false);
+ smgr->addLightSceneNode(billboard, vector3df(0, 0, 0), video::SColorf(0, 0, 1), lightRadius);
+
+ // Each cube also has a smaller cube rotating around it, to show that the cubes are being
+ // lit by the lights in their 'zone', not just lights that are their direct children.
+ node = smgr->addCubeSceneNode(5, node);
+ node->setPosition(vector3df(0, 21, 0));
+ }
+
+ smgr->addCameraSceneNode(0, vector3df(0,0,-130), vector3df(0,0,0));
+
+ CMyLightManager * myLightManager = new CMyLightManager(smgr);
+ smgr->setLightManager(0); // This is the default: we won't do light management until told to do it.
+ device->setEventReceiver(myLightManager);
+
+ int lastFps = -1;
+
+ while(device->run())
+ {
+ driver->beginScene(true, true, video::SColor(255,100,101,140));
+ smgr->drawAll();
+ guienv->drawAll();
+ driver->endScene();
+
+ int fps = driver->getFPS();
+ if(fps != lastFps)
+ {
+ lastFps = fps;
+ core::stringw str = L"Managed Lights [";
+ str += driver->getName();
+ str += "] FPS:";
+ str += fps;
+ device->setWindowCaption(str.c_str());
+ }
+ }
+
+ myLightManager->drop(); // Drop my implicit reference
+ device->drop();
+ return 0;
+}
+
+/*
+**/
+
diff --git a/examples/20.ManagedLights/tutorial.html b/examples/20.ManagedLights/tutorial.html new file mode 100644 index 0000000..b7d3cd6 --- /dev/null +++ b/examples/20.ManagedLights/tutorial.html @@ -0,0 +1,210 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 20: Managed Lights</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 20: Managed Lights </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/020shot.jpg" alt="020shot.jpg"/> +</div> + <p>Written by Colin MacDonald. This tutorial explains the use of the Light Manager of Irrlicht. It enables the use of more dynamic light sources than the actual hardware supports. Further applications of the Light Manager, such as per scene node callbacks, are left out for simplicity of the example. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"><span class="keyword">using namespace </span>core;</div><div class="line"></div><div class="line"><span class="preprocessor">#if defined(_MSC_VER)</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif // MSC_VER</span></div></div><!-- fragment --><p> Normally, you are limited to 8 dynamic lights per scene: this is a hardware limit. If you want to use more dynamic lights in your scene, then you can register an optional light manager that allows you to to turn lights on and off at specific point during rendering. You are still limited to 8 lights, but the limit is per scene node.</p> +<p>This is completely optional: if you do not register a light manager, then a default distance-based scheme will be used to prioritise hardware lights based on their distance from the active camera.</p> +<p>NO_MANAGEMENT disables the light manager and shows Irrlicht's default light behaviour. The 8 lights nearest to the camera will be turned on, and other lights will be turned off. In this example, this produces a funky looking but incoherent light display.</p> +<p>LIGHTS_NEAREST_NODE shows an implementation that turns on a limited number of lights per mesh scene node. If finds the 3 lights that are nearest to the node being rendered, and turns them on, turning all other lights off. This works, but as it operates on every light for every node, it does not scale well with many lights. The flickering you can see in this demo is due to the lights swapping their relative positions from the cubes (a deliberate demonstration of the limitations of this technique).</p> +<p>LIGHTS_IN_ZONE shows a technique for turning on lights based on a 'zone'. Each empty scene node is considered to be the parent of a zone. When nodes are rendered, they turn off all lights, then find their parent 'zone' and turn on all lights that are inside that zone, i.e. are descendents of it in the scene graph. This produces true 'local' lighting for each cube in this example. You could use a similar technique to locally light all meshes in (e.g.) a room, without the lights spilling out to other rooms.</p> +<p>This light manager is also an event receiver; this is purely for simplicity in this example, it's neither necessary nor recommended for a real application. </p><div class="fragment"><div class="line"><span class="keyword">class </span>CMyLightManager : <span class="keyword">public</span> scene::ILightManager, <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"> <span class="keyword">typedef</span> <span class="keyword">enum</span></div><div class="line"> {</div><div class="line"> NO_MANAGEMENT,</div><div class="line"> LIGHTS_NEAREST_NODE,</div><div class="line"> LIGHTS_IN_ZONE</div><div class="line"> }</div><div class="line"> LightManagementMode;</div><div class="line"></div><div class="line"> LightManagementMode Mode;</div><div class="line"> LightManagementMode RequestedMode;</div><div class="line"></div><div class="line"> <span class="comment">// These data represent the state information that this light manager</span></div><div class="line"> <span class="comment">// is interested in.</span></div><div class="line"> scene::ISceneManager * SceneManager;</div><div class="line"> core::array<scene::ISceneNode*> * SceneLightList;</div><div class="line"> scene::E_SCENE_NODE_RENDER_PASS CurrentRenderPass;</div><div class="line"> scene::ISceneNode * CurrentSceneNode;</div><div class="line"></div><div class="line"><span class="keyword">public</span>:</div><div class="line"> CMyLightManager(scene::ISceneManager* sceneManager)</div><div class="line"> : Mode(NO_MANAGEMENT), RequestedMode(NO_MANAGEMENT),</div><div class="line"> SceneManager(sceneManager), SceneLightList(0),</div><div class="line"> CurrentRenderPass(scene::ESNRP_NONE), CurrentSceneNode(0)</div><div class="line"> { }</div><div class="line"></div><div class="line"> <span class="comment">// The input receiver interface, which just switches light management strategy</span></div><div class="line"> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent & event)</div><div class="line"> {</div><div class="line"> <span class="keywordtype">bool</span> handled = <span class="keyword">false</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (event.EventType == irr::EET_KEY_INPUT_EVENT && event.KeyInput.PressedDown)</div><div class="line"> {</div><div class="line"> handled = <span class="keyword">true</span>;</div><div class="line"> <span class="keywordflow">switch</span>(event.KeyInput.Key)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> irr::KEY_KEY_1:</div><div class="line"> RequestedMode = NO_MANAGEMENT;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> irr::KEY_KEY_2:</div><div class="line"> RequestedMode = LIGHTS_NEAREST_NODE;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> irr::KEY_KEY_3:</div><div class="line"> RequestedMode = LIGHTS_IN_ZONE;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">default</span>:</div><div class="line"> handled = <span class="keyword">false</span>;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span>(NO_MANAGEMENT == RequestedMode)</div><div class="line"> SceneManager->setLightManager(0); <span class="comment">// Show that it's safe to register the light manager</span></div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> SceneManager->setLightManager(<span class="keyword">this</span>);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> handled;</div><div class="line"> }</div><div class="line"></div><div class="line"></div><div class="line"> <span class="comment">// This is called before the first scene node is rendered.</span></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> OnPreRender(core::array<scene::ISceneNode*> & lightList)</div><div class="line"> {</div><div class="line"> <span class="comment">// Update the mode; changing it here ensures that it's consistent throughout a render</span></div><div class="line"> Mode = RequestedMode;</div><div class="line"></div><div class="line"> <span class="comment">// Store the light list. I am free to alter this list until the end of OnPostRender().</span></div><div class="line"> SceneLightList = &lightList;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Called after the last scene node is rendered.</span></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> OnPostRender()</div><div class="line"> {</div><div class="line"> <span class="comment">// Since light management might be switched off in the event handler, we'll turn all</span></div><div class="line"> <span class="comment">// lights on to ensure that they are in a consistent state. You wouldn't normally have</span></div><div class="line"> <span class="comment">// to do this when using a light manager, since you'd continue to do light management</span></div><div class="line"> <span class="comment">// yourself.</span></div><div class="line"> <span class="keywordflow">for</span> (u32 i = 0; i < SceneLightList->size(); i++)</div><div class="line"> (*SceneLightList)[i]->setVisible(<span class="keyword">true</span>);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> OnRenderPassPreRender(scene::E_SCENE_NODE_RENDER_PASS renderPass)</div><div class="line"> {</div><div class="line"> <span class="comment">// I don't have to do anything here except remember which render pass I am in.</span></div><div class="line"> CurrentRenderPass = renderPass;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> OnRenderPassPostRender(scene::E_SCENE_NODE_RENDER_PASS renderPass)</div><div class="line"> {</div><div class="line"> <span class="comment">// I only want solid nodes to be lit, so after the solid pass, turn all lights off.</span></div><div class="line"> <span class="keywordflow">if</span> (scene::ESNRP_SOLID == renderPass)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">for</span> (u32 i = 0; i < SceneLightList->size(); ++i)</div><div class="line"> (*SceneLightList)[i]->setVisible(<span class="keyword">false</span>);</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// This is called before the specified scene node is rendered</span></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> OnNodePreRender(scene::ISceneNode* node)</div><div class="line"> {</div><div class="line"> CurrentSceneNode = node;</div><div class="line"></div><div class="line"> <span class="comment">// This light manager only considers solid objects, but you are free to manipulate</span></div><div class="line"> <span class="comment">// lights during any phase, depending on your requirements.</span></div><div class="line"> <span class="keywordflow">if</span> (scene::ESNRP_SOLID != CurrentRenderPass)</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"></div><div class="line"> <span class="comment">// And in fact for this example, I only want to consider lighting for cube scene</span></div><div class="line"> <span class="comment">// nodes. You will probably want to deal with lighting for (at least) mesh /</span></div><div class="line"> <span class="comment">// animated mesh scene nodes as well.</span></div><div class="line"> <span class="keywordflow">if</span> (node->getType() != scene::ESNT_CUBE)</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (LIGHTS_NEAREST_NODE == Mode)</div><div class="line"> {</div><div class="line"> <span class="comment">// This is a naive implementation that prioritises every light in the scene</span></div><div class="line"> <span class="comment">// by its proximity to the node being rendered. This produces some flickering</span></div><div class="line"> <span class="comment">// when lights orbit closer to a cube than its 'zone' lights.</span></div><div class="line"> <span class="keyword">const</span> vector3df nodePosition = node->getAbsolutePosition();</div><div class="line"></div><div class="line"> <span class="comment">// Sort the light list by prioritising them based on their distance from the node</span></div><div class="line"> <span class="comment">// that's about to be rendered.</span></div><div class="line"> array<LightDistanceElement> sortingArray;</div><div class="line"> sortingArray.reallocate(SceneLightList->size());</div><div class="line"></div><div class="line"> u32 i;</div><div class="line"> <span class="keywordflow">for</span>(i = 0; i < SceneLightList->size(); ++i)</div><div class="line"> {</div><div class="line"> scene::ISceneNode* lightNode = (*SceneLightList)[i];</div><div class="line"> <span class="keyword">const</span> f64 distance = lightNode->getAbsolutePosition().getDistanceFromSQ(nodePosition);</div><div class="line"> sortingArray.push_back(LightDistanceElement(lightNode, distance));</div><div class="line"> }</div><div class="line"></div><div class="line"> sortingArray.sort();</div><div class="line"></div><div class="line"> <span class="comment">// The list is now sorted by proximity to the node.</span></div><div class="line"> <span class="comment">// Turn on the three nearest lights, and turn the others off.</span></div><div class="line"> <span class="keywordflow">for</span>(i = 0; i < sortingArray.size(); ++i)</div><div class="line"> sortingArray[i].node->setVisible(i < 3);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span>(LIGHTS_IN_ZONE == Mode)</div><div class="line"> {</div><div class="line"> <span class="comment">// Empty scene nodes are used to represent 'zones'. For each solid mesh that</span></div><div class="line"> <span class="comment">// is being rendered, turn off all lights, then find its 'zone' parent, and turn</span></div><div class="line"> <span class="comment">// on all lights that are found under that node in the scene graph.</span></div><div class="line"> <span class="comment">// This is a general purpose algorithm that doesn't use any special</span></div><div class="line"> <span class="comment">// knowledge of how this particular scene graph is organised.</span></div><div class="line"> <span class="keywordflow">for</span> (u32 i = 0; i < SceneLightList->size(); ++i)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ((*SceneLightList)[i]->getType() != scene::ESNT_LIGHT)</div><div class="line"> <span class="keywordflow">continue</span>;</div><div class="line"> scene::ILightSceneNode* lightNode = <span class="keyword">static_cast<</span>scene::ILightSceneNode*<span class="keyword">></span>((*SceneLightList)[i]);</div><div class="line"> video::SLight & lightData = lightNode->getLightData();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (video::ELT_DIRECTIONAL != lightData.Type)</div><div class="line"> lightNode->setVisible(<span class="keyword">false</span>);</div><div class="line"> }</div><div class="line"></div><div class="line"> scene::ISceneNode * parentZone = findZone(node);</div><div class="line"> <span class="keywordflow">if</span> (parentZone)</div><div class="line"> turnOnZoneLights(parentZone);</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Called after the specified scene node is rendered</span></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> OnNodePostRender(scene::ISceneNode* node)</div><div class="line"> {</div><div class="line"> <span class="comment">// I don't need to do any light management after individual node rendering.</span></div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"></div><div class="line"> <span class="comment">// Find the empty scene node that is the parent of the specified node</span></div><div class="line"> scene::ISceneNode * findZone(scene::ISceneNode * node)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (!node)</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (node->getType() == scene::ESNT_EMPTY)</div><div class="line"> <span class="keywordflow">return</span> node;</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> findZone(node->getParent());</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Turn on all lights that are children (directly or indirectly) of the</span></div><div class="line"> <span class="comment">// specified scene node.</span></div><div class="line"> <span class="keywordtype">void</span> turnOnZoneLights(scene::ISceneNode * node)</div><div class="line"> {</div><div class="line"> core::list<scene::ISceneNode*> <span class="keyword">const</span> & children = node->getChildren();</div><div class="line"> <span class="keywordflow">for</span> (core::list<scene::ISceneNode*>::ConstIterator child = children.begin();</div><div class="line"> child != children.end(); ++child)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ((*child)->getType() == scene::ESNT_LIGHT)</div><div class="line"> (*child)->setVisible(<span class="keyword">true</span>);</div><div class="line"> <span class="keywordflow">else</span> <span class="comment">// Assume that lights don't have any children that are also lights</span></div><div class="line"> turnOnZoneLights(*child);</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"></div><div class="line"> <span class="comment">// A utility class to aid in sorting scene nodes into a distance order</span></div><div class="line"> <span class="keyword">class </span>LightDistanceElement</div><div class="line"> {</div><div class="line"> <span class="keyword">public</span>:</div><div class="line"> LightDistanceElement() {};</div><div class="line"></div><div class="line"> LightDistanceElement(scene::ISceneNode* n, f64 d)</div><div class="line"> : node(n), distance(d) { }</div><div class="line"></div><div class="line"> scene::ISceneNode* node;</div><div class="line"> f64 distance;</div><div class="line"></div><div class="line"> <span class="comment">// Lower distance elements are sorted to the start of the array</span></div><div class="line"> <span class="keywordtype">bool</span> operator < (<span class="keyword">const</span> LightDistanceElement& other)<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> <span class="keywordflow">return</span> (distance < other.distance);</div><div class="line"> }</div><div class="line"> };</div><div class="line">};</div></div><!-- fragment --> <div class="fragment"><div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argumentCount, <span class="keywordtype">char</span> * argumentValues[])</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> IrrlichtDevice *device = createDevice(driverType,</div><div class="line"> dimension2d<u32>(640, 480), 32);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span>(!device)</div><div class="line"> <span class="keywordflow">return</span> -1;</div><div class="line"></div><div class="line"> f32 <span class="keyword">const</span> lightRadius = 60.f; <span class="comment">// Enough to reach the far side of each 'zone'</span></div><div class="line"></div><div class="line"> video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line"> scene::ISceneManager* smgr = device->getSceneManager();</div><div class="line"> gui::IGUIEnvironment* guienv = device->getGUIEnvironment();</div><div class="line"></div><div class="line"> gui::IGUISkin* skin = guienv->getSkin();</div><div class="line"> <span class="keywordflow">if</span> (skin)</div><div class="line"> {</div><div class="line"> skin->setColor(gui::EGDC_BUTTON_TEXT, video::SColor(255, 255, 255, 255));</div><div class="line"> gui::IGUIFont* font = guienv->getFont(<span class="stringliteral">"../../media/fontlucida.png"</span>);</div><div class="line"> <span class="keywordflow">if</span>(font)</div><div class="line"> skin->setFont(font);</div><div class="line"> }</div><div class="line"></div><div class="line"> guienv->addStaticText(L<span class="stringliteral">"1 - No light management"</span>, core::rect<s32>(10,10,200,30));</div><div class="line"> guienv->addStaticText(L<span class="stringliteral">"2 - Closest 3 lights"</span>, core::rect<s32>(10,30,200,50));</div><div class="line"> guienv->addStaticText(L<span class="stringliteral">"3 - Lights in zone"</span>, core::rect<s32>(10,50,200,70));</div></div><!-- fragment --><p> Add several "zones". You could use this technique to light individual rooms, for example. </p><div class="fragment"><div class="line"> <span class="keywordflow">for</span>(f32 zoneX = -100.f; zoneX <= 100.f; zoneX += 50.f)</div><div class="line"> <span class="keywordflow">for</span>(f32 zoneY = -60.f; zoneY <= 60.f; zoneY += 60.f)</div><div class="line"> {</div><div class="line"> <span class="comment">// Start with an empty scene node, which we will use to represent a zone.</span></div><div class="line"> scene::ISceneNode * zoneRoot = smgr->addEmptySceneNode();</div><div class="line"> zoneRoot->setPosition(vector3df(zoneX, zoneY, 0));</div><div class="line"></div><div class="line"> <span class="comment">// Each zone contains a rotating cube</span></div><div class="line"> scene::IMeshSceneNode * node = smgr->addCubeSceneNode(15, zoneRoot);</div><div class="line"> scene::ISceneNodeAnimator * rotation = smgr->createRotationAnimator(vector3df(0.25f, 0.5f, 0.75f));</div><div class="line"> node->addAnimator(rotation);</div><div class="line"> rotation->drop();</div><div class="line"></div><div class="line"> <span class="comment">// And each cube has three lights attached to it. The lights are attached to billboards so</span></div><div class="line"> <span class="comment">// that we can see where they are. The billboards are attached to the cube, so that the</span></div><div class="line"> <span class="comment">// lights are indirect descendents of the same empty scene node as the cube.</span></div><div class="line"> scene::IBillboardSceneNode * billboard = smgr->addBillboardSceneNode(node);</div><div class="line"> billboard->setPosition(vector3df(0, -14, 30));</div><div class="line"> billboard->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );</div><div class="line"> billboard->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/particle.bmp"</span>));</div><div class="line"> billboard->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"> smgr->addLightSceneNode(billboard, vector3df(0, 0, 0), video::SColorf(1, 0, 0), lightRadius);</div><div class="line"></div><div class="line"> billboard = smgr->addBillboardSceneNode(node);</div><div class="line"> billboard->setPosition(vector3df(-21, -14, -21));</div><div class="line"> billboard->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );</div><div class="line"> billboard->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/particle.bmp"</span>));</div><div class="line"> billboard->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"> smgr->addLightSceneNode(billboard, vector3df(0, 0, 0), video::SColorf(0, 1, 0), lightRadius);</div><div class="line"></div><div class="line"> billboard = smgr->addBillboardSceneNode(node);</div><div class="line"> billboard->setPosition(vector3df(21, -14, -21));</div><div class="line"> billboard->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );</div><div class="line"> billboard->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/particle.bmp"</span>));</div><div class="line"> billboard->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"> smgr->addLightSceneNode(billboard, vector3df(0, 0, 0), video::SColorf(0, 0, 1), lightRadius);</div><div class="line"></div><div class="line"> <span class="comment">// Each cube also has a smaller cube rotating around it, to show that the cubes are being</span></div><div class="line"> <span class="comment">// lit by the lights in their 'zone', not just lights that are their direct children.</span></div><div class="line"> node = smgr->addCubeSceneNode(5, node);</div><div class="line"> node->setPosition(vector3df(0, 21, 0));</div><div class="line"> }</div><div class="line"></div><div class="line"> smgr->addCameraSceneNode(0, vector3df(0,0,-130), vector3df(0,0,0));</div><div class="line"></div><div class="line"> CMyLightManager * myLightManager = <span class="keyword">new</span> CMyLightManager(smgr);</div><div class="line"> smgr->setLightManager(0); <span class="comment">// This is the default: we won't do light management until told to do it.</span></div><div class="line"> device->setEventReceiver(myLightManager);</div><div class="line"></div><div class="line"> <span class="keywordtype">int</span> lastFps = -1;</div><div class="line"></div><div class="line"> <span class="keywordflow">while</span>(device->run())</div><div class="line"> {</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, video::SColor(255,100,101,140));</div><div class="line"> smgr->drawAll();</div><div class="line"> guienv->drawAll();</div><div class="line"> driver->endScene();</div><div class="line"></div><div class="line"> <span class="keywordtype">int</span> fps = driver->getFPS();</div><div class="line"> <span class="keywordflow">if</span>(fps != lastFps)</div><div class="line"> {</div><div class="line"> lastFps = fps;</div><div class="line"> core::stringw str = L<span class="stringliteral">"Managed Lights ["</span>;</div><div class="line"> str += driver->getName();</div><div class="line"> str += <span class="stringliteral">"] FPS:"</span>;</div><div class="line"> str += fps;</div><div class="line"> device->setWindowCaption(str.c_str());</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> myLightManager->drop(); <span class="comment">// Drop my implicit reference</span></div><div class="line"> device->drop();</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/21.Quake3Explorer/Makefile b/examples/21.Quake3Explorer/Makefile new file mode 100644 index 0000000..b2c6927 --- /dev/null +++ b/examples/21.Quake3Explorer/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 21.Quake3Explorer
+Sources = main.cpp sound.cpp q3factory.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+#CXXFLAGS = -O3 -ffast-math
+CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/21.Quake3Explorer/Quake3Explorer.cbp b/examples/21.Quake3Explorer/Quake3Explorer.cbp new file mode 100644 index 0000000..0b0c2ff --- /dev/null +++ b/examples/21.Quake3Explorer/Quake3Explorer.cbp @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 21 Quake 3 Explorer" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/Quake3Explorer" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/Quake3Explorer" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Unit filename="q3factory.cpp" /> + <Unit filename="q3factory.h" /> + <Unit filename="sound.cpp" /> + <Unit filename="sound.h" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/21.Quake3Explorer/Quake3Explorer.dev b/examples/21.Quake3Explorer/Quake3Explorer.dev new file mode 100644 index 0000000..193c6bd --- /dev/null +++ b/examples/21.Quake3Explorer/Quake3Explorer.dev @@ -0,0 +1,99 @@ +[Project]
+FileName=Quake3Explorer.dev
+Name=Irrlicht Example 21 Quake3 Explorer
+UnitCount=5
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=21.Quake3Explorer.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
+[Unit2]
+FileName=q3factory.cpp
+CompileCpp=1
+Folder=Irrlicht Example 21 Quake3 Explorer
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit3]
+FileName=q3factory.h
+CompileCpp=1
+Folder=Irrlicht Example 21 Quake3 Explorer
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit4]
+FileName=sound.cpp
+CompileCpp=1
+Folder=Irrlicht Example 21 Quake3 Explorer
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit5]
+FileName=sound.h
+CompileCpp=1
+Folder=Irrlicht Example 21 Quake3 Explorer
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
diff --git a/examples/21.Quake3Explorer/Quake3Explorer.vcproj b/examples/21.Quake3Explorer/Quake3Explorer.vcproj new file mode 100644 index 0000000..b869cc4 --- /dev/null +++ b/examples/21.Quake3Explorer/Quake3Explorer.vcproj @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="21.Quake3Explorer"
+ ProjectGUID="{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\21.Quake3MapExplorer.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/Quake3MapShader.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/QIfist /Oa"
+ Optimization="3"
+ GlobalOptimizations="TRUE"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="TRUE"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="TRUE"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="4"
+ BufferSecurityCheck="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"
+ CallingConvention="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\21.Quake3MapExplorer.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="FALSE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/21.Quake3Explorer/Quake3Explorer_vc10.vcxproj b/examples/21.Quake3Explorer/Quake3Explorer_vc10.vcxproj new file mode 100644 index 0000000..fd2e79a --- /dev/null +++ b/examples/21.Quake3Explorer/Quake3Explorer_vc10.vcxproj @@ -0,0 +1,200 @@ +ďťż<?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">
+ <ProjectName>21.Quake3Explorer</ProjectName>
+ <ProjectGuid>{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}</ProjectGuid>
+ <RootNamespace>21.Quake3Explorer</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\21.Quake3Explorer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)Quake3MapShader.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\21.Quake3Explorer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)Quake3MapShader.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>FastCall</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\21.Quake3Explorer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>FastCall</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\21.Quake3Explorer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ <ClCompile Include="q3factory.cpp" />
+ <ClCompile Include="sound.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="q3factory.h" />
+ <ClInclude Include="sound.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/21.Quake3Explorer/Quake3Explorer_vc11.vcxproj b/examples/21.Quake3Explorer/Quake3Explorer_vc11.vcxproj new file mode 100644 index 0000000..fd2e79a --- /dev/null +++ b/examples/21.Quake3Explorer/Quake3Explorer_vc11.vcxproj @@ -0,0 +1,200 @@ +ďťż<?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">
+ <ProjectName>21.Quake3Explorer</ProjectName>
+ <ProjectGuid>{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}</ProjectGuid>
+ <RootNamespace>21.Quake3Explorer</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\21.Quake3Explorer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)Quake3MapShader.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\21.Quake3Explorer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)Quake3MapShader.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>FastCall</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\21.Quake3Explorer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>FastCall</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\21.Quake3Explorer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ <ClCompile Include="q3factory.cpp" />
+ <ClCompile Include="sound.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="q3factory.h" />
+ <ClInclude Include="sound.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/21.Quake3Explorer/Quake3Explorer_vc12.vcxproj b/examples/21.Quake3Explorer/Quake3Explorer_vc12.vcxproj new file mode 100644 index 0000000..cec1289 --- /dev/null +++ b/examples/21.Quake3Explorer/Quake3Explorer_vc12.vcxproj @@ -0,0 +1,200 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>21.Quake3Explorer</ProjectName>
+ <ProjectGuid>{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}</ProjectGuid>
+ <RootNamespace>21.Quake3Explorer</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\21.Quake3Explorer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)Quake3MapShader.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\21.Quake3Explorer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)Quake3MapShader.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>FastCall</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\21.Quake3Explorer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>FastCall</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\21.Quake3Explorer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ <ClCompile Include="q3factory.cpp" />
+ <ClCompile Include="sound.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="q3factory.h" />
+ <ClInclude Include="sound.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/21.Quake3Explorer/Quake3Explorer_vc8.vcproj b/examples/21.Quake3Explorer/Quake3Explorer_vc8.vcproj new file mode 100644 index 0000000..9045027 --- /dev/null +++ b/examples/21.Quake3Explorer/Quake3Explorer_vc8.vcproj @@ -0,0 +1,210 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="21.Quake3Explorer_vc8"
+ ProjectGUID="{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}"
+ RootNamespace="21.Quake3Explorer_vc8"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <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"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\21.Quake3MapExplorer.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/Quake3MapShader.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ CallingConvention="1"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\21.Quake3MapExplorer.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\q3factory.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\q3factory.h"
+ >
+ </File>
+ <File
+ RelativePath=".\sound.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\sound.h"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/21.Quake3Explorer/Quake3Explorer_vc9.vcproj b/examples/21.Quake3Explorer/Quake3Explorer_vc9.vcproj new file mode 100644 index 0000000..36aee41 --- /dev/null +++ b/examples/21.Quake3Explorer/Quake3Explorer_vc9.vcproj @@ -0,0 +1,204 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="21.Quake3Explorer_vc9"
+ ProjectGUID="{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}"
+ RootNamespace="21.Quake3Explorer_vc9"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <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"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\21.Quake3MapExplorer.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/Quake3MapShader.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="0"
+ CallingConvention="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\21.Quake3MapExplorer.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\q3factory.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\q3factory.h"
+ >
+ </File>
+ <File
+ RelativePath=".\sound.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\sound.h"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/21.Quake3Explorer/main.cpp b/examples/21.Quake3Explorer/main.cpp new file mode 100644 index 0000000..b2277e6 --- /dev/null +++ b/examples/21.Quake3Explorer/main.cpp @@ -0,0 +1,2188 @@ +/** Example 021 Quake3 Explorer
+
+This Tutorial shows how to load different Quake 3 maps.
+
+Features:
+ - Load BSP Archives at Runtime from the menu
+ - Load a Map from the menu. Showing with Screenshot
+ - Set the VideoDriver at runtime from menu
+ - Adjust GammaLevel at runtime
+ - Create SceneNodes for the Shaders
+ - Load EntityList and create Entity SceneNodes
+ - Create Players with Weapons and with Collision Response
+ - Play music
+
+You can download the Quake III Arena demo ( copyright id software )
+at the following location:
+ftp://ftp.idsoftware.com/idstuff/quake3/win32/q3ademo.exe
+
+Copyright 2006-2011 Burningwater, Thomas Alten
+*/
+
+#include "driverChoice.h"
+#include <irrlicht.h>
+#include "q3factory.h"
+#include "sound.h"
+
+/*
+ Game Data is used to hold Data which is needed to drive the game
+*/
+struct GameData
+{
+ GameData ( const path &startupDir) :
+ retVal(0), StartupDir(startupDir), createExDevice(0), Device(0)
+ {
+ setDefault ();
+ }
+
+ void setDefault ();
+ s32 save ( const path &filename );
+ s32 load ( const path &filename );
+
+ s32 debugState;
+ s32 gravityState;
+ s32 flyTroughState;
+ s32 wireFrame;
+ s32 guiActive;
+ s32 guiInputActive;
+ f32 GammaValue;
+ s32 retVal;
+ s32 sound;
+
+ path StartupDir;
+ stringw CurrentMapName;
+ array<path> CurrentArchiveList;
+
+ vector3df PlayerPosition;
+ vector3df PlayerRotation;
+
+ tQ3EntityList Variable;
+
+ Q3LevelLoadParameter loadParam;
+ SIrrlichtCreationParameters deviceParam;
+ funcptr_createDeviceEx createExDevice;
+ IrrlichtDevice *Device;
+};
+
+/*
+ set default settings
+*/
+void GameData::setDefault ()
+{
+ debugState = EDS_OFF;
+ gravityState = 1;
+ flyTroughState = 0;
+ wireFrame = 0;
+ guiActive = 1;
+ guiInputActive = 0;
+ GammaValue = 1.f;
+
+ // default deviceParam;
+#if defined ( _IRR_WINDOWS_ )
+ deviceParam.DriverType = EDT_DIRECT3D9;
+#else
+ deviceParam.DriverType = EDT_OPENGL;
+#endif
+ deviceParam.WindowSize.Width = 800;
+ deviceParam.WindowSize.Height = 600;
+ deviceParam.Fullscreen = false;
+ deviceParam.Bits = 24;
+ deviceParam.ZBufferBits = 16;
+ deviceParam.Vsync = false;
+ deviceParam.AntiAlias = false;
+
+ // default Quake3 loadParam
+ loadParam.defaultLightMapMaterial = EMT_LIGHTMAP;
+ loadParam.defaultModulate = EMFN_MODULATE_1X;
+ loadParam.defaultFilter = EMF_ANISOTROPIC_FILTER;
+ loadParam.verbose = 2;
+ loadParam.mergeShaderBuffer = 1; // merge meshbuffers with same material
+ loadParam.cleanUnResolvedMeshes = 1; // should unresolved meshes be cleaned. otherwise blue texture
+ loadParam.loadAllShaders = 1; // load all scripts in the script directory
+ loadParam.loadSkyShader = 0; // load sky Shader
+ loadParam.alpharef = 1;
+
+ sound = 0;
+
+ CurrentMapName = "";
+ CurrentArchiveList.clear ();
+
+ // Explorer Media directory
+ CurrentArchiveList.push_back ( StartupDir + "../../media/" );
+
+ // Add the original quake3 files before you load your custom map
+ // Most mods are using the original shaders, models&items&weapons
+ CurrentArchiveList.push_back("/q/baseq3/");
+
+ CurrentArchiveList.push_back(StartupDir + "../../media/map-20kdm2.pk3");
+}
+
+/*
+ Load the current game State from a typical quake3 cfg file
+*/
+s32 GameData::load ( const path &filename )
+{
+ if (!Device)
+ return 0;
+
+ // the quake3 mesh loader can also handle *.shader and *.cfg file
+ IQ3LevelMesh* mesh = (IQ3LevelMesh*) Device->getSceneManager()->getMesh ( filename );
+ if (!mesh)
+ return 0;
+
+ tQ3EntityList &entityList = mesh->getEntityList ();
+
+ stringc s;
+ u32 pos;
+
+ for ( u32 e = 0; e != entityList.size (); ++e )
+ {
+ //dumpShader ( s, &entityList[e], false );
+ //printf ( s.c_str () );
+
+ for ( u32 g = 0; g != entityList[e].getGroupSize (); ++g )
+ {
+ const SVarGroup *group = entityList[e].getGroup ( g );
+
+ for ( u32 index = 0; index < group->Variable.size (); ++index )
+ {
+ const SVariable &v = group->Variable[index];
+ pos = 0;
+ if ( v.name == "playerposition" )
+ {
+ PlayerPosition = getAsVector3df ( v.content, pos );
+ }
+ else
+ if ( v.name == "playerrotation" )
+ {
+ PlayerRotation = getAsVector3df ( v.content, pos );
+ }
+ }
+ }
+ }
+
+ return 1;
+}
+
+/*
+ Store the current game State in a quake3 configuration file
+*/
+s32 GameData::save ( const path &filename )
+{
+ return 0;
+ if (!Device)
+ return 0;
+
+ c8 buf[128];
+ u32 i;
+
+ // Store current Archive for restart
+ CurrentArchiveList.clear();
+ IFileSystem *fs = Device->getFileSystem();
+ for ( i = 0; i != fs->getFileArchiveCount(); ++i )
+ {
+ CurrentArchiveList.push_back ( fs->getFileArchive(i)->getFileList()->getPath() );
+ }
+
+ // Store Player Position and Rotation
+ ICameraSceneNode * camera = Device->getSceneManager()->getActiveCamera ();
+ if ( camera )
+ {
+ PlayerPosition = camera->getPosition ();
+ PlayerRotation = camera->getRotation ();
+ }
+
+ IWriteFile *file = fs->createAndWriteFile ( filename );
+ if (!file)
+ return 0;
+
+ snprintf ( buf, 128, "playerposition %.f %.f %.f\nplayerrotation %.f %.f %.f\n",
+ PlayerPosition.X, PlayerPosition.Z, PlayerPosition.Y,
+ PlayerRotation.X, PlayerRotation.Z, PlayerRotation.Y);
+ file->write ( buf, (s32) strlen ( buf ) );
+ for ( i = 0; i != fs->getFileArchiveCount(); ++i )
+ {
+ snprintf ( buf, 128, "archive %s\n",stringc ( fs->getFileArchive(i)->getFileList()->getPath() ).c_str () );
+ file->write ( buf, (s32) strlen ( buf ) );
+ }
+
+ file->drop ();
+ return 1;
+}
+
+/*
+ Representing a player
+*/
+struct Q3Player : public IAnimationEndCallBack
+{
+ Q3Player ()
+ : Device(0), MapParent(0), Mesh(0), WeaponNode(0), StartPositionCurrent(0)
+ {
+ animation[0] = 0;
+ memset(Anim, 0, sizeof(TimeFire)*4);
+ }
+
+ virtual void OnAnimationEnd(IAnimatedMeshSceneNode* node);
+
+ void create ( IrrlichtDevice *device,
+ IQ3LevelMesh* mesh,
+ ISceneNode *mapNode,
+ IMetaTriangleSelector *meta
+ );
+ void shutdown ();
+ void setAnim ( const c8 *name );
+ void respawn ();
+ void setpos ( const vector3df &pos, const vector3df& rotation );
+
+ ISceneNodeAnimatorCollisionResponse * cam() { return camCollisionResponse ( Device ); }
+
+ IrrlichtDevice *Device;
+ ISceneNode* MapParent;
+ IQ3LevelMesh* Mesh;
+ IAnimatedMeshSceneNode* WeaponNode;
+ s32 StartPositionCurrent;
+ TimeFire Anim[4];
+ c8 animation[64];
+ c8 buf[64];
+};
+
+
+/* End player
+*/
+void Q3Player::shutdown ()
+{
+ setAnim ( 0 );
+
+ dropElement (WeaponNode);
+
+ if ( Device )
+ {
+ ICameraSceneNode* camera = Device->getSceneManager()->getActiveCamera();
+ dropElement ( camera );
+ Device = 0;
+ }
+
+ MapParent = 0;
+ Mesh = 0;
+}
+
+
+/* create a new player
+*/
+void Q3Player::create ( IrrlichtDevice *device, IQ3LevelMesh* mesh, ISceneNode *mapNode, IMetaTriangleSelector *meta )
+{
+ setTimeFire ( Anim + 0, 200, FIRED );
+ setTimeFire ( Anim + 1, 5000 );
+
+ if (!device)
+ return;
+ // load FPS weapon to Camera
+ Device = device;
+ Mesh = mesh;
+ MapParent = mapNode;
+
+ ISceneManager *smgr = device->getSceneManager ();
+ IVideoDriver * driver = device->getVideoDriver();
+
+ ICameraSceneNode* camera = 0;
+
+ SKeyMap keyMap[10];
+ keyMap[0].Action = EKA_MOVE_FORWARD;
+ keyMap[0].KeyCode = KEY_UP;
+ keyMap[1].Action = EKA_MOVE_FORWARD;
+ keyMap[1].KeyCode = KEY_KEY_W;
+
+ keyMap[2].Action = EKA_MOVE_BACKWARD;
+ keyMap[2].KeyCode = KEY_DOWN;
+ keyMap[3].Action = EKA_MOVE_BACKWARD;
+ keyMap[3].KeyCode = KEY_KEY_S;
+
+ keyMap[4].Action = EKA_STRAFE_LEFT;
+ keyMap[4].KeyCode = KEY_LEFT;
+ keyMap[5].Action = EKA_STRAFE_LEFT;
+ keyMap[5].KeyCode = KEY_KEY_A;
+
+ keyMap[6].Action = EKA_STRAFE_RIGHT;
+ keyMap[6].KeyCode = KEY_RIGHT;
+ keyMap[7].Action = EKA_STRAFE_RIGHT;
+ keyMap[7].KeyCode = KEY_KEY_D;
+
+ keyMap[8].Action = EKA_JUMP_UP;
+ keyMap[8].KeyCode = KEY_KEY_J;
+
+ keyMap[9].Action = EKA_CROUCH;
+ keyMap[9].KeyCode = KEY_KEY_C;
+
+ camera = smgr->addCameraSceneNodeFPS(0, 100.0f, 0.6f, -1, keyMap, 10, false, 0.6f);
+ camera->setName ( "First Person Camera" );
+ //camera->setFOV ( 100.f * core::DEGTORAD );
+ camera->setFarValue( 20000.f );
+
+ IAnimatedMeshMD2* weaponMesh = (IAnimatedMeshMD2*) smgr->getMesh("gun.md2");
+ if ( 0 == weaponMesh )
+ return;
+
+ if ( weaponMesh->getMeshType() == EAMT_MD2 )
+ {
+ s32 count = weaponMesh->getAnimationCount();
+ for ( s32 i = 0; i != count; ++i )
+ {
+ snprintf ( buf, 64, "Animation: %s", weaponMesh->getAnimationName(i) );
+ device->getLogger()->log(buf, ELL_INFORMATION);
+ }
+ }
+
+ WeaponNode = smgr->addAnimatedMeshSceneNode(
+ weaponMesh,
+ smgr->getActiveCamera(),
+ 10,
+ vector3df( 0, 0, 0),
+ vector3df(-90,-90,90)
+ );
+ WeaponNode->setMaterialFlag(EMF_LIGHTING, false);
+ WeaponNode->setMaterialTexture(0, driver->getTexture( "gun.jpg"));
+ WeaponNode->setLoopMode ( false );
+ WeaponNode->setName ( "tommi the gun man" );
+
+ //create a collision auto response animator
+ ISceneNodeAnimator* anim =
+ smgr->createCollisionResponseAnimator( meta, camera,
+ vector3df(30,45,30),
+ getGravity ( "earth" ),
+ vector3df(0,40,0),
+ 0.0005f
+ );
+
+ camera->addAnimator( anim );
+ anim->drop();
+
+ if ( meta )
+ {
+ meta->drop ();
+ }
+
+ respawn ();
+ setAnim ( "idle" );
+}
+
+
+/*
+ so we need a good starting Position in the level.
+ we can ask the Quake3 Loader for all entities with class_name "info_player_deathmatch"
+*/
+void Q3Player::respawn ()
+{
+ if (!Device)
+ return;
+ ICameraSceneNode* camera = Device->getSceneManager()->getActiveCamera();
+
+ Device->getLogger()->log( "respawn" );
+
+ if ( StartPositionCurrent >= Q3StartPosition (
+ Mesh, camera,StartPositionCurrent++,
+ cam ()->getEllipsoidTranslation() )
+ )
+ {
+ StartPositionCurrent = 0;
+ }
+}
+
+/*
+ set Player position from saved coordinates
+*/
+void Q3Player::setpos ( const vector3df &pos, const vector3df &rotation )
+{
+ if (!Device)
+ return;
+ Device->getLogger()->log( "setpos" );
+
+ ICameraSceneNode* camera = Device->getSceneManager()->getActiveCamera();
+ if ( camera )
+ {
+ camera->setPosition ( pos );
+ camera->setRotation ( rotation );
+ //! New. FPSCamera and animators catches reset on animate 0
+ camera->OnAnimate ( 0 );
+ }
+}
+
+/* set the Animation of the player and weapon
+*/
+void Q3Player::setAnim ( const c8 *name )
+{
+ if ( name )
+ {
+ snprintf ( animation, 64, "%s", name );
+ if ( WeaponNode )
+ {
+ WeaponNode->setAnimationEndCallback ( this );
+ WeaponNode->setMD2Animation ( animation );
+ }
+ }
+ else
+ {
+ animation[0] = 0;
+ if ( WeaponNode )
+ {
+ WeaponNode->setAnimationEndCallback ( 0 );
+ }
+ }
+}
+
+
+// Callback
+void Q3Player::OnAnimationEnd(IAnimatedMeshSceneNode* node)
+{
+ setAnim ( 0 );
+}
+
+
+
+/* GUI Elements
+*/
+struct GUI
+{
+ GUI ()
+ {
+ memset ( this, 0, sizeof ( *this ) );
+ }
+
+ void drop()
+ {
+ dropElement ( Window );
+ dropElement ( Logo );
+ }
+
+ IGUIComboBox* VideoDriver;
+ IGUIComboBox* VideoMode;
+ IGUICheckBox* FullScreen;
+ IGUICheckBox* Bit32;
+ IGUIScrollBar* MultiSample;
+ IGUIButton* SetVideoMode;
+
+ IGUIScrollBar* Tesselation;
+ IGUIScrollBar* Gamma;
+ IGUICheckBox* Collision;
+ IGUICheckBox* Visible_Map;
+ IGUICheckBox* Visible_Shader;
+ IGUICheckBox* Visible_Fog;
+ IGUICheckBox* Visible_Unresolved;
+ IGUICheckBox* Visible_Skydome;
+ IGUIButton* Respawn;
+
+ IGUITable* ArchiveList;
+ IGUIButton* ArchiveAdd;
+ IGUIButton* ArchiveRemove;
+ IGUIFileOpenDialog* ArchiveFileOpen;
+ IGUIButton* ArchiveUp;
+ IGUIButton* ArchiveDown;
+
+ IGUIListBox* MapList;
+ IGUITreeView* SceneTree;
+ IGUIStaticText* StatusLine;
+ IGUIImage* Logo;
+ IGUIWindow* Window;
+};
+
+
+/*
+ CQuake3EventHandler controls the game
+*/
+class CQuake3EventHandler : public IEventReceiver
+{
+public:
+
+ CQuake3EventHandler( GameData *gameData );
+ virtual ~CQuake3EventHandler ();
+
+ void Animate();
+ void Render();
+
+ void AddArchive ( const path& archiveName );
+ void LoadMap ( const stringw& mapName, s32 collision );
+ void CreatePlayers();
+ void AddSky( u32 dome, const c8 *texture );
+ Q3Player *GetPlayer ( u32 index ) { return &Player[index]; }
+
+ void CreateGUI();
+ void SetGUIActive( s32 command);
+
+ bool OnEvent(const SEvent& eve);
+
+
+private:
+
+ GameData *Game;
+
+ IQ3LevelMesh* Mesh;
+ ISceneNode* MapParent;
+ ISceneNode* ShaderParent;
+ ISceneNode* ItemParent;
+ ISceneNode* UnresolvedParent;
+ ISceneNode* BulletParent;
+ ISceneNode* FogParent;
+ ISceneNode * SkyNode;
+ IMetaTriangleSelector *Meta;
+
+ c8 buf[256];
+
+ Q3Player Player[2];
+
+ struct SParticleImpact
+ {
+ u32 when;
+ vector3df pos;
+ vector3df outVector;
+ };
+ array<SParticleImpact> Impacts;
+ void useItem( Q3Player * player);
+ void createParticleImpacts( u32 now );
+
+ void createTextures ();
+ void addSceneTreeItem( ISceneNode * parent, IGUITreeViewNode* nodeParent);
+
+ GUI gui;
+ void dropMap ();
+};
+
+/* Constructor
+*/
+CQuake3EventHandler::CQuake3EventHandler( GameData *game )
+: Game(game), Mesh(0), MapParent(0), ShaderParent(0), ItemParent(0), UnresolvedParent(0),
+ BulletParent(0), FogParent(0), SkyNode(0), Meta(0)
+{
+ buf[0]=0;
+ // Also use 16 Bit Textures for 16 Bit RenderDevice
+ if ( Game->deviceParam.Bits == 16 )
+ {
+ game->Device->getVideoDriver()->setTextureCreationFlag(ETCF_ALWAYS_16_BIT, true);
+ }
+
+ // Quake3 Shader controls Z-Writing
+ game->Device->getSceneManager()->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true);
+
+ // create internal textures
+ createTextures ();
+
+ sound_init ( game->Device );
+
+ Game->Device->setEventReceiver ( this );
+}
+
+
+// destructor
+CQuake3EventHandler::~CQuake3EventHandler ()
+{
+ Player[0].shutdown ();
+ sound_shutdown ();
+
+ Game->save( "explorer.cfg" );
+
+ Game->Device->drop();
+}
+
+
+// create runtime textures smog, fog
+void CQuake3EventHandler::createTextures()
+{
+ IVideoDriver * driver = Game->Device->getVideoDriver();
+
+ dimension2du dim(64, 64);
+
+ video::IImage* image;
+ u32 i;
+ u32 x;
+ u32 y;
+ u32 * data;
+ for ( i = 0; i != 8; ++i )
+ {
+ image = driver->createImage ( video::ECF_A8R8G8B8, dim);
+ data = (u32*) image->lock ();
+ for ( y = 0; y != dim.Height; ++y )
+ {
+ for ( x = 0; x != dim.Width; ++x )
+ {
+ data [x] = 0xFFFFFFFF;
+ }
+ data = (u32*) ( (u8*) data + image->getPitch() );
+ }
+ image->unlock();
+ snprintf ( buf, 64, "smoke_%02d", i );
+ driver->addTexture( buf, image );
+ image->drop ();
+ }
+
+ // fog
+ for ( i = 0; i != 1; ++i )
+ {
+ image = driver->createImage ( video::ECF_A8R8G8B8, dim);
+ data = (u32*) image->lock ();
+ for ( y = 0; y != dim.Height; ++y )
+ {
+ for ( x = 0; x != dim.Width; ++x )
+ {
+ data [x] = 0xFFFFFFFF;
+ }
+ data = (u32*) ( (u8*) data + image->getPitch() );
+ }
+ image->unlock();
+ snprintf ( buf, 64, "fog_%02d", i );
+ driver->addTexture( buf, image );
+ image->drop ();
+ }
+}
+
+
+/*
+ create the GUI
+*/
+void CQuake3EventHandler::CreateGUI()
+{
+
+ IGUIEnvironment *env = Game->Device->getGUIEnvironment();
+ IVideoDriver * driver = Game->Device->getVideoDriver();
+
+ gui.drop();
+
+ // set skin font
+ IGUIFont* font = env->getFont("fontlucida.png");
+ if (font)
+ env->getSkin()->setFont(font);
+ env->getSkin()->setColor ( EGDC_BUTTON_TEXT, video::SColor(240,0xAA,0xAA,0xAA) );
+ env->getSkin()->setColor ( EGDC_3D_HIGH_LIGHT, video::SColor(240,0x22,0x22,0x22) );
+ env->getSkin()->setColor ( EGDC_3D_FACE, video::SColor(240,0x44,0x44,0x44) );
+ env->getSkin()->setColor ( EGDC_EDITABLE, video::SColor(240,0x44,0x44,0x44) );
+ env->getSkin()->setColor ( EGDC_FOCUSED_EDITABLE, video::SColor(240,0x54,0x54,0x54) );
+ env->getSkin()->setColor ( EGDC_WINDOW, video::SColor(240,0x66,0x66,0x66) );
+
+ // minimal gui size 800x600
+ dimension2d<u32> dim ( 800, 600 );
+ dimension2d<u32> vdim ( Game->Device->getVideoDriver()->getScreenSize() );
+
+ if ( vdim.Height >= dim.Height && vdim.Width >= dim.Width )
+ {
+ //dim = vdim;
+ }
+ else
+ {
+ }
+
+ gui.Window = env->addWindow ( rect<s32> ( 0, 0, dim.Width, dim.Height ), false, L"Quake3 Explorer" );
+ gui.Window->setToolTipText ( L"Quake3Explorer. Loads and show various BSP File Format and Shaders." );
+ gui.Window->getCloseButton()->setToolTipText ( L"Quit Quake3 Explorer" );
+
+ // add a status line help text
+ gui.StatusLine = env->addStaticText( 0, rect<s32>( 5,dim.Height - 30,dim.Width - 5,dim.Height - 10),
+ false, false, gui.Window, -1, true
+ );
+
+
+ env->addStaticText ( L"VideoDriver:", rect<s32>( dim.Width - 400, 24, dim.Width - 310, 40 ),false, false, gui.Window, -1, false );
+ gui.VideoDriver = env->addComboBox(rect<s32>( dim.Width - 300, 24, dim.Width - 10, 40 ),gui.Window);
+ gui.VideoDriver->addItem(L"Direct3D 9.0c", EDT_DIRECT3D9 );
+ gui.VideoDriver->addItem(L"Direct3D 8.1", EDT_DIRECT3D8 );
+ gui.VideoDriver->addItem(L"OpenGL 1.5", EDT_OPENGL);
+ gui.VideoDriver->addItem(L"Software Renderer", EDT_SOFTWARE);
+ gui.VideoDriver->addItem(L"Burning's Video (TM) Thomas Alten", EDT_BURNINGSVIDEO);
+ gui.VideoDriver->setSelected ( gui.VideoDriver->getIndexForItemData ( Game->deviceParam.DriverType ) );
+ gui.VideoDriver->setToolTipText ( L"Use a VideoDriver" );
+
+ env->addStaticText ( L"VideoMode:", rect<s32>( dim.Width - 400, 44, dim.Width - 310, 60 ),false, false, gui.Window, -1, false );
+ gui.VideoMode = env->addComboBox(rect<s32>( dim.Width - 300, 44, dim.Width - 10, 60 ),gui.Window);
+ gui.VideoMode->setToolTipText ( L"Supported Screenmodes" );
+ IVideoModeList *modeList = Game->Device->getVideoModeList();
+ if ( modeList )
+ {
+ s32 i;
+ for ( i = 0; i != modeList->getVideoModeCount (); ++i )
+ {
+ u16 d = modeList->getVideoModeDepth ( i );
+ if ( d < 16 )
+ continue;
+
+ u16 w = modeList->getVideoModeResolution ( i ).Width;
+ u16 h = modeList->getVideoModeResolution ( i ).Height;
+ u32 val = w << 16 | h;
+
+ if ( gui.VideoMode->getIndexForItemData ( val ) >= 0 )
+ continue;
+
+ f32 aspect = (f32) w / (f32) h;
+ const c8 *a = "";
+ if ( core::equals ( aspect, 1.3333333333f ) ) a = "4:3";
+ else if ( core::equals ( aspect, 1.6666666f ) ) a = "15:9 widescreen";
+ else if ( core::equals ( aspect, 1.7777777f ) ) a = "16:9 widescreen";
+ else if ( core::equals ( aspect, 1.6f ) ) a = "16:10 widescreen";
+ else if ( core::equals ( aspect, 2.133333f ) ) a = "20:9 widescreen";
+
+ snprintf ( buf, sizeof ( buf ), "%d x %d, %s",w, h, a );
+ gui.VideoMode->addItem ( stringw ( buf ).c_str(), val );
+ }
+ }
+ gui.VideoMode->setSelected ( gui.VideoMode->getIndexForItemData (
+ Game->deviceParam.WindowSize.Width << 16 |
+ Game->deviceParam.WindowSize.Height ) );
+
+ gui.FullScreen = env->addCheckBox ( Game->deviceParam.Fullscreen, rect<s32>( dim.Width - 400, 64, dim.Width - 300, 80 ), gui.Window,-1, L"Fullscreen" );
+ gui.FullScreen->setToolTipText ( L"Set Fullscreen or Window Mode" );
+
+ gui.Bit32 = env->addCheckBox ( Game->deviceParam.Bits == 32, rect<s32>( dim.Width - 300, 64, dim.Width - 240, 80 ), gui.Window,-1, L"32Bit" );
+ gui.Bit32->setToolTipText ( L"Use 16 or 32 Bit" );
+
+ env->addStaticText ( L"MultiSample:", rect<s32>( dim.Width - 235, 64, dim.Width - 150, 80 ),false, false, gui.Window, -1, false );
+ gui.MultiSample = env->addScrollBar( true, rect<s32>( dim.Width - 150, 64, dim.Width - 70, 80 ), gui.Window,-1 );
+ gui.MultiSample->setMin ( 0 );
+ gui.MultiSample->setMax ( 8 );
+ gui.MultiSample->setSmallStep ( 1 );
+ gui.MultiSample->setLargeStep ( 1 );
+ gui.MultiSample->setPos ( Game->deviceParam.AntiAlias );
+ gui.MultiSample->setToolTipText ( L"Set the MultiSample (disable, 1x, 2x, 4x, 8x )" );
+
+ gui.SetVideoMode = env->addButton (rect<s32>( dim.Width - 60, 64, dim.Width - 10, 80 ), gui.Window, -1,L"set" );
+ gui.SetVideoMode->setToolTipText ( L"Set Video Mode with current values" );
+
+ env->addStaticText ( L"Gamma:", rect<s32>( dim.Width - 400, 104, dim.Width - 310, 120 ),false, false, gui.Window, -1, false );
+ gui.Gamma = env->addScrollBar( true, rect<s32>( dim.Width - 300, 104, dim.Width - 10, 120 ), gui.Window,-1 );
+ gui.Gamma->setMin ( 50 );
+ gui.Gamma->setMax ( 350 );
+ gui.Gamma->setSmallStep ( 1 );
+ gui.Gamma->setLargeStep ( 10 );
+ gui.Gamma->setPos ( core::floor32 ( Game->GammaValue * 100.f ) );
+ gui.Gamma->setToolTipText ( L"Adjust Gamma Ramp ( 0.5 - 3.5)" );
+ Game->Device->setGammaRamp ( Game->GammaValue, Game->GammaValue, Game->GammaValue, 0.f, 0.f );
+
+
+ env->addStaticText ( L"Tesselation:", rect<s32>( dim.Width - 400, 124, dim.Width - 310, 140 ),false, false, gui.Window, -1, false );
+ gui.Tesselation = env->addScrollBar( true, rect<s32>( dim.Width - 300, 124, dim.Width - 10, 140 ), gui.Window,-1 );
+ gui.Tesselation->setMin ( 2 );
+ gui.Tesselation->setMax ( 12 );
+ gui.Tesselation->setSmallStep ( 1 );
+ gui.Tesselation->setLargeStep ( 1 );
+ gui.Tesselation->setPos ( Game->loadParam.patchTesselation );
+ gui.Tesselation->setToolTipText ( L"How smooth should curved surfaces be rendered" );
+
+ gui.Collision = env->addCheckBox ( true, rect<s32>( dim.Width - 400, 150, dim.Width - 300, 166 ), gui.Window,-1, L"Collision" );
+ gui.Collision->setToolTipText ( L"Set collision on or off ( flythrough ). \nPress F7 on your Keyboard" );
+ gui.Visible_Map = env->addCheckBox ( true, rect<s32>( dim.Width - 300, 150, dim.Width - 240, 166 ), gui.Window,-1, L"Map" );
+ gui.Visible_Map->setToolTipText ( L"Show or not show the static part the Level. \nPress F3 on your Keyboard" );
+ gui.Visible_Shader = env->addCheckBox ( true, rect<s32>( dim.Width - 240, 150, dim.Width - 170, 166 ), gui.Window,-1, L"Shader" );
+ gui.Visible_Shader->setToolTipText ( L"Show or not show the Shader Nodes. \nPress F4 on your Keyboard" );
+ gui.Visible_Fog = env->addCheckBox ( true, rect<s32>( dim.Width - 170, 150, dim.Width - 110, 166 ), gui.Window,-1, L"Fog" );
+ gui.Visible_Fog->setToolTipText ( L"Show or not show the Fog Nodes. \nPress F5 on your Keyboard" );
+ gui.Visible_Unresolved = env->addCheckBox ( true, rect<s32>( dim.Width - 110, 150, dim.Width - 10, 166 ), gui.Window,-1, L"Unresolved" );
+ gui.Visible_Unresolved->setToolTipText ( L"Show the or not show the Nodes the Engine can't handle. \nPress F6 on your Keyboard" );
+ gui.Visible_Skydome = env->addCheckBox ( true, rect<s32>( dim.Width - 110, 180, dim.Width - 10, 196 ), gui.Window,-1, L"Skydome" );
+ gui.Visible_Skydome->setToolTipText ( L"Show the or not show the Skydome." );
+
+ //Respawn = env->addButton ( rect<s32>( dim.Width - 260, 90, dim.Width - 10, 106 ), 0,-1, L"Respawn" );
+
+ env->addStaticText ( L"Archives:", rect<s32>( 5, dim.Height - 530, dim.Width - 600,dim.Height - 514 ),false, false, gui.Window, -1, false );
+
+ gui.ArchiveAdd = env->addButton ( rect<s32>( dim.Width - 725, dim.Height - 530, dim.Width - 665, dim.Height - 514 ), gui.Window,-1, L"add" );
+ gui.ArchiveAdd->setToolTipText ( L"Add an archive, usually packed zip-archives (*.pk3) to the Filesystem" );
+ gui.ArchiveRemove = env->addButton ( rect<s32>( dim.Width - 660, dim.Height - 530, dim.Width - 600, dim.Height - 514 ), gui.Window,-1, L"del" );
+ gui.ArchiveRemove->setToolTipText ( L"Remove the selected archive from the FileSystem." );
+ gui.ArchiveUp = env->addButton ( rect<s32>( dim.Width - 575, dim.Height - 530, dim.Width - 515, dim.Height - 514 ), gui.Window,-1, L"up" );
+ gui.ArchiveUp->setToolTipText ( L"Arrange Archive Look-up Hirachy. Move the selected Archive up" );
+ gui.ArchiveDown = env->addButton ( rect<s32>( dim.Width - 510, dim.Height - 530, dim.Width - 440, dim.Height - 514 ), gui.Window,-1, L"down" );
+ gui.ArchiveDown->setToolTipText ( L"Arrange Archive Look-up Hirachy. Move the selected Archive down" );
+
+
+ gui.ArchiveList = env->addTable ( rect<s32>( 5,dim.Height - 510, dim.Width - 450,dim.Height - 410 ), gui.Window );
+ gui.ArchiveList->addColumn ( L"Type", 0 );
+ gui.ArchiveList->addColumn ( L"Real File Path", 1 );
+ gui.ArchiveList->setColumnWidth ( 0, 60 );
+ gui.ArchiveList->setColumnWidth ( 1, 284 );
+ gui.ArchiveList->setToolTipText ( L"Show the attached Archives" );
+
+
+ env->addStaticText ( L"Maps:", rect<s32>( 5, dim.Height - 400, dim.Width - 450,dim.Height - 380 ),false, false, gui.Window, -1, false );
+ gui.MapList = env->addListBox ( rect<s32>( 5,dim.Height - 380, dim.Width - 450,dim.Height - 40 ), gui.Window, -1, true );
+ gui.MapList->setToolTipText ( L"Show the current Maps in all Archives.\n Double-Click the Map to start the level" );
+
+
+ // create a visible Scene Tree
+ env->addStaticText ( L"Scenegraph:", rect<s32>( dim.Width - 400, dim.Height - 400, dim.Width - 5,dim.Height - 380 ),false, false, gui.Window, -1, false );
+ gui.SceneTree = env->addTreeView( rect<s32>( dim.Width - 400, dim.Height - 380, dim.Width - 5, dim.Height - 40 ),
+ gui.Window, -1, true, true, false );
+ gui.SceneTree->setToolTipText ( L"Show the current Scenegraph" );
+ gui.SceneTree->getRoot()->clearChildren();
+ addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() );
+
+
+ IGUIImageList* imageList = env->createImageList( driver->getTexture ( "iconlist.png" ),
+ dimension2di( 32, 32 ), true );
+
+ if ( imageList )
+ {
+ gui.SceneTree->setImageList( imageList );
+ imageList->drop ();
+ }
+
+
+ // load the engine logo
+ gui.Logo = env->addImage( driver->getTexture("irrlichtlogo3.png"), position2d<s32>(5, 16 ), true, 0 );
+ gui.Logo->setToolTipText ( L"The great Irrlicht Engine" );
+
+ AddArchive ( "" );
+}
+
+
+/*
+ Add an Archive to the FileSystems and updates the GUI
+*/
+void CQuake3EventHandler::AddArchive ( const path& archiveName )
+{
+ IFileSystem *fs = Game->Device->getFileSystem();
+ u32 i;
+
+ if ( archiveName.size () )
+ {
+ bool exists = false;
+ for ( i = 0; i != fs->getFileArchiveCount(); ++i )
+ {
+ if ( fs->getFileArchive(i)->getFileList()->getPath() == archiveName )
+ {
+ exists = true;
+ break;
+ }
+ }
+
+ if (!exists)
+ {
+ fs->addFileArchive(archiveName, true, false);
+ }
+ }
+
+ // store the current archives in game data
+ // show the attached Archive in proper order
+ if ( gui.ArchiveList )
+ {
+ gui.ArchiveList->clearRows();
+
+ for ( i = 0; i != fs->getFileArchiveCount(); ++i )
+ {
+ IFileArchive * archive = fs->getFileArchive ( i );
+
+ u32 index = gui.ArchiveList->addRow(i);
+
+ core::stringw typeName;
+ switch(archive->getType())
+ {
+ case io::EFAT_ZIP:
+ typeName = "ZIP";
+ break;
+ case io::EFAT_GZIP:
+ typeName = "gzip";
+ break;
+ case io::EFAT_FOLDER:
+ typeName = "Mount";
+ break;
+ case io::EFAT_PAK:
+ typeName = "PAK";
+ break;
+ case io::EFAT_TAR:
+ typeName = "TAR";
+ break;
+ default:
+ typeName = "archive";
+ }
+
+ gui.ArchiveList->setCellText ( index, 0, typeName );
+ gui.ArchiveList->setCellText ( index, 1, archive->getFileList()->getPath() );
+ }
+ }
+
+
+ // browse the archives for maps
+ if ( gui.MapList )
+ {
+ gui.MapList->clear();
+
+ IGUISpriteBank *bank = Game->Device->getGUIEnvironment()->getSpriteBank("sprite_q3map");
+ if ( 0 == bank )
+ bank = Game->Device->getGUIEnvironment()->addEmptySpriteBank("sprite_q3map");
+
+ SGUISprite sprite;
+ SGUISpriteFrame frame;
+ core::rect<s32> r;
+
+ bank->getSprites().clear();
+ bank->getPositions().clear ();
+ gui.MapList->setSpriteBank ( bank );
+
+ u32 g = 0;
+ core::stringw s;
+
+ // browse the attached file system
+ fs->setFileListSystem ( FILESYSTEM_VIRTUAL );
+ fs->changeWorkingDirectoryTo ( "/maps/" );
+ IFileList *fileList = fs->createFileList ();
+ fs->setFileListSystem ( FILESYSTEM_NATIVE );
+
+ for ( i=0; i< fileList->getFileCount(); ++i)
+ {
+ s = fileList->getFullFileName(i);
+ if ( s.find ( ".bsp" ) >= 0 )
+ {
+ // get level screenshot. reformat texture to 128x128
+ path c ( s );
+ deletePathFromFilename ( c );
+ cutFilenameExtension ( c, c );
+ c = path ( "levelshots/" ) + c;
+
+ dimension2du dim ( 128, 128 );
+ IVideoDriver * driver = Game->Device->getVideoDriver();
+ IImage* image = 0;
+ ITexture *tex = 0;
+ path filename;
+
+ filename = c + ".jpg";
+ if ( fs->existFile ( filename ) )
+ image = driver->createImageFromFile( filename );
+ if ( 0 == image )
+ {
+ filename = c + ".tga";
+ if ( fs->existFile ( filename ) )
+ image = driver->createImageFromFile( filename );
+ }
+
+ if ( image )
+ {
+ IImage* filter = driver->createImage ( video::ECF_R8G8B8, dim );
+ image->copyToScalingBoxFilter ( filter, 0 );
+ image->drop ();
+ image = filter;
+ }
+
+ if ( image )
+ {
+ tex = driver->addTexture ( filename, image );
+ image->drop ();
+ }
+
+
+ bank->setTexture ( g, tex );
+
+ r.LowerRightCorner.X = dim.Width;
+ r.LowerRightCorner.Y = dim.Height;
+ gui.MapList->setItemHeight ( r.LowerRightCorner.Y + 4 );
+ frame.rectNumber = bank->getPositions().size();
+ frame.textureNumber = g;
+
+ bank->getPositions().push_back(r);
+
+ sprite.Frames.set_used ( 0 );
+ sprite.Frames.push_back(frame);
+ sprite.frameTime = 0;
+ bank->getSprites().push_back(sprite);
+
+ gui.MapList->addItem ( s.c_str (), g );
+ g += 1;
+ }
+ }
+ fileList->drop ();
+
+ gui.MapList->setSelected ( -1 );
+ IGUIScrollBar * bar = (IGUIScrollBar*)gui.MapList->getElementFromId( 0 );
+ if ( bar )
+ bar->setPos ( 0 );
+
+ }
+
+}
+
+/*
+ clears the Map in Memory
+*/
+void CQuake3EventHandler::dropMap ()
+{
+ IVideoDriver * driver = Game->Device->getVideoDriver();
+
+ driver->removeAllHardwareBuffers ();
+ driver->removeAllTextures ();
+
+ Player[0].shutdown ();
+
+
+ dropElement ( ItemParent );
+ dropElement ( ShaderParent );
+ dropElement ( UnresolvedParent );
+ dropElement ( FogParent );
+ dropElement ( BulletParent );
+
+
+ Impacts.clear();
+
+ if ( Meta )
+ {
+ Meta = 0;
+ }
+
+ dropElement ( MapParent );
+ dropElement ( SkyNode );
+
+ // clean out meshes, because textures are invalid
+ // TODO: better texture handling;-)
+ IMeshCache *cache = Game->Device->getSceneManager ()->getMeshCache();
+ cache->clear ();
+ Mesh = 0;
+}
+
+/* Load new map
+*/
+void CQuake3EventHandler::LoadMap ( const stringw &mapName, s32 collision )
+{
+ if ( 0 == mapName.size() )
+ return;
+
+ dropMap ();
+
+ IFileSystem *fs = Game->Device->getFileSystem();
+ ISceneManager *smgr = Game->Device->getSceneManager ();
+
+ IReadFile* file = fs->createMemoryReadFile(&Game->loadParam,
+ sizeof(Game->loadParam), L"levelparameter.cfg", false);
+
+ // load cfg file
+ smgr->getMesh( file );
+ file->drop ();
+
+ // load the actual map
+ Mesh = (IQ3LevelMesh*) smgr->getMesh(mapName);
+ if ( 0 == Mesh )
+ return;
+
+ /*
+ add the geometry mesh to the Scene ( polygon & patches )
+ The Geometry mesh is optimised for faster drawing
+ */
+
+ IMesh *geometry = Mesh->getMesh(E_Q3_MESH_GEOMETRY);
+ if ( 0 == geometry || geometry->getMeshBufferCount() == 0)
+ return;
+
+ Game->CurrentMapName = mapName;
+
+ //create a collision list
+ Meta = 0;
+
+ ITriangleSelector * selector = 0;
+ if (collision)
+ Meta = smgr->createMetaTriangleSelector();
+
+ //IMeshBuffer *b0 = geometry->getMeshBuffer(0);
+ //s32 minimalNodes = b0 ? core::s32_max ( 2048, b0->getVertexCount() / 32 ) : 2048;
+ s32 minimalNodes = 2048;
+
+ MapParent = smgr->addOctreeSceneNode(geometry, 0, -1, minimalNodes);
+ MapParent->setName ( mapName );
+ if ( Meta )
+ {
+ selector = smgr->createOctreeTriangleSelector( geometry,MapParent, minimalNodes);
+ //selector = smgr->createTriangleSelector ( geometry, MapParent );
+ Meta->addTriangleSelector( selector);
+ selector->drop ();
+ }
+
+ // logical parent for the items
+ ItemParent = smgr->addEmptySceneNode();
+ if ( ItemParent )
+ ItemParent->setName ( "Item Container" );
+
+ ShaderParent = smgr->addEmptySceneNode();
+ if ( ShaderParent )
+ ShaderParent->setName ( "Shader Container" );
+
+ UnresolvedParent = smgr->addEmptySceneNode();
+ if ( UnresolvedParent )
+ UnresolvedParent->setName ( "Unresolved Container" );
+
+ FogParent = smgr->addEmptySceneNode();
+ if ( FogParent )
+ FogParent->setName ( "Fog Container" );
+
+ // logical parent for the bullets
+ BulletParent = smgr->addEmptySceneNode();
+ if ( BulletParent )
+ BulletParent->setName ( "Bullet Container" );
+
+ /*
+ now construct SceneNodes for each Shader
+ The Objects are stored in the quake mesh E_Q3_MESH_ITEMS
+ and the Shader ID is stored in the MaterialParameters
+ mostly dark looking skulls and moving lava.. or green flashing tubes?
+ */
+ Q3ShaderFactory ( Game->loadParam, Game->Device, Mesh, E_Q3_MESH_ITEMS,ShaderParent, Meta, false );
+ Q3ShaderFactory ( Game->loadParam, Game->Device, Mesh, E_Q3_MESH_FOG,FogParent, 0, false );
+ Q3ShaderFactory ( Game->loadParam, Game->Device, Mesh, E_Q3_MESH_UNRESOLVED,UnresolvedParent, Meta, true );
+
+ /*
+ Now construct Models from Entity List
+ */
+ Q3ModelFactory ( Game->loadParam, Game->Device, Mesh, ItemParent, false );
+}
+
+/*
+ Adds a SceneNode with an icon to the Scene Tree
+*/
+void CQuake3EventHandler::addSceneTreeItem( ISceneNode * parent, IGUITreeViewNode* nodeParent)
+{
+ IGUITreeViewNode* node;
+ wchar_t msg[128];
+
+ s32 imageIndex;
+ list<ISceneNode*>::ConstIterator it = parent->getChildren().begin();
+ for (; it != parent->getChildren().end(); ++it)
+ {
+ switch ( (*it)->getType () )
+ {
+ case ESNT_Q3SHADER_SCENE_NODE: imageIndex = 0; break;
+ case ESNT_CAMERA: imageIndex = 1; break;
+ case ESNT_EMPTY: imageIndex = 2; break;
+ case ESNT_MESH: imageIndex = 3; break;
+ case ESNT_OCTREE: imageIndex = 3; break;
+ case ESNT_ANIMATED_MESH: imageIndex = 4; break;
+ case ESNT_SKY_BOX: imageIndex = 5; break;
+ case ESNT_BILLBOARD: imageIndex = 6; break;
+ case ESNT_PARTICLE_SYSTEM: imageIndex = 7; break;
+ case ESNT_TEXT: imageIndex = 8; break;
+ default:imageIndex = -1; break;
+ }
+
+ if ( imageIndex < 0 )
+ {
+ swprintf ( msg, 128, L"%hs,%hs",
+ Game->Device->getSceneManager ()->getSceneNodeTypeName ( (*it)->getType () ),
+ (*it)->getName()
+ );
+ }
+ else
+ {
+ swprintf ( msg, 128, L"%hs",(*it)->getName() );
+ }
+
+ node = nodeParent->addChildBack( msg, 0, imageIndex );
+
+ // Add all Animators
+ list<ISceneNodeAnimator*>::ConstIterator ait = (*it)->getAnimators().begin();
+ for (; ait != (*it)->getAnimators().end(); ++ait)
+ {
+ imageIndex = -1;
+ swprintf ( msg, 128, L"%hs",
+ Game->Device->getSceneManager ()->getAnimatorTypeName ( (*ait)->getType () )
+ );
+
+ switch ( (*ait)->getType () )
+ {
+ case ESNAT_FLY_CIRCLE:
+ case ESNAT_FLY_STRAIGHT:
+ case ESNAT_FOLLOW_SPLINE:
+ case ESNAT_ROTATION:
+ case ESNAT_TEXTURE:
+ case ESNAT_DELETION:
+ case ESNAT_COLLISION_RESPONSE:
+ case ESNAT_CAMERA_FPS:
+ case ESNAT_CAMERA_MAYA:
+ default:
+ break;
+ }
+ node->addChildBack( msg, 0, imageIndex );
+ }
+
+ addSceneTreeItem ( *it, node );
+ }
+}
+
+
+// Adds life!
+void CQuake3EventHandler::CreatePlayers()
+{
+ Player[0].create ( Game->Device, Mesh, MapParent, Meta );
+}
+
+
+// Adds a skydome to the scene
+void CQuake3EventHandler::AddSky( u32 dome, const c8 *texture)
+{
+ ISceneManager *smgr = Game->Device->getSceneManager ();
+ IVideoDriver * driver = Game->Device->getVideoDriver();
+
+ bool oldMipMapState = driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS);
+ driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
+
+ if ( 0 == dome )
+ {
+ // irrlicht order
+ //static const c8*p[] = { "ft", "lf", "bk", "rt", "up", "dn" };
+ // quake3 order
+ static const c8*p[] = { "ft", "rt", "bk", "lf", "up", "dn" };
+
+ u32 i = 0;
+ snprintf ( buf, 64, "%s_%s.jpg", texture, p[i] );
+ SkyNode = smgr->addSkyBoxSceneNode( driver->getTexture ( buf ), 0, 0, 0, 0, 0 );
+
+ if (SkyNode)
+ {
+ for ( i = 0; i < 6; ++i )
+ {
+ snprintf ( buf, 64, "%s_%s.jpg", texture, p[i] );
+ SkyNode->getMaterial(i).setTexture ( 0, driver->getTexture ( buf ) );
+ }
+ }
+ }
+ else
+ if ( 1 == dome )
+ {
+ snprintf ( buf, 64, "%s.jpg", texture );
+ SkyNode = smgr->addSkyDomeSceneNode(
+ driver->getTexture( buf ), 32,32,
+ 1.f, 1.f, 1000.f, 0, 11);
+ }
+ else
+ if ( 2 == dome )
+ {
+ snprintf ( buf, 64, "%s.jpg", texture );
+ SkyNode = smgr->addSkyDomeSceneNode(
+ driver->getTexture( buf ), 16,8,
+ 0.95f, 2.f, 1000.f, 0, 11);
+ }
+
+ if (SkyNode)
+ SkyNode->setName("Skydome");
+ //SkyNode->getMaterial(0).ZBuffer = video::EMDF_DEPTH_LESS_EQUAL;
+
+ driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, oldMipMapState);
+}
+
+
+// enable GUI elements
+void CQuake3EventHandler::SetGUIActive( s32 command)
+{
+ bool inputState = false;
+
+ ICameraSceneNode * camera = Game->Device->getSceneManager()->getActiveCamera ();
+
+ switch ( command )
+ {
+ case 0: Game->guiActive = 0; inputState = !Game->guiActive; break;
+ case 1: Game->guiActive = 1; inputState = !Game->guiActive;;break;
+ case 2: Game->guiActive ^= 1; inputState = !Game->guiActive;break;
+ case 3:
+ if ( camera )
+ inputState = !camera->isInputReceiverEnabled();
+ break;
+ }
+
+ if ( camera )
+ {
+ camera->setInputReceiverEnabled ( inputState );
+ Game->Device->getCursorControl()->setVisible( !inputState );
+ }
+
+ if ( gui.Window )
+ {
+ gui.Window->setVisible ( Game->guiActive != 0 );
+ }
+
+ if ( Game->guiActive &&
+ gui.SceneTree && Game->Device->getGUIEnvironment()->getFocus() != gui.SceneTree
+ )
+ {
+ gui.SceneTree->getRoot()->clearChildren();
+ addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() );
+ }
+
+ Game->Device->getGUIEnvironment()->setFocus ( Game->guiActive ? gui.Window: 0 );
+}
+
+
+/*
+ Handle game input
+*/
+bool CQuake3EventHandler::OnEvent(const SEvent& eve)
+{
+ if ( eve.EventType == EET_LOG_TEXT_EVENT )
+ {
+ return false;
+ }
+
+ if ( Game->guiActive && eve.EventType == EET_GUI_EVENT )
+ {
+ if ( eve.GUIEvent.Caller == gui.MapList && eve.GUIEvent.EventType == gui::EGET_LISTBOX_SELECTED_AGAIN )
+ {
+ s32 selected = gui.MapList->getSelected();
+ if ( selected >= 0 )
+ {
+ stringw loadMap = gui.MapList->getListItem ( selected );
+ if ( 0 == MapParent || loadMap != Game->CurrentMapName )
+ {
+ printf ( "Loading map %ls\n", loadMap.c_str() );
+ LoadMap ( loadMap , 1 );
+ if ( 0 == Game->loadParam.loadSkyShader )
+ {
+ AddSky ( 1, "skydome2" );
+ }
+ CreatePlayers ();
+ CreateGUI ();
+ SetGUIActive ( 0 );
+ return true;
+ }
+ }
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.ArchiveRemove && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )
+ {
+ Game->Device->getFileSystem()->removeFileArchive( gui.ArchiveList->getSelected() );
+ Game->CurrentMapName = "";
+ AddArchive ( "" );
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.ArchiveAdd && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )
+ {
+ if ( 0 == gui.ArchiveFileOpen )
+ {
+ Game->Device->getFileSystem()->setFileListSystem ( FILESYSTEM_NATIVE );
+ gui.ArchiveFileOpen = Game->Device->getGUIEnvironment()->addFileOpenDialog ( L"Add Game Archive" , false,gui.Window );
+ }
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.ArchiveFileOpen && eve.GUIEvent.EventType == gui::EGET_FILE_SELECTED )
+ {
+ AddArchive ( gui.ArchiveFileOpen->getFileName() );
+ gui.ArchiveFileOpen = 0;
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.ArchiveFileOpen && eve.GUIEvent.EventType == gui::EGET_DIRECTORY_SELECTED )
+ {
+ AddArchive ( gui.ArchiveFileOpen->getDirectoryName() );
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.ArchiveFileOpen && eve.GUIEvent.EventType == gui::EGET_FILE_CHOOSE_DIALOG_CANCELLED )
+ {
+ gui.ArchiveFileOpen = 0;
+ }
+ else
+ if ( ( eve.GUIEvent.Caller == gui.ArchiveUp || eve.GUIEvent.Caller == gui.ArchiveDown ) &&
+ eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )
+ {
+ s32 rel = eve.GUIEvent.Caller == gui.ArchiveUp ? -1 : 1;
+ if ( Game->Device->getFileSystem()->moveFileArchive ( gui.ArchiveList->getSelected (), rel ) )
+ {
+ s32 newIndex = core::s32_clamp ( gui.ArchiveList->getSelected() + rel, 0, gui.ArchiveList->getRowCount() - 1 );
+ AddArchive ( "" );
+ gui.ArchiveList->setSelected ( newIndex );
+ Game->CurrentMapName = "";
+ }
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.VideoDriver && eve.GUIEvent.EventType == gui::EGET_COMBO_BOX_CHANGED )
+ {
+ Game->deviceParam.DriverType = (E_DRIVER_TYPE) gui.VideoDriver->getItemData ( gui.VideoDriver->getSelected() );
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.VideoMode && eve.GUIEvent.EventType == gui::EGET_COMBO_BOX_CHANGED )
+ {
+ u32 val = gui.VideoMode->getItemData ( gui.VideoMode->getSelected() );
+ Game->deviceParam.WindowSize.Width = val >> 16;
+ Game->deviceParam.WindowSize.Height = val & 0xFFFF;
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.FullScreen && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+ {
+ Game->deviceParam.Fullscreen = gui.FullScreen->isChecked();
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.Bit32 && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+ {
+ Game->deviceParam.Bits = gui.Bit32->isChecked() ? 32 : 16;
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.MultiSample && eve.GUIEvent.EventType == gui::EGET_SCROLL_BAR_CHANGED )
+ {
+ Game->deviceParam.AntiAlias = gui.MultiSample->getPos();
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.Tesselation && eve.GUIEvent.EventType == gui::EGET_SCROLL_BAR_CHANGED )
+ {
+ Game->loadParam.patchTesselation = gui.Tesselation->getPos ();
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.Gamma && eve.GUIEvent.EventType == gui::EGET_SCROLL_BAR_CHANGED )
+ {
+ Game->GammaValue = gui.Gamma->getPos () * 0.01f;
+ Game->Device->setGammaRamp ( Game->GammaValue, Game->GammaValue, Game->GammaValue, 0.f, 0.f );
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.SetVideoMode && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )
+ {
+ Game->retVal = 2;
+ Game->Device->closeDevice();
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.Window && eve.GUIEvent.EventType == gui::EGET_ELEMENT_CLOSED )
+ {
+ Game->Device->closeDevice();
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.Collision && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+ {
+ // set fly through active
+ Game->flyTroughState ^= 1;
+ Player[0].cam()->setAnimateTarget ( Game->flyTroughState == 0 );
+
+ printf ( "collision %d\n", Game->flyTroughState == 0 );
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.Visible_Map && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+ {
+ bool v = gui.Visible_Map->isChecked();
+
+ if ( MapParent )
+ {
+ printf ( "static node set visible %d\n",v );
+ MapParent->setVisible ( v );
+ }
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.Visible_Shader && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+ {
+ bool v = gui.Visible_Shader->isChecked();
+
+ if ( ShaderParent )
+ {
+ printf ( "shader node set visible %d\n",v );
+ ShaderParent->setVisible ( v );
+ }
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.Visible_Skydome && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+ {
+ if ( SkyNode )
+ {
+ bool v = !SkyNode->isVisible();
+ printf ( "skynode set visible %d\n",v );
+ SkyNode->setVisible ( v );
+ }
+ }
+ else
+ if ( eve.GUIEvent.Caller == gui.Respawn && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )
+ {
+ Player[0].respawn ();
+ }
+
+ return false;
+ }
+
+ // fire
+ if ((eve.EventType == EET_KEY_INPUT_EVENT && eve.KeyInput.Key == KEY_SPACE &&
+ eve.KeyInput.PressedDown == false) ||
+ (eve.EventType == EET_MOUSE_INPUT_EVENT && eve.MouseInput.Event == EMIE_LMOUSE_LEFT_UP)
+ )
+ {
+ ICameraSceneNode * camera = Game->Device->getSceneManager()->getActiveCamera ();
+ if ( camera && camera->isInputReceiverEnabled () )
+ {
+ useItem( Player + 0 );
+ }
+ }
+
+ // gui active
+ if ((eve.EventType == EET_KEY_INPUT_EVENT && eve.KeyInput.Key == KEY_F1 &&
+ eve.KeyInput.PressedDown == false) ||
+ (eve.EventType == EET_MOUSE_INPUT_EVENT && eve.MouseInput.Event == EMIE_RMOUSE_LEFT_UP)
+ )
+ {
+ SetGUIActive ( 2 );
+ }
+
+ // check if user presses the key
+ if ( eve.EventType == EET_KEY_INPUT_EVENT && eve.KeyInput.PressedDown == false)
+ {
+ // Escape toggles camera Input
+ if ( eve.KeyInput.Key == irr::KEY_ESCAPE )
+ {
+ SetGUIActive ( 3 );
+ }
+ else
+ if (eve.KeyInput.Key == KEY_F11)
+ {
+ // screenshot are taken without gamma!
+ IImage* image = Game->Device->getVideoDriver()->createScreenShot();
+ if (image)
+ {
+ core::vector3df pos;
+ core::vector3df rot;
+ ICameraSceneNode * cam = Game->Device->getSceneManager()->getActiveCamera ();
+ if ( cam )
+ {
+ pos = cam->getPosition ();
+ rot = cam->getRotation ();
+ }
+
+ static const c8 *dName[] = { "null", "software", "burning",
+ "d3d8", "d3d9", "opengl" };
+
+ snprintf(buf, 256, "%s_%ls_%.0f_%.0f_%.0f_%.0f_%.0f_%.0f.jpg",
+ dName[Game->Device->getVideoDriver()->getDriverType()],
+ Game->CurrentMapName.c_str(),
+ pos.X, pos.Y, pos.Z,
+ rot.X, rot.Y, rot.Z
+ );
+ path filename ( buf );
+ filename.replace ( '/', '_' );
+ printf ( "screenshot : %s\n", filename.c_str() );
+ Game->Device->getVideoDriver()->writeImageToFile(image, filename, 100 );
+ image->drop();
+ }
+ }
+ else
+ if (eve.KeyInput.Key == KEY_F9)
+ {
+ s32 value = EDS_OFF;
+
+ Game->debugState = ( Game->debugState + 1 ) & 3;
+
+ switch ( Game->debugState )
+ {
+ case 1: value = EDS_NORMALS | EDS_MESH_WIRE_OVERLAY | EDS_BBOX_ALL; break;
+ case 2: value = EDS_NORMALS | EDS_MESH_WIRE_OVERLAY | EDS_SKELETON; break;
+ }
+/*
+ // set debug map data on/off
+ debugState = debugState == EDS_OFF ?
+ EDS_NORMALS | EDS_MESH_WIRE_OVERLAY | EDS_BBOX_ALL:
+ EDS_OFF;
+*/
+ if ( ItemParent )
+ {
+ list<ISceneNode*>::ConstIterator it = ItemParent->getChildren().begin();
+ for (; it != ItemParent->getChildren().end(); ++it)
+ {
+ (*it)->setDebugDataVisible ( value );
+ }
+ }
+
+ if ( ShaderParent )
+ {
+ list<ISceneNode*>::ConstIterator it = ShaderParent->getChildren().begin();
+ for (; it != ShaderParent->getChildren().end(); ++it)
+ {
+ (*it)->setDebugDataVisible ( value );
+ }
+ }
+
+ if ( UnresolvedParent )
+ {
+ list<ISceneNode*>::ConstIterator it = UnresolvedParent->getChildren().begin();
+ for (; it != UnresolvedParent->getChildren().end(); ++it)
+ {
+ (*it)->setDebugDataVisible ( value );
+ }
+ }
+
+ if ( FogParent )
+ {
+ list<ISceneNode*>::ConstIterator it = FogParent->getChildren().begin();
+ for (; it != FogParent->getChildren().end(); ++it)
+ {
+ (*it)->setDebugDataVisible ( value );
+ }
+ }
+
+ if ( SkyNode )
+ {
+ SkyNode->setDebugDataVisible ( value );
+ }
+
+ }
+ else
+ if (eve.KeyInput.Key == KEY_F8)
+ {
+ // set gravity on/off
+ Game->gravityState ^= 1;
+ Player[0].cam()->setGravity ( getGravity ( Game->gravityState ? "earth" : "none" ) );
+ printf ( "gravity %s\n", Game->gravityState ? "earth" : "none" );
+ }
+ else
+ if (eve.KeyInput.Key == KEY_F7)
+ {
+ // set fly through active
+ Game->flyTroughState ^= 1;
+ Player[0].cam()->setAnimateTarget ( Game->flyTroughState == 0 );
+ if ( gui.Collision )
+ gui.Collision->setChecked ( Game->flyTroughState == 0 );
+
+ printf ( "collision %d\n", Game->flyTroughState == 0 );
+ }
+ else
+ if (eve.KeyInput.Key == KEY_F2)
+ {
+ Player[0].respawn ();
+ }
+ else
+ if (eve.KeyInput.Key == KEY_F3)
+ {
+ if ( MapParent )
+ {
+ bool v = !MapParent->isVisible ();
+ printf ( "static node set visible %d\n",v );
+ MapParent->setVisible ( v );
+ if ( gui.Visible_Map )
+ gui.Visible_Map->setChecked ( v );
+ }
+ }
+ else
+ if (eve.KeyInput.Key == KEY_F4)
+ {
+ if ( ShaderParent )
+ {
+ bool v = !ShaderParent->isVisible ();
+ printf ( "shader node set visible %d\n",v );
+ ShaderParent->setVisible ( v );
+ if ( gui.Visible_Shader )
+ gui.Visible_Shader->setChecked ( v );
+ }
+ }
+ else
+ if (eve.KeyInput.Key == KEY_F5)
+ {
+ if ( FogParent )
+ {
+ bool v = !FogParent->isVisible ();
+ printf ( "fog node set visible %d\n",v );
+ FogParent->setVisible ( v );
+ if ( gui.Visible_Fog )
+ gui.Visible_Fog->setChecked ( v );
+ }
+
+ }
+ else
+ if (eve.KeyInput.Key == KEY_F6)
+ {
+ if ( UnresolvedParent )
+ {
+ bool v = !UnresolvedParent->isVisible ();
+ printf ( "unresolved node set visible %d\n",v );
+ UnresolvedParent->setVisible ( v );
+ if ( gui.Visible_Unresolved )
+ gui.Visible_Unresolved->setChecked ( v );
+ }
+ }
+ }
+
+ // check if user presses the key C ( for crouch)
+ if ( eve.EventType == EET_KEY_INPUT_EVENT && eve.KeyInput.Key == KEY_KEY_C )
+ {
+ // crouch
+ ISceneNodeAnimatorCollisionResponse *anim = Player[0].cam ();
+ if ( anim && 0 == Game->flyTroughState )
+ {
+ if ( false == eve.KeyInput.PressedDown )
+ {
+ // stand up
+ anim->setEllipsoidRadius ( vector3df(30,45,30) );
+ anim->setEllipsoidTranslation ( vector3df(0,40,0));
+
+ }
+ else
+ {
+ // on your knees
+ anim->setEllipsoidRadius ( vector3df(30,20,30) );
+ anim->setEllipsoidTranslation ( vector3df(0,20,0));
+ }
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+/*
+ useItem
+*/
+void CQuake3EventHandler::useItem( Q3Player * player)
+{
+ ISceneManager* smgr = Game->Device->getSceneManager();
+ ICameraSceneNode* camera = smgr->getActiveCamera();
+
+ if (!camera)
+ return;
+
+ SParticleImpact imp;
+ imp.when = 0;
+
+ // get line of camera
+
+ vector3df start = camera->getPosition();
+
+ if ( player->WeaponNode )
+ {
+ start.X += 0.f;
+ start.Y += 0.f;
+ start.Z += 0.f;
+ }
+
+ vector3df end = (camera->getTarget() - start);
+ end.normalize();
+ start += end*20.0f;
+
+ end = start + (end * camera->getFarValue());
+
+ triangle3df triangle;
+ line3d<f32> line(start, end);
+
+ // get intersection point with map
+ scene::ISceneNode* hitNode;
+ if (smgr->getSceneCollisionManager()->getCollisionPoint(
+ line, Meta, end, triangle,hitNode))
+ {
+ // collides with wall
+ vector3df out = triangle.getNormal();
+ out.setLength(0.03f);
+
+ imp.when = 1;
+ imp.outVector = out;
+ imp.pos = end;
+
+ player->setAnim ( "pow" );
+ player->Anim[1].next += player->Anim[1].delta;
+ }
+ else
+ {
+ // doesnt collide with wall
+ vector3df start = camera->getPosition();
+ if ( player->WeaponNode )
+ {
+ //start.X += 10.f;
+ //start.Y += -5.f;
+ //start.Z += 1.f;
+ }
+
+ vector3df end = (camera->getTarget() - start);
+ end.normalize();
+ start += end*20.0f;
+ end = start + (end * camera->getFarValue());
+ }
+
+ // create fire ball
+ ISceneNode* node = 0;
+ node = smgr->addBillboardSceneNode( BulletParent,dimension2d<f32>(10,10), start);
+
+ node->setMaterialFlag(EMF_LIGHTING, false);
+ node->setMaterialTexture(0, Game->Device->getVideoDriver()->getTexture("fireball.bmp"));
+ node->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
+ node->setMaterialType(EMT_TRANSPARENT_ADD_COLOR);
+
+ f32 length = (f32)(end - start).getLength();
+ const f32 speed = 5.8f;
+ u32 time = (u32)(length / speed);
+
+ ISceneNodeAnimator* anim = 0;
+
+ // set flight line
+
+ anim = smgr->createFlyStraightAnimator(start, end, time);
+ node->addAnimator(anim);
+ anim->drop();
+
+ snprintf ( buf, 64, "bullet: %s on %.1f,%1.f,%1.f",
+ imp.when ? "hit" : "nohit", end.X, end.Y, end.Z );
+ node->setName ( buf );
+
+
+ anim = smgr->createDeleteAnimator(time);
+ node->addAnimator(anim);
+ anim->drop();
+
+ if (imp.when)
+ {
+ // create impact note
+ imp.when = Game->Device->getTimer()->getTime() +
+ (time + (s32) ( ( 1.f + Noiser::get() ) * 250.f ));
+ Impacts.push_back(imp);
+ }
+
+ // play sound
+}
+
+// rendered when bullets hit something
+void CQuake3EventHandler::createParticleImpacts( u32 now )
+{
+ ISceneManager* sm = Game->Device->getSceneManager();
+
+ struct smokeLayer
+ {
+ const c8 * texture;
+ f32 scale;
+ f32 minparticleSize;
+ f32 maxparticleSize;
+ f32 boxSize;
+ u32 minParticle;
+ u32 maxParticle;
+ u32 fadeout;
+ u32 lifetime;
+ };
+
+ smokeLayer smoke[] =
+ {
+ { "smoke2.jpg", 0.4f, 1.5f, 18.f, 20.f, 20, 50, 2000, 10000 },
+ { "smoke3.jpg", 0.2f, 1.2f, 15.f, 20.f, 10, 30, 1000, 12000 }
+ };
+
+
+ u32 i;
+ u32 g;
+ s32 factor = 1;
+ for ( g = 0; g != 2; ++g )
+ {
+ smoke[g].minParticle *= factor;
+ smoke[g].maxParticle *= factor;
+ smoke[g].lifetime *= factor;
+ smoke[g].boxSize *= Noiser::get() * 0.5f;
+ }
+
+ for ( i=0; i < Impacts.size(); ++i)
+ {
+ if (now < Impacts[i].when)
+ continue;
+
+ // create smoke particle system
+ IParticleSystemSceneNode* pas = 0;
+
+ for ( g = 0; g != 2; ++g )
+ {
+ pas = sm->addParticleSystemSceneNode(false, BulletParent, -1, Impacts[i].pos);
+
+ snprintf ( buf, 64, "bullet impact smoke at %.1f,%.1f,%1.f",
+ Impacts[i].pos.X,Impacts[i].pos.Y,Impacts[i].pos.Z);
+ pas->setName ( buf );
+
+ // create a flat smoke
+ vector3df direction = Impacts[i].outVector;
+ direction *= smoke[g].scale;
+ IParticleEmitter* em = pas->createBoxEmitter(
+ aabbox3d<f32>(-4.f,0.f,-4.f,20.f,smoke[g].minparticleSize,20.f),
+ direction,smoke[g].minParticle, smoke[g].maxParticle,
+ video::SColor(0,0,0,0),video::SColor(0,128,128,128),
+ 250,4000, 60);
+
+ em->setMinStartSize (dimension2d<f32>( smoke[g].minparticleSize, smoke[g].minparticleSize));
+ em->setMaxStartSize (dimension2d<f32>( smoke[g].maxparticleSize, smoke[g].maxparticleSize));
+
+ pas->setEmitter(em);
+ em->drop();
+
+ // particles get invisible
+ IParticleAffector* paf = pas->createFadeOutParticleAffector(
+ video::SColor ( 0, 0, 0, 0 ), smoke[g].fadeout);
+ pas->addAffector(paf);
+ paf->drop();
+
+ // particle system life time
+ ISceneNodeAnimator* anim = sm->createDeleteAnimator( smoke[g].lifetime);
+ pas->addAnimator(anim);
+ anim->drop();
+
+ pas->setMaterialFlag(video::EMF_LIGHTING, false);
+ pas->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
+ pas->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );
+ pas->setMaterialTexture(0, Game->Device->getVideoDriver()->getTexture( smoke[g].texture ));
+ }
+
+
+ // play impact sound
+ #ifdef USE_IRRKLANG
+/*
+ if (irrKlang)
+ {
+ audio::ISound* sound =
+ irrKlang->play3D(impactSound, Impacts[i].pos, false, false, true);
+
+ if (sound)
+ {
+ // adjust max value a bit to make to sound of an impact louder
+ sound->setMinDistance(400);
+ sound->drop();
+ }
+ }
+*/
+ #endif
+
+
+ // delete entry
+ Impacts.erase(i);
+ i--;
+ }
+}
+
+/*
+ render
+*/
+void CQuake3EventHandler::Render()
+{
+ IVideoDriver * driver = Game->Device->getVideoDriver();
+ if ( 0 == driver )
+ return;
+
+ // TODO: This does not work, yet.
+ const bool anaglyph=false;
+ if (anaglyph)
+ {
+ scene::ICameraSceneNode* cameraOld = Game->Device->getSceneManager()->getActiveCamera();
+ driver->beginScene(true, true, SColor(0,0,0,0));
+ driver->getOverrideMaterial().Material.ColorMask = ECP_NONE;
+ driver->getOverrideMaterial().EnableFlags = EMF_COLOR_MASK;
+ driver->getOverrideMaterial().EnablePasses = ESNRP_SKY_BOX +
+ ESNRP_SOLID +
+ ESNRP_TRANSPARENT +
+ ESNRP_TRANSPARENT_EFFECT +
+ ESNRP_SHADOW;
+ Game->Device->getSceneManager()->drawAll();
+ driver->clearZBuffer();
+
+ const vector3df oldPosition = cameraOld->getPosition();
+ const vector3df oldTarget = cameraOld->getTarget();
+ const matrix4 startMatrix = cameraOld->getAbsoluteTransformation();
+ const vector3df focusPoint = (oldTarget -
+ cameraOld->getAbsolutePosition()).setLength(10000) +
+ cameraOld->getAbsolutePosition() ;
+
+ scene::ICameraSceneNode* camera = cameraOld;//Game->Device->getSceneManager()->addCameraSceneNode();
+
+ //Left eye...
+ vector3df pos;
+ matrix4 move;
+
+ move.setTranslation( vector3df(-1.5f,0.0f,0.0f) );
+ pos=(startMatrix*move).getTranslation();
+
+ driver->getOverrideMaterial().Material.ColorMask = ECP_RED;
+ driver->getOverrideMaterial().EnableFlags = EMF_COLOR_MASK;
+ driver->getOverrideMaterial().EnablePasses =
+ ESNRP_SKY_BOX|ESNRP_SOLID|ESNRP_TRANSPARENT|
+ ESNRP_TRANSPARENT_EFFECT|ESNRP_SHADOW;
+
+ camera->setPosition(pos);
+ camera->setTarget(focusPoint);
+
+ Game->Device->getSceneManager()->drawAll();
+ driver->clearZBuffer();
+
+ //Right eye...
+ move.setTranslation( vector3df(1.5f,0.0f,0.0f) );
+ pos=(startMatrix*move).getTranslation();
+
+ driver->getOverrideMaterial().Material.ColorMask = ECP_GREEN + ECP_BLUE;
+ driver->getOverrideMaterial().EnableFlags = EMF_COLOR_MASK;
+ driver->getOverrideMaterial().EnablePasses =
+ ESNRP_SKY_BOX|ESNRP_SOLID|ESNRP_TRANSPARENT|
+ ESNRP_TRANSPARENT_EFFECT|ESNRP_SHADOW;
+
+ camera->setPosition(pos);
+ camera->setTarget(focusPoint);
+
+ Game->Device->getSceneManager()->drawAll();
+
+ driver->getOverrideMaterial().Material.ColorMask=ECP_ALL;
+ driver->getOverrideMaterial().EnableFlags=0;
+ driver->getOverrideMaterial().EnablePasses=0;
+
+ if (camera != cameraOld)
+ {
+ Game->Device->getSceneManager()->setActiveCamera(cameraOld);
+ camera->remove();
+ }
+ else
+ {
+ camera->setPosition(oldPosition);
+ camera->setTarget(oldTarget);
+ }
+ }
+ else
+ {
+ driver->beginScene(true, true, SColor(0,0,0,0));
+ Game->Device->getSceneManager()->drawAll();
+ }
+ Game->Device->getGUIEnvironment()->drawAll();
+ driver->endScene();
+}
+
+/*
+ update the generic scene node
+*/
+void CQuake3EventHandler::Animate()
+{
+ u32 now = Game->Device->getTimer()->getTime();
+
+ Q3Player * player = Player + 0;
+
+ checkTimeFire ( player->Anim, 4, now );
+
+ // Query Scene Manager attributes
+ if ( player->Anim[0].flags & FIRED )
+ {
+ ISceneManager *smgr = Game->Device->getSceneManager ();
+ wchar_t msg[128];
+ IVideoDriver * driver = Game->Device->getVideoDriver();
+
+ IAttributes * attr = smgr->getParameters();
+#ifdef _IRR_SCENEMANAGER_DEBUG
+ swprintf ( msg, 128,
+ L"Q3 %s [%ls], FPS:%03d Tri:%.03fm Cull %d/%d nodes (%d,%d,%d)",
+ Game->CurrentMapName.c_str(),
+ driver->getName(),
+ driver->getFPS (),
+ (f32) driver->getPrimitiveCountDrawn( 0 ) * ( 1.f / 1000000.f ),
+ attr->getAttributeAsInt ( "culled" ),
+ attr->getAttributeAsInt ( "calls" ),
+ attr->getAttributeAsInt ( "drawn_solid" ),
+ attr->getAttributeAsInt ( "drawn_transparent" ),
+ attr->getAttributeAsInt ( "drawn_transparent_effect" )
+ );
+#else
+swprintf ( msg, 128,
+ L"Q3 %s [%ls], FPS:%03d Tri:%.03fm",
+ Game->CurrentMapName.c_str(),
+ driver->getName(),
+ driver->getFPS (),
+ (f32) driver->getPrimitiveCountDrawn( 0 ) * ( 1.f / 1000000.f )
+ );
+#endif
+ Game->Device->setWindowCaption( msg );
+
+ swprintf ( msg, 128,
+ L"%03d fps, F1 GUI on/off, F2 respawn, F3-F6 toggle Nodes, F7 Collision on/off"
+ L", F8 Gravity on/off, Right Mouse Toggle GUI",
+ Game->Device->getVideoDriver()->getFPS ()
+ );
+ if ( gui.StatusLine )
+ gui.StatusLine->setText ( msg );
+ player->Anim[0].flags &= ~FIRED;
+ }
+
+ // idle..
+ if ( player->Anim[1].flags & FIRED )
+ {
+ if ( strcmp ( player->animation, "idle" ) )
+ player->setAnim ( "idle" );
+
+ player->Anim[1].flags &= ~FIRED;
+ }
+
+ createParticleImpacts ( now );
+
+}
+
+
+/* The main game states
+*/
+void runGame ( GameData *game )
+{
+ if ( game->retVal >= 3 )
+ return;
+
+ game->Device = (*game->createExDevice) ( game->deviceParam );
+ if ( 0 == game->Device)
+ {
+ // could not create selected driver.
+ game->retVal = 0;
+ return;
+ }
+
+ // create an event receiver based on current game data
+ CQuake3EventHandler *eventHandler = new CQuake3EventHandler( game );
+
+ // load stored config
+ game->load ( "explorer.cfg" );
+
+ // add our media directory and archive to the file system
+ for ( u32 i = 0; i < game->CurrentArchiveList.size(); ++i )
+ {
+ eventHandler->AddArchive ( game->CurrentArchiveList[i] );
+ }
+
+ // Load a Map or startup to the GUI
+ if ( game->CurrentMapName.size () )
+ {
+ eventHandler->LoadMap ( game->CurrentMapName, 1 );
+ if ( 0 == game->loadParam.loadSkyShader )
+ eventHandler->AddSky ( 1, "skydome2" );
+ eventHandler->CreatePlayers ();
+ eventHandler->CreateGUI ();
+ eventHandler->SetGUIActive ( 0 );
+
+ // set player to last position on restart
+ if ( game->retVal == 2 )
+ {
+ eventHandler->GetPlayer( 0 )->setpos ( game->PlayerPosition, game->PlayerRotation );
+ }
+ }
+ else
+ {
+ // start up empty
+ eventHandler->AddSky ( 1, "skydome2" );
+ eventHandler->CreatePlayers ();
+ eventHandler->CreateGUI ();
+ eventHandler->SetGUIActive ( 1 );
+ background_music ( "IrrlichtTheme.ogg" );
+ }
+
+
+ game->retVal = 3;
+ while( game->Device->run() )
+ {
+ eventHandler->Animate ();
+ eventHandler->Render ();
+ //if ( !game->Device->isWindowActive() )
+ game->Device->yield();
+ }
+
+ game->Device->setGammaRamp ( 1.f, 1.f, 1.f, 0.f, 0.f );
+ delete eventHandler;
+}
+
+#if defined (_IRR_WINDOWS_) && 0
+ #pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
+#endif
+
+
+/* The main routine, doing all setup
+*/
+int IRRCALLCONV main(int argc, char* argv[])
+{
+ path prgname(argv[0]);
+ GameData game ( deletePathFromPath ( prgname, 1 ) );
+
+ // dynamically load irrlicht
+ const c8 * dllName = argc > 1 ? argv[1] : "irrlicht.dll";
+ game.createExDevice = load_createDeviceEx ( dllName );
+ if ( 0 == game.createExDevice )
+ {
+ game.retVal = 3;
+ printf ( "Could not load %s.\n", dllName );
+ return game.retVal; // could not load dll
+ }
+
+ // start without asking for driver
+ game.retVal = 1;
+ do
+ {
+ // if driver could not created, ask for another driver
+ if ( game.retVal == 0 )
+ {
+ game.setDefault ();
+ // ask user for driver
+ game.deviceParam.DriverType=driverChoiceConsole();
+ if (game.deviceParam.DriverType==video::EDT_COUNT)
+ game.retVal = 3;
+ }
+ runGame ( &game );
+ } while ( game.retVal < 3 );
+
+ return game.retVal;
+}
+
+/*
+**/
diff --git a/examples/21.Quake3Explorer/q3factory.cpp b/examples/21.Quake3Explorer/q3factory.cpp new file mode 100644 index 0000000..d0f09b2 --- /dev/null +++ b/examples/21.Quake3Explorer/q3factory.cpp @@ -0,0 +1,824 @@ +/*!
+ Model Factory.
+ create the additional scenenodes for ( bullets, health... )
+
+ Defines the Entities for Quake3
+*/
+
+#include <irrlicht.h>
+#include "q3factory.h"
+#include "sound.h"
+
+using namespace irr;
+using namespace scene;
+using namespace gui;
+using namespace video;
+using namespace core;
+using namespace quake3;
+
+//! This list is based on the original quake3.
+static const SItemElement Quake3ItemElement [] = {
+{ "item_health",
+ {"models/powerups/health/medium_cross.md3",
+ "models/powerups/health/medium_sphere.md3"},
+ "sound/items/n_health.wav",
+ "icons/iconh_yellow",
+ "25 Health",
+ 25,
+ HEALTH,
+ SUB_NONE,
+ SPECIAL_SFX_BOUNCE | SPECIAL_SFX_ROTATE_1
+},
+{ "item_health_large",
+ "models/powerups/health/large_cross.md3",
+ "models/powerups/health/large_sphere.md3",
+ "sound/items/l_health.wav",
+ "icons/iconh_red",
+ "50 Health",
+ 50,
+ HEALTH,
+ SUB_NONE,
+ SPECIAL_SFX_BOUNCE | SPECIAL_SFX_ROTATE_1
+},
+{
+ "item_health_mega",
+ "models/powerups/health/mega_cross.md3",
+ "models/powerups/health/mega_sphere.md3",
+ "sound/items/m_health.wav",
+ "icons/iconh_mega",
+ "Mega Health",
+ 100,
+ HEALTH,
+ SUB_NONE,
+ SPECIAL_SFX_BOUNCE | SPECIAL_SFX_ROTATE_1
+},
+{
+ "item_health_small",
+ "models/powerups/health/small_cross.md3",
+ "models/powerups/health/small_sphere.md3",
+ "sound/items/s_health.wav",
+ "icons/iconh_green",
+ "5 Health",
+ 5,
+ HEALTH,
+ SUB_NONE,
+ SPECIAL_SFX_BOUNCE | SPECIAL_SFX_ROTATE_1
+},
+{ "ammo_bullets",
+ "models/powerups/ammo/machinegunam.md3",
+ "",
+ "sound/misc/am_pkup.wav",
+ "icons/icona_machinegun",
+ "Bullets",
+ 50,
+ AMMO,
+ MACHINEGUN,
+ SPECIAL_SFX_BOUNCE,
+},
+{
+ "ammo_cells",
+ "models/powerups/ammo/plasmaam.md3",
+ "",
+ "sound/misc/am_pkup.wav",
+ "icons/icona_plasma",
+ "Cells",
+ 30,
+ AMMO,
+ PLASMAGUN,
+ SPECIAL_SFX_BOUNCE
+},
+{ "ammo_rockets",
+ "models/powerups/ammo/rocketam.md3",
+ "",
+ "",
+ "icons/icona_rocket",
+ "Rockets",
+ 5,
+ AMMO,
+ ROCKET_LAUNCHER,
+ SPECIAL_SFX_ROTATE
+},
+{
+ "ammo_shells",
+ "models/powerups/ammo/shotgunam.md3",
+ "",
+ "sound/misc/am_pkup.wav",
+ "icons/icona_shotgun",
+ "Shells",
+ 10,
+ AMMO,
+ SHOTGUN,
+ SPECIAL_SFX_ROTATE
+},
+{
+ "ammo_slugs",
+ "models/powerups/ammo/railgunam.md3",
+ "",
+ "sound/misc/am_pkup.wav",
+ "icons/icona_railgun",
+ "Slugs",
+ 10,
+ AMMO,
+ RAILGUN,
+ SPECIAL_SFX_ROTATE
+},
+{
+ "item_armor_body",
+ "models/powerups/armor/armor_red.md3",
+ "",
+ "sound/misc/ar2_pkup.wav",
+ "icons/iconr_red",
+ "Heavy Armor",
+ 100,
+ ARMOR,
+ SUB_NONE,
+ SPECIAL_SFX_ROTATE
+},
+{
+ "item_armor_combat",
+ "models/powerups/armor/armor_yel.md3",
+ "",
+ "sound/misc/ar2_pkup.wav",
+ "icons/iconr_yellow",
+ "Armor",
+ 50,
+ ARMOR,
+ SUB_NONE,
+ SPECIAL_SFX_ROTATE
+},
+{
+ "item_armor_shard",
+ "models/powerups/armor/shard.md3",
+ "",
+ "sound/misc/ar1_pkup.wav",
+ "icons/iconr_shard",
+ "Armor Shared",
+ 5,
+ ARMOR,
+ SUB_NONE,
+ SPECIAL_SFX_ROTATE
+},
+{
+ "weapon_gauntlet",
+ "models/weapons2/gauntlet/gauntlet.md3",
+ "",
+ "sound/misc/w_pkup.wav",
+ "icons/iconw_gauntlet",
+ "Gauntlet",
+ 0,
+ WEAPON,
+ GAUNTLET,
+ SPECIAL_SFX_ROTATE
+},
+{
+ "weapon_shotgun",
+ "models/weapons2/shotgun/shotgun.md3",
+ "",
+ "sound/misc/w_pkup.wav",
+ "icons/iconw_shotgun",
+ "Shotgun",
+ 10,
+ WEAPON,
+ SHOTGUN,
+ SPECIAL_SFX_ROTATE
+},
+{
+ "weapon_machinegun",
+ "models/weapons2/machinegun/machinegun.md3",
+ "",
+ "sound/misc/w_pkup.wav",
+ "icons/iconw_machinegun",
+ "Machinegun",
+ 40,
+ WEAPON,
+ MACHINEGUN,
+ SPECIAL_SFX_ROTATE
+},
+{
+ "weapon_grenadelauncher",
+ "models/weapons2/grenadel/grenadel.md3",
+ "",
+ "sound/misc/w_pkup.wav",
+ "icons/iconw_grenade",
+ "Grenade Launcher",
+ 10,
+ WEAPON,
+ GRENADE_LAUNCHER,
+ SPECIAL_SFX_ROTATE
+},
+{
+ "weapon_rocketlauncher",
+ "models/weapons2/rocketl/rocketl.md3",
+ "",
+ "sound/misc/w_pkup.wav",
+ "icons/iconw_rocket",
+ "Rocket Launcher",
+ 10,
+ WEAPON,
+ ROCKET_LAUNCHER,
+ SPECIAL_SFX_ROTATE
+},
+{
+ "weapon_lightning",
+ "models/weapons2/lightning/lightning.md3",
+ "",
+ "sound/misc/w_pkup.wav",
+ "icons/iconw_lightning",
+ "Lightning Gun",
+ 100,
+ WEAPON,
+ LIGHTNING,
+ SPECIAL_SFX_ROTATE
+},
+{
+ "weapon_railgun",
+ "models/weapons2/railgun/railgun.md3",
+ "",
+ "sound/misc/w_pkup.wav",
+ "icons/iconw_railgun",
+ "Railgun",
+ 10,
+ WEAPON,
+ RAILGUN,
+ SPECIAL_SFX_ROTATE
+},
+{
+ "weapon_plasmagun",
+ "models/weapons2/plasma/plasma.md3",
+ "",
+ "sound/misc/w_pkup.wav",
+ "icons/iconw_plasma",
+ "Plasma Gun",
+ 50,
+ WEAPON,
+ PLASMAGUN,
+ SPECIAL_SFX_ROTATE
+},
+{
+ "weapon_bfg",
+ "models/weapons2/bfg/bfg.md3",
+ "",
+ "sound/misc/w_pkup.wav",
+ "icons/iconw_bfg",
+ "BFG10K",
+ 20,
+ WEAPON,
+ BFG,
+ SPECIAL_SFX_ROTATE
+},
+{
+ "weapon_grapplinghook",
+ "models/weapons2/grapple/grapple.md3",
+ "",
+ "sound/misc/w_pkup.wav",
+ "icons/iconw_grapple",
+ "Grappling Hook",
+ 0,
+ WEAPON,
+ GRAPPLING_HOOK,
+ SPECIAL_SFX_ROTATE
+},
+{
+ 0
+}
+
+};
+
+
+/*!
+*/
+const SItemElement * getItemElement ( const stringc& key )
+{
+ const SItemElement *item = Quake3ItemElement;
+
+ while ( item->key )
+ {
+ if ( 0 == strcmp ( key.c_str(), item->key ) )
+ return item;
+ item += 1;
+ }
+ return 0;
+}
+
+/*!
+ Quake3 Model Factory.
+ Takes the mesh buffers and creates scenenodes for their associated shaders
+*/
+void Q3ShaderFactory ( Q3LevelLoadParameter &loadParam,
+ IrrlichtDevice *device,
+ IQ3LevelMesh* mesh,
+ eQ3MeshIndex meshIndex,
+ ISceneNode *parent,
+ IMetaTriangleSelector *meta,
+ bool showShaderName )
+{
+ if ( 0 == mesh || 0 == device )
+ return;
+
+ IMeshSceneNode* node = 0;
+ ISceneManager* smgr = device->getSceneManager();
+ ITriangleSelector * selector = 0;
+
+ // the additional mesh can be quite huge and is unoptimized
+ // Save to cast to SMesh
+ SMesh * additional_mesh = (SMesh*) mesh->getMesh ( meshIndex );
+ if ( 0 == additional_mesh || additional_mesh->getMeshBufferCount() == 0)
+ return;
+
+ char buf[128];
+ if ( loadParam.verbose > 0 )
+ {
+ loadParam.startTime = device->getTimer()->getRealTime();
+ if ( loadParam.verbose > 1 )
+ {
+ snprintf(buf, 128, "q3shaderfactory start" );
+ device->getLogger()->log( buf, ELL_INFORMATION);
+ }
+ }
+
+ IGUIFont *font = 0;
+ if ( showShaderName )
+ font = device->getGUIEnvironment()->getFont("fontlucida.png");
+
+ IVideoDriver *driver = device->getVideoDriver();
+
+ // create helper textures
+ if ( 1 )
+ {
+ tTexArray tex;
+ u32 pos = 0;
+ getTextures ( tex, "$redimage $blueimage $whiteimage $checkerimage", pos,
+ device->getFileSystem(), driver );
+ }
+
+ s32 sceneNodeID = 0;
+ for ( u32 i = 0; i!= additional_mesh->getMeshBufferCount (); ++i )
+ {
+ IMeshBuffer *meshBuffer = additional_mesh->getMeshBuffer ( i );
+ const SMaterial &material = meshBuffer->getMaterial();
+
+ //! The ShaderIndex is stored in the second material parameter
+ s32 shaderIndex = (s32) material.MaterialTypeParam2;
+
+ // the meshbuffer can be rendered without additional support, or it has no shader
+ IShader *shader = (IShader *) mesh->getShader ( shaderIndex );
+
+ // no shader, or mapped to existing material
+ if ( 0 == shader )
+ {
+
+#if 1
+ // clone mesh
+ SMesh * m = new SMesh ();
+ m->addMeshBuffer ( meshBuffer );
+ SMaterial &mat = m->getMeshBuffer( 0 )->getMaterial();
+ if ( mat.getTexture( 0 ) == 0 )
+ mat.setTexture ( 0, driver->getTexture ( "$blueimage" ) );
+ if ( mat.getTexture( 1 ) == 0 )
+ mat.setTexture ( 1, driver->getTexture ( "$redimage" ) );
+
+ IMesh * store = smgr->getMeshManipulator ()->createMeshWith2TCoords ( m );
+ m->drop();
+
+ node = smgr->addMeshSceneNode ( store, parent, sceneNodeID );
+ node->setAutomaticCulling ( scene::EAC_OFF );
+ store->drop ();
+ sceneNodeID += 1;
+#endif
+ }
+ else if ( 1 )
+ {
+/*
+ stringc s;
+ dumpShader ( s, shader );
+ printf ( s.c_str () );
+*/
+ // create sceneNode
+ node = smgr->addQuake3SceneNode ( meshBuffer, shader, parent, sceneNodeID );
+ node->setAutomaticCulling ( scene::EAC_FRUSTUM_BOX );
+ sceneNodeID += 1;
+ }
+
+ // show Debug Shader Name
+ if ( showShaderName && node )
+ {
+ swprintf ( (wchar_t*) buf, 64, L"%hs:%d", node->getName(),node->getID() );
+ smgr->addBillboardTextSceneNode(
+ font,
+ (wchar_t*) buf,
+ node,
+ dimension2d<f32>(80.0f, 8.0f),
+ vector3df(0, 10, 0),
+ sceneNodeID);
+ sceneNodeID += 1;
+ }
+
+ // create Portal Rendertargets
+ if ( shader )
+ {
+ const SVarGroup *group = shader->getGroup(1);
+ if ( group->isDefined( "surfaceparm", "portal" ) )
+ {
+ }
+
+ }
+
+
+ // add collision
+ // find out if shader is marked as nonsolid
+ u8 doCreate = meta !=0 ;
+
+ if ( shader )
+ {
+ const SVarGroup *group = shader->getGroup(1);
+ if ( group->isDefined( "surfaceparm", "trans" )
+ // || group->isDefined( "surfaceparm", "sky" )
+ // || group->isDefined( "surfaceparm", "nonsolid" )
+ )
+ {
+ if ( !group->isDefined( "surfaceparm", "metalsteps" ) )
+ {
+ doCreate = 0;
+ }
+ }
+ }
+
+ if ( doCreate )
+ {
+ IMesh *m = 0;
+
+ //! controls if triangles are modified by the scenenode during runtime
+ bool takeOriginal = true;
+
+ if ( takeOriginal )
+ {
+ m = new SMesh ();
+ ((SMesh*) m )->addMeshBuffer (meshBuffer);
+ }
+ else
+ {
+ m = node->getMesh();
+ }
+
+ //selector = smgr->createOctreeTriangleSelector ( m, 0, 128 );
+ selector = smgr->createTriangleSelector ( m, 0 );
+ meta->addTriangleSelector ( selector );
+ selector->drop ();
+
+ if ( takeOriginal )
+ {
+ delete m;
+ }
+ }
+
+ }
+
+#if 0
+ if ( meta )
+ {
+ selector = smgr->createOctreeTriangleSelector ( additional_mesh, 0 );
+ meta->addTriangleSelector ( selector );
+ selector->drop ();
+ }
+#endif
+
+ if ( loadParam.verbose > 0 )
+ {
+ loadParam.endTime = device->getTimer()->getRealTime ();
+ snprintf(buf, 128, "q3shaderfactory needed %04d ms to create %d shader nodes",
+ loadParam.endTime - loadParam.startTime,
+ sceneNodeID
+ );
+ device->getLogger()->log(buf, ELL_INFORMATION);
+ }
+
+}
+
+
+/*!
+ create Items from Entity
+*/
+void Q3ModelFactory ( Q3LevelLoadParameter &loadParam,
+ IrrlichtDevice *device,
+ IQ3LevelMesh* masterMesh,
+ ISceneNode *parent,
+ bool showShaderName
+ )
+{
+ if ( 0 == masterMesh )
+ return;
+
+ tQ3EntityList &entity = masterMesh->getEntityList ();
+ ISceneManager* smgr = device->getSceneManager();
+
+
+ char buf[128];
+ const SVarGroup *group;
+ IEntity search;
+ s32 index;
+ s32 lastIndex;
+
+/*
+ stringc s;
+ FILE *f = 0;
+ f = fopen ( "entity.txt", "wb" );
+ for ( index = 0; (u32) index < entityList.size (); ++index )
+ {
+ const IEntity *entity = &entityList[ index ];
+ s = entity->name;
+ dumpShader ( s, entity );
+ fwrite ( s.c_str(), 1, s.size(), f );
+ }
+ fclose ( f );
+*/
+ IAnimatedMeshMD3* model;
+ SMD3Mesh * mesh;
+ const SMD3MeshBuffer *meshBuffer;
+ IMeshSceneNode* node;
+ ISceneNodeAnimator* anim;
+ const IShader *shader;
+ u32 pos;
+ vector3df p;
+ u32 nodeCount = 0;
+ tTexArray textureArray;
+
+ IGUIFont *font = 0;
+ if ( showShaderName )
+ font = device->getGUIEnvironment()->getFont("fontlucida.png");
+
+ const SItemElement *itemElement;
+
+ // walk list
+ for ( index = 0; (u32) index < entity.size(); ++index )
+ {
+ itemElement = getItemElement ( entity[index].name );
+ if ( 0 == itemElement )
+ continue;
+
+ pos = 0;
+ p = getAsVector3df ( entity[index].getGroup(1)->get ( "origin" ), pos );
+
+ nodeCount += 1;
+ for ( u32 g = 0; g < 2; ++g )
+ {
+ if ( 0 == itemElement->model[g] || itemElement->model[g][0] == 0 )
+ continue;
+ model = (IAnimatedMeshMD3*) smgr->getMesh( itemElement->model[g] );
+ if ( 0 == model )
+ continue;
+
+ mesh = model->getOriginalMesh();
+ for ( u32 j = 0; j != mesh->Buffer.size (); ++j )
+ {
+ meshBuffer = mesh->Buffer[j];
+ if ( 0 == meshBuffer )
+ continue;
+
+ shader = masterMesh->getShader ( meshBuffer->Shader.c_str(), false );
+ IMeshBuffer *final = model->getMesh(0)->getMeshBuffer(j);
+ if ( shader )
+ {
+ //!TODO: Hack don't modify the vertexbuffer. make it better;-)
+ final->getMaterial().ColorMask = 0;
+ node = smgr->addQuake3SceneNode ( final, shader, parent );
+ final->getMaterial().ColorMask = 15;
+ }
+ else
+ {
+ // clone mesh
+ SMesh * m = new SMesh ();
+ m->addMeshBuffer ( final );
+ node = smgr->addMeshSceneNode ( m, parent );
+ m->drop();
+ }
+
+ if ( 0 == node )
+ {
+ snprintf ( buf, 128, "q3ModelFactory shader %s failed", meshBuffer->Shader.c_str() );
+ device->getLogger()->log ( buf );
+ continue;
+ }
+
+ // node was maybe centered by shaderscenenode
+ node->setPosition ( p );
+ node->setName ( meshBuffer->Shader );
+ node->setAutomaticCulling ( scene::EAC_BOX );
+
+ // add special effects to node
+ if ( itemElement->special & SPECIAL_SFX_ROTATE ||
+ (g == 0 && itemElement->special & SPECIAL_SFX_ROTATE_1)
+ )
+ {
+ anim = smgr->createRotationAnimator ( vector3df ( 0.f,
+ 2.f, 0.f ) );
+ node->addAnimator ( anim );
+ anim->drop ();
+ }
+
+ if ( itemElement->special & SPECIAL_SFX_BOUNCE )
+ {
+ //anim = smgr->createFlyStraightAnimator (
+ // p, p + vector3df ( 0.f, 60.f, 0.f ), 1000, true, true );
+ anim = smgr->createFlyCircleAnimator (
+ p + vector3df( 0.f, 20.f, 0.f ),
+ 20.f,
+ 0.005f,
+ vector3df ( 1.f, 0.f, 0.f ),
+ core::fract ( nodeCount * 0.05f ),
+ 1.f
+ );
+ node->addAnimator ( anim );
+ anim->drop ();
+ }
+ }
+ }
+ // show name
+ if ( showShaderName )
+ {
+ swprintf ( (wchar_t*) buf, sizeof(buf) / 2, L"%hs", itemElement->key );
+ smgr->addBillboardTextSceneNode(
+ font,
+ (wchar_t*) buf,
+ parent,
+ dimension2d<f32>(80.0f, 8.0f),
+ p + vector3df(0, 30, 0),
+ 0);
+ }
+ }
+
+ // music
+ search.name = "worldspawn";
+ index = entity.binary_search_multi ( search, lastIndex );
+
+ if ( index >= 0 )
+ {
+ group = entity[ index ].getGroup(1);
+ background_music ( group->get ( "music" ).c_str () );
+ }
+
+ // music
+ search.name = "worldspawn";
+ index = entity.binary_search_multi ( search, lastIndex );
+
+ if ( index >= 0 )
+ {
+ group = entity[ index ].getGroup(1);
+ background_music ( group->get ( "music" ).c_str () );
+ }
+
+ //IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
+ //IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
+
+}
+
+/*!
+ so we need a good starting Position in the level.
+ we can ask the Quake3 Loader for all entities with class_name "info_player_deathmatch"
+*/
+s32 Q3StartPosition ( IQ3LevelMesh* mesh,
+ ICameraSceneNode* camera,
+ s32 startposIndex,
+ const vector3df &translation
+ )
+{
+ if ( 0 == mesh )
+ return 0;
+
+ tQ3EntityList &entityList = mesh->getEntityList ();
+
+ IEntity search;
+ search.name = "info_player_start"; // "info_player_deathmatch";
+
+ // find all entities in the multi-list
+ s32 lastIndex;
+ s32 index = entityList.binary_search_multi ( search, lastIndex );
+
+ if ( index < 0 )
+ {
+ search.name = "info_player_deathmatch";
+ index = entityList.binary_search_multi ( search, lastIndex );
+ }
+
+ if ( index < 0 )
+ return 0;
+
+ index += core::clamp ( startposIndex, 0, lastIndex - index );
+
+ u32 parsepos;
+
+ const SVarGroup *group;
+ group = entityList[ index ].getGroup(1);
+
+ parsepos = 0;
+ vector3df pos = getAsVector3df ( group->get ( "origin" ), parsepos );
+ pos += translation;
+
+ parsepos = 0;
+ f32 angle = getAsFloat ( group->get ( "angle"), parsepos );
+
+ vector3df target ( 0.f, 0.f, 1.f );
+ target.rotateXZBy ( angle - 90.f, vector3df () );
+
+ if ( camera )
+ {
+ camera->setPosition ( pos );
+ camera->setTarget ( pos + target );
+ //! New. FPSCamera and animators catches reset on animate 0
+ camera->OnAnimate ( 0 );
+ }
+ return lastIndex - index + 1;
+}
+
+
+/*!
+ gets a accumulated force on a given surface
+*/
+vector3df getGravity ( const c8 * surface )
+{
+ if ( 0 == strcmp ( surface, "earth" ) ) return vector3df ( 0.f, -90.f, 0.f );
+ if ( 0 == strcmp ( surface, "moon" ) ) return vector3df ( 0.f, -6.f / 100.f, 0.f );
+ if ( 0 == strcmp ( surface, "water" ) ) return vector3df ( 0.1f / 100.f, -2.f / 100.f, 0.f );
+ if ( 0 == strcmp ( surface, "ice" ) ) return vector3df ( 0.2f / 100.f, -9.f / 100.f, 0.3f / 100.f );
+
+ return vector3df ( 0.f, 0.f, 0.f );
+}
+
+
+
+/*
+ Dynamically load the Irrlicht Library
+*/
+
+#if defined(_IRR_WINDOWS_API_)
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+#include <windows.h>
+
+funcptr_createDevice load_createDevice ( const c8 * filename)
+{
+ return (funcptr_createDevice) GetProcAddress ( LoadLibrary ( filename ), "createDevice" );
+}
+
+funcptr_createDeviceEx load_createDeviceEx ( const c8 * filename)
+{
+ return (funcptr_createDeviceEx) GetProcAddress ( LoadLibrary ( filename ), "createDeviceEx" );
+}
+
+#else
+
+// TODO: Dynamic Loading for other os
+funcptr_createDevice load_createDevice ( const c8 * filename)
+{
+ return createDevice;
+}
+
+funcptr_createDeviceEx load_createDeviceEx ( const c8 * filename)
+{
+ return createDeviceEx;
+}
+
+#endif
+
+/*
+ get the current collision response camera animator
+*/
+ISceneNodeAnimatorCollisionResponse* camCollisionResponse( IrrlichtDevice * device )
+{
+ ICameraSceneNode *camera = device->getSceneManager()->getActiveCamera();
+ ISceneNodeAnimatorCollisionResponse *a = 0;
+
+ list<ISceneNodeAnimator*>::ConstIterator it = camera->getAnimators().begin();
+ for (; it != camera->getAnimators().end(); ++it)
+ {
+ a = (ISceneNodeAnimatorCollisionResponse*) (*it);
+ if ( a->getType() == ESNAT_COLLISION_RESPONSE )
+ return a;
+ }
+
+ return 0;
+}
+
+
+//! internal Animation
+void setTimeFire ( TimeFire *t, u32 delta, u32 flags )
+{
+ t->flags = flags;
+ t->next = 0;
+ t->delta = delta;
+}
+
+
+void checkTimeFire ( TimeFire *t, u32 listSize, u32 now )
+{
+ u32 i;
+ for ( i = 0; i < listSize; ++i )
+ {
+ if ( now < t[i].next )
+ continue;
+
+ t[i].next = core::max_ ( now + t[i].delta, t[i].next + t[i].delta );
+ t[i].flags |= FIRED;
+ }
+}
diff --git a/examples/21.Quake3Explorer/q3factory.h b/examples/21.Quake3Explorer/q3factory.h new file mode 100644 index 0000000..d9606ed --- /dev/null +++ b/examples/21.Quake3Explorer/q3factory.h @@ -0,0 +1,149 @@ +/*!
+ Model Factory.
+ create the additional scenenodes for ( bullets, health... )
+
+ Defines the Entities for Quake3
+*/
+#ifndef __QUAKE3_FACTORY__H_INCLUDED__
+#define __QUAKE3_FACTORY__H_INCLUDED__
+
+using namespace irr;
+using namespace scene;
+using namespace gui;
+using namespace video;
+using namespace core;
+using namespace quake3;
+using namespace io;
+
+
+
+//! Defines to which group the entities belong
+enum eItemGroup
+{
+ WEAPON,
+ AMMO,
+ ARMOR,
+ HEALTH,
+ POWERUP
+};
+
+//! define a supgroup for the item. for e.q the Weapons
+enum eItemSubGroup
+{
+ SUB_NONE = 0,
+ GAUNTLET,
+ MACHINEGUN,
+ SHOTGUN,
+ GRENADE_LAUNCHER,
+ ROCKET_LAUNCHER,
+ LIGHTNING,
+ RAILGUN,
+ PLASMAGUN,
+ BFG,
+ GRAPPLING_HOOK,
+ NAILGUN,
+ PROX_LAUNCHER,
+ CHAINGUN,
+};
+
+//! aplly a special effect to the shader
+enum eItemSpecialEffect
+{
+ SPECIAL_SFX_NONE = 0,
+ SPECIAL_SFX_ROTATE = 1,
+ SPECIAL_SFX_BOUNCE = 2,
+ SPECIAL_SFX_ROTATE_1 = 4,
+};
+
+// a List for defining a model
+struct SItemElement
+{
+ const c8 *key;
+ const c8 *model[2];
+ const c8 *sound;
+ const c8 *icon;
+ const c8 *pickup;
+ s32 value;
+ eItemGroup group;
+ eItemSubGroup sub;
+ u32 special;
+};
+
+
+//! Get's an entity based on it's key
+const SItemElement * getItemElement ( const stringc& key );
+
+/*!
+ Quake3 Model Factory.
+ Takes the mesh buffers and creates scenenodes for their associated shaders
+*/
+void Q3ShaderFactory ( Q3LevelLoadParameter &loadParam,
+ IrrlichtDevice *device,
+ IQ3LevelMesh* mesh,
+ eQ3MeshIndex meshIndex,
+ ISceneNode *parent,
+ IMetaTriangleSelector *meta,
+ bool showShaderName
+ );
+
+
+/*!
+ Creates Model based on the entity list
+*/
+void Q3ModelFactory ( Q3LevelLoadParameter &loadParam,
+ IrrlichtDevice *device,
+ IQ3LevelMesh* masterMesh,
+ ISceneNode *parent,
+ bool showShaderName
+ );
+
+/*!
+ so we need a good starting Position in the level.
+ we can ask the Quake3 Loader for all entities with class_name "info_player_deathmatch"
+*/
+s32 Q3StartPosition ( IQ3LevelMesh* mesh,
+ ICameraSceneNode* camera,
+ s32 startposIndex,
+ const vector3df &translation
+ );
+/*!
+ gets a accumulated force on a given surface
+*/
+vector3df getGravity ( const c8 * surface );
+
+
+/*
+ Dynamically load the Irrlicht Library
+*/
+funcptr_createDevice load_createDevice ( const c8 * filename);
+funcptr_createDeviceEx load_createDeviceEx ( const c8 * filename);
+
+
+//! Macro for save Dropping an Element
+#define dropElement(x) if (x) { x->remove(); x = 0; }
+
+
+/*
+ get the current collision respone camera animator
+*/
+ISceneNodeAnimatorCollisionResponse* camCollisionResponse( IrrlichtDevice * device );
+
+//! internal Animation
+enum eTimeFireFlag
+{
+ FIRED = 1,
+};
+
+struct TimeFire
+{
+ u32 flags;
+ u32 next;
+ u32 delta;
+};
+
+void setTimeFire ( TimeFire *t, u32 delta, u32 flags = 0 );
+void checkTimeFire ( TimeFire *t, u32 listSize, u32 now );
+
+#endif // __QUAKE3_FACTORY__H_INCLUDED__
+
+
diff --git a/examples/21.Quake3Explorer/sound.cpp b/examples/21.Quake3Explorer/sound.cpp new file mode 100644 index 0000000..75615c1 --- /dev/null +++ b/examples/21.Quake3Explorer/sound.cpp @@ -0,0 +1,98 @@ +/*!
+ Sound Factory.
+ provides a sound interface
+
+*/
+
+#include "sound.h"
+
+
+//#define USE_IRRKLANG
+
+#ifdef USE_IRRKLANG
+
+#include <irrKlang.h>
+#ifdef _IRR_WINDOWS_
+ #pragma comment (lib, "irrKlang.lib")
+#endif
+
+using namespace irrklang;
+
+struct soundfile: public IFileReader
+{
+ soundfile ( io::IReadFile* f ): file (f ) {}
+ virtual ~soundfile () { file->drop (); }
+
+ virtual ik_s32 read(void* buffer, ik_u32 sizeToRead) { return file->read ( buffer, sizeToRead ); }
+ virtual bool seek(ik_s32 finalPos, bool relativeMovement = false) { return file->seek ( finalPos, relativeMovement ); }
+ virtual ik_s32 getSize(){ return file->getSize (); }
+ virtual ik_s32 getPos() {return file->getPos (); }
+ virtual const ik_c8* getFileName() { return file->getFileName (); }
+ io::IReadFile* file;
+};
+
+struct klangFactory : public irrklang::IFileFactory
+{
+ klangFactory ( IrrlichtDevice *device ) { Device = device; }
+
+ virtual irrklang::IFileReader* createFileReader(const ik_c8* filename)
+ {
+ io::IReadFile* file = Device->getFileSystem()->createAndOpenFile(filename);
+ if ( 0 == file )
+ return 0;
+
+ return new soundfile ( file );
+ }
+
+ IrrlichtDevice *Device;
+};
+
+ISoundEngine *engine = 0;
+ISound *backMusic = 0;
+
+void sound_init ( IrrlichtDevice *device )
+{
+ engine = createIrrKlangDevice ();
+ if ( 0 == engine )
+ return;
+
+ klangFactory *f = new klangFactory ( device );
+ engine->addFileFactory ( f );
+}
+
+void sound_shutdown ()
+{
+ if ( backMusic )
+ backMusic->drop ();
+
+ if ( engine )
+ engine->drop ();
+}
+
+void background_music ( const c8 * file )
+{
+ if ( 0 == engine )
+ return;
+
+ if ( backMusic )
+ {
+ backMusic->stop ();
+ backMusic->drop ();
+ }
+
+ backMusic = engine->play2D ( file, true, false, true );
+
+ if ( backMusic )
+ {
+ backMusic->setVolume ( 0.5f );
+ }
+}
+
+#else
+
+void sound_init ( IrrlichtDevice *device ) {}
+void sound_shutdown () {}
+void background_music ( const c8 * file ) {}
+
+#endif
+
diff --git a/examples/21.Quake3Explorer/sound.h b/examples/21.Quake3Explorer/sound.h new file mode 100644 index 0000000..033e9bb --- /dev/null +++ b/examples/21.Quake3Explorer/sound.h @@ -0,0 +1,18 @@ +/*!
+ Sound Factory.
+ provides a sound interface
+
+*/
+#ifndef __QUAKE3_SOUND__H_INCLUDED__
+#define __QUAKE3_SOUND__H_INCLUDED__
+
+#include <irrlicht.h>
+
+using namespace irr;
+
+void sound_init ( IrrlichtDevice *device );
+void sound_shutdown ();
+void background_music ( const c8 * file );
+
+
+#endif // __QUAKE3_SOUND__H_INCLUDED__
diff --git a/examples/21.Quake3Explorer/tutorial.html b/examples/21.Quake3Explorer/tutorial.html new file mode 100644 index 0000000..989e63d --- /dev/null +++ b/examples/21.Quake3Explorer/tutorial.html @@ -0,0 +1,218 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 21: Quake3 Explorer</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 21: Quake3 Explorer </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/021shot.jpg" alt="021shot.jpg"/> +</div> + <p>This Tutorial shows how to load different Quake 3 maps.</p> +<p>Features:</p><ul> +<li>Load BSP Archives at Runtime from the menu</li> +<li>Load a Map from the menu. Showing with Screenshot</li> +<li>Set the VideoDriver at runtime from menu</li> +<li>Adjust GammaLevel at runtime</li> +<li>Create SceneNodes for the Shaders</li> +<li>Load EntityList and create Entity SceneNodes</li> +<li>Create Players with Weapons and with Collision Response</li> +<li>Play music</li> +</ul> +<p>You can download the Quake III Arena demo ( copyright id software ) at the following location: <a href="ftp://ftp.idsoftware.com/idstuff/quake3/win32/q3ademo.exe">ftp://ftp.idsoftware.com/idstuff/quake3/win32/q3ademo.exe</a></p> +<p>Copyright 2006-2011 Burningwater, Thomas Alten </p><div class="fragment"><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "q3factory.h"</span></div><div class="line"><span class="preprocessor">#include "sound.h"</span></div></div><!-- fragment --><p> Game Data is used to hold Data which is needed to drive the game </p><div class="fragment"><div class="line"><span class="keyword">struct </span>GameData</div><div class="line">{</div><div class="line"> GameData ( <span class="keyword">const</span> path &startupDir) :</div><div class="line"> retVal(0), StartupDir(startupDir), createExDevice(0), Device(0)</div><div class="line"> {</div><div class="line"> setDefault ();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> setDefault ();</div><div class="line"> s32 save ( <span class="keyword">const</span> path &filename );</div><div class="line"> s32 load ( <span class="keyword">const</span> path &filename );</div><div class="line"></div><div class="line"> s32 debugState;</div><div class="line"> s32 gravityState;</div><div class="line"> s32 flyTroughState;</div><div class="line"> s32 wireFrame;</div><div class="line"> s32 guiActive;</div><div class="line"> s32 guiInputActive;</div><div class="line"> f32 GammaValue;</div><div class="line"> s32 retVal;</div><div class="line"> s32 sound;</div><div class="line"></div><div class="line"> path StartupDir;</div><div class="line"> stringw CurrentMapName;</div><div class="line"> array<path> CurrentArchiveList;</div><div class="line"></div><div class="line"> vector3df PlayerPosition;</div><div class="line"> vector3df PlayerRotation;</div><div class="line"></div><div class="line"> tQ3EntityList Variable;</div><div class="line"></div><div class="line"> Q3LevelLoadParameter loadParam;</div><div class="line"> SIrrlichtCreationParameters deviceParam;</div><div class="line"> funcptr_createDeviceEx createExDevice;</div><div class="line"> IrrlichtDevice *Device;</div><div class="line">};</div></div><!-- fragment --><p> set default settings </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> GameData::setDefault ()</div><div class="line">{</div><div class="line"> debugState = EDS_OFF;</div><div class="line"> gravityState = 1;</div><div class="line"> flyTroughState = 0;</div><div class="line"> wireFrame = 0;</div><div class="line"> guiActive = 1;</div><div class="line"> guiInputActive = 0;</div><div class="line"> GammaValue = 1.f;</div><div class="line"></div><div class="line"> <span class="comment">// default deviceParam;</span></div><div class="line"><span class="preprocessor">#if defined ( _IRR_WINDOWS_ )</span></div><div class="line"> deviceParam.DriverType = EDT_DIRECT3D9;</div><div class="line"><span class="preprocessor">#else</span></div><div class="line"> deviceParam.DriverType = EDT_OPENGL;</div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"> deviceParam.WindowSize.Width = 800;</div><div class="line"> deviceParam.WindowSize.Height = 600;</div><div class="line"> deviceParam.Fullscreen = <span class="keyword">false</span>;</div><div class="line"> deviceParam.Bits = 24;</div><div class="line"> deviceParam.ZBufferBits = 16;</div><div class="line"> deviceParam.Vsync = <span class="keyword">false</span>;</div><div class="line"> deviceParam.AntiAlias = <span class="keyword">false</span>;</div><div class="line"></div><div class="line"> <span class="comment">// default Quake3 loadParam</span></div><div class="line"> loadParam.defaultLightMapMaterial = EMT_LIGHTMAP;</div><div class="line"> loadParam.defaultModulate = EMFN_MODULATE_1X;</div><div class="line"> loadParam.defaultFilter = EMF_ANISOTROPIC_FILTER;</div><div class="line"> loadParam.verbose = 2;</div><div class="line"> loadParam.mergeShaderBuffer = 1; <span class="comment">// merge meshbuffers with same material</span></div><div class="line"> loadParam.cleanUnResolvedMeshes = 1; <span class="comment">// should unresolved meshes be cleaned. otherwise blue texture</span></div><div class="line"> loadParam.loadAllShaders = 1; <span class="comment">// load all scripts in the script directory</span></div><div class="line"> loadParam.loadSkyShader = 0; <span class="comment">// load sky Shader</span></div><div class="line"> loadParam.alpharef = 1;</div><div class="line"></div><div class="line"> sound = 0;</div><div class="line"></div><div class="line"> CurrentMapName = <span class="stringliteral">""</span>;</div><div class="line"> CurrentArchiveList.clear ();</div><div class="line"></div><div class="line"> <span class="comment">// Explorer Media directory</span></div><div class="line"> CurrentArchiveList.push_back ( StartupDir + <span class="stringliteral">"../../media/"</span> );</div><div class="line"></div><div class="line"> <span class="comment">// Add the original quake3 files before you load your custom map</span></div><div class="line"> <span class="comment">// Most mods are using the original shaders, models&items&weapons</span></div><div class="line"> CurrentArchiveList.push_back(<span class="stringliteral">"/q/baseq3/"</span>);</div><div class="line"></div><div class="line"> CurrentArchiveList.push_back(StartupDir + <span class="stringliteral">"../../media/map-20kdm2.pk3"</span>);</div><div class="line">}</div></div><!-- fragment --><p> Load the current game State from a typical quake3 cfg file </p><div class="fragment"><div class="line">s32 GameData::load ( <span class="keyword">const</span> path &filename )</div><div class="line">{</div><div class="line"> <span class="keywordflow">if</span> (!Device)</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line"></div><div class="line"> <span class="comment">// the quake3 mesh loader can also handle *.shader and *.cfg file</span></div><div class="line"> IQ3LevelMesh* mesh = (IQ3LevelMesh*) Device->getSceneManager()->getMesh ( filename );</div><div class="line"> <span class="keywordflow">if</span> (!mesh)</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line"></div><div class="line"> tQ3EntityList &entityList = mesh->getEntityList ();</div><div class="line"></div><div class="line"> stringc s;</div><div class="line"> u32 pos;</div><div class="line"></div><div class="line"> <span class="keywordflow">for</span> ( u32 e = 0; e != entityList.size (); ++e )</div><div class="line"> {</div><div class="line"> <span class="comment">//dumpShader ( s, &entityList[e], false );</span></div><div class="line"> <span class="comment">//printf ( s.c_str () );</span></div><div class="line"></div><div class="line"> <span class="keywordflow">for</span> ( u32 g = 0; g != entityList[e].getGroupSize (); ++g )</div><div class="line"> {</div><div class="line"> <span class="keyword">const</span> SVarGroup *group = entityList[e].getGroup ( g );</div><div class="line"></div><div class="line"> <span class="keywordflow">for</span> ( u32 index = 0; index < group->Variable.size (); ++index )</div><div class="line"> {</div><div class="line"> <span class="keyword">const</span> SVariable &v = group->Variable[index];</div><div class="line"> pos = 0;</div><div class="line"> <span class="keywordflow">if</span> ( v.name == <span class="stringliteral">"playerposition"</span> )</div><div class="line"> {</div><div class="line"> PlayerPosition = getAsVector3df ( v.content, pos );</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( v.name == <span class="stringliteral">"playerrotation"</span> )</div><div class="line"> {</div><div class="line"> PlayerRotation = getAsVector3df ( v.content, pos );</div><div class="line"> }</div><div class="line"> }</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line">}</div></div><!-- fragment --><p> Store the current game State in a quake3 configuration file </p><div class="fragment"><div class="line">s32 GameData::save ( <span class="keyword">const</span> path &filename )</div><div class="line">{</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line"> <span class="keywordflow">if</span> (!Device)</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line"></div><div class="line"> c8 buf[128];</div><div class="line"> u32 i;</div><div class="line"></div><div class="line"> <span class="comment">// Store current Archive for restart</span></div><div class="line"> CurrentArchiveList.clear();</div><div class="line"> IFileSystem *fs = Device->getFileSystem();</div><div class="line"> <span class="keywordflow">for</span> ( i = 0; i != fs->getFileArchiveCount(); ++i )</div><div class="line"> {</div><div class="line"> CurrentArchiveList.push_back ( fs->getFileArchive(i)->getFileList()->getPath() );</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Store Player Position and Rotation</span></div><div class="line"> ICameraSceneNode * camera = Device->getSceneManager()->getActiveCamera ();</div><div class="line"> <span class="keywordflow">if</span> ( camera )</div><div class="line"> {</div><div class="line"> PlayerPosition = camera->getPosition ();</div><div class="line"> PlayerRotation = camera->getRotation ();</div><div class="line"> }</div><div class="line"></div><div class="line"> IWriteFile *file = fs->createAndWriteFile ( filename );</div><div class="line"> <span class="keywordflow">if</span> (!file)</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line"></div><div class="line"> snprintf ( buf, 128, <span class="stringliteral">"playerposition %.f %.f %.f\nplayerrotation %.f %.f %.f\n"</span>,</div><div class="line"> PlayerPosition.X, PlayerPosition.Z, PlayerPosition.Y,</div><div class="line"> PlayerRotation.X, PlayerRotation.Z, PlayerRotation.Y);</div><div class="line"> file->write ( buf, (s32) strlen ( buf ) );</div><div class="line"> <span class="keywordflow">for</span> ( i = 0; i != fs->getFileArchiveCount(); ++i )</div><div class="line"> {</div><div class="line"> snprintf ( buf, 128, <span class="stringliteral">"archive %s\n"</span>,stringc ( fs->getFileArchive(i)->getFileList()->getPath() ).c_str () );</div><div class="line"> file->write ( buf, (s32) strlen ( buf ) );</div><div class="line"> }</div><div class="line"></div><div class="line"> file->drop ();</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line">}</div></div><!-- fragment --><p> Representing a player </p><div class="fragment"><div class="line"><span class="keyword">struct </span>Q3Player : <span class="keyword">public</span> IAnimationEndCallBack</div><div class="line">{</div><div class="line"> Q3Player ()</div><div class="line"> : Device(0), MapParent(0), Mesh(0), WeaponNode(0), StartPositionCurrent(0)</div><div class="line"> {</div><div class="line"> animation[0] = 0;</div><div class="line"> memset(Anim, 0, <span class="keyword">sizeof</span>(TimeFire)*4);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> OnAnimationEnd(IAnimatedMeshSceneNode* node);</div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> create ( IrrlichtDevice *device,</div><div class="line"> IQ3LevelMesh* mesh,</div><div class="line"> ISceneNode *mapNode,</div><div class="line"> IMetaTriangleSelector *meta</div><div class="line"> );</div><div class="line"> <span class="keywordtype">void</span> shutdown ();</div><div class="line"> <span class="keywordtype">void</span> setAnim ( <span class="keyword">const</span> c8 *name );</div><div class="line"> <span class="keywordtype">void</span> respawn ();</div><div class="line"> <span class="keywordtype">void</span> setpos ( <span class="keyword">const</span> vector3df &pos, <span class="keyword">const</span> vector3df& rotation );</div><div class="line"></div><div class="line"> ISceneNodeAnimatorCollisionResponse * cam() { <span class="keywordflow">return</span> camCollisionResponse ( Device ); }</div><div class="line"></div><div class="line"> IrrlichtDevice *Device;</div><div class="line"> ISceneNode* MapParent;</div><div class="line"> IQ3LevelMesh* Mesh;</div><div class="line"> IAnimatedMeshSceneNode* WeaponNode;</div><div class="line"> s32 StartPositionCurrent;</div><div class="line"> TimeFire Anim[4];</div><div class="line"> c8 animation[64];</div><div class="line"> c8 buf[64];</div><div class="line">};</div></div><!-- fragment --><p> End player </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> Q3Player::shutdown ()</div><div class="line">{</div><div class="line"> setAnim ( 0 );</div><div class="line"></div><div class="line"> dropElement (WeaponNode);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( Device )</div><div class="line"> {</div><div class="line"> ICameraSceneNode* camera = Device->getSceneManager()->getActiveCamera();</div><div class="line"> dropElement ( camera );</div><div class="line"> Device = 0;</div><div class="line"> }</div><div class="line"></div><div class="line"> MapParent = 0;</div><div class="line"> Mesh = 0;</div><div class="line">}</div></div><!-- fragment --><p> create a new player </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> Q3Player::create ( IrrlichtDevice *device, IQ3LevelMesh* mesh, ISceneNode *mapNode, IMetaTriangleSelector *meta )</div><div class="line">{</div><div class="line"> setTimeFire ( Anim + 0, 200, FIRED );</div><div class="line"> setTimeFire ( Anim + 1, 5000 );</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (!device)</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"> <span class="comment">// load FPS weapon to Camera</span></div><div class="line"> Device = device;</div><div class="line"> Mesh = mesh;</div><div class="line"> MapParent = mapNode;</div><div class="line"></div><div class="line"> ISceneManager *smgr = device->getSceneManager ();</div><div class="line"> IVideoDriver * driver = device->getVideoDriver();</div><div class="line"></div><div class="line"> ICameraSceneNode* camera = 0;</div><div class="line"></div><div class="line"> SKeyMap keyMap[10];</div><div class="line"> keyMap[0].Action = EKA_MOVE_FORWARD;</div><div class="line"> keyMap[0].KeyCode = KEY_UP;</div><div class="line"> keyMap[1].Action = EKA_MOVE_FORWARD;</div><div class="line"> keyMap[1].KeyCode = KEY_KEY_W;</div><div class="line"></div><div class="line"> keyMap[2].Action = EKA_MOVE_BACKWARD;</div><div class="line"> keyMap[2].KeyCode = KEY_DOWN;</div><div class="line"> keyMap[3].Action = EKA_MOVE_BACKWARD;</div><div class="line"> keyMap[3].KeyCode = KEY_KEY_S;</div><div class="line"></div><div class="line"> keyMap[4].Action = EKA_STRAFE_LEFT;</div><div class="line"> keyMap[4].KeyCode = KEY_LEFT;</div><div class="line"> keyMap[5].Action = EKA_STRAFE_LEFT;</div><div class="line"> keyMap[5].KeyCode = KEY_KEY_A;</div><div class="line"></div><div class="line"> keyMap[6].Action = EKA_STRAFE_RIGHT;</div><div class="line"> keyMap[6].KeyCode = KEY_RIGHT;</div><div class="line"> keyMap[7].Action = EKA_STRAFE_RIGHT;</div><div class="line"> keyMap[7].KeyCode = KEY_KEY_D;</div><div class="line"></div><div class="line"> keyMap[8].Action = EKA_JUMP_UP;</div><div class="line"> keyMap[8].KeyCode = KEY_KEY_J;</div><div class="line"></div><div class="line"> keyMap[9].Action = EKA_CROUCH;</div><div class="line"> keyMap[9].KeyCode = KEY_KEY_C;</div><div class="line"></div><div class="line"> camera = smgr->addCameraSceneNodeFPS(0, 100.0f, 0.6f, -1, keyMap, 10, <span class="keyword">false</span>, 0.6f);</div><div class="line"> camera->setName ( <span class="stringliteral">"First Person Camera"</span> );</div><div class="line"> <span class="comment">//camera->setFOV ( 100.f * core::DEGTORAD );</span></div><div class="line"> camera->setFarValue( 20000.f );</div><div class="line"></div><div class="line"> IAnimatedMeshMD2* weaponMesh = (IAnimatedMeshMD2*) smgr->getMesh(<span class="stringliteral">"gun.md2"</span>);</div><div class="line"> <span class="keywordflow">if</span> ( 0 == weaponMesh )</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( weaponMesh->getMeshType() == EAMT_MD2 )</div><div class="line"> {</div><div class="line"> s32 count = weaponMesh->getAnimationCount();</div><div class="line"> <span class="keywordflow">for</span> ( s32 i = 0; i != count; ++i )</div><div class="line"> {</div><div class="line"> snprintf ( buf, 64, <span class="stringliteral">"Animation: %s"</span>, weaponMesh->getAnimationName(i) );</div><div class="line"> device->getLogger()->log(buf, ELL_INFORMATION);</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> WeaponNode = smgr->addAnimatedMeshSceneNode(</div><div class="line"> weaponMesh,</div><div class="line"> smgr->getActiveCamera(),</div><div class="line"> 10,</div><div class="line"> vector3df( 0, 0, 0),</div><div class="line"> vector3df(-90,-90,90)</div><div class="line"> );</div><div class="line"> WeaponNode->setMaterialFlag(EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"> WeaponNode->setMaterialTexture(0, driver->getTexture( <span class="stringliteral">"gun.jpg"</span>));</div><div class="line"> WeaponNode->setLoopMode ( <span class="keyword">false</span> );</div><div class="line"> WeaponNode->setName ( <span class="stringliteral">"tommi the gun man"</span> );</div><div class="line"></div><div class="line"> <span class="comment">//create a collision auto response animator</span></div><div class="line"> ISceneNodeAnimator* anim =</div><div class="line"> smgr->createCollisionResponseAnimator( meta, camera,</div><div class="line"> vector3df(30,45,30),</div><div class="line"> getGravity ( <span class="stringliteral">"earth"</span> ),</div><div class="line"> vector3df(0,40,0),</div><div class="line"> 0.0005f</div><div class="line"> );</div><div class="line"></div><div class="line"> camera->addAnimator( anim );</div><div class="line"> anim->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( meta )</div><div class="line"> {</div><div class="line"> meta->drop ();</div><div class="line"> }</div><div class="line"></div><div class="line"> respawn ();</div><div class="line"> setAnim ( <span class="stringliteral">"idle"</span> );</div><div class="line">}</div></div><!-- fragment --><p> so we need a good starting Position in the level. we can ask the Quake3 Loader for all entities with class_name "info_player_deathmatch" </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> Q3Player::respawn ()</div><div class="line">{</div><div class="line"> <span class="keywordflow">if</span> (!Device)</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"> ICameraSceneNode* camera = Device->getSceneManager()->getActiveCamera();</div><div class="line"></div><div class="line"> Device->getLogger()->log( <span class="stringliteral">"respawn"</span> );</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( StartPositionCurrent >= Q3StartPosition (</div><div class="line"> Mesh, camera,StartPositionCurrent++,</div><div class="line"> cam ()->getEllipsoidTranslation() )</div><div class="line"> )</div><div class="line"> {</div><div class="line"> StartPositionCurrent = 0;</div><div class="line"> }</div><div class="line">}</div></div><!-- fragment --><p> set Player position from saved coordinates </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> Q3Player::setpos ( <span class="keyword">const</span> vector3df &pos, <span class="keyword">const</span> vector3df &rotation )</div><div class="line">{</div><div class="line"> <span class="keywordflow">if</span> (!Device)</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"> Device->getLogger()->log( <span class="stringliteral">"setpos"</span> );</div><div class="line"></div><div class="line"> ICameraSceneNode* camera = Device->getSceneManager()->getActiveCamera();</div><div class="line"> <span class="keywordflow">if</span> ( camera )</div><div class="line"> {</div><div class="line"> camera->setPosition ( pos );</div><div class="line"> camera->setRotation ( rotation );</div><div class="line"> camera->OnAnimate ( 0 );</div><div class="line"> }</div><div class="line">}</div></div><!-- fragment --><p> set the Animation of the player and weapon </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> Q3Player::setAnim ( <span class="keyword">const</span> c8 *name )</div><div class="line">{</div><div class="line"> <span class="keywordflow">if</span> ( name )</div><div class="line"> {</div><div class="line"> snprintf ( animation, 64, <span class="stringliteral">"%s"</span>, name );</div><div class="line"> <span class="keywordflow">if</span> ( WeaponNode )</div><div class="line"> {</div><div class="line"> WeaponNode->setAnimationEndCallback ( <span class="keyword">this</span> );</div><div class="line"> WeaponNode->setMD2Animation ( animation );</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> animation[0] = 0;</div><div class="line"> <span class="keywordflow">if</span> ( WeaponNode )</div><div class="line"> {</div><div class="line"> WeaponNode->setAnimationEndCallback ( 0 );</div><div class="line"> }</div><div class="line"> }</div><div class="line">}</div><div class="line"></div><div class="line"></div><div class="line"><span class="comment">// Callback</span></div><div class="line"><span class="keywordtype">void</span> Q3Player::OnAnimationEnd(IAnimatedMeshSceneNode* node)</div><div class="line">{</div><div class="line"> setAnim ( 0 );</div><div class="line">}</div></div><!-- fragment --><p> GUI Elements </p><div class="fragment"><div class="line"><span class="keyword">struct </span>GUI</div><div class="line">{</div><div class="line"> GUI ()</div><div class="line"> {</div><div class="line"> memset ( <span class="keyword">this</span>, 0, <span class="keyword">sizeof</span> ( *<span class="keyword">this</span> ) );</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> drop()</div><div class="line"> {</div><div class="line"> dropElement ( Window );</div><div class="line"> dropElement ( Logo );</div><div class="line"> }</div><div class="line"></div><div class="line"> IGUIComboBox* VideoDriver;</div><div class="line"> IGUIComboBox* VideoMode;</div><div class="line"> IGUICheckBox* FullScreen;</div><div class="line"> IGUICheckBox* Bit32;</div><div class="line"> IGUIScrollBar* MultiSample;</div><div class="line"> IGUIButton* SetVideoMode;</div><div class="line"></div><div class="line"> IGUIScrollBar* Tesselation;</div><div class="line"> IGUIScrollBar* Gamma;</div><div class="line"> IGUICheckBox* Collision;</div><div class="line"> IGUICheckBox* Visible_Map;</div><div class="line"> IGUICheckBox* Visible_Shader;</div><div class="line"> IGUICheckBox* Visible_Fog;</div><div class="line"> IGUICheckBox* Visible_Unresolved;</div><div class="line"> IGUICheckBox* Visible_Skydome;</div><div class="line"> IGUIButton* Respawn;</div><div class="line"></div><div class="line"> IGUITable* ArchiveList;</div><div class="line"> IGUIButton* ArchiveAdd;</div><div class="line"> IGUIButton* ArchiveRemove;</div><div class="line"> IGUIFileOpenDialog* ArchiveFileOpen;</div><div class="line"> IGUIButton* ArchiveUp;</div><div class="line"> IGUIButton* ArchiveDown;</div><div class="line"></div><div class="line"> IGUIListBox* MapList;</div><div class="line"> IGUITreeView* SceneTree;</div><div class="line"> IGUIStaticText* StatusLine;</div><div class="line"> IGUIImage* Logo;</div><div class="line"> IGUIWindow* Window;</div><div class="line">};</div></div><!-- fragment --><p> CQuake3EventHandler controls the game </p><div class="fragment"><div class="line"><span class="keyword">class </span>CQuake3EventHandler : <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"></div><div class="line"> CQuake3EventHandler( GameData *gameData );</div><div class="line"> <span class="keyword">virtual</span> ~CQuake3EventHandler ();</div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> Animate();</div><div class="line"> <span class="keywordtype">void</span> Render();</div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> AddArchive ( <span class="keyword">const</span> path& archiveName );</div><div class="line"> <span class="keywordtype">void</span> LoadMap ( <span class="keyword">const</span> stringw& mapName, s32 collision );</div><div class="line"> <span class="keywordtype">void</span> CreatePlayers();</div><div class="line"> <span class="keywordtype">void</span> AddSky( u32 dome, <span class="keyword">const</span> c8 *texture );</div><div class="line"> Q3Player *GetPlayer ( u32 index ) { <span class="keywordflow">return</span> &Player[index]; }</div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> CreateGUI();</div><div class="line"> <span class="keywordtype">void</span> SetGUIActive( s32 command);</div><div class="line"></div><div class="line"> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent& eve);</div><div class="line"></div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"></div><div class="line"> GameData *Game;</div><div class="line"></div><div class="line"> IQ3LevelMesh* Mesh;</div><div class="line"> ISceneNode* MapParent;</div><div class="line"> ISceneNode* ShaderParent;</div><div class="line"> ISceneNode* ItemParent;</div><div class="line"> ISceneNode* UnresolvedParent;</div><div class="line"> ISceneNode* BulletParent;</div><div class="line"> ISceneNode* FogParent;</div><div class="line"> ISceneNode * SkyNode;</div><div class="line"> IMetaTriangleSelector *Meta;</div><div class="line"></div><div class="line"> c8 buf[256];</div><div class="line"></div><div class="line"> Q3Player Player[2];</div><div class="line"></div><div class="line"> <span class="keyword">struct </span>SParticleImpact</div><div class="line"> {</div><div class="line"> u32 when;</div><div class="line"> vector3df pos;</div><div class="line"> vector3df outVector;</div><div class="line"> };</div><div class="line"> array<SParticleImpact> Impacts;</div><div class="line"> <span class="keywordtype">void</span> useItem( Q3Player * player);</div><div class="line"> <span class="keywordtype">void</span> createParticleImpacts( u32 now );</div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> createTextures ();</div><div class="line"> <span class="keywordtype">void</span> addSceneTreeItem( ISceneNode * parent, IGUITreeViewNode* nodeParent);</div><div class="line"></div><div class="line"> GUI gui;</div><div class="line"> <span class="keywordtype">void</span> dropMap ();</div><div class="line">};</div></div><!-- fragment --><p> Constructor </p><div class="fragment"><div class="line">CQuake3EventHandler::CQuake3EventHandler( GameData *game )</div><div class="line">: Game(game), Mesh(0), MapParent(0), ShaderParent(0), ItemParent(0), UnresolvedParent(0),</div><div class="line"> BulletParent(0), FogParent(0), SkyNode(0), Meta(0)</div><div class="line">{</div><div class="line"> buf[0]=0;</div><div class="line"> <span class="comment">// Also use 16 Bit Textures for 16 Bit RenderDevice</span></div><div class="line"> <span class="keywordflow">if</span> ( Game->deviceParam.Bits == 16 )</div><div class="line"> {</div><div class="line"> game->Device->getVideoDriver()->setTextureCreationFlag(ETCF_ALWAYS_16_BIT, <span class="keyword">true</span>);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Quake3 Shader controls Z-Writing</span></div><div class="line"> game->Device->getSceneManager()->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, <span class="keyword">true</span>);</div><div class="line"></div><div class="line"> <span class="comment">// create internal textures</span></div><div class="line"> createTextures ();</div><div class="line"></div><div class="line"> sound_init ( game->Device );</div><div class="line"></div><div class="line"> Game->Device->setEventReceiver ( <span class="keyword">this</span> );</div><div class="line">}</div><div class="line"></div><div class="line"></div><div class="line"><span class="comment">// destructor</span></div><div class="line">CQuake3EventHandler::~CQuake3EventHandler ()</div><div class="line">{</div><div class="line"> Player[0].shutdown ();</div><div class="line"> sound_shutdown ();</div><div class="line"></div><div class="line"> Game->save( <span class="stringliteral">"explorer.cfg"</span> );</div><div class="line"></div><div class="line"> Game->Device->drop();</div><div class="line">}</div><div class="line"></div><div class="line"></div><div class="line"><span class="comment">// create runtime textures smog, fog</span></div><div class="line"><span class="keywordtype">void</span> CQuake3EventHandler::createTextures()</div><div class="line">{</div><div class="line"> IVideoDriver * driver = Game->Device->getVideoDriver();</div><div class="line"></div><div class="line"> dimension2du dim(64, 64);</div><div class="line"></div><div class="line"> video::IImage* image;</div><div class="line"> u32 i;</div><div class="line"> u32 x;</div><div class="line"> u32 y;</div><div class="line"> u32 * data;</div><div class="line"> <span class="keywordflow">for</span> ( i = 0; i != 8; ++i )</div><div class="line"> {</div><div class="line"> image = driver->createImage ( video::ECF_A8R8G8B8, dim);</div><div class="line"> data = (u32*) image->lock ();</div><div class="line"> <span class="keywordflow">for</span> ( y = 0; y != dim.Height; ++y )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">for</span> ( x = 0; x != dim.Width; ++x )</div><div class="line"> {</div><div class="line"> data [x] = 0xFFFFFFFF;</div><div class="line"> }</div><div class="line"> data = (u32*) ( (u8*) data + image->getPitch() );</div><div class="line"> }</div><div class="line"> image->unlock();</div><div class="line"> snprintf ( buf, 64, <span class="stringliteral">"smoke_%02d"</span>, i );</div><div class="line"> driver->addTexture( buf, image );</div><div class="line"> image->drop ();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// fog</span></div><div class="line"> <span class="keywordflow">for</span> ( i = 0; i != 1; ++i )</div><div class="line"> {</div><div class="line"> image = driver->createImage ( video::ECF_A8R8G8B8, dim);</div><div class="line"> data = (u32*) image->lock ();</div><div class="line"> <span class="keywordflow">for</span> ( y = 0; y != dim.Height; ++y )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">for</span> ( x = 0; x != dim.Width; ++x )</div><div class="line"> {</div><div class="line"> data [x] = 0xFFFFFFFF;</div><div class="line"> }</div><div class="line"> data = (u32*) ( (u8*) data + image->getPitch() );</div><div class="line"> }</div><div class="line"> image->unlock();</div><div class="line"> snprintf ( buf, 64, <span class="stringliteral">"fog_%02d"</span>, i );</div><div class="line"> driver->addTexture( buf, image );</div><div class="line"> image->drop ();</div><div class="line"> }</div><div class="line">}</div></div><!-- fragment --><p> create the GUI </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> CQuake3EventHandler::CreateGUI()</div><div class="line">{</div><div class="line"></div><div class="line"> IGUIEnvironment *env = Game->Device->getGUIEnvironment();</div><div class="line"> IVideoDriver * driver = Game->Device->getVideoDriver();</div><div class="line"></div><div class="line"> gui.drop();</div><div class="line"></div><div class="line"> <span class="comment">// set skin font</span></div><div class="line"> IGUIFont* font = env->getFont(<span class="stringliteral">"fontlucida.png"</span>);</div><div class="line"> <span class="keywordflow">if</span> (font)</div><div class="line"> env->getSkin()->setFont(font);</div><div class="line"> env->getSkin()->setColor ( EGDC_BUTTON_TEXT, video::SColor(240,0xAA,0xAA,0xAA) );</div><div class="line"> env->getSkin()->setColor ( EGDC_3D_HIGH_LIGHT, video::SColor(240,0x22,0x22,0x22) );</div><div class="line"> env->getSkin()->setColor ( EGDC_3D_FACE, video::SColor(240,0x44,0x44,0x44) );</div><div class="line"> env->getSkin()->setColor ( EGDC_EDITABLE, video::SColor(240,0x44,0x44,0x44) );</div><div class="line"> env->getSkin()->setColor ( EGDC_FOCUSED_EDITABLE, video::SColor(240,0x54,0x54,0x54) );</div><div class="line"> env->getSkin()->setColor ( EGDC_WINDOW, video::SColor(240,0x66,0x66,0x66) );</div><div class="line"></div><div class="line"> <span class="comment">// minimal gui size 800x600</span></div><div class="line"> dimension2d<u32> dim ( 800, 600 );</div><div class="line"> dimension2d<u32> vdim ( Game->Device->getVideoDriver()->getScreenSize() );</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( vdim.Height >= dim.Height && vdim.Width >= dim.Width )</div><div class="line"> {</div><div class="line"> <span class="comment">//dim = vdim;</span></div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> }</div><div class="line"></div><div class="line"> gui.Window = env->addWindow ( rect<s32> ( 0, 0, dim.Width, dim.Height ), <span class="keyword">false</span>, L<span class="stringliteral">"Quake3 Explorer"</span> );</div><div class="line"> gui.Window->setToolTipText ( L<span class="stringliteral">"Quake3Explorer. Loads and show various BSP File Format and Shaders."</span> );</div><div class="line"> gui.Window->getCloseButton()->setToolTipText ( L<span class="stringliteral">"Quit Quake3 Explorer"</span> );</div><div class="line"></div><div class="line"> <span class="comment">// add a status line help text</span></div><div class="line"> gui.StatusLine = env->addStaticText( 0, rect<s32>( 5,dim.Height - 30,dim.Width - 5,dim.Height - 10),</div><div class="line"> <span class="keyword">false</span>, <span class="keyword">false</span>, gui.Window, -1, <span class="keyword">true</span></div><div class="line"> );</div><div class="line"></div><div class="line"></div><div class="line"> env->addStaticText ( L<span class="stringliteral">"VideoDriver:"</span>, rect<s32>( dim.Width - 400, 24, dim.Width - 310, 40 ),<span class="keyword">false</span>, <span class="keyword">false</span>, gui.Window, -1, <span class="keyword">false</span> );</div><div class="line"> gui.VideoDriver = env->addComboBox(rect<s32>( dim.Width - 300, 24, dim.Width - 10, 40 ),gui.Window);</div><div class="line"> gui.VideoDriver->addItem(L<span class="stringliteral">"Direct3D 9.0c"</span>, EDT_DIRECT3D9 );</div><div class="line"> gui.VideoDriver->addItem(L<span class="stringliteral">"Direct3D 8.1"</span>, EDT_DIRECT3D8 );</div><div class="line"> gui.VideoDriver->addItem(L<span class="stringliteral">"OpenGL 1.5"</span>, EDT_OPENGL);</div><div class="line"> gui.VideoDriver->addItem(L<span class="stringliteral">"Software Renderer"</span>, EDT_SOFTWARE);</div><div class="line"> gui.VideoDriver->addItem(L<span class="stringliteral">"Burning's Video (TM) Thomas Alten"</span>, EDT_BURNINGSVIDEO);</div><div class="line"> gui.VideoDriver->setSelected ( gui.VideoDriver->getIndexForItemData ( Game->deviceParam.DriverType ) );</div><div class="line"> gui.VideoDriver->setToolTipText ( L<span class="stringliteral">"Use a VideoDriver"</span> );</div><div class="line"></div><div class="line"> env->addStaticText ( L<span class="stringliteral">"VideoMode:"</span>, rect<s32>( dim.Width - 400, 44, dim.Width - 310, 60 ),<span class="keyword">false</span>, <span class="keyword">false</span>, gui.Window, -1, <span class="keyword">false</span> );</div><div class="line"> gui.VideoMode = env->addComboBox(rect<s32>( dim.Width - 300, 44, dim.Width - 10, 60 ),gui.Window);</div><div class="line"> gui.VideoMode->setToolTipText ( L<span class="stringliteral">"Supported Screenmodes"</span> );</div><div class="line"> IVideoModeList *modeList = Game->Device->getVideoModeList();</div><div class="line"> <span class="keywordflow">if</span> ( modeList )</div><div class="line"> {</div><div class="line"> s32 i;</div><div class="line"> <span class="keywordflow">for</span> ( i = 0; i != modeList->getVideoModeCount (); ++i )</div><div class="line"> {</div><div class="line"> u16 d = modeList->getVideoModeDepth ( i );</div><div class="line"> <span class="keywordflow">if</span> ( d < 16 )</div><div class="line"> <span class="keywordflow">continue</span>;</div><div class="line"></div><div class="line"> u16 w = modeList->getVideoModeResolution ( i ).Width;</div><div class="line"> u16 h = modeList->getVideoModeResolution ( i ).Height;</div><div class="line"> u32 val = w << 16 | h;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( gui.VideoMode->getIndexForItemData ( val ) >= 0 )</div><div class="line"> <span class="keywordflow">continue</span>;</div><div class="line"></div><div class="line"> f32 aspect = (f32) w / (f32) h;</div><div class="line"> <span class="keyword">const</span> c8 *a = <span class="stringliteral">""</span>;</div><div class="line"> <span class="keywordflow">if</span> ( core::equals ( aspect, 1.3333333333f ) ) a = <span class="stringliteral">"4:3"</span>;</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( core::equals ( aspect, 1.6666666f ) ) a = <span class="stringliteral">"15:9 widescreen"</span>;</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( core::equals ( aspect, 1.7777777f ) ) a = <span class="stringliteral">"16:9 widescreen"</span>;</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( core::equals ( aspect, 1.6f ) ) a = <span class="stringliteral">"16:10 widescreen"</span>;</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( core::equals ( aspect, 2.133333f ) ) a = <span class="stringliteral">"20:9 widescreen"</span>;</div><div class="line"></div><div class="line"> snprintf ( buf, <span class="keyword">sizeof</span> ( buf ), <span class="stringliteral">"%d x %d, %s"</span>,w, h, a );</div><div class="line"> gui.VideoMode->addItem ( stringw ( buf ).c_str(), val );</div><div class="line"> }</div><div class="line"> }</div><div class="line"> gui.VideoMode->setSelected ( gui.VideoMode->getIndexForItemData (</div><div class="line"> Game->deviceParam.WindowSize.Width << 16 |</div><div class="line"> Game->deviceParam.WindowSize.Height ) );</div><div class="line"></div><div class="line"> gui.FullScreen = env->addCheckBox ( Game->deviceParam.Fullscreen, rect<s32>( dim.Width - 400, 64, dim.Width - 300, 80 ), gui.Window,-1, L<span class="stringliteral">"Fullscreen"</span> );</div><div class="line"> gui.FullScreen->setToolTipText ( L<span class="stringliteral">"Set Fullscreen or Window Mode"</span> );</div><div class="line"></div><div class="line"> gui.Bit32 = env->addCheckBox ( Game->deviceParam.Bits == 32, rect<s32>( dim.Width - 300, 64, dim.Width - 240, 80 ), gui.Window,-1, L<span class="stringliteral">"32Bit"</span> );</div><div class="line"> gui.Bit32->setToolTipText ( L<span class="stringliteral">"Use 16 or 32 Bit"</span> );</div><div class="line"></div><div class="line"> env->addStaticText ( L<span class="stringliteral">"MultiSample:"</span>, rect<s32>( dim.Width - 235, 64, dim.Width - 150, 80 ),<span class="keyword">false</span>, <span class="keyword">false</span>, gui.Window, -1, <span class="keyword">false</span> );</div><div class="line"> gui.MultiSample = env->addScrollBar( <span class="keyword">true</span>, rect<s32>( dim.Width - 150, 64, dim.Width - 70, 80 ), gui.Window,-1 );</div><div class="line"> gui.MultiSample->setMin ( 0 );</div><div class="line"> gui.MultiSample->setMax ( 8 );</div><div class="line"> gui.MultiSample->setSmallStep ( 1 );</div><div class="line"> gui.MultiSample->setLargeStep ( 1 );</div><div class="line"> gui.MultiSample->setPos ( Game->deviceParam.AntiAlias );</div><div class="line"> gui.MultiSample->setToolTipText ( L<span class="stringliteral">"Set the MultiSample (disable, 1x, 2x, 4x, 8x )"</span> );</div><div class="line"></div><div class="line"> gui.SetVideoMode = env->addButton (rect<s32>( dim.Width - 60, 64, dim.Width - 10, 80 ), gui.Window, -1,L<span class="stringliteral">"set"</span> );</div><div class="line"> gui.SetVideoMode->setToolTipText ( L<span class="stringliteral">"Set Video Mode with current values"</span> );</div><div class="line"></div><div class="line"> env->addStaticText ( L<span class="stringliteral">"Gamma:"</span>, rect<s32>( dim.Width - 400, 104, dim.Width - 310, 120 ),<span class="keyword">false</span>, <span class="keyword">false</span>, gui.Window, -1, <span class="keyword">false</span> );</div><div class="line"> gui.Gamma = env->addScrollBar( <span class="keyword">true</span>, rect<s32>( dim.Width - 300, 104, dim.Width - 10, 120 ), gui.Window,-1 );</div><div class="line"> gui.Gamma->setMin ( 50 );</div><div class="line"> gui.Gamma->setMax ( 350 );</div><div class="line"> gui.Gamma->setSmallStep ( 1 );</div><div class="line"> gui.Gamma->setLargeStep ( 10 );</div><div class="line"> gui.Gamma->setPos ( core::floor32 ( Game->GammaValue * 100.f ) );</div><div class="line"> gui.Gamma->setToolTipText ( L<span class="stringliteral">"Adjust Gamma Ramp ( 0.5 - 3.5)"</span> );</div><div class="line"> Game->Device->setGammaRamp ( Game->GammaValue, Game->GammaValue, Game->GammaValue, 0.f, 0.f );</div><div class="line"></div><div class="line"></div><div class="line"> env->addStaticText ( L<span class="stringliteral">"Tesselation:"</span>, rect<s32>( dim.Width - 400, 124, dim.Width - 310, 140 ),<span class="keyword">false</span>, <span class="keyword">false</span>, gui.Window, -1, <span class="keyword">false</span> );</div><div class="line"> gui.Tesselation = env->addScrollBar( <span class="keyword">true</span>, rect<s32>( dim.Width - 300, 124, dim.Width - 10, 140 ), gui.Window,-1 );</div><div class="line"> gui.Tesselation->setMin ( 2 );</div><div class="line"> gui.Tesselation->setMax ( 12 );</div><div class="line"> gui.Tesselation->setSmallStep ( 1 );</div><div class="line"> gui.Tesselation->setLargeStep ( 1 );</div><div class="line"> gui.Tesselation->setPos ( Game->loadParam.patchTesselation );</div><div class="line"> gui.Tesselation->setToolTipText ( L<span class="stringliteral">"How smooth should curved surfaces be rendered"</span> );</div><div class="line"></div><div class="line"> gui.Collision = env->addCheckBox ( <span class="keyword">true</span>, rect<s32>( dim.Width - 400, 150, dim.Width - 300, 166 ), gui.Window,-1, L<span class="stringliteral">"Collision"</span> );</div><div class="line"> gui.Collision->setToolTipText ( L<span class="stringliteral">"Set collision on or off ( flythrough ). \nPress F7 on your Keyboard"</span> );</div><div class="line"> gui.Visible_Map = env->addCheckBox ( <span class="keyword">true</span>, rect<s32>( dim.Width - 300, 150, dim.Width - 240, 166 ), gui.Window,-1, L<span class="stringliteral">"Map"</span> );</div><div class="line"> gui.Visible_Map->setToolTipText ( L<span class="stringliteral">"Show or not show the static part the Level. \nPress F3 on your Keyboard"</span> );</div><div class="line"> gui.Visible_Shader = env->addCheckBox ( <span class="keyword">true</span>, rect<s32>( dim.Width - 240, 150, dim.Width - 170, 166 ), gui.Window,-1, L<span class="stringliteral">"Shader"</span> );</div><div class="line"> gui.Visible_Shader->setToolTipText ( L<span class="stringliteral">"Show or not show the Shader Nodes. \nPress F4 on your Keyboard"</span> );</div><div class="line"> gui.Visible_Fog = env->addCheckBox ( <span class="keyword">true</span>, rect<s32>( dim.Width - 170, 150, dim.Width - 110, 166 ), gui.Window,-1, L<span class="stringliteral">"Fog"</span> );</div><div class="line"> gui.Visible_Fog->setToolTipText ( L<span class="stringliteral">"Show or not show the Fog Nodes. \nPress F5 on your Keyboard"</span> );</div><div class="line"> gui.Visible_Unresolved = env->addCheckBox ( <span class="keyword">true</span>, rect<s32>( dim.Width - 110, 150, dim.Width - 10, 166 ), gui.Window,-1, L<span class="stringliteral">"Unresolved"</span> );</div><div class="line"> gui.Visible_Unresolved->setToolTipText ( L<span class="stringliteral">"Show the or not show the Nodes the Engine can't handle. \nPress F6 on your Keyboard"</span> );</div><div class="line"> gui.Visible_Skydome = env->addCheckBox ( <span class="keyword">true</span>, rect<s32>( dim.Width - 110, 180, dim.Width - 10, 196 ), gui.Window,-1, L<span class="stringliteral">"Skydome"</span> );</div><div class="line"> gui.Visible_Skydome->setToolTipText ( L<span class="stringliteral">"Show the or not show the Skydome."</span> );</div><div class="line"></div><div class="line"> <span class="comment">//Respawn = env->addButton ( rect<s32>( dim.Width - 260, 90, dim.Width - 10, 106 ), 0,-1, L"Respawn" );</span></div><div class="line"></div><div class="line"> env->addStaticText ( L<span class="stringliteral">"Archives:"</span>, rect<s32>( 5, dim.Height - 530, dim.Width - 600,dim.Height - 514 ),<span class="keyword">false</span>, <span class="keyword">false</span>, gui.Window, -1, <span class="keyword">false</span> );</div><div class="line"></div><div class="line"> gui.ArchiveAdd = env->addButton ( rect<s32>( dim.Width - 725, dim.Height - 530, dim.Width - 665, dim.Height - 514 ), gui.Window,-1, L<span class="stringliteral">"add"</span> );</div><div class="line"> gui.ArchiveAdd->setToolTipText ( L<span class="stringliteral">"Add an archive, usually packed zip-archives (*.pk3) to the Filesystem"</span> );</div><div class="line"> gui.ArchiveRemove = env->addButton ( rect<s32>( dim.Width - 660, dim.Height - 530, dim.Width - 600, dim.Height - 514 ), gui.Window,-1, L<span class="stringliteral">"del"</span> );</div><div class="line"> gui.ArchiveRemove->setToolTipText ( L<span class="stringliteral">"Remove the selected archive from the FileSystem."</span> );</div><div class="line"> gui.ArchiveUp = env->addButton ( rect<s32>( dim.Width - 575, dim.Height - 530, dim.Width - 515, dim.Height - 514 ), gui.Window,-1, L<span class="stringliteral">"up"</span> );</div><div class="line"> gui.ArchiveUp->setToolTipText ( L<span class="stringliteral">"Arrange Archive Look-up Hirachy. Move the selected Archive up"</span> );</div><div class="line"> gui.ArchiveDown = env->addButton ( rect<s32>( dim.Width - 510, dim.Height - 530, dim.Width - 440, dim.Height - 514 ), gui.Window,-1, L<span class="stringliteral">"down"</span> );</div><div class="line"> gui.ArchiveDown->setToolTipText ( L<span class="stringliteral">"Arrange Archive Look-up Hirachy. Move the selected Archive down"</span> );</div><div class="line"></div><div class="line"></div><div class="line"> gui.ArchiveList = env->addTable ( rect<s32>( 5,dim.Height - 510, dim.Width - 450,dim.Height - 410 ), gui.Window );</div><div class="line"> gui.ArchiveList->addColumn ( L<span class="stringliteral">"Type"</span>, 0 );</div><div class="line"> gui.ArchiveList->addColumn ( L<span class="stringliteral">"Real File Path"</span>, 1 );</div><div class="line"> gui.ArchiveList->setColumnWidth ( 0, 60 );</div><div class="line"> gui.ArchiveList->setColumnWidth ( 1, 284 );</div><div class="line"> gui.ArchiveList->setToolTipText ( L<span class="stringliteral">"Show the attached Archives"</span> );</div><div class="line"></div><div class="line"></div><div class="line"> env->addStaticText ( L<span class="stringliteral">"Maps:"</span>, rect<s32>( 5, dim.Height - 400, dim.Width - 450,dim.Height - 380 ),<span class="keyword">false</span>, <span class="keyword">false</span>, gui.Window, -1, <span class="keyword">false</span> );</div><div class="line"> gui.MapList = env->addListBox ( rect<s32>( 5,dim.Height - 380, dim.Width - 450,dim.Height - 40 ), gui.Window, -1, <span class="keyword">true</span> );</div><div class="line"> gui.MapList->setToolTipText ( L<span class="stringliteral">"Show the current Maps in all Archives.\n Double-Click the Map to start the level"</span> );</div><div class="line"></div><div class="line"></div><div class="line"> <span class="comment">// create a visible Scene Tree</span></div><div class="line"> env->addStaticText ( L<span class="stringliteral">"Scenegraph:"</span>, rect<s32>( dim.Width - 400, dim.Height - 400, dim.Width - 5,dim.Height - 380 ),<span class="keyword">false</span>, <span class="keyword">false</span>, gui.Window, -1, <span class="keyword">false</span> );</div><div class="line"> gui.SceneTree = env->addTreeView( rect<s32>( dim.Width - 400, dim.Height - 380, dim.Width - 5, dim.Height - 40 ),</div><div class="line"> gui.Window, -1, <span class="keyword">true</span>, <span class="keyword">true</span>, <span class="keyword">false</span> );</div><div class="line"> gui.SceneTree->setToolTipText ( L<span class="stringliteral">"Show the current Scenegraph"</span> );</div><div class="line"> gui.SceneTree->getRoot()->clearChildren();</div><div class="line"> addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() );</div><div class="line"></div><div class="line"></div><div class="line"> IGUIImageList* imageList = env->createImageList( driver->getTexture ( <span class="stringliteral">"iconlist.png"</span> ),</div><div class="line"> dimension2di( 32, 32 ), true );</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( imageList )</div><div class="line"> {</div><div class="line"> gui.SceneTree->setImageList( imageList );</div><div class="line"> imageList->drop ();</div><div class="line"> }</div><div class="line"></div><div class="line"></div><div class="line"> <span class="comment">// load the engine logo</span></div><div class="line"> gui.Logo = env->addImage( driver->getTexture(<span class="stringliteral">"irrlichtlogo3.png"</span>), position2d<s32>(5, 16 ), <span class="keyword">true</span>, 0 );</div><div class="line"> gui.Logo->setToolTipText ( L<span class="stringliteral">"The great Irrlicht Engine"</span> );</div><div class="line"></div><div class="line"> AddArchive ( <span class="stringliteral">""</span> );</div><div class="line">}</div></div><!-- fragment --><p> Add an Archive to the FileSystems and updates the GUI </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> CQuake3EventHandler::AddArchive ( <span class="keyword">const</span> path& archiveName )</div><div class="line">{</div><div class="line"> IFileSystem *fs = Game->Device->getFileSystem();</div><div class="line"> u32 i;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( archiveName.size () )</div><div class="line"> {</div><div class="line"> <span class="keywordtype">bool</span> exists = <span class="keyword">false</span>;</div><div class="line"> <span class="keywordflow">for</span> ( i = 0; i != fs->getFileArchiveCount(); ++i )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( fs->getFileArchive(i)->getFileList()->getPath() == archiveName )</div><div class="line"> {</div><div class="line"> exists = <span class="keyword">true</span>;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (!exists)</div><div class="line"> {</div><div class="line"> fs->addFileArchive(archiveName, <span class="keyword">true</span>, <span class="keyword">false</span>);</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// store the current archives in game data</span></div><div class="line"> <span class="comment">// show the attached Archive in proper order</span></div><div class="line"> <span class="keywordflow">if</span> ( gui.ArchiveList )</div><div class="line"> {</div><div class="line"> gui.ArchiveList->clearRows();</div><div class="line"></div><div class="line"> <span class="keywordflow">for</span> ( i = 0; i != fs->getFileArchiveCount(); ++i )</div><div class="line"> {</div><div class="line"> IFileArchive * archive = fs->getFileArchive ( i );</div><div class="line"></div><div class="line"> u32 index = gui.ArchiveList->addRow(i);</div><div class="line"></div><div class="line"> core::stringw typeName;</div><div class="line"> <span class="keywordflow">switch</span>(archive->getType())</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> io::EFAT_ZIP:</div><div class="line"> typeName = <span class="stringliteral">"ZIP"</span>;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> io::EFAT_GZIP:</div><div class="line"> typeName = <span class="stringliteral">"gzip"</span>;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> io::EFAT_FOLDER:</div><div class="line"> typeName = <span class="stringliteral">"Mount"</span>;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> io::EFAT_PAK:</div><div class="line"> typeName = <span class="stringliteral">"PAK"</span>;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> io::EFAT_TAR:</div><div class="line"> typeName = <span class="stringliteral">"TAR"</span>;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">default</span>:</div><div class="line"> typeName = <span class="stringliteral">"archive"</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> gui.ArchiveList->setCellText ( index, 0, typeName );</div><div class="line"> gui.ArchiveList->setCellText ( index, 1, archive->getFileList()->getPath() );</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"></div><div class="line"> <span class="comment">// browse the archives for maps</span></div><div class="line"> <span class="keywordflow">if</span> ( gui.MapList )</div><div class="line"> {</div><div class="line"> gui.MapList->clear();</div><div class="line"></div><div class="line"> IGUISpriteBank *bank = Game->Device->getGUIEnvironment()->getSpriteBank(<span class="stringliteral">"sprite_q3map"</span>);</div><div class="line"> <span class="keywordflow">if</span> ( 0 == bank )</div><div class="line"> bank = Game->Device->getGUIEnvironment()->addEmptySpriteBank(<span class="stringliteral">"sprite_q3map"</span>);</div><div class="line"></div><div class="line"> SGUISprite sprite;</div><div class="line"> SGUISpriteFrame frame;</div><div class="line"> core::rect<s32> r;</div><div class="line"></div><div class="line"> bank->getSprites().clear();</div><div class="line"> bank->getPositions().clear ();</div><div class="line"> gui.MapList->setSpriteBank ( bank );</div><div class="line"></div><div class="line"> u32 g = 0;</div><div class="line"> core::stringw s;</div><div class="line"></div><div class="line"> <span class="comment">// browse the attached file system</span></div><div class="line"> fs->setFileListSystem ( FILESYSTEM_VIRTUAL );</div><div class="line"> fs->changeWorkingDirectoryTo ( <span class="stringliteral">"/maps/"</span> );</div><div class="line"> IFileList *fileList = fs->createFileList ();</div><div class="line"> fs->setFileListSystem ( FILESYSTEM_NATIVE );</div><div class="line"></div><div class="line"> <span class="keywordflow">for</span> ( i=0; i< fileList->getFileCount(); ++i)</div><div class="line"> {</div><div class="line"> s = fileList->getFullFileName(i);</div><div class="line"> <span class="keywordflow">if</span> ( s.find ( <span class="stringliteral">".bsp"</span> ) >= 0 )</div><div class="line"> {</div><div class="line"> <span class="comment">// get level screenshot. reformat texture to 128x128</span></div><div class="line"> path c ( s );</div><div class="line"> deletePathFromFilename ( c );</div><div class="line"> cutFilenameExtension ( c, c );</div><div class="line"> c = path ( <span class="stringliteral">"levelshots/"</span> ) + c;</div><div class="line"></div><div class="line"> dimension2du dim ( 128, 128 );</div><div class="line"> IVideoDriver * driver = Game->Device->getVideoDriver();</div><div class="line"> IImage* image = 0;</div><div class="line"> ITexture *tex = 0;</div><div class="line"> path filename;</div><div class="line"></div><div class="line"> filename = c + <span class="stringliteral">".jpg"</span>;</div><div class="line"> <span class="keywordflow">if</span> ( fs->existFile ( filename ) )</div><div class="line"> image = driver->createImageFromFile( filename );</div><div class="line"> <span class="keywordflow">if</span> ( 0 == image )</div><div class="line"> {</div><div class="line"> filename = c + <span class="stringliteral">".tga"</span>;</div><div class="line"> <span class="keywordflow">if</span> ( fs->existFile ( filename ) )</div><div class="line"> image = driver->createImageFromFile( filename );</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( image )</div><div class="line"> {</div><div class="line"> IImage* filter = driver->createImage ( video::ECF_R8G8B8, dim );</div><div class="line"> image->copyToScalingBoxFilter ( filter, 0 );</div><div class="line"> image->drop ();</div><div class="line"> image = filter;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( image )</div><div class="line"> {</div><div class="line"> tex = driver->addTexture ( filename, image );</div><div class="line"> image->drop ();</div><div class="line"> }</div><div class="line"></div><div class="line"></div><div class="line"> bank->setTexture ( g, tex );</div><div class="line"></div><div class="line"> r.LowerRightCorner.X = dim.Width;</div><div class="line"> r.LowerRightCorner.Y = dim.Height;</div><div class="line"> gui.MapList->setItemHeight ( r.LowerRightCorner.Y + 4 );</div><div class="line"> frame.rectNumber = bank->getPositions().size();</div><div class="line"> frame.textureNumber = g;</div><div class="line"></div><div class="line"> bank->getPositions().push_back(r);</div><div class="line"></div><div class="line"> sprite.Frames.set_used ( 0 );</div><div class="line"> sprite.Frames.push_back(frame);</div><div class="line"> sprite.frameTime = 0;</div><div class="line"> bank->getSprites().push_back(sprite);</div><div class="line"></div><div class="line"> gui.MapList->addItem ( s.c_str (), g );</div><div class="line"> g += 1;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> fileList->drop ();</div><div class="line"></div><div class="line"> gui.MapList->setSelected ( -1 );</div><div class="line"> IGUIScrollBar * bar = (IGUIScrollBar*)gui.MapList->getElementFromId( 0 );</div><div class="line"> <span class="keywordflow">if</span> ( bar )</div><div class="line"> bar->setPos ( 0 );</div><div class="line"></div><div class="line"> }</div><div class="line"></div><div class="line">}</div></div><!-- fragment --><p> clears the Map in Memory </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> CQuake3EventHandler::dropMap ()</div><div class="line">{</div><div class="line"> IVideoDriver * driver = Game->Device->getVideoDriver();</div><div class="line"></div><div class="line"> driver->removeAllHardwareBuffers ();</div><div class="line"> driver->removeAllTextures ();</div><div class="line"></div><div class="line"> Player[0].shutdown ();</div><div class="line"></div><div class="line"></div><div class="line"> dropElement ( ItemParent );</div><div class="line"> dropElement ( ShaderParent );</div><div class="line"> dropElement ( UnresolvedParent );</div><div class="line"> dropElement ( FogParent );</div><div class="line"> dropElement ( BulletParent );</div><div class="line"></div><div class="line"></div><div class="line"> Impacts.clear();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( Meta )</div><div class="line"> {</div><div class="line"> Meta = 0;</div><div class="line"> }</div><div class="line"></div><div class="line"> dropElement ( MapParent );</div><div class="line"> dropElement ( SkyNode );</div><div class="line"></div><div class="line"> <span class="comment">// clean out meshes, because textures are invalid</span></div><div class="line"> <span class="comment">// TODO: better texture handling;-)</span></div><div class="line"> IMeshCache *cache = Game->Device->getSceneManager ()->getMeshCache();</div><div class="line"> cache->clear ();</div><div class="line"> Mesh = 0;</div><div class="line">}</div></div><!-- fragment --><p> Load new map </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> CQuake3EventHandler::LoadMap ( <span class="keyword">const</span> stringw &mapName, s32 collision )</div><div class="line">{</div><div class="line"> <span class="keywordflow">if</span> ( 0 == mapName.size() )</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"></div><div class="line"> dropMap ();</div><div class="line"></div><div class="line"> IFileSystem *fs = Game->Device->getFileSystem();</div><div class="line"> ISceneManager *smgr = Game->Device->getSceneManager ();</div><div class="line"></div><div class="line"> IReadFile* file = fs->createMemoryReadFile(&Game->loadParam,</div><div class="line"> <span class="keyword">sizeof</span>(Game->loadParam), L<span class="stringliteral">"levelparameter.cfg"</span>, <span class="keyword">false</span>);</div><div class="line"></div><div class="line"> <span class="comment">// load cfg file</span></div><div class="line"> smgr->getMesh( file );</div><div class="line"> file->drop ();</div><div class="line"></div><div class="line"> <span class="comment">// load the actual map</span></div><div class="line"> Mesh = (IQ3LevelMesh*) smgr->getMesh(mapName);</div><div class="line"> <span class="keywordflow">if</span> ( 0 == Mesh )</div><div class="line"> <span class="keywordflow">return</span>;</div></div><!-- fragment --><p> add the geometry mesh to the Scene ( polygon & patches ) The Geometry mesh is optimised for faster drawing </p><div class="fragment"><div class="line">IMesh *geometry = Mesh->getMesh(E_Q3_MESH_GEOMETRY);</div><div class="line"><span class="keywordflow">if</span> ( 0 == geometry || geometry->getMeshBufferCount() == 0)</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"></div><div class="line">Game->CurrentMapName = mapName;</div><div class="line"></div><div class="line"><span class="comment">//create a collision list</span></div><div class="line">Meta = 0;</div><div class="line"></div><div class="line">ITriangleSelector * selector = 0;</div><div class="line"><span class="keywordflow">if</span> (collision)</div><div class="line"> Meta = smgr->createMetaTriangleSelector();</div><div class="line"></div><div class="line"><span class="comment">//IMeshBuffer *b0 = geometry->getMeshBuffer(0);</span></div><div class="line"><span class="comment">//s32 minimalNodes = b0 ? core::s32_max ( 2048, b0->getVertexCount() / 32 ) : 2048;</span></div><div class="line">s32 minimalNodes = 2048;</div><div class="line"></div><div class="line">MapParent = smgr->addOctreeSceneNode(geometry, 0, -1, minimalNodes);</div><div class="line">MapParent->setName ( mapName );</div><div class="line"><span class="keywordflow">if</span> ( Meta )</div><div class="line">{</div><div class="line"> selector = smgr->createOctreeTriangleSelector( geometry,MapParent, minimalNodes);</div><div class="line"> <span class="comment">//selector = smgr->createTriangleSelector ( geometry, MapParent );</span></div><div class="line"> Meta->addTriangleSelector( selector);</div><div class="line"> selector->drop ();</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// logical parent for the items</span></div><div class="line">ItemParent = smgr->addEmptySceneNode();</div><div class="line"><span class="keywordflow">if</span> ( ItemParent )</div><div class="line"> ItemParent->setName ( <span class="stringliteral">"Item Container"</span> );</div><div class="line"></div><div class="line">ShaderParent = smgr->addEmptySceneNode();</div><div class="line"><span class="keywordflow">if</span> ( ShaderParent )</div><div class="line"> ShaderParent->setName ( <span class="stringliteral">"Shader Container"</span> );</div><div class="line"></div><div class="line">UnresolvedParent = smgr->addEmptySceneNode();</div><div class="line"><span class="keywordflow">if</span> ( UnresolvedParent )</div><div class="line"> UnresolvedParent->setName ( <span class="stringliteral">"Unresolved Container"</span> );</div><div class="line"></div><div class="line">FogParent = smgr->addEmptySceneNode();</div><div class="line"><span class="keywordflow">if</span> ( FogParent )</div><div class="line"> FogParent->setName ( <span class="stringliteral">"Fog Container"</span> );</div><div class="line"></div><div class="line"><span class="comment">// logical parent for the bullets</span></div><div class="line">BulletParent = smgr->addEmptySceneNode();</div><div class="line"><span class="keywordflow">if</span> ( BulletParent )</div><div class="line"> BulletParent->setName ( <span class="stringliteral">"Bullet Container"</span> );</div></div><!-- fragment --><p> now construct SceneNodes for each Shader The Objects are stored in the quake mesh E_Q3_MESH_ITEMS and the Shader ID is stored in the MaterialParameters mostly dark looking skulls and moving lava.. or green flashing tubes? </p><div class="fragment"><div class="line">Q3ShaderFactory ( Game->loadParam, Game->Device, Mesh, E_Q3_MESH_ITEMS,ShaderParent, Meta, <span class="keyword">false</span> );</div><div class="line">Q3ShaderFactory ( Game->loadParam, Game->Device, Mesh, E_Q3_MESH_FOG,FogParent, 0, <span class="keyword">false</span> );</div><div class="line">Q3ShaderFactory ( Game->loadParam, Game->Device, Mesh, E_Q3_MESH_UNRESOLVED,UnresolvedParent, Meta, <span class="keyword">true</span> );</div></div><!-- fragment --><p> Now construct Models from Entity List </p><div class="fragment"><div class="line"> Q3ModelFactory ( Game->loadParam, Game->Device, Mesh, ItemParent, <span class="keyword">false</span> );</div><div class="line">}</div></div><!-- fragment --><p> Adds a SceneNode with an icon to the Scene Tree </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> CQuake3EventHandler::addSceneTreeItem( ISceneNode * parent, IGUITreeViewNode* nodeParent)</div><div class="line">{</div><div class="line"> IGUITreeViewNode* node;</div><div class="line"> <span class="keywordtype">wchar_t</span> msg[128];</div><div class="line"></div><div class="line"> s32 imageIndex;</div><div class="line"> list<ISceneNode*>::ConstIterator it = parent->getChildren().begin();</div><div class="line"> <span class="keywordflow">for</span> (; it != parent->getChildren().end(); ++it)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">switch</span> ( (*it)->getType () )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> ESNT_Q3SHADER_SCENE_NODE: imageIndex = 0; <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> ESNT_CAMERA: imageIndex = 1; <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> ESNT_EMPTY: imageIndex = 2; <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> ESNT_MESH: imageIndex = 3; <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> ESNT_OCTREE: imageIndex = 3; <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> ESNT_ANIMATED_MESH: imageIndex = 4; <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> ESNT_SKY_BOX: imageIndex = 5; <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> ESNT_BILLBOARD: imageIndex = 6; <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> ESNT_PARTICLE_SYSTEM: imageIndex = 7; <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> ESNT_TEXT: imageIndex = 8; <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">default</span>:imageIndex = -1; <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( imageIndex < 0 )</div><div class="line"> {</div><div class="line"> swprintf ( msg, 128, L<span class="stringliteral">"%hs,%hs"</span>,</div><div class="line"> Game->Device->getSceneManager ()->getSceneNodeTypeName ( (*it)->getType () ),</div><div class="line"> (*it)->getName()</div><div class="line"> );</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> swprintf ( msg, 128, L<span class="stringliteral">"%hs"</span>,(*it)->getName() );</div><div class="line"> }</div><div class="line"></div><div class="line"> node = nodeParent->addChildBack( msg, 0, imageIndex );</div><div class="line"></div><div class="line"> <span class="comment">// Add all Animators</span></div><div class="line"> list<ISceneNodeAnimator*>::ConstIterator ait = (*it)->getAnimators().begin();</div><div class="line"> <span class="keywordflow">for</span> (; ait != (*it)->getAnimators().end(); ++ait)</div><div class="line"> {</div><div class="line"> imageIndex = -1;</div><div class="line"> swprintf ( msg, 128, L<span class="stringliteral">"%hs"</span>,</div><div class="line"> Game->Device->getSceneManager ()->getAnimatorTypeName ( (*ait)->getType () )</div><div class="line"> );</div><div class="line"></div><div class="line"> <span class="keywordflow">switch</span> ( (*ait)->getType () )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> ESNAT_FLY_CIRCLE:</div><div class="line"> <span class="keywordflow">case</span> ESNAT_FLY_STRAIGHT:</div><div class="line"> <span class="keywordflow">case</span> ESNAT_FOLLOW_SPLINE:</div><div class="line"> <span class="keywordflow">case</span> ESNAT_ROTATION:</div><div class="line"> <span class="keywordflow">case</span> ESNAT_TEXTURE:</div><div class="line"> <span class="keywordflow">case</span> ESNAT_DELETION:</div><div class="line"> <span class="keywordflow">case</span> ESNAT_COLLISION_RESPONSE:</div><div class="line"> <span class="keywordflow">case</span> ESNAT_CAMERA_FPS:</div><div class="line"> <span class="keywordflow">case</span> ESNAT_CAMERA_MAYA:</div><div class="line"> <span class="keywordflow">default</span>:</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> node->addChildBack( msg, 0, imageIndex );</div><div class="line"> }</div><div class="line"></div><div class="line"> addSceneTreeItem ( *it, node );</div><div class="line"> }</div><div class="line">}</div><div class="line"></div><div class="line"></div><div class="line"><span class="comment">// Adds life!</span></div><div class="line"><span class="keywordtype">void</span> CQuake3EventHandler::CreatePlayers()</div><div class="line">{</div><div class="line"> Player[0].create ( Game->Device, Mesh, MapParent, Meta );</div><div class="line">}</div><div class="line"></div><div class="line"></div><div class="line"><span class="comment">// Adds a skydome to the scene</span></div><div class="line"><span class="keywordtype">void</span> CQuake3EventHandler::AddSky( u32 dome, <span class="keyword">const</span> c8 *texture)</div><div class="line">{</div><div class="line"> ISceneManager *smgr = Game->Device->getSceneManager ();</div><div class="line"> IVideoDriver * driver = Game->Device->getVideoDriver();</div><div class="line"></div><div class="line"> <span class="keywordtype">bool</span> oldMipMapState = driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS);</div><div class="line"> driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, <span class="keyword">false</span>);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( 0 == dome )</div><div class="line"> {</div><div class="line"> <span class="comment">// irrlicht order</span></div><div class="line"> <span class="comment">//static const c8*p[] = { "ft", "lf", "bk", "rt", "up", "dn" };</span></div><div class="line"> <span class="comment">// quake3 order</span></div><div class="line"> <span class="keyword">static</span> <span class="keyword">const</span> c8*p[] = { <span class="stringliteral">"ft"</span>, <span class="stringliteral">"rt"</span>, <span class="stringliteral">"bk"</span>, <span class="stringliteral">"lf"</span>, <span class="stringliteral">"up"</span>, <span class="stringliteral">"dn"</span> };</div><div class="line"></div><div class="line"> u32 i = 0;</div><div class="line"> snprintf ( buf, 64, <span class="stringliteral">"%s_%s.jpg"</span>, texture, p[i] );</div><div class="line"> SkyNode = smgr->addSkyBoxSceneNode( driver->getTexture ( buf ), 0, 0, 0, 0, 0 );</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (SkyNode)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">for</span> ( i = 0; i < 6; ++i )</div><div class="line"> {</div><div class="line"> snprintf ( buf, 64, <span class="stringliteral">"%s_%s.jpg"</span>, texture, p[i] );</div><div class="line"> SkyNode->getMaterial(i).setTexture ( 0, driver->getTexture ( buf ) );</div><div class="line"> }</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( 1 == dome )</div><div class="line"> {</div><div class="line"> snprintf ( buf, 64, <span class="stringliteral">"%s.jpg"</span>, texture );</div><div class="line"> SkyNode = smgr->addSkyDomeSceneNode(</div><div class="line"> driver->getTexture( buf ), 32,32,</div><div class="line"> 1.f, 1.f, 1000.f, 0, 11);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( 2 == dome )</div><div class="line"> {</div><div class="line"> snprintf ( buf, 64, <span class="stringliteral">"%s.jpg"</span>, texture );</div><div class="line"> SkyNode = smgr->addSkyDomeSceneNode(</div><div class="line"> driver->getTexture( buf ), 16,8,</div><div class="line"> 0.95f, 2.f, 1000.f, 0, 11);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (SkyNode)</div><div class="line"> SkyNode->setName(<span class="stringliteral">"Skydome"</span>);</div><div class="line"> <span class="comment">//SkyNode->getMaterial(0).ZBuffer = video::EMDF_DEPTH_LESS_EQUAL;</span></div><div class="line"></div><div class="line"> driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, oldMipMapState);</div><div class="line">}</div><div class="line"></div><div class="line"></div><div class="line"><span class="comment">// enable GUI elements</span></div><div class="line"><span class="keywordtype">void</span> CQuake3EventHandler::SetGUIActive( s32 command)</div><div class="line">{</div><div class="line"> <span class="keywordtype">bool</span> inputState = <span class="keyword">false</span>;</div><div class="line"></div><div class="line"> ICameraSceneNode * camera = Game->Device->getSceneManager()->getActiveCamera ();</div><div class="line"></div><div class="line"> <span class="keywordflow">switch</span> ( command )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> 0: Game->guiActive = 0; inputState = !Game->guiActive; <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> 1: Game->guiActive = 1; inputState = !Game->guiActive;;<span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> 2: Game->guiActive ^= 1; inputState = !Game->guiActive;<span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> 3:</div><div class="line"> <span class="keywordflow">if</span> ( camera )</div><div class="line"> inputState = !camera->isInputReceiverEnabled();</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( camera )</div><div class="line"> {</div><div class="line"> camera->setInputReceiverEnabled ( inputState );</div><div class="line"> Game->Device->getCursorControl()->setVisible( !inputState );</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( gui.Window )</div><div class="line"> {</div><div class="line"> gui.Window->setVisible ( Game->guiActive != 0 );</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( Game->guiActive &&</div><div class="line"> gui.SceneTree && Game->Device->getGUIEnvironment()->getFocus() != gui.SceneTree</div><div class="line"> )</div><div class="line"> {</div><div class="line"> gui.SceneTree->getRoot()->clearChildren();</div><div class="line"> addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() );</div><div class="line"> }</div><div class="line"></div><div class="line"> Game->Device->getGUIEnvironment()->setFocus ( Game->guiActive ? gui.Window: 0 );</div><div class="line">}</div></div><!-- fragment --><p> Handle game input </p><div class="fragment"><div class="line"><span class="keywordtype">bool</span> CQuake3EventHandler::OnEvent(<span class="keyword">const</span> SEvent& eve)</div><div class="line">{</div><div class="line"> <span class="keywordflow">if</span> ( eve.EventType == EET_LOG_TEXT_EVENT )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( Game->guiActive && eve.EventType == EET_GUI_EVENT )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.MapList && eve.GUIEvent.EventType == gui::EGET_LISTBOX_SELECTED_AGAIN )</div><div class="line"> {</div><div class="line"> s32 selected = gui.MapList->getSelected();</div><div class="line"> <span class="keywordflow">if</span> ( selected >= 0 )</div><div class="line"> {</div><div class="line"> stringw loadMap = gui.MapList->getListItem ( selected );</div><div class="line"> <span class="keywordflow">if</span> ( 0 == MapParent || loadMap != Game->CurrentMapName )</div><div class="line"> {</div><div class="line"> printf ( <span class="stringliteral">"Loading map %ls\n"</span>, loadMap.c_str() );</div><div class="line"> LoadMap ( loadMap , 1 );</div><div class="line"> <span class="keywordflow">if</span> ( 0 == Game->loadParam.loadSkyShader )</div><div class="line"> {</div><div class="line"> AddSky ( 1, <span class="stringliteral">"skydome2"</span> );</div><div class="line"> }</div><div class="line"> CreatePlayers ();</div><div class="line"> CreateGUI ();</div><div class="line"> SetGUIActive ( 0 );</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.ArchiveRemove && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )</div><div class="line"> {</div><div class="line"> Game->Device->getFileSystem()->removeFileArchive( gui.ArchiveList->getSelected() );</div><div class="line"> Game->CurrentMapName = <span class="stringliteral">""</span>;</div><div class="line"> AddArchive ( <span class="stringliteral">""</span> );</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.ArchiveAdd && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( 0 == gui.ArchiveFileOpen )</div><div class="line"> {</div><div class="line"> Game->Device->getFileSystem()->setFileListSystem ( FILESYSTEM_NATIVE );</div><div class="line"> gui.ArchiveFileOpen = Game->Device->getGUIEnvironment()->addFileOpenDialog ( L<span class="stringliteral">"Add Game Archive"</span> , <span class="keyword">false</span>,gui.Window );</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.ArchiveFileOpen && eve.GUIEvent.EventType == gui::EGET_FILE_SELECTED )</div><div class="line"> {</div><div class="line"> AddArchive ( gui.ArchiveFileOpen->getFileName() );</div><div class="line"> gui.ArchiveFileOpen = 0;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.ArchiveFileOpen && eve.GUIEvent.EventType == gui::EGET_DIRECTORY_SELECTED )</div><div class="line"> {</div><div class="line"> AddArchive ( gui.ArchiveFileOpen->getDirectoryName() );</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.ArchiveFileOpen && eve.GUIEvent.EventType == gui::EGET_FILE_CHOOSE_DIALOG_CANCELLED )</div><div class="line"> {</div><div class="line"> gui.ArchiveFileOpen = 0;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( ( eve.GUIEvent.Caller == gui.ArchiveUp || eve.GUIEvent.Caller == gui.ArchiveDown ) &&</div><div class="line"> eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )</div><div class="line"> {</div><div class="line"> s32 rel = eve.GUIEvent.Caller == gui.ArchiveUp ? -1 : 1;</div><div class="line"> <span class="keywordflow">if</span> ( Game->Device->getFileSystem()->moveFileArchive ( gui.ArchiveList->getSelected (), rel ) )</div><div class="line"> {</div><div class="line"> s32 newIndex = core::s32_clamp ( gui.ArchiveList->getSelected() + rel, 0, gui.ArchiveList->getRowCount() - 1 );</div><div class="line"> AddArchive ( <span class="stringliteral">""</span> );</div><div class="line"> gui.ArchiveList->setSelected ( newIndex );</div><div class="line"> Game->CurrentMapName = <span class="stringliteral">""</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.VideoDriver && eve.GUIEvent.EventType == gui::EGET_COMBO_BOX_CHANGED )</div><div class="line"> {</div><div class="line"> Game->deviceParam.DriverType = (E_DRIVER_TYPE) gui.VideoDriver->getItemData ( gui.VideoDriver->getSelected() );</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.VideoMode && eve.GUIEvent.EventType == gui::EGET_COMBO_BOX_CHANGED )</div><div class="line"> {</div><div class="line"> u32 val = gui.VideoMode->getItemData ( gui.VideoMode->getSelected() );</div><div class="line"> Game->deviceParam.WindowSize.Width = val >> 16;</div><div class="line"> Game->deviceParam.WindowSize.Height = val & 0xFFFF;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.FullScreen && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )</div><div class="line"> {</div><div class="line"> Game->deviceParam.Fullscreen = gui.FullScreen->isChecked();</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.Bit32 && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )</div><div class="line"> {</div><div class="line"> Game->deviceParam.Bits = gui.Bit32->isChecked() ? 32 : 16;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.MultiSample && eve.GUIEvent.EventType == gui::EGET_SCROLL_BAR_CHANGED )</div><div class="line"> {</div><div class="line"> Game->deviceParam.AntiAlias = gui.MultiSample->getPos();</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.Tesselation && eve.GUIEvent.EventType == gui::EGET_SCROLL_BAR_CHANGED )</div><div class="line"> {</div><div class="line"> Game->loadParam.patchTesselation = gui.Tesselation->getPos ();</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.Gamma && eve.GUIEvent.EventType == gui::EGET_SCROLL_BAR_CHANGED )</div><div class="line"> {</div><div class="line"> Game->GammaValue = gui.Gamma->getPos () * 0.01f;</div><div class="line"> Game->Device->setGammaRamp ( Game->GammaValue, Game->GammaValue, Game->GammaValue, 0.f, 0.f );</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.SetVideoMode && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )</div><div class="line"> {</div><div class="line"> Game->retVal = 2;</div><div class="line"> Game->Device->closeDevice();</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.Window && eve.GUIEvent.EventType == gui::EGET_ELEMENT_CLOSED )</div><div class="line"> {</div><div class="line"> Game->Device->closeDevice();</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.Collision && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )</div><div class="line"> {</div><div class="line"> <span class="comment">// set fly through active</span></div><div class="line"> Game->flyTroughState ^= 1;</div><div class="line"> Player[0].cam()->setAnimateTarget ( Game->flyTroughState == 0 );</div><div class="line"></div><div class="line"> printf ( <span class="stringliteral">"collision %d\n"</span>, Game->flyTroughState == 0 );</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.Visible_Map && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )</div><div class="line"> {</div><div class="line"> <span class="keywordtype">bool</span> v = gui.Visible_Map->isChecked();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( MapParent )</div><div class="line"> {</div><div class="line"> printf ( <span class="stringliteral">"static node set visible %d\n"</span>,v );</div><div class="line"> MapParent->setVisible ( v );</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.Visible_Shader && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )</div><div class="line"> {</div><div class="line"> <span class="keywordtype">bool</span> v = gui.Visible_Shader->isChecked();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( ShaderParent )</div><div class="line"> {</div><div class="line"> printf ( <span class="stringliteral">"shader node set visible %d\n"</span>,v );</div><div class="line"> ShaderParent->setVisible ( v );</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.Visible_Skydome && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( SkyNode )</div><div class="line"> {</div><div class="line"> <span class="keywordtype">bool</span> v = !SkyNode->isVisible();</div><div class="line"> printf ( <span class="stringliteral">"skynode set visible %d\n"</span>,v );</div><div class="line"> SkyNode->setVisible ( v );</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.GUIEvent.Caller == gui.Respawn && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )</div><div class="line"> {</div><div class="line"> Player[0].respawn ();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// fire</span></div><div class="line"> <span class="keywordflow">if</span> ((eve.EventType == EET_KEY_INPUT_EVENT && eve.KeyInput.Key == KEY_SPACE &&</div><div class="line"> eve.KeyInput.PressedDown == <span class="keyword">false</span>) ||</div><div class="line"> (eve.EventType == EET_MOUSE_INPUT_EVENT && eve.MouseInput.Event == EMIE_LMOUSE_LEFT_UP)</div><div class="line"> )</div><div class="line"> {</div><div class="line"> ICameraSceneNode * camera = Game->Device->getSceneManager()->getActiveCamera ();</div><div class="line"> <span class="keywordflow">if</span> ( camera && camera->isInputReceiverEnabled () )</div><div class="line"> {</div><div class="line"> useItem( Player + 0 );</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// gui active</span></div><div class="line"> <span class="keywordflow">if</span> ((eve.EventType == EET_KEY_INPUT_EVENT && eve.KeyInput.Key == KEY_F1 &&</div><div class="line"> eve.KeyInput.PressedDown == <span class="keyword">false</span>) ||</div><div class="line"> (eve.EventType == EET_MOUSE_INPUT_EVENT && eve.MouseInput.Event == EMIE_RMOUSE_LEFT_UP)</div><div class="line"> )</div><div class="line"> {</div><div class="line"> SetGUIActive ( 2 );</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// check if user presses the key</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.EventType == EET_KEY_INPUT_EVENT && eve.KeyInput.PressedDown == <span class="keyword">false</span>)</div><div class="line"> {</div><div class="line"> <span class="comment">// Escape toggles camera Input</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.KeyInput.Key == irr::KEY_ESCAPE )</div><div class="line"> {</div><div class="line"> SetGUIActive ( 3 );</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> (eve.KeyInput.Key == KEY_F11)</div><div class="line"> {</div><div class="line"> <span class="comment">// screenshot are taken without gamma!</span></div><div class="line"> IImage* image = Game->Device->getVideoDriver()->createScreenShot();</div><div class="line"> <span class="keywordflow">if</span> (image)</div><div class="line"> {</div><div class="line"> core::vector3df pos;</div><div class="line"> core::vector3df rot;</div><div class="line"> ICameraSceneNode * cam = Game->Device->getSceneManager()->getActiveCamera ();</div><div class="line"> <span class="keywordflow">if</span> ( cam )</div><div class="line"> {</div><div class="line"> pos = cam->getPosition ();</div><div class="line"> rot = cam->getRotation ();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">static</span> <span class="keyword">const</span> c8 *dName[] = { <span class="stringliteral">"null"</span>, <span class="stringliteral">"software"</span>, <span class="stringliteral">"burning"</span>,</div><div class="line"> <span class="stringliteral">"d3d8"</span>, <span class="stringliteral">"d3d9"</span>, <span class="stringliteral">"opengl"</span> };</div><div class="line"></div><div class="line"> snprintf(buf, 256, <span class="stringliteral">"%s_%ls_%.0f_%.0f_%.0f_%.0f_%.0f_%.0f.jpg"</span>,</div><div class="line"> dName[Game->Device->getVideoDriver()->getDriverType()],</div><div class="line"> Game->CurrentMapName.c_str(),</div><div class="line"> pos.X, pos.Y, pos.Z,</div><div class="line"> rot.X, rot.Y, rot.Z</div><div class="line"> );</div><div class="line"> path filename ( buf );</div><div class="line"> filename.replace ( <span class="charliteral">'/'</span>, <span class="charliteral">'_'</span> );</div><div class="line"> printf ( <span class="stringliteral">"screenshot : %s\n"</span>, filename.c_str() );</div><div class="line"> Game->Device->getVideoDriver()->writeImageToFile(image, filename, 100 );</div><div class="line"> image->drop();</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> (eve.KeyInput.Key == KEY_F9)</div><div class="line"> {</div><div class="line"> s32 value = EDS_OFF;</div><div class="line"></div><div class="line"> Game->debugState = ( Game->debugState + 1 ) & 3;</div><div class="line"></div><div class="line"> <span class="keywordflow">switch</span> ( Game->debugState )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> 1: value = EDS_NORMALS | EDS_MESH_WIRE_OVERLAY | EDS_BBOX_ALL; <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> 2: value = EDS_NORMALS | EDS_MESH_WIRE_OVERLAY | EDS_SKELETON; <span class="keywordflow">break</span>;</div><div class="line"> }</div></div><!-- fragment --><p> set debug map data on/off debugState = debugState == EDS_OFF ? EDS_NORMALS | EDS_MESH_WIRE_OVERLAY | EDS_BBOX_ALL: EDS_OFF; </p><div class="fragment"><div class="line"> <span class="keywordflow">if</span> ( ItemParent )</div><div class="line"> {</div><div class="line"> list<ISceneNode*>::ConstIterator it = ItemParent->getChildren().begin();</div><div class="line"> <span class="keywordflow">for</span> (; it != ItemParent->getChildren().end(); ++it)</div><div class="line"> {</div><div class="line"> (*it)->setDebugDataVisible ( value );</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( ShaderParent )</div><div class="line"> {</div><div class="line"> list<ISceneNode*>::ConstIterator it = ShaderParent->getChildren().begin();</div><div class="line"> <span class="keywordflow">for</span> (; it != ShaderParent->getChildren().end(); ++it)</div><div class="line"> {</div><div class="line"> (*it)->setDebugDataVisible ( value );</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( UnresolvedParent )</div><div class="line"> {</div><div class="line"> list<ISceneNode*>::ConstIterator it = UnresolvedParent->getChildren().begin();</div><div class="line"> <span class="keywordflow">for</span> (; it != UnresolvedParent->getChildren().end(); ++it)</div><div class="line"> {</div><div class="line"> (*it)->setDebugDataVisible ( value );</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( FogParent )</div><div class="line"> {</div><div class="line"> list<ISceneNode*>::ConstIterator it = FogParent->getChildren().begin();</div><div class="line"> <span class="keywordflow">for</span> (; it != FogParent->getChildren().end(); ++it)</div><div class="line"> {</div><div class="line"> (*it)->setDebugDataVisible ( value );</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( SkyNode )</div><div class="line"> {</div><div class="line"> SkyNode->setDebugDataVisible ( value );</div><div class="line"> }</div><div class="line"></div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> (eve.KeyInput.Key == KEY_F8)</div><div class="line"> {</div><div class="line"> <span class="comment">// set gravity on/off</span></div><div class="line"> Game->gravityState ^= 1;</div><div class="line"> Player[0].cam()->setGravity ( getGravity ( Game->gravityState ? <span class="stringliteral">"earth"</span> : <span class="stringliteral">"none"</span> ) );</div><div class="line"> printf ( <span class="stringliteral">"gravity %s\n"</span>, Game->gravityState ? <span class="stringliteral">"earth"</span> : <span class="stringliteral">"none"</span> );</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> (eve.KeyInput.Key == KEY_F7)</div><div class="line"> {</div><div class="line"> <span class="comment">// set fly through active</span></div><div class="line"> Game->flyTroughState ^= 1;</div><div class="line"> Player[0].cam()->setAnimateTarget ( Game->flyTroughState == 0 );</div><div class="line"> <span class="keywordflow">if</span> ( gui.Collision )</div><div class="line"> gui.Collision->setChecked ( Game->flyTroughState == 0 );</div><div class="line"></div><div class="line"> printf ( <span class="stringliteral">"collision %d\n"</span>, Game->flyTroughState == 0 );</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> (eve.KeyInput.Key == KEY_F2)</div><div class="line"> {</div><div class="line"> Player[0].respawn ();</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> (eve.KeyInput.Key == KEY_F3)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( MapParent )</div><div class="line"> {</div><div class="line"> <span class="keywordtype">bool</span> v = !MapParent->isVisible ();</div><div class="line"> printf ( <span class="stringliteral">"static node set visible %d\n"</span>,v );</div><div class="line"> MapParent->setVisible ( v );</div><div class="line"> <span class="keywordflow">if</span> ( gui.Visible_Map )</div><div class="line"> gui.Visible_Map->setChecked ( v );</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> (eve.KeyInput.Key == KEY_F4)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( ShaderParent )</div><div class="line"> {</div><div class="line"> <span class="keywordtype">bool</span> v = !ShaderParent->isVisible ();</div><div class="line"> printf ( <span class="stringliteral">"shader node set visible %d\n"</span>,v );</div><div class="line"> ShaderParent->setVisible ( v );</div><div class="line"> <span class="keywordflow">if</span> ( gui.Visible_Shader )</div><div class="line"> gui.Visible_Shader->setChecked ( v );</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> (eve.KeyInput.Key == KEY_F5)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( FogParent )</div><div class="line"> {</div><div class="line"> <span class="keywordtype">bool</span> v = !FogParent->isVisible ();</div><div class="line"> printf ( <span class="stringliteral">"fog node set visible %d\n"</span>,v );</div><div class="line"> FogParent->setVisible ( v );</div><div class="line"> <span class="keywordflow">if</span> ( gui.Visible_Fog )</div><div class="line"> gui.Visible_Fog->setChecked ( v );</div><div class="line"> }</div><div class="line"></div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">if</span> (eve.KeyInput.Key == KEY_F6)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( UnresolvedParent )</div><div class="line"> {</div><div class="line"> <span class="keywordtype">bool</span> v = !UnresolvedParent->isVisible ();</div><div class="line"> printf ( <span class="stringliteral">"unresolved node set visible %d\n"</span>,v );</div><div class="line"> UnresolvedParent->setVisible ( v );</div><div class="line"> <span class="keywordflow">if</span> ( gui.Visible_Unresolved )</div><div class="line"> gui.Visible_Unresolved->setChecked ( v );</div><div class="line"> }</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// check if user presses the key C ( for crouch)</span></div><div class="line"> <span class="keywordflow">if</span> ( eve.EventType == EET_KEY_INPUT_EVENT && eve.KeyInput.Key == KEY_KEY_C )</div><div class="line"> {</div><div class="line"> <span class="comment">// crouch</span></div><div class="line"> ISceneNodeAnimatorCollisionResponse *anim = Player[0].cam ();</div><div class="line"> <span class="keywordflow">if</span> ( anim && 0 == Game->flyTroughState )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( <span class="keyword">false</span> == eve.KeyInput.PressedDown )</div><div class="line"> {</div><div class="line"> <span class="comment">// stand up</span></div><div class="line"> anim->setEllipsoidRadius ( vector3df(30,45,30) );</div><div class="line"> anim->setEllipsoidTranslation ( vector3df(0,40,0));</div><div class="line"></div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> <span class="comment">// on your knees</span></div><div class="line"> anim->setEllipsoidRadius ( vector3df(30,20,30) );</div><div class="line"> anim->setEllipsoidTranslation ( vector3df(0,20,0));</div><div class="line"> }</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line">}</div></div><!-- fragment --><p> useItem </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> CQuake3EventHandler::useItem( Q3Player * player)</div><div class="line">{</div><div class="line"> ISceneManager* smgr = Game->Device->getSceneManager();</div><div class="line"> ICameraSceneNode* camera = smgr->getActiveCamera();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (!camera)</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"></div><div class="line"> SParticleImpact imp;</div><div class="line"> imp.when = 0;</div><div class="line"></div><div class="line"> <span class="comment">// get line of camera</span></div><div class="line"></div><div class="line"> vector3df start = camera->getPosition();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( player->WeaponNode )</div><div class="line"> {</div><div class="line"> start.X += 0.f;</div><div class="line"> start.Y += 0.f;</div><div class="line"> start.Z += 0.f;</div><div class="line"> }</div><div class="line"></div><div class="line"> vector3df end = (camera->getTarget() - start);</div><div class="line"> end.normalize();</div><div class="line"> start += end*20.0f;</div><div class="line"></div><div class="line"> end = start + (end * camera->getFarValue());</div><div class="line"></div><div class="line"> triangle3df triangle;</div><div class="line"> line3d<f32> line(start, end);</div><div class="line"></div><div class="line"> <span class="comment">// get intersection point with map</span></div><div class="line"> scene::ISceneNode* hitNode;</div><div class="line"> <span class="keywordflow">if</span> (smgr->getSceneCollisionManager()->getCollisionPoint(</div><div class="line"> line, Meta, end, triangle,hitNode))</div><div class="line"> {</div><div class="line"> <span class="comment">// collides with wall</span></div><div class="line"> vector3df out = triangle.getNormal();</div><div class="line"> out.setLength(0.03f);</div><div class="line"></div><div class="line"> imp.when = 1;</div><div class="line"> imp.outVector = out;</div><div class="line"> imp.pos = end;</div><div class="line"></div><div class="line"> player->setAnim ( <span class="stringliteral">"pow"</span> );</div><div class="line"> player->Anim[1].next += player->Anim[1].delta;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> <span class="comment">// doesnt collide with wall</span></div><div class="line"> vector3df start = camera->getPosition();</div><div class="line"> <span class="keywordflow">if</span> ( player->WeaponNode )</div><div class="line"> {</div><div class="line"> <span class="comment">//start.X += 10.f;</span></div><div class="line"> <span class="comment">//start.Y += -5.f;</span></div><div class="line"> <span class="comment">//start.Z += 1.f;</span></div><div class="line"> }</div><div class="line"></div><div class="line"> vector3df end = (camera->getTarget() - start);</div><div class="line"> end.normalize();</div><div class="line"> start += end*20.0f;</div><div class="line"> end = start + (end * camera->getFarValue());</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// create fire ball</span></div><div class="line"> ISceneNode* node = 0;</div><div class="line"> node = smgr->addBillboardSceneNode( BulletParent,dimension2d<f32>(10,10), start);</div><div class="line"></div><div class="line"> node->setMaterialFlag(EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"> node->setMaterialTexture(0, Game->Device->getVideoDriver()->getTexture(<span class="stringliteral">"fireball.bmp"</span>));</div><div class="line"> node->setMaterialFlag(video::EMF_ZWRITE_ENABLE, <span class="keyword">false</span>);</div><div class="line"> node->setMaterialType(EMT_TRANSPARENT_ADD_COLOR);</div><div class="line"></div><div class="line"> f32 length = (f32)(end - start).getLength();</div><div class="line"> <span class="keyword">const</span> f32 speed = 5.8f;</div><div class="line"> u32 time = (u32)(length / speed);</div><div class="line"></div><div class="line"> ISceneNodeAnimator* anim = 0;</div><div class="line"></div><div class="line"> <span class="comment">// set flight line</span></div><div class="line"></div><div class="line"> anim = smgr->createFlyStraightAnimator(start, end, time);</div><div class="line"> node->addAnimator(anim);</div><div class="line"> anim->drop();</div><div class="line"></div><div class="line"> snprintf ( buf, 64, <span class="stringliteral">"bullet: %s on %.1f,%1.f,%1.f"</span>,</div><div class="line"> imp.when ? <span class="stringliteral">"hit"</span> : <span class="stringliteral">"nohit"</span>, end.X, end.Y, end.Z );</div><div class="line"> node->setName ( buf );</div><div class="line"></div><div class="line"></div><div class="line"> anim = smgr->createDeleteAnimator(time);</div><div class="line"> node->addAnimator(anim);</div><div class="line"> anim->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (imp.when)</div><div class="line"> {</div><div class="line"> <span class="comment">// create impact note</span></div><div class="line"> imp.when = Game->Device->getTimer()->getTime() +</div><div class="line"> (time + (s32) ( ( 1.f + Noiser::get() ) * 250.f ));</div><div class="line"> Impacts.push_back(imp);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// play sound</span></div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// rendered when bullets hit something</span></div><div class="line"><span class="keywordtype">void</span> CQuake3EventHandler::createParticleImpacts( u32 now )</div><div class="line">{</div><div class="line"> ISceneManager* sm = Game->Device->getSceneManager();</div><div class="line"></div><div class="line"> <span class="keyword">struct </span>smokeLayer</div><div class="line"> {</div><div class="line"> <span class="keyword">const</span> c8 * texture;</div><div class="line"> f32 scale;</div><div class="line"> f32 minparticleSize;</div><div class="line"> f32 maxparticleSize;</div><div class="line"> f32 boxSize;</div><div class="line"> u32 minParticle;</div><div class="line"> u32 maxParticle;</div><div class="line"> u32 fadeout;</div><div class="line"> u32 lifetime;</div><div class="line"> };</div><div class="line"></div><div class="line"> smokeLayer smoke[] =</div><div class="line"> {</div><div class="line"> { <span class="stringliteral">"smoke2.jpg"</span>, 0.4f, 1.5f, 18.f, 20.f, 20, 50, 2000, 10000 },</div><div class="line"> { <span class="stringliteral">"smoke3.jpg"</span>, 0.2f, 1.2f, 15.f, 20.f, 10, 30, 1000, 12000 }</div><div class="line"> };</div><div class="line"></div><div class="line"></div><div class="line"> u32 i;</div><div class="line"> u32 g;</div><div class="line"> s32 factor = 1;</div><div class="line"> <span class="keywordflow">for</span> ( g = 0; g != 2; ++g )</div><div class="line"> {</div><div class="line"> smoke[g].minParticle *= factor;</div><div class="line"> smoke[g].maxParticle *= factor;</div><div class="line"> smoke[g].lifetime *= factor;</div><div class="line"> smoke[g].boxSize *= Noiser::get() * 0.5f;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">for</span> ( i=0; i < Impacts.size(); ++i)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (now < Impacts[i].when)</div><div class="line"> <span class="keywordflow">continue</span>;</div><div class="line"></div><div class="line"> <span class="comment">// create smoke particle system</span></div><div class="line"> IParticleSystemSceneNode* pas = 0;</div><div class="line"></div><div class="line"> <span class="keywordflow">for</span> ( g = 0; g != 2; ++g )</div><div class="line"> {</div><div class="line"> pas = sm->addParticleSystemSceneNode(<span class="keyword">false</span>, BulletParent, -1, Impacts[i].pos);</div><div class="line"></div><div class="line"> snprintf ( buf, 64, <span class="stringliteral">"bullet impact smoke at %.1f,%.1f,%1.f"</span>,</div><div class="line"> Impacts[i].pos.X,Impacts[i].pos.Y,Impacts[i].pos.Z);</div><div class="line"> pas->setName ( buf );</div><div class="line"></div><div class="line"> <span class="comment">// create a flat smoke</span></div><div class="line"> vector3df direction = Impacts[i].outVector;</div><div class="line"> direction *= smoke[g].scale;</div><div class="line"> IParticleEmitter* em = pas->createBoxEmitter(</div><div class="line"> aabbox3d<f32>(-4.f,0.f,-4.f,20.f,smoke[g].minparticleSize,20.f),</div><div class="line"> direction,smoke[g].minParticle, smoke[g].maxParticle,</div><div class="line"> video::SColor(0,0,0,0),video::SColor(0,128,128,128),</div><div class="line"> 250,4000, 60);</div><div class="line"></div><div class="line"> em->setMinStartSize (dimension2d<f32>( smoke[g].minparticleSize, smoke[g].minparticleSize));</div><div class="line"> em->setMaxStartSize (dimension2d<f32>( smoke[g].maxparticleSize, smoke[g].maxparticleSize));</div><div class="line"></div><div class="line"> pas->setEmitter(em);</div><div class="line"> em->drop();</div><div class="line"></div><div class="line"> <span class="comment">// particles get invisible</span></div><div class="line"> IParticleAffector* paf = pas->createFadeOutParticleAffector(</div><div class="line"> video::SColor ( 0, 0, 0, 0 ), smoke[g].fadeout);</div><div class="line"> pas->addAffector(paf);</div><div class="line"> paf->drop();</div><div class="line"></div><div class="line"> <span class="comment">// particle system life time</span></div><div class="line"> ISceneNodeAnimator* anim = sm->createDeleteAnimator( smoke[g].lifetime);</div><div class="line"> pas->addAnimator(anim);</div><div class="line"> anim->drop();</div><div class="line"></div><div class="line"> pas->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"> pas->setMaterialFlag(video::EMF_ZWRITE_ENABLE, <span class="keyword">false</span>);</div><div class="line"> pas->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );</div><div class="line"> pas->setMaterialTexture(0, Game->Device->getVideoDriver()->getTexture( smoke[g].texture ));</div><div class="line"> }</div><div class="line"></div><div class="line"></div><div class="line"> <span class="comment">// play impact sound</span></div><div class="line"><span class="preprocessor"> #ifdef USE_IRRKLANG</span></div></div><!-- fragment --><p> if (irrKlang) { audio::ISound* sound = irrKlang->play3D(impactSound, Impacts[i].pos, false, false, true);</p> +<p>if (sound) { adjust max value a bit to make to sound of an impact louder sound->setMinDistance(400); sound->drop(); } } </p><div class="fragment"><div class="line"><span class="preprocessor"> #endif</span></div><div class="line"></div><div class="line"></div><div class="line"> <span class="comment">// delete entry</span></div><div class="line"> Impacts.erase(i);</div><div class="line"> i--;</div><div class="line"> }</div><div class="line">}</div></div><!-- fragment --><p> render </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> CQuake3EventHandler::Render()</div><div class="line">{</div><div class="line"> IVideoDriver * driver = Game->Device->getVideoDriver();</div><div class="line"> <span class="keywordflow">if</span> ( 0 == driver )</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"></div><div class="line"> <span class="comment">// TODO: This does not work, yet.</span></div><div class="line"> <span class="keyword">const</span> <span class="keywordtype">bool</span> anaglyph=<span class="keyword">false</span>;</div><div class="line"> <span class="keywordflow">if</span> (anaglyph)</div><div class="line"> {</div><div class="line"> scene::ICameraSceneNode* cameraOld = Game->Device->getSceneManager()->getActiveCamera();</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, SColor(0,0,0,0));</div><div class="line"> driver->getOverrideMaterial().Material.ColorMask = ECP_NONE;</div><div class="line"> driver->getOverrideMaterial().EnableFlags = EMF_COLOR_MASK;</div><div class="line"> driver->getOverrideMaterial().EnablePasses = ESNRP_SKY_BOX +</div><div class="line"> ESNRP_SOLID +</div><div class="line"> ESNRP_TRANSPARENT +</div><div class="line"> ESNRP_TRANSPARENT_EFFECT +</div><div class="line"> ESNRP_SHADOW;</div><div class="line"> Game->Device->getSceneManager()->drawAll();</div><div class="line"> driver->clearZBuffer();</div><div class="line"></div><div class="line"> <span class="keyword">const</span> vector3df oldPosition = cameraOld->getPosition();</div><div class="line"> <span class="keyword">const</span> vector3df oldTarget = cameraOld->getTarget();</div><div class="line"> <span class="keyword">const</span> matrix4 startMatrix = cameraOld->getAbsoluteTransformation();</div><div class="line"> <span class="keyword">const</span> vector3df focusPoint = (oldTarget -</div><div class="line"> cameraOld->getAbsolutePosition()).setLength(10000) +</div><div class="line"> cameraOld->getAbsolutePosition() ;</div><div class="line"></div><div class="line"> scene::ICameraSceneNode* camera = cameraOld;<span class="comment">//Game->Device->getSceneManager()->addCameraSceneNode();</span></div><div class="line"></div><div class="line"> <span class="comment">//Left eye...</span></div><div class="line"> vector3df pos;</div><div class="line"> matrix4 move;</div><div class="line"></div><div class="line"> move.setTranslation( vector3df(-1.5f,0.0f,0.0f) );</div><div class="line"> pos=(startMatrix*move).getTranslation();</div><div class="line"></div><div class="line"> driver->getOverrideMaterial().Material.ColorMask = ECP_RED;</div><div class="line"> driver->getOverrideMaterial().EnableFlags = EMF_COLOR_MASK;</div><div class="line"> driver->getOverrideMaterial().EnablePasses =</div><div class="line"> ESNRP_SKY_BOX|ESNRP_SOLID|ESNRP_TRANSPARENT|</div><div class="line"> ESNRP_TRANSPARENT_EFFECT|ESNRP_SHADOW;</div><div class="line"></div><div class="line"> camera->setPosition(pos);</div><div class="line"> camera->setTarget(focusPoint);</div><div class="line"></div><div class="line"> Game->Device->getSceneManager()->drawAll();</div><div class="line"> driver->clearZBuffer();</div><div class="line"></div><div class="line"> <span class="comment">//Right eye...</span></div><div class="line"> move.setTranslation( vector3df(1.5f,0.0f,0.0f) );</div><div class="line"> pos=(startMatrix*move).getTranslation();</div><div class="line"></div><div class="line"> driver->getOverrideMaterial().Material.ColorMask = ECP_GREEN + ECP_BLUE;</div><div class="line"> driver->getOverrideMaterial().EnableFlags = EMF_COLOR_MASK;</div><div class="line"> driver->getOverrideMaterial().EnablePasses =</div><div class="line"> ESNRP_SKY_BOX|ESNRP_SOLID|ESNRP_TRANSPARENT|</div><div class="line"> ESNRP_TRANSPARENT_EFFECT|ESNRP_SHADOW;</div><div class="line"></div><div class="line"> camera->setPosition(pos);</div><div class="line"> camera->setTarget(focusPoint);</div><div class="line"></div><div class="line"> Game->Device->getSceneManager()->drawAll();</div><div class="line"></div><div class="line"> driver->getOverrideMaterial().Material.ColorMask=ECP_ALL;</div><div class="line"> driver->getOverrideMaterial().EnableFlags=0;</div><div class="line"> driver->getOverrideMaterial().EnablePasses=0;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (camera != cameraOld)</div><div class="line"> {</div><div class="line"> Game->Device->getSceneManager()->setActiveCamera(cameraOld);</div><div class="line"> camera->remove();</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> camera->setPosition(oldPosition);</div><div class="line"> camera->setTarget(oldTarget);</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, SColor(0,0,0,0));</div><div class="line"> Game->Device->getSceneManager()->drawAll();</div><div class="line"> }</div><div class="line"> Game->Device->getGUIEnvironment()->drawAll();</div><div class="line"> driver->endScene();</div><div class="line">}</div></div><!-- fragment --><p> update the generic scene node </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> CQuake3EventHandler::Animate()</div><div class="line">{</div><div class="line"> u32 now = Game->Device->getTimer()->getTime();</div><div class="line"></div><div class="line"> Q3Player * player = Player + 0;</div><div class="line"></div><div class="line"> checkTimeFire ( player->Anim, 4, now );</div><div class="line"></div><div class="line"> <span class="comment">// Query Scene Manager attributes</span></div><div class="line"> <span class="keywordflow">if</span> ( player->Anim[0].flags & FIRED )</div><div class="line"> {</div><div class="line"> ISceneManager *smgr = Game->Device->getSceneManager ();</div><div class="line"> <span class="keywordtype">wchar_t</span> msg[128];</div><div class="line"> IVideoDriver * driver = Game->Device->getVideoDriver();</div><div class="line"></div><div class="line"> IAttributes * attr = smgr->getParameters();</div><div class="line"><span class="preprocessor">#ifdef _IRR_SCENEMANAGER_DEBUG </span></div><div class="line"> swprintf ( msg, 128,</div><div class="line"> L<span class="stringliteral">"Q3 %s [%ls], FPS:%03d Tri:%.03fm Cull %d/%d nodes (%d,%d,%d)"</span>,</div><div class="line"> Game->CurrentMapName.c_str(),</div><div class="line"> driver->getName(),</div><div class="line"> driver->getFPS (),</div><div class="line"> (f32) driver->getPrimitiveCountDrawn( 0 ) * ( 1.f / 1000000.f ),</div><div class="line"> attr->getAttributeAsInt ( <span class="stringliteral">"culled"</span> ),</div><div class="line"> attr->getAttributeAsInt ( <span class="stringliteral">"calls"</span> ),</div><div class="line"> attr->getAttributeAsInt ( <span class="stringliteral">"drawn_solid"</span> ),</div><div class="line"> attr->getAttributeAsInt ( <span class="stringliteral">"drawn_transparent"</span> ),</div><div class="line"> attr->getAttributeAsInt ( <span class="stringliteral">"drawn_transparent_effect"</span> )</div><div class="line"> );</div><div class="line"><span class="preprocessor">#else</span></div><div class="line">swprintf ( msg, 128,</div><div class="line"> L<span class="stringliteral">"Q3 %s [%ls], FPS:%03d Tri:%.03fm"</span>,</div><div class="line"> Game->CurrentMapName.c_str(),</div><div class="line"> driver->getName(),</div><div class="line"> driver->getFPS (),</div><div class="line"> (f32) driver->getPrimitiveCountDrawn( 0 ) * ( 1.f / 1000000.f )</div><div class="line"> ); </div><div class="line"><span class="preprocessor">#endif </span></div><div class="line"> Game->Device->setWindowCaption( msg );</div><div class="line"></div><div class="line"> swprintf ( msg, 128,</div><div class="line"> L<span class="stringliteral">"%03d fps, F1 GUI on/off, F2 respawn, F3-F6 toggle Nodes, F7 Collision on/off"</span></div><div class="line"> L<span class="stringliteral">", F8 Gravity on/off, Right Mouse Toggle GUI"</span>,</div><div class="line"> Game->Device->getVideoDriver()->getFPS ()</div><div class="line"> );</div><div class="line"> <span class="keywordflow">if</span> ( gui.StatusLine )</div><div class="line"> gui.StatusLine->setText ( msg );</div><div class="line"> player->Anim[0].flags &= ~FIRED;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// idle..</span></div><div class="line"> <span class="keywordflow">if</span> ( player->Anim[1].flags & FIRED )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( strcmp ( player->animation, <span class="stringliteral">"idle"</span> ) )</div><div class="line"> player->setAnim ( <span class="stringliteral">"idle"</span> );</div><div class="line"></div><div class="line"> player->Anim[1].flags &= ~FIRED;</div><div class="line"> }</div><div class="line"></div><div class="line"> createParticleImpacts ( now );</div><div class="line"></div><div class="line">}</div></div><!-- fragment --><p> The main game states </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> runGame ( GameData *game )</div><div class="line">{</div><div class="line"> <span class="keywordflow">if</span> ( game->retVal >= 3 )</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"></div><div class="line"> game->Device = (*game->createExDevice) ( game->deviceParam );</div><div class="line"> <span class="keywordflow">if</span> ( 0 == game->Device)</div><div class="line"> {</div><div class="line"> <span class="comment">// could not create selected driver.</span></div><div class="line"> game->retVal = 0;</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// create an event receiver based on current game data</span></div><div class="line"> CQuake3EventHandler *eventHandler = <span class="keyword">new</span> CQuake3EventHandler( game );</div><div class="line"></div><div class="line"> <span class="comment">// load stored config</span></div><div class="line"> game->load ( <span class="stringliteral">"explorer.cfg"</span> );</div><div class="line"></div><div class="line"> <span class="comment">// add our media directory and archive to the file system</span></div><div class="line"> <span class="keywordflow">for</span> ( u32 i = 0; i < game->CurrentArchiveList.size(); ++i )</div><div class="line"> {</div><div class="line"> eventHandler->AddArchive ( game->CurrentArchiveList[i] );</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Load a Map or startup to the GUI</span></div><div class="line"> <span class="keywordflow">if</span> ( game->CurrentMapName.size () )</div><div class="line"> {</div><div class="line"> eventHandler->LoadMap ( game->CurrentMapName, 1 );</div><div class="line"> <span class="keywordflow">if</span> ( 0 == game->loadParam.loadSkyShader )</div><div class="line"> eventHandler->AddSky ( 1, <span class="stringliteral">"skydome2"</span> );</div><div class="line"> eventHandler->CreatePlayers ();</div><div class="line"> eventHandler->CreateGUI ();</div><div class="line"> eventHandler->SetGUIActive ( 0 );</div><div class="line"></div><div class="line"> <span class="comment">// set player to last position on restart</span></div><div class="line"> <span class="keywordflow">if</span> ( game->retVal == 2 )</div><div class="line"> {</div><div class="line"> eventHandler->GetPlayer( 0 )->setpos ( game->PlayerPosition, game->PlayerRotation );</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> <span class="comment">// start up empty</span></div><div class="line"> eventHandler->AddSky ( 1, <span class="stringliteral">"skydome2"</span> );</div><div class="line"> eventHandler->CreatePlayers ();</div><div class="line"> eventHandler->CreateGUI ();</div><div class="line"> eventHandler->SetGUIActive ( 1 );</div><div class="line"> background_music ( <span class="stringliteral">"IrrlichtTheme.ogg"</span> );</div><div class="line"> }</div><div class="line"></div><div class="line"></div><div class="line"> game->retVal = 3;</div><div class="line"> <span class="keywordflow">while</span>( game->Device->run() )</div><div class="line"> {</div><div class="line"> eventHandler->Animate ();</div><div class="line"> eventHandler->Render ();</div><div class="line"> <span class="comment">//if ( !game->Device->isWindowActive() )</span></div><div class="line"> game->Device->yield();</div><div class="line"> }</div><div class="line"></div><div class="line"> game->Device->setGammaRamp ( 1.f, 1.f, 1.f, 0.f, 0.f );</div><div class="line"> <span class="keyword">delete</span> eventHandler;</div><div class="line">}</div><div class="line"></div><div class="line"><span class="preprocessor">#if defined (_IRR_WINDOWS_) && 0</span></div><div class="line"><span class="preprocessor"> #pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")</span></div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> The main routine, doing all setup </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> IRRCALLCONV main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>* argv[])</div><div class="line">{</div><div class="line"> path prgname(argv[0]);</div><div class="line"> GameData game ( deletePathFromPath ( prgname, 1 ) );</div><div class="line"></div><div class="line"> <span class="comment">// dynamically load irrlicht</span></div><div class="line"> <span class="keyword">const</span> c8 * dllName = argc > 1 ? argv[1] : <span class="stringliteral">"irrlicht.dll"</span>;</div><div class="line"> game.createExDevice = load_createDeviceEx ( dllName );</div><div class="line"> <span class="keywordflow">if</span> ( 0 == game.createExDevice )</div><div class="line"> {</div><div class="line"> game.retVal = 3;</div><div class="line"> printf ( <span class="stringliteral">"Could not load %s.\n"</span>, dllName );</div><div class="line"> <span class="keywordflow">return</span> game.retVal; <span class="comment">// could not load dll</span></div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// start without asking for driver</span></div><div class="line"> game.retVal = 1;</div><div class="line"> <span class="keywordflow">do</span></div><div class="line"> {</div><div class="line"> <span class="comment">// if driver could not created, ask for another driver</span></div><div class="line"> <span class="keywordflow">if</span> ( game.retVal == 0 )</div><div class="line"> {</div><div class="line"> game.setDefault ();</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> game.deviceParam.DriverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (game.deviceParam.DriverType==video::EDT_COUNT)</div><div class="line"> game.retVal = 3;</div><div class="line"> }</div><div class="line"> runGame ( &game );</div><div class="line"> } <span class="keywordflow">while</span> ( game.retVal < 3 );</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> game.retVal;</div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/22.MaterialViewer/Makefile b/examples/22.MaterialViewer/Makefile new file mode 100644 index 0000000..8016988 --- /dev/null +++ b/examples/22.MaterialViewer/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 22.MaterialViewer
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+#CXXFLAGS = -O3 -ffast-math
+CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/22.MaterialViewer/MaterialViewer.cbp b/examples/22.MaterialViewer/MaterialViewer.cbp new file mode 100644 index 0000000..be38a0d --- /dev/null +++ b/examples/22.MaterialViewer/MaterialViewer.cbp @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 22 Material Viewer" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/MaterialViewer" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/MaterialViewer" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/22.MaterialViewer/MaterialViewer.dev b/examples/22.MaterialViewer/MaterialViewer.dev new file mode 100644 index 0000000..dfd9d4d --- /dev/null +++ b/examples/22.MaterialViewer/MaterialViewer.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 22 Material Viewer
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=22.MaterialViewer.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/22.MaterialViewer/MaterialViewer.vcproj b/examples/22.MaterialViewer/MaterialViewer.vcproj new file mode 100644 index 0000000..7419359 --- /dev/null +++ b/examples/22.MaterialViewer/MaterialViewer.vcproj @@ -0,0 +1,229 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="22.MaterialViewer"
+ ProjectGUID="{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/MaterialViewer.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/MaterialViewer.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/MaterialViewer.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/MaterialViewer.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/MaterialViewer.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/MaterialViewer.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/22.MaterialViewer/MaterialViewer_vc10.vcxproj b/examples/22.MaterialViewer/MaterialViewer_vc10.vcxproj new file mode 100644 index 0000000..582faee --- /dev/null +++ b/examples/22.MaterialViewer/MaterialViewer_vc10.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>22.MaterialViewer</ProjectName>
+ <ProjectGuid>{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}</ProjectGuid>
+ <RootNamespace>MaterialViewer</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/MaterialViewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ProgramDatabaseFile>.\Release/MaterialViewer.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/MaterialViewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\22.MaterialViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ProgramDatabaseFile>.\Release/MaterialViewer.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/MaterialViewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>.\Debug/MaterialViewer.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/MaterialViewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\22.MaterialViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>.\Debug/MaterialViewer.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/22.MaterialViewer/MaterialViewer_vc11.vcxproj b/examples/22.MaterialViewer/MaterialViewer_vc11.vcxproj new file mode 100644 index 0000000..582faee --- /dev/null +++ b/examples/22.MaterialViewer/MaterialViewer_vc11.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>22.MaterialViewer</ProjectName>
+ <ProjectGuid>{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}</ProjectGuid>
+ <RootNamespace>MaterialViewer</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/MaterialViewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ProgramDatabaseFile>.\Release/MaterialViewer.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/MaterialViewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\22.MaterialViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ProgramDatabaseFile>.\Release/MaterialViewer.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/MaterialViewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>.\Debug/MaterialViewer.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/MaterialViewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\22.MaterialViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>.\Debug/MaterialViewer.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/22.MaterialViewer/MaterialViewer_vc12.vcxproj b/examples/22.MaterialViewer/MaterialViewer_vc12.vcxproj new file mode 100644 index 0000000..ca49423 --- /dev/null +++ b/examples/22.MaterialViewer/MaterialViewer_vc12.vcxproj @@ -0,0 +1,235 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>22.MaterialViewer</ProjectName>
+ <ProjectGuid>{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}</ProjectGuid>
+ <RootNamespace>MaterialViewer</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/MaterialViewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ProgramDatabaseFile>.\Release/MaterialViewer.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/MaterialViewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\22.MaterialViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ProgramDatabaseFile>.\Release/MaterialViewer.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/MaterialViewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>.\Debug/MaterialViewer.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/MaterialViewer.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\22.MaterialViewer.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>.\Debug/MaterialViewer.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/22.MaterialViewer/MaterialViewer_vc8.vcproj b/examples/22.MaterialViewer/MaterialViewer_vc8.vcproj new file mode 100644 index 0000000..1e7c0db --- /dev/null +++ b/examples/22.MaterialViewer/MaterialViewer_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="22.MaterialViewer_vc8"
+ ProjectGUID="{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}"
+ RootNamespace="MaterialViewer_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/MaterialViewer.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/MaterialViewer.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/MaterialViewer.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/MaterialViewer.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/MaterialViewer.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/MaterialViewer.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/22.MaterialViewer/MaterialViewer_vc9.vcproj b/examples/22.MaterialViewer/MaterialViewer_vc9.vcproj new file mode 100644 index 0000000..8ce9803 --- /dev/null +++ b/examples/22.MaterialViewer/MaterialViewer_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="22.MaterialViewer_vc9"
+ ProjectGUID="{F4C8112D-57A8-4D01-BB62-BAC6A09A6902}"
+ RootNamespace="MaterialViewer_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/MaterialViewer.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/MaterialViewer.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/MaterialViewer.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/MaterialViewer.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/MaterialViewer.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/MaterialViewer.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/22.MaterialViewer/main.cpp b/examples/22.MaterialViewer/main.cpp new file mode 100644 index 0000000..85b3c72 --- /dev/null +++ b/examples/22.MaterialViewer/main.cpp @@ -0,0 +1,1057 @@ +/** Example 022 Material Viewer
+
+This example can be used to play around with material settings and watch the results.
+Only the default non-shader materials are used in here.
+
+You have two nodes to make it easier to see which difference your settings will make.
+Additionally you have one lightscenenode and you can set the global ambient values.
+*/
+
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+/*
+ Variables within the empty namespace are globals which are restricted to this file.
+*/
+namespace
+{
+ const wchar_t* const DriverTypeNames[] =
+ {
+ L"NULL",
+ L"SOFTWARE",
+ L"BURNINGSVIDEO",
+ L"DIRECT3D8",
+ L"DIRECT3D9",
+ L"OPENGL",
+ 0,
+ };
+
+ // For the gui id's
+ enum EGUI_IDS
+ {
+ GUI_ID_OPEN_TEXTURE = 1,
+ GUI_ID_QUIT,
+ GUI_ID_MAX
+ };
+
+ // Name used in texture selection to clear the textures on the node
+ const core::stringw CLEAR_TEXTURE = L"CLEAR texture";
+
+ // some useful color constants
+ const video::SColor SCOL_BLACK = video::SColor(255, 0, 0, 0);
+ const video::SColor SCOL_BLUE = video::SColor(255, 0, 0, 255);
+ const video::SColor SCOL_CYAN = video::SColor(255, 0, 255, 255);
+ const video::SColor SCOL_GRAY = video::SColor(255, 128,128, 128);
+ const video::SColor SCOL_GREEN = video::SColor(255, 0, 255, 0);
+ const video::SColor SCOL_MAGENTA = video::SColor(255, 255, 0, 255);
+ const video::SColor SCOL_RED = video::SColor(255, 255, 0, 0);
+ const video::SColor SCOL_YELLOW = video::SColor(255, 255, 255, 0);
+ const video::SColor SCOL_WHITE = video::SColor(255, 255, 255, 255);
+}; // namespace
+
+/*
+ Returns a new unique number on each call.
+*/
+s32 makeUniqueId()
+{
+ static int unique = GUI_ID_MAX;
+ ++unique;
+ return unique;
+}
+
+/*
+ Find out which vertex-type is needed for the given material type.
+*/
+video::E_VERTEX_TYPE getVertexTypeForMaterialType(video::E_MATERIAL_TYPE materialType)
+{
+ using namespace video;
+
+ switch ( materialType )
+ {
+ case EMT_SOLID:
+ return EVT_STANDARD;
+
+ case EMT_SOLID_2_LAYER:
+ return EVT_STANDARD;
+
+ case EMT_LIGHTMAP:
+ case EMT_LIGHTMAP_ADD:
+ case EMT_LIGHTMAP_M2:
+ case EMT_LIGHTMAP_M4:
+ case EMT_LIGHTMAP_LIGHTING:
+ case EMT_LIGHTMAP_LIGHTING_M2:
+ case EMT_LIGHTMAP_LIGHTING_M4:
+ return EVT_2TCOORDS;
+
+ case EMT_DETAIL_MAP:
+ return EVT_2TCOORDS;
+
+ case EMT_SPHERE_MAP:
+ return EVT_STANDARD;
+
+ case EMT_REFLECTION_2_LAYER:
+ return EVT_2TCOORDS;
+
+ case EMT_TRANSPARENT_ADD_COLOR:
+ return EVT_STANDARD;
+
+ case EMT_TRANSPARENT_ALPHA_CHANNEL:
+ return EVT_STANDARD;
+
+ case EMT_TRANSPARENT_ALPHA_CHANNEL_REF:
+ return EVT_STANDARD;
+
+ case EMT_TRANSPARENT_VERTEX_ALPHA:
+ return EVT_STANDARD;
+
+ case EMT_TRANSPARENT_REFLECTION_2_LAYER:
+ return EVT_2TCOORDS;
+
+ case EMT_NORMAL_MAP_SOLID:
+ case EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR:
+ case EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA:
+ case EMT_PARALLAX_MAP_SOLID:
+ case EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR:
+ case EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA:
+ return EVT_TANGENTS;
+
+ case EMT_ONETEXTURE_BLEND:
+ return EVT_STANDARD;
+
+ case EMT_FORCE_32BIT:
+ return EVT_STANDARD;
+ }
+ return EVT_STANDARD;
+}
+
+/*
+ Custom GUI-control to edit colorvalues.
+*/
+class CColorControl : public gui::IGUIElement
+{
+public:
+ // Constructor
+ CColorControl(gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, const wchar_t *text, IGUIElement* parent, s32 id=-1 )
+ : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect< s32 >(pos, pos+core::dimension2d<s32>(80, 75)))
+ , DirtyFlag(true)
+ , ColorStatic(0)
+ , EditAlpha(0)
+ , EditRed(0)
+ , EditGreen(0)
+ , EditBlue(0)
+ {
+ using namespace gui;
+ ButtonSetId = makeUniqueId();
+
+ const core::rect< s32 > rectControls(0,0,AbsoluteRect.getWidth(),AbsoluteRect.getHeight() );
+ IGUIStaticText * groupElement = guiEnv->addStaticText (L"", rectControls, true, false, this, -1, false);
+ groupElement->setNotClipped(true);
+
+ guiEnv->addStaticText (text, core::rect<s32>(0,0,80,15), false, false, groupElement, -1, false);
+
+ EditAlpha = addEditForNumbers(guiEnv, core::position2d<s32>(0,15), L"a", -1, groupElement );
+ EditRed = addEditForNumbers(guiEnv, core::position2d<s32>(0,30), L"r", -1, groupElement );
+ EditGreen = addEditForNumbers(guiEnv, core::position2d<s32>(0,45), L"g", -1, groupElement );
+ EditBlue = addEditForNumbers(guiEnv, core::position2d<s32>(0,60), L"b", -1, groupElement );
+
+ ColorStatic = guiEnv->addStaticText (L"", core::rect<s32>(60,15,80,75), true, false, groupElement, -1, true);
+
+ guiEnv->addButton (core::rect<s32>(60,35,80,50), groupElement, ButtonSetId, L"set");
+ SetEditsFromColor(Color);
+ }
+
+ // event receiver
+ virtual bool OnEvent(const SEvent &event)
+ {
+ if ( event.EventType != EET_GUI_EVENT )
+ return false;
+
+ if ( event.GUIEvent.Caller->getID() == ButtonSetId && event.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )
+ {
+ Color = GetColorFromEdits();
+ SetEditsFromColor(Color);
+ }
+
+ return false;
+ }
+
+ // set the color values
+ void setColor(const video::SColor& col)
+ {
+ DirtyFlag = true;
+ Color = col;
+ SetEditsFromColor(Color);
+ }
+
+ // get the color values
+ const video::SColor& getColor() const
+ {
+ return Color;
+ }
+
+ // To reset the dirty flag
+ void resetDirty()
+ {
+ DirtyFlag = false;
+ }
+
+ // when the color was changed the dirty flag is set
+ bool isDirty() const
+ {
+ return DirtyFlag;
+ };
+
+protected:
+
+ // Add a staticbox for a description + an editbox so users can enter numbers
+ gui::IGUIEditBox* addEditForNumbers(gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, const wchar_t *text, s32 id, gui::IGUIElement * parent)
+ {
+ using namespace gui;
+
+ core::rect< s32 > rect(pos, pos+core::dimension2d<s32>(10, 15));
+ guiEnv->addStaticText (text, rect, false, false, parent, -1, false);
+ rect += core::position2d<s32>( 20, 0 );
+ rect.LowerRightCorner.X += 20;
+ gui::IGUIEditBox* edit = guiEnv->addEditBox(L"0", rect, true, parent, id);
+ return edit;
+ }
+
+ // Get the color value from the editfields
+ video::SColor GetColorFromEdits()
+ {
+ video::SColor col;
+
+ if (EditAlpha)
+ {
+ u32 alpha = core::strtoul10(core::stringc(EditAlpha->getText()).c_str());
+ if (alpha > 255)
+ alpha = 255;
+ col.setAlpha(alpha);
+ }
+
+ if (EditRed)
+ {
+ u32 red = core::strtoul10(core::stringc(EditRed->getText()).c_str());
+ if (red > 255)
+ red = 255;
+ col.setRed(red);
+ }
+
+ if (EditGreen)
+ {
+ u32 green = core::strtoul10(core::stringc(EditGreen->getText()).c_str());
+ if (green > 255)
+ green = 255;
+ col.setGreen(green);
+ }
+
+ if (EditBlue)
+ {
+ u32 blue = core::strtoul10(core::stringc(EditBlue->getText()).c_str());
+ if (blue > 255)
+ blue = 255;
+ col.setBlue(blue);
+ }
+
+ return col;
+ }
+
+ // Fill the editfields with the value for the given color
+ void SetEditsFromColor(video::SColor col)
+ {
+ DirtyFlag = true;
+ if ( EditAlpha )
+ EditAlpha->setText( core::stringw(col.getAlpha()).c_str() );
+ if ( EditRed )
+ EditRed->setText( core::stringw(col.getRed()).c_str() );
+ if ( EditGreen )
+ EditGreen->setText( core::stringw(col.getGreen()).c_str() );
+ if ( EditBlue )
+ EditBlue->setText( core::stringw(col.getBlue()).c_str() );
+ if ( ColorStatic )
+ ColorStatic->setBackgroundColor(col);
+ }
+
+private:
+
+ bool DirtyFlag;
+ video::SColor Color;
+ s32 ButtonSetId;
+ gui::IGUIStaticText * ColorStatic;
+ gui::IGUIEditBox * EditAlpha;
+ gui::IGUIEditBox * EditRed;
+ gui::IGUIEditBox * EditGreen;
+ gui::IGUIEditBox * EditBlue;
+};
+
+/*
+ Custom GUI-control for to edit all colors typically used in materials and lights
+*/
+class CAllColorsControl : public gui::IGUIElement
+{
+public:
+ // Constructor
+ CAllColorsControl(gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, const wchar_t * description, bool hasEmissive, IGUIElement* parent, s32 id=-1)
+ : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect<s32>(pos,pos+core::dimension2d<s32>(60,250)))
+ , ControlAmbientColor(0), ControlDiffuseColor(0), ControlSpecularColor(0), ControlEmissiveColor(0)
+ {
+ core::rect<s32> rect(0, 0, 60, 15);
+ guiEnv->addStaticText (description, rect, false, false, this, -1, false);
+ createColorControls(guiEnv, core::position2d<s32>(0, 15), hasEmissive);
+ }
+
+ // Destructor
+ virtual ~CAllColorsControl()
+ {
+ ControlAmbientColor->drop();
+ ControlDiffuseColor->drop();
+ if ( ControlEmissiveColor )
+ ControlEmissiveColor->drop();
+ ControlSpecularColor->drop();
+ }
+
+ // Set the color values to those within the material
+ void setColorsToMaterialColors(const video::SMaterial & material)
+ {
+ ControlAmbientColor->setColor(material.AmbientColor);
+ ControlDiffuseColor->setColor(material.DiffuseColor);
+ ControlEmissiveColor->setColor(material.EmissiveColor);
+ ControlSpecularColor->setColor(material.SpecularColor);
+ }
+
+ // Update all changed colors in the material
+ void updateMaterialColors(video::SMaterial & material)
+ {
+ if ( ControlAmbientColor->isDirty() )
+ material.AmbientColor = ControlAmbientColor->getColor();
+ if ( ControlDiffuseColor->isDirty() )
+ material.DiffuseColor = ControlDiffuseColor->getColor();
+ if ( ControlEmissiveColor->isDirty() )
+ material.EmissiveColor = ControlEmissiveColor->getColor();
+ if ( ControlSpecularColor->isDirty() )
+ material.SpecularColor = ControlSpecularColor->getColor();
+ }
+
+ // Set the color values to those from the light data
+ void setColorsToLightDataColors(const video::SLight & lightData)
+ {
+ ControlAmbientColor->setColor(lightData.AmbientColor.toSColor());
+ ControlAmbientColor->setColor(lightData.DiffuseColor.toSColor());
+ ControlAmbientColor->setColor(lightData.SpecularColor.toSColor());
+ }
+
+ // Update all changed colors in the light data
+ void updateLightColors(video::SLight & lightData)
+ {
+ if ( ControlAmbientColor->isDirty() )
+ lightData.AmbientColor = video::SColorf( ControlAmbientColor->getColor() );
+ if ( ControlDiffuseColor->isDirty() )
+ lightData.DiffuseColor = video::SColorf( ControlDiffuseColor->getColor() );
+ if ( ControlSpecularColor->isDirty() )
+ lightData.SpecularColor = video::SColorf(ControlSpecularColor->getColor() );
+ }
+
+ // To reset the dirty flags
+ void resetDirty()
+ {
+ ControlAmbientColor->resetDirty();
+ ControlDiffuseColor->resetDirty();
+ ControlSpecularColor->resetDirty();
+ if ( ControlEmissiveColor )
+ ControlEmissiveColor->resetDirty();
+ }
+
+protected:
+ void createColorControls(gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, bool hasEmissive)
+ {
+ ControlAmbientColor = new CColorControl( guiEnv, pos, L"ambient", this);
+ ControlDiffuseColor = new CColorControl( guiEnv, pos + core::position2d<s32>(0, 75), L"diffuse", this );
+ ControlSpecularColor = new CColorControl( guiEnv, pos + core::position2d<s32>(0, 150), L"specular", this );
+ if ( hasEmissive )
+ {
+ ControlEmissiveColor = new CColorControl( guiEnv, pos + core::position2d<s32>(0, 225), L"emissive", this );
+ }
+ }
+
+private:
+ CColorControl* ControlAmbientColor;
+ CColorControl* ControlDiffuseColor;
+ CColorControl* ControlSpecularColor;
+ CColorControl* ControlEmissiveColor;
+};
+
+/*
+ GUI-Control to offer a selection of available textures.
+*/
+class CTextureControl : public gui::IGUIElement
+{
+public:
+ CTextureControl(gui::IGUIEnvironment* guiEnv, video::IVideoDriver * driver, const core::position2d<s32> & pos, IGUIElement* parent, s32 id=-1)
+ : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect<s32>(pos,pos+core::dimension2d<s32>(100,15)))
+ , DirtyFlag(true), ComboTexture(0)
+ {
+ core::rect<s32> rectCombo(0, 0, AbsoluteRect.getWidth(),AbsoluteRect.getHeight());
+ ComboTexture = guiEnv->addComboBox (rectCombo, this);
+ updateTextures(driver);
+ }
+
+ virtual bool OnEvent(const SEvent &event)
+ {
+ if ( event.EventType != EET_GUI_EVENT )
+ return false;
+
+ if ( event.GUIEvent.Caller == ComboTexture && event.GUIEvent.EventType == gui::EGET_COMBO_BOX_CHANGED )
+ {
+ DirtyFlag = true;
+ }
+
+ return false;
+ }
+
+ // Workaround for a problem with comboboxes.
+ // We have to get in front when the combobox wants to get in front or combobox-list might be drawn below other elements.
+ virtual bool bringToFront(IGUIElement* element)
+ {
+ bool result = gui::IGUIElement::bringToFront(element);
+ if ( Parent && element == ComboTexture )
+ result &= Parent->bringToFront(this);
+ return result;
+ }
+
+ // return selected texturename (if any, otherwise 0)
+ const wchar_t * getSelectedTextureName() const
+ {
+ s32 selected = ComboTexture->getSelected();
+ if ( selected < 0 )
+ return 0;
+ return ComboTexture->getItem(selected);
+ }
+
+ // reset the dirty flag
+ void resetDirty()
+ {
+ DirtyFlag = false;
+ }
+
+ // when the texture was changed the dirty flag is set
+ bool isDirty() const
+ {
+ return DirtyFlag;
+ };
+
+ // Put the names of all currently loaded textures in a combobox
+ void updateTextures(video::IVideoDriver * driver)
+ {
+ s32 oldSelected = ComboTexture->getSelected();
+ s32 selectNew = -1;
+ core::stringw oldTextureName;
+ if ( oldSelected >= 0 )
+ {
+ oldTextureName = ComboTexture->getItem(oldSelected);
+ }
+ ComboTexture->clear();
+ for ( u32 i=0; i < driver->getTextureCount(); ++i )
+ {
+ video::ITexture * texture = driver->getTextureByIndex(i);
+ core::stringw name( texture->getName() );
+ ComboTexture->addItem( name.c_str() );
+ if ( !oldTextureName.empty() && selectNew < 0 && name == oldTextureName )
+ selectNew = i;
+ }
+
+ // add another name which can be used to clear the texture
+ ComboTexture->addItem( CLEAR_TEXTURE.c_str() );
+ if ( CLEAR_TEXTURE == oldTextureName )
+ selectNew = ComboTexture->getItemCount()-1;
+
+ if ( selectNew >= 0 )
+ ComboTexture->setSelected(selectNew);
+
+ DirtyFlag = true;
+ }
+
+private:
+ bool DirtyFlag;
+ gui::IGUIComboBox * ComboTexture;
+};
+
+/*
+ Control which allows setting some of the material values for a meshscenenode
+*/
+struct SMeshNodeControl
+{
+ // constructor
+ SMeshNodeControl()
+ : Initialized(false), Driver(0), MeshManipulator(0), SceneNode(0), SceneNode2T(0), SceneNodeTangents(0)
+ , AllColorsControl(0), ButtonLighting(0), InfoLighting(0), ComboMaterial(0), TextureControl1(0), TextureControl2(0), ControlVertexColors(0)
+ {
+ }
+
+ // Destructor
+ virtual ~SMeshNodeControl()
+ {
+ if ( TextureControl1 )
+ TextureControl1->drop();
+ if ( TextureControl2 )
+ TextureControl2->drop();
+ if ( ControlVertexColors )
+ ControlVertexColors->drop();
+ if ( AllColorsControl )
+ AllColorsControl->drop();
+ }
+
+ void init(scene::IMeshSceneNode* node, IrrlichtDevice * device, const core::position2d<s32> & pos, const wchar_t * description)
+ {
+ if ( Initialized || !node || !device) // initializing twice or with invalid data not allowed
+ return;
+
+ Driver = device->getVideoDriver ();
+ gui::IGUIEnvironment* guiEnv = device->getGUIEnvironment();
+ scene::ISceneManager* smgr = device->getSceneManager();
+ MeshManipulator = smgr->getMeshManipulator();
+
+ SceneNode = node;
+ scene::IMeshManipulator * meshManip = smgr->getMeshManipulator();
+
+ scene::IMesh * mesh2T = meshManip->createMeshWith2TCoords(node->getMesh());
+ SceneNode2T = smgr->addMeshSceneNode(mesh2T, 0, -1, SceneNode->getPosition(), SceneNode->getRotation(), SceneNode->getScale() );
+ mesh2T->drop();
+
+ scene::IMesh * meshTangents = meshManip->createMeshWithTangents(node->getMesh(), false, false, false);
+ SceneNodeTangents = smgr->addMeshSceneNode(meshTangents, 0, -1
+ , SceneNode->getPosition(), SceneNode->getRotation(), SceneNode->getScale() );
+ meshTangents->drop();
+
+ video::SMaterial & material = SceneNode->getMaterial(0);
+ material.Lighting = true;
+ AllColorsControl = new CAllColorsControl(guiEnv, pos, description, true, guiEnv->getRootGUIElement());
+ AllColorsControl->setColorsToMaterialColors(material);
+
+ core::rect<s32> rectBtn(pos + core::position2d<s32>(0, 320), core::dimension2d<s32>(60, 15));
+ ButtonLighting = guiEnv->addButton (rectBtn, 0, -1, L"Lighting");
+ ButtonLighting->setIsPushButton(true);
+ ButtonLighting->setPressed(material.Lighting);
+ core::rect<s32> rectInfo( rectBtn.LowerRightCorner.X, rectBtn.UpperLeftCorner.Y, rectBtn.LowerRightCorner.X+40, rectBtn.UpperLeftCorner.Y+15 );
+ InfoLighting = guiEnv->addStaticText(L"", rectInfo, true, false );
+ InfoLighting->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_CENTER );
+
+ core::rect<s32> rectCombo(pos.X, rectBtn.LowerRightCorner.Y, pos.X+100, rectBtn.LowerRightCorner.Y+15);
+ ComboMaterial = guiEnv->addComboBox (rectCombo);
+ for ( int i=0; i <= (int)video::EMT_ONETEXTURE_BLEND; ++i )
+ {
+ ComboMaterial->addItem( core::stringw(video::sBuiltInMaterialTypeNames[i]).c_str() );
+ }
+ ComboMaterial->setSelected( (s32)material.MaterialType );
+
+ core::position2d<s32> posTex(rectCombo.UpperLeftCorner.X,rectCombo.LowerRightCorner.Y);
+ TextureControl1 = new CTextureControl(guiEnv, Driver, posTex, guiEnv->getRootGUIElement());
+ posTex.Y += 15;
+ TextureControl2 = new CTextureControl(guiEnv, Driver, posTex, guiEnv->getRootGUIElement());
+
+ core::position2d<s32> posVertexColors( posTex.X, posTex.Y + 15);
+ ControlVertexColors = new CColorControl( guiEnv, posVertexColors, L"Vertex colors", guiEnv->getRootGUIElement());
+
+ video::S3DVertex * vertices = (video::S3DVertex *)node->getMesh()->getMeshBuffer(0)->getVertices();
+ if ( vertices )
+ {
+ ControlVertexColors->setColor(vertices[0].Color);
+ }
+
+ Initialized = true;
+ }
+
+ void update()
+ {
+ if ( !Initialized )
+ return;
+
+ video::SMaterial & material = SceneNode->getMaterial(0);
+ video::SMaterial & material2T = SceneNode2T->getMaterial(0);
+ video::SMaterial & materialTangents = SceneNodeTangents->getMaterial(0);
+
+ s32 selectedMaterial = ComboMaterial->getSelected();
+ if ( selectedMaterial >= (s32)video::EMT_SOLID && selectedMaterial <= (s32)video::EMT_ONETEXTURE_BLEND)
+ {
+ video::E_VERTEX_TYPE vertexType = getVertexTypeForMaterialType((video::E_MATERIAL_TYPE)selectedMaterial);
+ switch ( vertexType )
+ {
+ case video::EVT_STANDARD:
+ material.MaterialType = (video::E_MATERIAL_TYPE)selectedMaterial;
+ SceneNode->setVisible(true);
+ SceneNode2T->setVisible(false);
+ SceneNodeTangents->setVisible(false);
+ break;
+ case video::EVT_2TCOORDS:
+ material2T.MaterialType = (video::E_MATERIAL_TYPE)selectedMaterial;
+ SceneNode->setVisible(false);
+ SceneNode2T->setVisible(true);
+ SceneNodeTangents->setVisible(false);
+ break;
+ case video::EVT_TANGENTS:
+ materialTangents.MaterialType = (video::E_MATERIAL_TYPE)selectedMaterial;
+ SceneNode->setVisible(false);
+ SceneNode2T->setVisible(false);
+ SceneNodeTangents->setVisible(true);
+ break;
+ }
+ }
+
+ updateMaterial(material);
+ updateMaterial(material2T);
+ updateMaterial(materialTangents);
+
+ if ( ButtonLighting->isPressed() )
+ InfoLighting->setText(L"on");
+ else
+ InfoLighting->setText(L"off");
+
+ AllColorsControl->resetDirty();
+ TextureControl1->resetDirty();
+ TextureControl2->resetDirty();
+ ControlVertexColors->resetDirty();
+ }
+
+ void updateTextures()
+ {
+ TextureControl1->updateTextures(Driver);
+ TextureControl2->updateTextures(Driver);
+ }
+
+protected:
+
+ void updateMaterial(video::SMaterial & material)
+ {
+ AllColorsControl->updateMaterialColors(material);
+ material.Lighting = ButtonLighting->isPressed();
+ if ( TextureControl1->isDirty() )
+ {
+ material.TextureLayer[0].Texture = Driver->getTexture( io::path(TextureControl1->getSelectedTextureName()) );
+ }
+ if ( TextureControl2->isDirty() )
+ {
+ material.TextureLayer[1].Texture = Driver->getTexture( io::path(TextureControl2->getSelectedTextureName()) );
+ }
+ if ( ControlVertexColors->isDirty() )
+ {
+ MeshManipulator->setVertexColors (SceneNode->getMesh(), ControlVertexColors->getColor());
+ MeshManipulator->setVertexColors (SceneNode2T->getMesh(), ControlVertexColors->getColor());
+ MeshManipulator->setVertexColors (SceneNodeTangents->getMesh(), ControlVertexColors->getColor());
+ }
+ }
+
+ bool Initialized;
+ video::IVideoDriver * Driver;
+ scene::IMeshManipulator* MeshManipulator;
+ scene::IMeshSceneNode* SceneNode;
+ scene::IMeshSceneNode* SceneNode2T;
+ scene::IMeshSceneNode* SceneNodeTangents;
+ CAllColorsControl* AllColorsControl;
+ gui::IGUIButton * ButtonLighting;
+ gui::IGUIStaticText* InfoLighting;
+ gui::IGUIComboBox * ComboMaterial;
+ CTextureControl* TextureControl1;
+ CTextureControl* TextureControl2;
+ CColorControl* ControlVertexColors;
+};
+
+/*
+ Control to allow setting the color values of a lightscenenode.
+*/
+struct SLightNodeControl
+{
+ // constructor
+ SLightNodeControl() : Initialized(false), SceneNode(0), AllColorsControl(0)
+ {
+ }
+
+ virtual ~SLightNodeControl()
+ {
+ if ( AllColorsControl )
+ AllColorsControl->drop();
+ }
+
+ void init(scene::ILightSceneNode* node, gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, const wchar_t * description)
+ {
+ if ( Initialized || !node || !guiEnv) // initializing twice or with invalid data not allowed
+ return;
+ SceneNode = node;
+ AllColorsControl = new CAllColorsControl(guiEnv, pos, description, false, guiEnv->getRootGUIElement());
+ const video::SLight & lightData = SceneNode->getLightData();
+ AllColorsControl->setColorsToLightDataColors(lightData);
+ Initialized = true;
+ }
+
+ void update()
+ {
+ if ( !Initialized )
+ return;
+
+ video::SLight & lightData = SceneNode->getLightData();
+ AllColorsControl->updateLightColors(lightData);
+ }
+
+protected:
+ bool Initialized;
+ scene::ILightSceneNode* SceneNode;
+ CAllColorsControl* AllColorsControl;
+};
+
+/*
+ Application configuration
+*/
+struct SConfig
+{
+ SConfig()
+ : RenderInBackground(true)
+ , DriverType(video::EDT_BURNINGSVIDEO)
+ , ScreenSize(640, 480)
+ {
+ }
+
+ bool RenderInBackground;
+ video::E_DRIVER_TYPE DriverType;
+ core::dimension2d<u32> ScreenSize;
+};
+
+/*
+ Main application class
+*/
+class CApp : public IEventReceiver
+{
+ friend int main(int argc, char *argv[]);
+
+public:
+ // constructor
+ CApp()
+ : IsRunning(false)
+ , Device(0)
+ , Camera(0)
+ , GlobalAmbient(0)
+ {
+ }
+
+ // destructor
+ ~CApp()
+ {
+ }
+
+ // stop running - will quit at end of mainloop
+ void stopApp()
+ {
+ IsRunning = false;
+ }
+
+ // Event handler
+ virtual bool OnEvent(const SEvent &event)
+ {
+ if (event.EventType == EET_GUI_EVENT)
+ {
+ gui::IGUIEnvironment* env = Device->getGUIEnvironment();
+
+ switch(event.GUIEvent.EventType)
+ {
+ case gui::EGET_MENU_ITEM_SELECTED:
+ {
+ gui::IGUIContextMenu* menu = (gui::IGUIContextMenu*)event.GUIEvent.Caller;
+ s32 id = menu->getItemCommandId(menu->getSelectedItem());
+
+ switch(id)
+ {
+ case GUI_ID_OPEN_TEXTURE: // File -> Open Texture
+ env->addFileOpenDialog(L"Please select a texture file to open");
+ break;
+ case GUI_ID_QUIT: // File -> Quit
+ stopApp();
+ break;
+ }
+ }
+ break;
+
+ case gui::EGET_FILE_SELECTED:
+ {
+ // load the model file, selected in the file open dialog
+ gui::IGUIFileOpenDialog* dialog =
+ (gui::IGUIFileOpenDialog*)event.GUIEvent.Caller;
+ loadTexture(io::path(dialog->getFileName()).c_str());
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return false;
+ }
+
+protected:
+
+ // Application initialization
+ // returns true when it was successful initialized, otherwise false.
+ bool init(int argc, char *argv[])
+ {
+ // ask user for driver
+ Config.DriverType=driverChoiceConsole();
+ if (Config.DriverType==video::EDT_COUNT)
+ return false;
+
+ // create the device with the settings from our config
+ Device = createDevice(Config.DriverType, Config.ScreenSize);
+ if (!Device)
+ return false;
+ Device->setWindowCaption( DriverTypeNames[Config.DriverType] );
+ Device->setEventReceiver(this);
+
+ scene::ISceneManager* smgr = Device->getSceneManager();
+ video::IVideoDriver * driver = Device->getVideoDriver ();
+ gui::IGUIEnvironment* guiEnv = Device->getGUIEnvironment();
+
+ // set a nicer font
+ gui::IGUISkin* skin = guiEnv->getSkin();
+ gui::IGUIFont* font = guiEnv->getFont("../../media/fonthaettenschweiler.bmp");
+ if (font)
+ skin->setFont(font);
+
+ // remove some alpha value because it makes those menus harder to read otherwise
+ video::SColor col3dHighLight( skin->getColor(gui::EGDC_APP_WORKSPACE) );
+ col3dHighLight.setAlpha(255);
+ video::SColor colHighLight( col3dHighLight );
+ skin->setColor(gui::EGDC_HIGH_LIGHT, colHighLight );
+ skin->setColor(gui::EGDC_3D_HIGH_LIGHT, col3dHighLight );
+
+ // Add some textures which are useful to test material settings
+ createDefaultTextures(driver);
+
+ // create a menu
+ gui::IGUIContextMenu * menuBar = guiEnv->addMenu();
+ menuBar->addItem(L"File", -1, true, true);
+
+ gui::IGUIContextMenu* subMenuFile = menuBar->getSubMenu(0);
+ subMenuFile->addItem(L"Open texture ...", GUI_ID_OPEN_TEXTURE);
+ subMenuFile->addSeparator();
+ subMenuFile->addItem(L"Quit", GUI_ID_QUIT);
+
+ // a static camera
+ Camera = smgr->addCameraSceneNode (0, core::vector3df(0, 0, 0),
+ core::vector3df(0, 0, 100),
+ -1);
+
+ // add the nodes which are used to show the materials
+ scene::IMeshSceneNode* nodeL = smgr->addCubeSceneNode (30.0f, 0, -1,
+ core::vector3df(-35, 0, 100),
+ core::vector3df(0, 0, 0),
+ core::vector3df(1.0f, 1.0f, 1.0f));
+ NodeLeft.init( nodeL, Device, core::position2d<s32>(10,20), L"left node" );
+
+ scene::IMeshSceneNode* nodeR = smgr->addCubeSceneNode (30.0f, 0, -1,
+ core::vector3df(35, 0, 100),
+ core::vector3df(0, 0, 0),
+ core::vector3df(1.0f, 1.0f, 1.0f));
+ NodeRight.init( nodeR, Device, core::position2d<s32>(530,20), L"right node" );
+
+ // add one light
+ scene::ILightSceneNode* nodeLight = smgr->addLightSceneNode(0, core::vector3df(0, 0, 0),
+ video::SColorf(1.0f, 1.0f, 1.0f),
+ 100.0f);
+ LightControl.init(nodeLight, guiEnv, core::position2d<s32>(270,20), L"light" );
+
+ // one large cube around everything. That's mainly to make the light more obvious.
+ scene::IMeshSceneNode* backgroundCube = smgr->addCubeSceneNode (200.0f, 0, -1, core::vector3df(0, 0, 0),
+ core::vector3df(45, 0, 0),
+ core::vector3df(1.0f, 1.0f, 1.0f));
+ backgroundCube->getMaterial(0).BackfaceCulling = false; // we are within the cube, so we have to disable backface culling to see it
+ backgroundCube->getMaterial(0).EmissiveColor.set(255,50,50,50); // we keep some self lighting to keep texts visible
+
+ // set the ambient light value
+ GlobalAmbient = new CColorControl( guiEnv, core::position2d<s32>(270, 300), L"global ambient", guiEnv->getRootGUIElement());
+ GlobalAmbient->setColor( smgr->getAmbientLight().toSColor() );
+
+ return true;
+ }
+
+ // Update one frame
+ bool update()
+ {
+ using namespace irr;
+
+ video::IVideoDriver* videoDriver = Device->getVideoDriver();
+ if ( !Device->run() )
+ return false;
+
+ if ( Device->isWindowActive() || Config.RenderInBackground )
+ {
+ gui::IGUIEnvironment* guiEnv = Device->getGUIEnvironment();
+ scene::ISceneManager* smgr = Device->getSceneManager();
+ gui::IGUISkin * skin = guiEnv->getSkin();
+
+ // update our controls
+ NodeLeft.update();
+ NodeRight.update();
+ LightControl.update();
+
+ // update ambient light settings
+ if ( GlobalAmbient->isDirty() )
+ {
+ smgr->setAmbientLight( GlobalAmbient->getColor() );
+ GlobalAmbient->resetDirty();
+ }
+
+ // draw everything
+ video::SColor bkColor( skin->getColor(gui::EGDC_APP_WORKSPACE) );
+ videoDriver->beginScene(true, true, bkColor);
+
+ smgr->drawAll();
+ guiEnv->drawAll();
+
+ videoDriver->endScene();
+ }
+
+ return true;
+ }
+
+ // Run the application. Our main loop.
+ void run()
+ {
+ IsRunning = true;
+
+ if ( !Device )
+ return;
+
+ // main application loop
+ while(IsRunning)
+ {
+ if ( !update() )
+ break;
+
+ Device->sleep( 5 );
+ }
+ }
+
+ // Close down the application
+ void quit()
+ {
+ IsRunning = false;
+ GlobalAmbient->drop();
+ GlobalAmbient = NULL;
+ if ( Device )
+ {
+ Device->closeDevice();
+ Device->drop();
+ Device = NULL;
+ }
+ }
+
+ // Create some useful textures.
+ // Note that the function put readability over speed, you shouldn't use setPixel at runtime but for initialization it's nice.
+ void createDefaultTextures(video::IVideoDriver * driver)
+ {
+ const u32 width = 256;
+ const u32 height = 256;
+ video::IImage * imageA8R8G8B8 = driver->createImage (video::ECF_A8R8G8B8, core::dimension2d<u32>(width, height));
+ if ( !imageA8R8G8B8 )
+ return;
+ const u32 pitch = imageA8R8G8B8->getPitch();
+
+ // some nice square-pattern with 9 typical colors
+ for ( u32 y = 0; y < height; ++ y )
+ {
+ for ( u32 x = 0; x < pitch; ++x )
+ {
+ if ( y < height/3 )
+ {
+ if ( x < width/3 )
+ imageA8R8G8B8->setPixel (x, y, SCOL_BLACK);
+ else if ( x < 2*width/3 )
+ imageA8R8G8B8->setPixel (x, y, SCOL_BLUE);
+ else
+ imageA8R8G8B8->setPixel (x, y, SCOL_CYAN);
+ }
+ else if ( y < 2*height/3 )
+ {
+ if ( x < width/3 )
+ imageA8R8G8B8->setPixel (x, y, SCOL_GRAY);
+ else if ( x < 2*width/3 )
+ imageA8R8G8B8->setPixel (x, y, SCOL_GREEN);
+ else
+ imageA8R8G8B8->setPixel (x, y, SCOL_MAGENTA);
+ }
+ else
+ {
+ if ( x < width/3 )
+ imageA8R8G8B8->setPixel (x, y, SCOL_RED);
+ else if ( x < 2*width/3 )
+ imageA8R8G8B8->setPixel (x, y, SCOL_YELLOW);
+ else
+ imageA8R8G8B8->setPixel (x, y, SCOL_WHITE);
+ }
+ }
+ }
+ driver->addTexture (io::path("CARO_A8R8G8B8"), imageA8R8G8B8);
+
+ // all white
+ imageA8R8G8B8->fill(SCOL_WHITE);
+ driver->addTexture (io::path("WHITE_A8R8G8B8"), imageA8R8G8B8);
+
+ // all black
+ imageA8R8G8B8->fill(SCOL_BLACK);
+ driver->addTexture (io::path("BLACK_A8R8G8B8"), imageA8R8G8B8);
+
+ // gray-scale
+ for ( u32 y = 0; y < height; ++ y )
+ {
+ for ( u32 x = 0; x < pitch; ++x )
+ {
+ imageA8R8G8B8->setPixel (x, y, video::SColor(y, x,x,x) );
+ }
+ }
+ driver->addTexture (io::path("GRAYSCALE_A8R8G8B8"), imageA8R8G8B8);
+
+ imageA8R8G8B8->drop();
+ }
+
+ // Load a texture and make sure nodes know it when more textures are available.
+ void loadTexture(const io::path &name)
+ {
+ Device->getVideoDriver()->getTexture(name);
+ NodeLeft.updateTextures();
+ NodeRight.updateTextures();
+ }
+
+private:
+ SConfig Config;
+ volatile bool IsRunning;
+ IrrlichtDevice * Device;
+ scene::ICameraSceneNode * Camera;
+ SMeshNodeControl NodeLeft;
+ SMeshNodeControl NodeRight;
+ SLightNodeControl LightControl;
+ CColorControl * GlobalAmbient;
+};
+
+/*
+ A very short main as we do everything else in classes.
+*/
+int main(int argc, char *argv[])
+{
+ CApp APP;
+
+ if ( !APP.init(argc, argv) )
+ {
+ printf("init failed\n");
+ return 1;
+ }
+
+ APP.run();
+ APP.quit();
+
+ return 0;
+}
+
+/*
+**/
diff --git a/examples/22.MaterialViewer/tutorial.html b/examples/22.MaterialViewer/tutorial.html new file mode 100644 index 0000000..6009e17 --- /dev/null +++ b/examples/22.MaterialViewer/tutorial.html @@ -0,0 +1,206 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 22: Material Viewer</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 22: Material Viewer </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/022shot.jpg" alt="022shot.jpg"/> +</div> + <p>This example can be used to play around with material settings and watch the results. Only the default non-shader materials are used in here.</p> +<p>You have two nodes to make it easier to see which difference your settings will make. Additionally you have one lightscenenode and you can set the global ambient values. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> Variables within the empty namespace are globals which are restricted to this file. </p><div class="fragment"><div class="line"><span class="keyword">namespace</span></div><div class="line">{</div><div class="line"> <span class="keyword">const</span> <span class="keywordtype">wchar_t</span>* <span class="keyword">const</span> DriverTypeNames[] =</div><div class="line"> {</div><div class="line"> L<span class="stringliteral">"NULL"</span>,</div><div class="line"> L<span class="stringliteral">"SOFTWARE"</span>,</div><div class="line"> L<span class="stringliteral">"BURNINGSVIDEO"</span>,</div><div class="line"> L<span class="stringliteral">"DIRECT3D8"</span>,</div><div class="line"> L<span class="stringliteral">"DIRECT3D9"</span>,</div><div class="line"> L<span class="stringliteral">"OPENGL"</span>,</div><div class="line"> 0,</div><div class="line"> };</div><div class="line"></div><div class="line"> <span class="comment">// For the gui id's</span></div><div class="line"> <span class="keyword">enum</span> EGUI_IDS</div><div class="line"> {</div><div class="line"> GUI_ID_OPEN_TEXTURE = 1,</div><div class="line"> GUI_ID_QUIT,</div><div class="line"> GUI_ID_MAX</div><div class="line"> };</div><div class="line"></div><div class="line"> <span class="comment">// Name used in texture selection to clear the textures on the node</span></div><div class="line"> <span class="keyword">const</span> core::stringw CLEAR_TEXTURE = L<span class="stringliteral">"CLEAR texture"</span>;</div><div class="line"></div><div class="line"> <span class="comment">// some useful color constants</span></div><div class="line"> <span class="keyword">const</span> video::SColor SCOL_BLACK = video::SColor(255, 0, 0, 0);</div><div class="line"> <span class="keyword">const</span> video::SColor SCOL_BLUE = video::SColor(255, 0, 0, 255);</div><div class="line"> <span class="keyword">const</span> video::SColor SCOL_CYAN = video::SColor(255, 0, 255, 255);</div><div class="line"> <span class="keyword">const</span> video::SColor SCOL_GRAY = video::SColor(255, 128,128, 128);</div><div class="line"> <span class="keyword">const</span> video::SColor SCOL_GREEN = video::SColor(255, 0, 255, 0);</div><div class="line"> <span class="keyword">const</span> video::SColor SCOL_MAGENTA = video::SColor(255, 255, 0, 255);</div><div class="line"> <span class="keyword">const</span> video::SColor SCOL_RED = video::SColor(255, 255, 0, 0);</div><div class="line"> <span class="keyword">const</span> video::SColor SCOL_YELLOW = video::SColor(255, 255, 255, 0);</div><div class="line"> <span class="keyword">const</span> video::SColor SCOL_WHITE = video::SColor(255, 255, 255, 255);</div><div class="line">}; <span class="comment">// namespace</span></div></div><!-- fragment --><p> Returns a new unique number on each call. </p><div class="fragment"><div class="line">s32 makeUniqueId()</div><div class="line">{</div><div class="line"> <span class="keyword">static</span> <span class="keywordtype">int</span> unique = GUI_ID_MAX;</div><div class="line"> ++unique;</div><div class="line"> <span class="keywordflow">return</span> unique;</div><div class="line">}</div></div><!-- fragment --><p> Find out which vertex-type is needed for the given material type. </p><div class="fragment"><div class="line">video::E_VERTEX_TYPE getVertexTypeForMaterialType(video::E_MATERIAL_TYPE materialType)</div><div class="line">{</div><div class="line"> <span class="keyword">using namespace </span>video;</div><div class="line"></div><div class="line"> <span class="keywordflow">switch</span> ( materialType )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> EMT_SOLID:</div><div class="line"> <span class="keywordflow">return</span> EVT_STANDARD;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EMT_SOLID_2_LAYER:</div><div class="line"> <span class="keywordflow">return</span> EVT_STANDARD;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EMT_LIGHTMAP:</div><div class="line"> <span class="keywordflow">case</span> EMT_LIGHTMAP_ADD:</div><div class="line"> <span class="keywordflow">case</span> EMT_LIGHTMAP_M2:</div><div class="line"> <span class="keywordflow">case</span> EMT_LIGHTMAP_M4:</div><div class="line"> <span class="keywordflow">case</span> EMT_LIGHTMAP_LIGHTING:</div><div class="line"> <span class="keywordflow">case</span> EMT_LIGHTMAP_LIGHTING_M2:</div><div class="line"> <span class="keywordflow">case</span> EMT_LIGHTMAP_LIGHTING_M4:</div><div class="line"> <span class="keywordflow">return</span> EVT_2TCOORDS;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EMT_DETAIL_MAP:</div><div class="line"> <span class="keywordflow">return</span> EVT_2TCOORDS;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EMT_SPHERE_MAP:</div><div class="line"> <span class="keywordflow">return</span> EVT_STANDARD;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EMT_REFLECTION_2_LAYER:</div><div class="line"> <span class="keywordflow">return</span> EVT_2TCOORDS;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EMT_TRANSPARENT_ADD_COLOR:</div><div class="line"> <span class="keywordflow">return</span> EVT_STANDARD;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EMT_TRANSPARENT_ALPHA_CHANNEL:</div><div class="line"> <span class="keywordflow">return</span> EVT_STANDARD;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EMT_TRANSPARENT_ALPHA_CHANNEL_REF:</div><div class="line"> <span class="keywordflow">return</span> EVT_STANDARD;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EMT_TRANSPARENT_VERTEX_ALPHA:</div><div class="line"> <span class="keywordflow">return</span> EVT_STANDARD;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EMT_TRANSPARENT_REFLECTION_2_LAYER:</div><div class="line"> <span class="keywordflow">return</span> EVT_2TCOORDS;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EMT_NORMAL_MAP_SOLID:</div><div class="line"> <span class="keywordflow">case</span> EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR:</div><div class="line"> <span class="keywordflow">case</span> EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA:</div><div class="line"> <span class="keywordflow">case</span> EMT_PARALLAX_MAP_SOLID:</div><div class="line"> <span class="keywordflow">case</span> EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR:</div><div class="line"> <span class="keywordflow">case</span> EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA:</div><div class="line"> <span class="keywordflow">return</span> EVT_TANGENTS;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EMT_ONETEXTURE_BLEND:</div><div class="line"> <span class="keywordflow">return</span> EVT_STANDARD;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> EMT_FORCE_32BIT:</div><div class="line"> <span class="keywordflow">return</span> EVT_STANDARD;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">return</span> EVT_STANDARD;</div><div class="line">}</div></div><!-- fragment --><p> Custom GUI-control to edit colorvalues. </p><div class="fragment"><div class="line"><span class="keyword">class </span>CColorControl : <span class="keyword">public</span> gui::IGUIElement</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"> <span class="comment">// Constructor</span></div><div class="line"> CColorControl(gui::IGUIEnvironment* guiEnv, <span class="keyword">const</span> core::position2d<s32> & pos, <span class="keyword">const</span> <span class="keywordtype">wchar_t</span> *text, IGUIElement* parent, s32 <span class="keywordtype">id</span>=-1 )</div><div class="line"> : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect< s32 >(pos, pos+core::dimension2d<s32>(80, 75)))</div><div class="line"> , DirtyFlag(true)</div><div class="line"> , ColorStatic(0)</div><div class="line"> , EditAlpha(0)</div><div class="line"> , EditRed(0)</div><div class="line"> , EditGreen(0)</div><div class="line"> , EditBlue(0)</div><div class="line"> {</div><div class="line"> <span class="keyword">using namespace </span>gui;</div><div class="line"> ButtonSetId = makeUniqueId();</div><div class="line"></div><div class="line"> <span class="keyword">const</span> core::rect< s32 > rectControls(0,0,AbsoluteRect.getWidth(),AbsoluteRect.getHeight() );</div><div class="line"> IGUIStaticText * groupElement = guiEnv->addStaticText (L<span class="stringliteral">""</span>, rectControls, <span class="keyword">true</span>, <span class="keyword">false</span>, <span class="keyword">this</span>, -1, <span class="keyword">false</span>);</div><div class="line"> groupElement->setNotClipped(<span class="keyword">true</span>);</div><div class="line"></div><div class="line"> guiEnv->addStaticText (text, core::rect<s32>(0,0,80,15), <span class="keyword">false</span>, <span class="keyword">false</span>, groupElement, -1, <span class="keyword">false</span>);</div><div class="line"></div><div class="line"> EditAlpha = addEditForNumbers(guiEnv, core::position2d<s32>(0,15), L<span class="stringliteral">"a"</span>, -1, groupElement );</div><div class="line"> EditRed = addEditForNumbers(guiEnv, core::position2d<s32>(0,30), L<span class="stringliteral">"r"</span>, -1, groupElement );</div><div class="line"> EditGreen = addEditForNumbers(guiEnv, core::position2d<s32>(0,45), L<span class="stringliteral">"g"</span>, -1, groupElement );</div><div class="line"> EditBlue = addEditForNumbers(guiEnv, core::position2d<s32>(0,60), L<span class="stringliteral">"b"</span>, -1, groupElement );</div><div class="line"></div><div class="line"> ColorStatic = guiEnv->addStaticText (L<span class="stringliteral">""</span>, core::rect<s32>(60,15,80,75), <span class="keyword">true</span>, <span class="keyword">false</span>, groupElement, -1, <span class="keyword">true</span>);</div><div class="line"></div><div class="line"> guiEnv->addButton (core::rect<s32>(60,35,80,50), groupElement, ButtonSetId, L<span class="stringliteral">"set"</span>);</div><div class="line"> SetEditsFromColor(Color);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// event receiver</span></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent &event)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( event.EventType != EET_GUI_EVENT )</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( event.GUIEvent.Caller->getID() == ButtonSetId && <span class="keyword">event</span>.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )</div><div class="line"> {</div><div class="line"> Color = GetColorFromEdits();</div><div class="line"> SetEditsFromColor(Color);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// set the color values</span></div><div class="line"> <span class="keywordtype">void</span> setColor(<span class="keyword">const</span> video::SColor& col)</div><div class="line"> {</div><div class="line"> DirtyFlag = <span class="keyword">true</span>;</div><div class="line"> Color = col;</div><div class="line"> SetEditsFromColor(Color);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// get the color values</span></div><div class="line"> <span class="keyword">const</span> video::SColor& getColor()<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> <span class="keywordflow">return</span> Color;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// To reset the dirty flag</span></div><div class="line"> <span class="keywordtype">void</span> resetDirty()</div><div class="line"> {</div><div class="line"> DirtyFlag = <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// when the color was changed the dirty flag is set</span></div><div class="line"> <span class="keywordtype">bool</span> isDirty()<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> <span class="keywordflow">return</span> DirtyFlag;</div><div class="line"> };</div><div class="line"></div><div class="line"><span class="keyword">protected</span>:</div><div class="line"></div><div class="line"> <span class="comment">// Add a staticbox for a description + an editbox so users can enter numbers</span></div><div class="line"> gui::IGUIEditBox* addEditForNumbers(gui::IGUIEnvironment* guiEnv, <span class="keyword">const</span> core::position2d<s32> & pos, <span class="keyword">const</span> <span class="keywordtype">wchar_t</span> *text, s32 <span class="keywordtype">id</span>, gui::IGUIElement * parent)</div><div class="line"> {</div><div class="line"> <span class="keyword">using namespace </span>gui;</div><div class="line"></div><div class="line"> core::rect< s32 > rect(pos, pos+core::dimension2d<s32>(10, 15));</div><div class="line"> guiEnv->addStaticText (text, rect, <span class="keyword">false</span>, <span class="keyword">false</span>, parent, -1, <span class="keyword">false</span>);</div><div class="line"> rect += core::position2d<s32>( 20, 0 );</div><div class="line"> rect.LowerRightCorner.X += 20;</div><div class="line"> gui::IGUIEditBox* edit = guiEnv->addEditBox(L<span class="stringliteral">"0"</span>, rect, <span class="keyword">true</span>, parent, <span class="keywordtype">id</span>);</div><div class="line"> <span class="keywordflow">return</span> edit;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Get the color value from the editfields</span></div><div class="line"> video::SColor GetColorFromEdits()</div><div class="line"> {</div><div class="line"> video::SColor col;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (EditAlpha)</div><div class="line"> {</div><div class="line"> u32 alpha = core::strtoul10(core::stringc(EditAlpha->getText()).c_str());</div><div class="line"> <span class="keywordflow">if</span> (alpha > 255)</div><div class="line"> alpha = 255;</div><div class="line"> col.setAlpha(alpha);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (EditRed)</div><div class="line"> {</div><div class="line"> u32 red = core::strtoul10(core::stringc(EditRed->getText()).c_str());</div><div class="line"> <span class="keywordflow">if</span> (red > 255)</div><div class="line"> red = 255;</div><div class="line"> col.setRed(red);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (EditGreen)</div><div class="line"> {</div><div class="line"> u32 green = core::strtoul10(core::stringc(EditGreen->getText()).c_str());</div><div class="line"> <span class="keywordflow">if</span> (green > 255)</div><div class="line"> green = 255;</div><div class="line"> col.setGreen(green);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (EditBlue)</div><div class="line"> {</div><div class="line"> u32 blue = core::strtoul10(core::stringc(EditBlue->getText()).c_str());</div><div class="line"> <span class="keywordflow">if</span> (blue > 255)</div><div class="line"> blue = 255;</div><div class="line"> col.setBlue(blue);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> col;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Fill the editfields with the value for the given color</span></div><div class="line"> <span class="keywordtype">void</span> SetEditsFromColor(video::SColor col)</div><div class="line"> {</div><div class="line"> DirtyFlag = <span class="keyword">true</span>;</div><div class="line"> <span class="keywordflow">if</span> ( EditAlpha )</div><div class="line"> EditAlpha->setText( core::stringw(col.getAlpha()).c_str() );</div><div class="line"> <span class="keywordflow">if</span> ( EditRed )</div><div class="line"> EditRed->setText( core::stringw(col.getRed()).c_str() );</div><div class="line"> <span class="keywordflow">if</span> ( EditGreen )</div><div class="line"> EditGreen->setText( core::stringw(col.getGreen()).c_str() );</div><div class="line"> <span class="keywordflow">if</span> ( EditBlue )</div><div class="line"> EditBlue->setText( core::stringw(col.getBlue()).c_str() );</div><div class="line"> <span class="keywordflow">if</span> ( ColorStatic )</div><div class="line"> ColorStatic->setBackgroundColor(col);</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"></div><div class="line"> <span class="keywordtype">bool</span> DirtyFlag;</div><div class="line"> video::SColor Color;</div><div class="line"> s32 ButtonSetId;</div><div class="line"> gui::IGUIStaticText * ColorStatic;</div><div class="line"> gui::IGUIEditBox * EditAlpha;</div><div class="line"> gui::IGUIEditBox * EditRed;</div><div class="line"> gui::IGUIEditBox * EditGreen;</div><div class="line"> gui::IGUIEditBox * EditBlue;</div><div class="line">};</div></div><!-- fragment --><p> Custom GUI-control for to edit all colors typically used in materials and lights </p><div class="fragment"><div class="line"><span class="keyword">class </span>CAllColorsControl : <span class="keyword">public</span> gui::IGUIElement</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"> <span class="comment">// Constructor</span></div><div class="line"> CAllColorsControl(gui::IGUIEnvironment* guiEnv, <span class="keyword">const</span> core::position2d<s32> & pos, <span class="keyword">const</span> <span class="keywordtype">wchar_t</span> * description, <span class="keywordtype">bool</span> hasEmissive, IGUIElement* parent, s32 <span class="keywordtype">id</span>=-1)</div><div class="line"> : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect<s32>(pos,pos+core::dimension2d<s32>(60,250)))</div><div class="line"> , ControlAmbientColor(0), ControlDiffuseColor(0), ControlSpecularColor(0), ControlEmissiveColor(0)</div><div class="line"> {</div><div class="line"> core::rect<s32> rect(0, 0, 60, 15);</div><div class="line"> guiEnv->addStaticText (description, rect, <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">this</span>, -1, <span class="keyword">false</span>);</div><div class="line"> createColorControls(guiEnv, core::position2d<s32>(0, 15), hasEmissive);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Destructor</span></div><div class="line"> <span class="keyword">virtual</span> ~CAllColorsControl()</div><div class="line"> {</div><div class="line"> ControlAmbientColor->drop();</div><div class="line"> ControlDiffuseColor->drop();</div><div class="line"> <span class="keywordflow">if</span> ( ControlEmissiveColor )</div><div class="line"> ControlEmissiveColor->drop();</div><div class="line"> ControlSpecularColor->drop();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Set the color values to those within the material</span></div><div class="line"> <span class="keywordtype">void</span> setColorsToMaterialColors(<span class="keyword">const</span> video::SMaterial & material)</div><div class="line"> {</div><div class="line"> ControlAmbientColor->setColor(material.AmbientColor);</div><div class="line"> ControlDiffuseColor->setColor(material.DiffuseColor);</div><div class="line"> ControlEmissiveColor->setColor(material.EmissiveColor);</div><div class="line"> ControlSpecularColor->setColor(material.SpecularColor);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Update all changed colors in the material</span></div><div class="line"> <span class="keywordtype">void</span> updateMaterialColors(video::SMaterial & material)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( ControlAmbientColor->isDirty() )</div><div class="line"> material.AmbientColor = ControlAmbientColor->getColor();</div><div class="line"> <span class="keywordflow">if</span> ( ControlDiffuseColor->isDirty() )</div><div class="line"> material.DiffuseColor = ControlDiffuseColor->getColor();</div><div class="line"> <span class="keywordflow">if</span> ( ControlEmissiveColor->isDirty() )</div><div class="line"> material.EmissiveColor = ControlEmissiveColor->getColor();</div><div class="line"> <span class="keywordflow">if</span> ( ControlSpecularColor->isDirty() )</div><div class="line"> material.SpecularColor = ControlSpecularColor->getColor();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Set the color values to those from the light data</span></div><div class="line"> <span class="keywordtype">void</span> setColorsToLightDataColors(<span class="keyword">const</span> video::SLight & lightData)</div><div class="line"> {</div><div class="line"> ControlAmbientColor->setColor(lightData.AmbientColor.toSColor());</div><div class="line"> ControlAmbientColor->setColor(lightData.DiffuseColor.toSColor());</div><div class="line"> ControlAmbientColor->setColor(lightData.SpecularColor.toSColor());</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Update all changed colors in the light data</span></div><div class="line"> <span class="keywordtype">void</span> updateLightColors(video::SLight & lightData)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( ControlAmbientColor->isDirty() )</div><div class="line"> lightData.AmbientColor = video::SColorf( ControlAmbientColor->getColor() );</div><div class="line"> <span class="keywordflow">if</span> ( ControlDiffuseColor->isDirty() )</div><div class="line"> lightData.DiffuseColor = video::SColorf( ControlDiffuseColor->getColor() );</div><div class="line"> <span class="keywordflow">if</span> ( ControlSpecularColor->isDirty() )</div><div class="line"> lightData.SpecularColor = video::SColorf(ControlSpecularColor->getColor() );</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// To reset the dirty flags</span></div><div class="line"> <span class="keywordtype">void</span> resetDirty()</div><div class="line"> {</div><div class="line"> ControlAmbientColor->resetDirty();</div><div class="line"> ControlDiffuseColor->resetDirty();</div><div class="line"> ControlSpecularColor->resetDirty();</div><div class="line"> <span class="keywordflow">if</span> ( ControlEmissiveColor )</div><div class="line"> ControlEmissiveColor->resetDirty();</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">protected</span>:</div><div class="line"> <span class="keywordtype">void</span> createColorControls(gui::IGUIEnvironment* guiEnv, <span class="keyword">const</span> core::position2d<s32> & pos, <span class="keywordtype">bool</span> hasEmissive)</div><div class="line"> {</div><div class="line"> ControlAmbientColor = <span class="keyword">new</span> CColorControl( guiEnv, pos, L<span class="stringliteral">"ambient"</span>, <span class="keyword">this</span>);</div><div class="line"> ControlDiffuseColor = <span class="keyword">new</span> CColorControl( guiEnv, pos + core::position2d<s32>(0, 75), L<span class="stringliteral">"diffuse"</span>, <span class="keyword">this</span> );</div><div class="line"> ControlSpecularColor = <span class="keyword">new</span> CColorControl( guiEnv, pos + core::position2d<s32>(0, 150), L<span class="stringliteral">"specular"</span>, <span class="keyword">this</span> );</div><div class="line"> <span class="keywordflow">if</span> ( hasEmissive )</div><div class="line"> {</div><div class="line"> ControlEmissiveColor = <span class="keyword">new</span> CColorControl( guiEnv, pos + core::position2d<s32>(0, 225), L<span class="stringliteral">"emissive"</span>, <span class="keyword">this</span> );</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"> CColorControl* ControlAmbientColor;</div><div class="line"> CColorControl* ControlDiffuseColor;</div><div class="line"> CColorControl* ControlSpecularColor;</div><div class="line"> CColorControl* ControlEmissiveColor;</div><div class="line">};</div></div><!-- fragment --><p> GUI-Control to offer a selection of available textures. </p><div class="fragment"><div class="line"><span class="keyword">class </span>CTextureControl : <span class="keyword">public</span> gui::IGUIElement</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"> CTextureControl(gui::IGUIEnvironment* guiEnv, video::IVideoDriver * driver, <span class="keyword">const</span> core::position2d<s32> & pos, IGUIElement* parent, s32 <span class="keywordtype">id</span>=-1)</div><div class="line"> : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect<s32>(pos,pos+core::dimension2d<s32>(100,15)))</div><div class="line"> , DirtyFlag(true), ComboTexture(0)</div><div class="line"> {</div><div class="line"> core::rect<s32> rectCombo(0, 0, AbsoluteRect.getWidth(),AbsoluteRect.getHeight());</div><div class="line"> ComboTexture = guiEnv->addComboBox (rectCombo, <span class="keyword">this</span>);</div><div class="line"> updateTextures(driver);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent &event)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( event.EventType != EET_GUI_EVENT )</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( event.GUIEvent.Caller == ComboTexture && event.GUIEvent.EventType == gui::EGET_COMBO_BOX_CHANGED )</div><div class="line"> {</div><div class="line"> DirtyFlag = <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Workaround for a problem with comboboxes.</span></div><div class="line"> <span class="comment">// We have to get in front when the combobox wants to get in front or combobox-list might be drawn below other elements.</span></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> bringToFront(IGUIElement* element)</div><div class="line"> {</div><div class="line"> <span class="keywordtype">bool</span> result = gui::IGUIElement::bringToFront(element);</div><div class="line"> <span class="keywordflow">if</span> ( Parent && element == ComboTexture )</div><div class="line"> result &= Parent->bringToFront(<span class="keyword">this</span>);</div><div class="line"> <span class="keywordflow">return</span> result;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// return selected texturename (if any, otherwise 0)</span></div><div class="line"> <span class="keyword">const</span> <span class="keywordtype">wchar_t</span> * getSelectedTextureName()<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> s32 selected = ComboTexture->getSelected();</div><div class="line"> <span class="keywordflow">if</span> ( selected < 0 )</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line"> <span class="keywordflow">return</span> ComboTexture->getItem(selected);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// reset the dirty flag</span></div><div class="line"> <span class="keywordtype">void</span> resetDirty()</div><div class="line"> {</div><div class="line"> DirtyFlag = <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// when the texture was changed the dirty flag is set</span></div><div class="line"> <span class="keywordtype">bool</span> isDirty()<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> <span class="keywordflow">return</span> DirtyFlag;</div><div class="line"> };</div><div class="line"></div><div class="line"> <span class="comment">// Put the names of all currently loaded textures in a combobox</span></div><div class="line"> <span class="keywordtype">void</span> updateTextures(video::IVideoDriver * driver)</div><div class="line"> {</div><div class="line"> s32 oldSelected = ComboTexture->getSelected();</div><div class="line"> s32 selectNew = -1;</div><div class="line"> core::stringw oldTextureName;</div><div class="line"> <span class="keywordflow">if</span> ( oldSelected >= 0 )</div><div class="line"> {</div><div class="line"> oldTextureName = ComboTexture->getItem(oldSelected);</div><div class="line"> }</div><div class="line"> ComboTexture->clear();</div><div class="line"> <span class="keywordflow">for</span> ( u32 i=0; i < driver->getTextureCount(); ++i )</div><div class="line"> {</div><div class="line"> video::ITexture * texture = driver->getTextureByIndex(i);</div><div class="line"> core::stringw name( texture->getName() );</div><div class="line"> ComboTexture->addItem( name.c_str() );</div><div class="line"> <span class="keywordflow">if</span> ( !oldTextureName.empty() && selectNew < 0 && name == oldTextureName )</div><div class="line"> selectNew = i;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// add another name which can be used to clear the texture</span></div><div class="line"> ComboTexture->addItem( CLEAR_TEXTURE.c_str() );</div><div class="line"> <span class="keywordflow">if</span> ( CLEAR_TEXTURE == oldTextureName )</div><div class="line"> selectNew = ComboTexture->getItemCount()-1;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( selectNew >= 0 )</div><div class="line"> ComboTexture->setSelected(selectNew);</div><div class="line"></div><div class="line"> DirtyFlag = <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"> <span class="keywordtype">bool</span> DirtyFlag;</div><div class="line"> gui::IGUIComboBox * ComboTexture;</div><div class="line">};</div></div><!-- fragment --><p> Control which allows setting some of the material values for a meshscenenode </p><div class="fragment"><div class="line"><span class="keyword">struct </span>SMeshNodeControl</div><div class="line">{</div><div class="line"> <span class="comment">// constructor</span></div><div class="line"> SMeshNodeControl()</div><div class="line"> : Initialized(false), Driver(0), MeshManipulator(0), SceneNode(0), SceneNode2T(0), SceneNodeTangents(0)</div><div class="line"> , AllColorsControl(0), ButtonLighting(0), InfoLighting(0), ComboMaterial(0), TextureControl1(0), TextureControl2(0), ControlVertexColors(0)</div><div class="line"> {</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Destructor</span></div><div class="line"> <span class="keyword">virtual</span> ~SMeshNodeControl()</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( TextureControl1 )</div><div class="line"> TextureControl1->drop();</div><div class="line"> <span class="keywordflow">if</span> ( TextureControl2 )</div><div class="line"> TextureControl2->drop();</div><div class="line"> <span class="keywordflow">if</span> ( ControlVertexColors )</div><div class="line"> ControlVertexColors->drop();</div><div class="line"> <span class="keywordflow">if</span> ( AllColorsControl )</div><div class="line"> AllColorsControl->drop();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> init(scene::IMeshSceneNode* node, IrrlichtDevice * device, <span class="keyword">const</span> core::position2d<s32> & pos, <span class="keyword">const</span> <span class="keywordtype">wchar_t</span> * description)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( Initialized || !node || !device) <span class="comment">// initializing twice or with invalid data not allowed</span></div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"></div><div class="line"> Driver = device->getVideoDriver ();</div><div class="line"> gui::IGUIEnvironment* guiEnv = device->getGUIEnvironment();</div><div class="line"> scene::ISceneManager* smgr = device->getSceneManager();</div><div class="line"> MeshManipulator = smgr->getMeshManipulator();</div><div class="line"></div><div class="line"> SceneNode = node;</div><div class="line"> scene::IMeshManipulator * meshManip = smgr->getMeshManipulator();</div><div class="line"></div><div class="line"> scene::IMesh * mesh2T = meshManip->createMeshWith2TCoords(node->getMesh());</div><div class="line"> SceneNode2T = smgr->addMeshSceneNode(mesh2T, 0, -1, SceneNode->getPosition(), SceneNode->getRotation(), SceneNode->getScale() );</div><div class="line"> mesh2T->drop();</div><div class="line"></div><div class="line"> scene::IMesh * meshTangents = meshManip->createMeshWithTangents(node->getMesh(), <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">false</span>);</div><div class="line"> SceneNodeTangents = smgr->addMeshSceneNode(meshTangents, 0, -1</div><div class="line"> , SceneNode->getPosition(), SceneNode->getRotation(), SceneNode->getScale() );</div><div class="line"> meshTangents->drop();</div><div class="line"></div><div class="line"> video::SMaterial & material = SceneNode->getMaterial(0);</div><div class="line"> material.Lighting = <span class="keyword">true</span>;</div><div class="line"> AllColorsControl = <span class="keyword">new</span> CAllColorsControl(guiEnv, pos, description, <span class="keyword">true</span>, guiEnv->getRootGUIElement());</div><div class="line"> AllColorsControl->setColorsToMaterialColors(material);</div><div class="line"></div><div class="line"> core::rect<s32> rectBtn(pos + core::position2d<s32>(0, 320), core::dimension2d<s32>(60, 15));</div><div class="line"> ButtonLighting = guiEnv->addButton (rectBtn, 0, -1, L<span class="stringliteral">"Lighting"</span>);</div><div class="line"> ButtonLighting->setIsPushButton(<span class="keyword">true</span>);</div><div class="line"> ButtonLighting->setPressed(material.Lighting);</div><div class="line"> core::rect<s32> rectInfo( rectBtn.LowerRightCorner.X, rectBtn.UpperLeftCorner.Y, rectBtn.LowerRightCorner.X+40, rectBtn.UpperLeftCorner.Y+15 );</div><div class="line"> InfoLighting = guiEnv->addStaticText(L<span class="stringliteral">""</span>, rectInfo, <span class="keyword">true</span>, <span class="keyword">false</span> );</div><div class="line"> InfoLighting->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_CENTER );</div><div class="line"></div><div class="line"> core::rect<s32> rectCombo(pos.X, rectBtn.LowerRightCorner.Y, pos.X+100, rectBtn.LowerRightCorner.Y+15);</div><div class="line"> ComboMaterial = guiEnv->addComboBox (rectCombo);</div><div class="line"> <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0; i <= (int)video::EMT_ONETEXTURE_BLEND; ++i )</div><div class="line"> {</div><div class="line"> ComboMaterial->addItem( core::stringw(video::sBuiltInMaterialTypeNames[i]).c_str() );</div><div class="line"> }</div><div class="line"> ComboMaterial->setSelected( (s32)material.MaterialType );</div><div class="line"></div><div class="line"> core::position2d<s32> posTex(rectCombo.UpperLeftCorner.X,rectCombo.LowerRightCorner.Y);</div><div class="line"> TextureControl1 = <span class="keyword">new</span> CTextureControl(guiEnv, Driver, posTex, guiEnv->getRootGUIElement());</div><div class="line"> posTex.Y += 15;</div><div class="line"> TextureControl2 = <span class="keyword">new</span> CTextureControl(guiEnv, Driver, posTex, guiEnv->getRootGUIElement());</div><div class="line"></div><div class="line"> core::position2d<s32> posVertexColors( posTex.X, posTex.Y + 15);</div><div class="line"> ControlVertexColors = <span class="keyword">new</span> CColorControl( guiEnv, posVertexColors, L<span class="stringliteral">"Vertex colors"</span>, guiEnv->getRootGUIElement());</div><div class="line"></div><div class="line"> video::S3DVertex * vertices = (video::S3DVertex *)node->getMesh()->getMeshBuffer(0)->getVertices();</div><div class="line"> <span class="keywordflow">if</span> ( vertices )</div><div class="line"> {</div><div class="line"> ControlVertexColors->setColor(vertices[0].Color);</div><div class="line"> }</div><div class="line"></div><div class="line"> Initialized = <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> update()</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( !Initialized )</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"></div><div class="line"> video::SMaterial & material = SceneNode->getMaterial(0);</div><div class="line"> video::SMaterial & material2T = SceneNode2T->getMaterial(0);</div><div class="line"> video::SMaterial & materialTangents = SceneNodeTangents->getMaterial(0);</div><div class="line"></div><div class="line"> s32 selectedMaterial = ComboMaterial->getSelected();</div><div class="line"> <span class="keywordflow">if</span> ( selectedMaterial >= (s32)video::EMT_SOLID && selectedMaterial <= (s32)video::EMT_ONETEXTURE_BLEND)</div><div class="line"> {</div><div class="line"> video::E_VERTEX_TYPE vertexType = getVertexTypeForMaterialType((video::E_MATERIAL_TYPE)selectedMaterial);</div><div class="line"> <span class="keywordflow">switch</span> ( vertexType )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> video::EVT_STANDARD:</div><div class="line"> material.MaterialType = (video::E_MATERIAL_TYPE)selectedMaterial;</div><div class="line"> SceneNode->setVisible(<span class="keyword">true</span>);</div><div class="line"> SceneNode2T->setVisible(<span class="keyword">false</span>);</div><div class="line"> SceneNodeTangents->setVisible(<span class="keyword">false</span>);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> video::EVT_2TCOORDS:</div><div class="line"> material2T.MaterialType = (video::E_MATERIAL_TYPE)selectedMaterial;</div><div class="line"> SceneNode->setVisible(<span class="keyword">false</span>);</div><div class="line"> SceneNode2T->setVisible(<span class="keyword">true</span>);</div><div class="line"> SceneNodeTangents->setVisible(<span class="keyword">false</span>);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> video::EVT_TANGENTS:</div><div class="line"> materialTangents.MaterialType = (video::E_MATERIAL_TYPE)selectedMaterial;</div><div class="line"> SceneNode->setVisible(<span class="keyword">false</span>);</div><div class="line"> SceneNode2T->setVisible(<span class="keyword">false</span>);</div><div class="line"> SceneNodeTangents->setVisible(<span class="keyword">true</span>);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> updateMaterial(material);</div><div class="line"> updateMaterial(material2T);</div><div class="line"> updateMaterial(materialTangents);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( ButtonLighting->isPressed() )</div><div class="line"> InfoLighting->setText(L<span class="stringliteral">"on"</span>);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> InfoLighting->setText(L<span class="stringliteral">"off"</span>);</div><div class="line"></div><div class="line"> AllColorsControl->resetDirty();</div><div class="line"> TextureControl1->resetDirty();</div><div class="line"> TextureControl2->resetDirty();</div><div class="line"> ControlVertexColors->resetDirty();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> updateTextures()</div><div class="line"> {</div><div class="line"> TextureControl1->updateTextures(Driver);</div><div class="line"> TextureControl2->updateTextures(Driver);</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">protected</span>:</div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> updateMaterial(video::SMaterial & material)</div><div class="line"> {</div><div class="line"> AllColorsControl->updateMaterialColors(material);</div><div class="line"> material.Lighting = ButtonLighting->isPressed();</div><div class="line"> <span class="keywordflow">if</span> ( TextureControl1->isDirty() )</div><div class="line"> {</div><div class="line"> material.TextureLayer[0].Texture = Driver->getTexture( io::path(TextureControl1->getSelectedTextureName()) );</div><div class="line"> }</div><div class="line"> <span class="keywordflow">if</span> ( TextureControl2->isDirty() )</div><div class="line"> {</div><div class="line"> material.TextureLayer[1].Texture = Driver->getTexture( io::path(TextureControl2->getSelectedTextureName()) );</div><div class="line"> }</div><div class="line"> <span class="keywordflow">if</span> ( ControlVertexColors->isDirty() )</div><div class="line"> {</div><div class="line"> MeshManipulator->setVertexColors (SceneNode->getMesh(), ControlVertexColors->getColor());</div><div class="line"> MeshManipulator->setVertexColors (SceneNode2T->getMesh(), ControlVertexColors->getColor());</div><div class="line"> MeshManipulator->setVertexColors (SceneNodeTangents->getMesh(), ControlVertexColors->getColor());</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordtype">bool</span> Initialized;</div><div class="line"> video::IVideoDriver * Driver;</div><div class="line"> scene::IMeshManipulator* MeshManipulator;</div><div class="line"> scene::IMeshSceneNode* SceneNode;</div><div class="line"> scene::IMeshSceneNode* SceneNode2T;</div><div class="line"> scene::IMeshSceneNode* SceneNodeTangents;</div><div class="line"> CAllColorsControl* AllColorsControl;</div><div class="line"> gui::IGUIButton * ButtonLighting;</div><div class="line"> gui::IGUIStaticText* InfoLighting;</div><div class="line"> gui::IGUIComboBox * ComboMaterial;</div><div class="line"> CTextureControl* TextureControl1;</div><div class="line"> CTextureControl* TextureControl2;</div><div class="line"> CColorControl* ControlVertexColors;</div><div class="line">};</div></div><!-- fragment --><p> Control to allow setting the color values of a lightscenenode. </p><div class="fragment"><div class="line"><span class="keyword">struct </span>SLightNodeControl</div><div class="line">{</div><div class="line"> <span class="comment">// constructor</span></div><div class="line"> SLightNodeControl() : Initialized(false), SceneNode(0), AllColorsControl(0)</div><div class="line"> {</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> ~SLightNodeControl()</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( AllColorsControl )</div><div class="line"> AllColorsControl->drop();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> init(scene::ILightSceneNode* node, gui::IGUIEnvironment* guiEnv, <span class="keyword">const</span> core::position2d<s32> & pos, <span class="keyword">const</span> <span class="keywordtype">wchar_t</span> * description)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( Initialized || !node || !guiEnv) <span class="comment">// initializing twice or with invalid data not allowed</span></div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"> SceneNode = node;</div><div class="line"> AllColorsControl = <span class="keyword">new</span> CAllColorsControl(guiEnv, pos, description, <span class="keyword">false</span>, guiEnv->getRootGUIElement());</div><div class="line"> <span class="keyword">const</span> video::SLight & lightData = SceneNode->getLightData();</div><div class="line"> AllColorsControl->setColorsToLightDataColors(lightData);</div><div class="line"> Initialized = <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> update()</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( !Initialized )</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"></div><div class="line"> video::SLight & lightData = SceneNode->getLightData();</div><div class="line"> AllColorsControl->updateLightColors(lightData);</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">protected</span>:</div><div class="line"> <span class="keywordtype">bool</span> Initialized;</div><div class="line"> scene::ILightSceneNode* SceneNode;</div><div class="line"> CAllColorsControl* AllColorsControl;</div><div class="line">};</div></div><!-- fragment --><p> Application configuration </p><div class="fragment"><div class="line"><span class="keyword">struct </span>SConfig</div><div class="line">{</div><div class="line"> SConfig()</div><div class="line"> : RenderInBackground(true)</div><div class="line"> , DriverType(video::EDT_BURNINGSVIDEO)</div><div class="line"> , ScreenSize(640, 480)</div><div class="line"> {</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordtype">bool</span> RenderInBackground;</div><div class="line"> video::E_DRIVER_TYPE DriverType;</div><div class="line"> core::dimension2d<u32> ScreenSize;</div><div class="line">};</div></div><!-- fragment --><p> Main application class </p><div class="fragment"><div class="line"><span class="keyword">class </span>CApp : <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"> <span class="keyword">friend</span> <span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[]);</div><div class="line"></div><div class="line"><span class="keyword">public</span>:</div><div class="line"> <span class="comment">// constructor</span></div><div class="line"> CApp()</div><div class="line"> : IsRunning(false)</div><div class="line"> , Device(0)</div><div class="line"> , Camera(0)</div><div class="line"> , GlobalAmbient(0)</div><div class="line"> {</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// destructor</span></div><div class="line"> ~CApp()</div><div class="line"> {</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// stop running - will quit at end of mainloop</span></div><div class="line"> <span class="keywordtype">void</span> stopApp()</div><div class="line"> {</div><div class="line"> IsRunning = <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Event handler</span></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent &event)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (event.EventType == EET_GUI_EVENT)</div><div class="line"> {</div><div class="line"> gui::IGUIEnvironment* env = Device->getGUIEnvironment();</div><div class="line"></div><div class="line"> <span class="keywordflow">switch</span>(event.GUIEvent.EventType)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> gui::EGET_MENU_ITEM_SELECTED:</div><div class="line"> {</div><div class="line"> gui::IGUIContextMenu* menu = (gui::IGUIContextMenu*)event.GUIEvent.Caller;</div><div class="line"> s32 <span class="keywordtype">id</span> = menu->getItemCommandId(menu->getSelectedItem());</div><div class="line"></div><div class="line"> <span class="keywordflow">switch</span>(<span class="keywordtype">id</span>)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_OPEN_TEXTURE: <span class="comment">// File -> Open Texture</span></div><div class="line"> env->addFileOpenDialog(L<span class="stringliteral">"Please select a texture file to open"</span>);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GUI_ID_QUIT: <span class="comment">// File -> Quit</span></div><div class="line"> stopApp();</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">case</span> gui::EGET_FILE_SELECTED:</div><div class="line"> {</div><div class="line"> <span class="comment">// load the model file, selected in the file open dialog</span></div><div class="line"> gui::IGUIFileOpenDialog* dialog =</div><div class="line"> (gui::IGUIFileOpenDialog*)event.GUIEvent.Caller;</div><div class="line"> loadTexture(io::path(dialog->getFileName()).c_str());</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">default</span>:</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">protected</span>:</div><div class="line"></div><div class="line"> <span class="comment">// Application initialization</span></div><div class="line"> <span class="comment">// returns true when it was successful initialized, otherwise false.</span></div><div class="line"> <span class="keywordtype">bool</span> init(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[])</div><div class="line"> {</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> Config.DriverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (Config.DriverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"></div><div class="line"> <span class="comment">// create the device with the settings from our config</span></div><div class="line"> Device = createDevice(Config.DriverType, Config.ScreenSize);</div><div class="line"> <span class="keywordflow">if</span> (!Device)</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> Device->setWindowCaption( DriverTypeNames[Config.DriverType] );</div><div class="line"> Device->setEventReceiver(<span class="keyword">this</span>);</div><div class="line"></div><div class="line"> scene::ISceneManager* smgr = Device->getSceneManager();</div><div class="line"> video::IVideoDriver * driver = Device->getVideoDriver ();</div><div class="line"> gui::IGUIEnvironment* guiEnv = Device->getGUIEnvironment();</div><div class="line"></div><div class="line"> <span class="comment">// set a nicer font</span></div><div class="line"> gui::IGUISkin* skin = guiEnv->getSkin();</div><div class="line"> gui::IGUIFont* font = guiEnv->getFont(<span class="stringliteral">"../../media/fonthaettenschweiler.bmp"</span>);</div><div class="line"> <span class="keywordflow">if</span> (font)</div><div class="line"> skin->setFont(font);</div><div class="line"></div><div class="line"> <span class="comment">// remove some alpha value because it makes those menus harder to read otherwise</span></div><div class="line"> video::SColor col3dHighLight( skin->getColor(gui::EGDC_APP_WORKSPACE) );</div><div class="line"> col3dHighLight.setAlpha(255);</div><div class="line"> video::SColor colHighLight( col3dHighLight );</div><div class="line"> skin->setColor(gui::EGDC_HIGH_LIGHT, colHighLight );</div><div class="line"> skin->setColor(gui::EGDC_3D_HIGH_LIGHT, col3dHighLight );</div><div class="line"></div><div class="line"> <span class="comment">// Add some textures which are useful to test material settings</span></div><div class="line"> createDefaultTextures(driver);</div><div class="line"></div><div class="line"> <span class="comment">// create a menu</span></div><div class="line"> gui::IGUIContextMenu * menuBar = guiEnv->addMenu();</div><div class="line"> menuBar->addItem(L<span class="stringliteral">"File"</span>, -1, <span class="keyword">true</span>, <span class="keyword">true</span>);</div><div class="line"></div><div class="line"> gui::IGUIContextMenu* subMenuFile = menuBar->getSubMenu(0);</div><div class="line"> subMenuFile->addItem(L<span class="stringliteral">"Open texture ..."</span>, GUI_ID_OPEN_TEXTURE);</div><div class="line"> subMenuFile->addSeparator();</div><div class="line"> subMenuFile->addItem(L<span class="stringliteral">"Quit"</span>, GUI_ID_QUIT);</div><div class="line"></div><div class="line"> <span class="comment">// a static camera</span></div><div class="line"> Camera = smgr->addCameraSceneNode (0, core::vector3df(0, 0, 0),</div><div class="line"> core::vector3df(0, 0, 100),</div><div class="line"> -1);</div><div class="line"></div><div class="line"> <span class="comment">// add the nodes which are used to show the materials</span></div><div class="line"> scene::IMeshSceneNode* nodeL = smgr->addCubeSceneNode (30.0f, 0, -1,</div><div class="line"> core::vector3df(-35, 0, 100),</div><div class="line"> core::vector3df(0, 0, 0),</div><div class="line"> core::vector3df(1.0f, 1.0f, 1.0f));</div><div class="line"> NodeLeft.init( nodeL, Device, core::position2d<s32>(10,20), L<span class="stringliteral">"left node"</span> );</div><div class="line"></div><div class="line"> scene::IMeshSceneNode* nodeR = smgr->addCubeSceneNode (30.0f, 0, -1,</div><div class="line"> core::vector3df(35, 0, 100),</div><div class="line"> core::vector3df(0, 0, 0),</div><div class="line"> core::vector3df(1.0f, 1.0f, 1.0f));</div><div class="line"> NodeRight.init( nodeR, Device, core::position2d<s32>(530,20), L<span class="stringliteral">"right node"</span> );</div><div class="line"></div><div class="line"> <span class="comment">// add one light</span></div><div class="line"> scene::ILightSceneNode* nodeLight = smgr->addLightSceneNode(0, core::vector3df(0, 0, 0),</div><div class="line"> video::SColorf(1.0f, 1.0f, 1.0f),</div><div class="line"> 100.0f);</div><div class="line"> LightControl.init(nodeLight, guiEnv, core::position2d<s32>(270,20), L<span class="stringliteral">"light"</span> );</div><div class="line"></div><div class="line"> <span class="comment">// one large cube around everything. That's mainly to make the light more obvious.</span></div><div class="line"> scene::IMeshSceneNode* backgroundCube = smgr->addCubeSceneNode (200.0f, 0, -1, core::vector3df(0, 0, 0),</div><div class="line"> core::vector3df(45, 0, 0),</div><div class="line"> core::vector3df(1.0f, 1.0f, 1.0f));</div><div class="line"> backgroundCube->getMaterial(0).BackfaceCulling = <span class="keyword">false</span>; <span class="comment">// we are within the cube, so we have to disable backface culling to see it</span></div><div class="line"> backgroundCube->getMaterial(0).EmissiveColor.set(255,50,50,50); <span class="comment">// we keep some self lighting to keep texts visible</span></div><div class="line"></div><div class="line"> <span class="comment">// set the ambient light value</span></div><div class="line"> GlobalAmbient = <span class="keyword">new</span> CColorControl( guiEnv, core::position2d<s32>(270, 300), L<span class="stringliteral">"global ambient"</span>, guiEnv->getRootGUIElement());</div><div class="line"> GlobalAmbient->setColor( smgr->getAmbientLight().toSColor() );</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Update one frame</span></div><div class="line"> <span class="keywordtype">bool</span> update()</div><div class="line"> {</div><div class="line"> <span class="keyword">using namespace </span>irr;</div><div class="line"></div><div class="line"> video::IVideoDriver* videoDriver = Device->getVideoDriver();</div><div class="line"> <span class="keywordflow">if</span> ( !Device->run() )</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( Device->isWindowActive() || Config.RenderInBackground )</div><div class="line"> {</div><div class="line"> gui::IGUIEnvironment* guiEnv = Device->getGUIEnvironment();</div><div class="line"> scene::ISceneManager* smgr = Device->getSceneManager();</div><div class="line"> gui::IGUISkin * skin = guiEnv->getSkin();</div><div class="line"></div><div class="line"> <span class="comment">// update our controls</span></div><div class="line"> NodeLeft.update();</div><div class="line"> NodeRight.update();</div><div class="line"> LightControl.update();</div><div class="line"></div><div class="line"> <span class="comment">// update ambient light settings</span></div><div class="line"> <span class="keywordflow">if</span> ( GlobalAmbient->isDirty() )</div><div class="line"> {</div><div class="line"> smgr->setAmbientLight( GlobalAmbient->getColor() );</div><div class="line"> GlobalAmbient->resetDirty();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// draw everything</span></div><div class="line"> video::SColor bkColor( skin->getColor(gui::EGDC_APP_WORKSPACE) );</div><div class="line"> videoDriver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, bkColor);</div><div class="line"></div><div class="line"> smgr->drawAll();</div><div class="line"> guiEnv->drawAll();</div><div class="line"></div><div class="line"> videoDriver->endScene();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Run the application. Our main loop.</span></div><div class="line"> <span class="keywordtype">void</span> run()</div><div class="line"> {</div><div class="line"> IsRunning = <span class="keyword">true</span>;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( !Device )</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"></div><div class="line"> <span class="comment">// main application loop</span></div><div class="line"> <span class="keywordflow">while</span>(IsRunning)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( !update() )</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> Device->sleep( 5 );</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Close down the application</span></div><div class="line"> <span class="keywordtype">void</span> quit()</div><div class="line"> {</div><div class="line"> IsRunning = <span class="keyword">false</span>;</div><div class="line"> GlobalAmbient->drop();</div><div class="line"> GlobalAmbient = NULL;</div><div class="line"> <span class="keywordflow">if</span> ( Device )</div><div class="line"> {</div><div class="line"> Device->closeDevice();</div><div class="line"> Device->drop();</div><div class="line"> Device = NULL;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Create some useful textures.</span></div><div class="line"> <span class="comment">// Note that the function put readability over speed, you shouldn't use setPixel at runtime but for initialization it's nice.</span></div><div class="line"> <span class="keywordtype">void</span> createDefaultTextures(video::IVideoDriver * driver)</div><div class="line"> {</div><div class="line"> <span class="keyword">const</span> u32 width = 256;</div><div class="line"> <span class="keyword">const</span> u32 height = 256;</div><div class="line"> video::IImage * imageA8R8G8B8 = driver->createImage (video::ECF_A8R8G8B8, core::dimension2d<u32>(width, height));</div><div class="line"> <span class="keywordflow">if</span> ( !imageA8R8G8B8 )</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"> <span class="keyword">const</span> u32 pitch = imageA8R8G8B8->getPitch();</div><div class="line"></div><div class="line"> <span class="comment">// some nice square-pattern with 9 typical colors</span></div><div class="line"> <span class="keywordflow">for</span> ( u32 y = 0; y < height; ++ y )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">for</span> ( u32 x = 0; x < pitch; ++x )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( y < height/3 )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( x < width/3 )</div><div class="line"> imageA8R8G8B8->setPixel (x, y, SCOL_BLACK);</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( x < 2*width/3 )</div><div class="line"> imageA8R8G8B8->setPixel (x, y, SCOL_BLUE);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> imageA8R8G8B8->setPixel (x, y, SCOL_CYAN);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( y < 2*height/3 )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( x < width/3 )</div><div class="line"> imageA8R8G8B8->setPixel (x, y, SCOL_GRAY);</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( x < 2*width/3 )</div><div class="line"> imageA8R8G8B8->setPixel (x, y, SCOL_GREEN);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> imageA8R8G8B8->setPixel (x, y, SCOL_MAGENTA);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( x < width/3 )</div><div class="line"> imageA8R8G8B8->setPixel (x, y, SCOL_RED);</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( x < 2*width/3 )</div><div class="line"> imageA8R8G8B8->setPixel (x, y, SCOL_YELLOW);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> imageA8R8G8B8->setPixel (x, y, SCOL_WHITE);</div><div class="line"> }</div><div class="line"> }</div><div class="line"> }</div><div class="line"> driver->addTexture (io::path(<span class="stringliteral">"CARO_A8R8G8B8"</span>), imageA8R8G8B8);</div><div class="line"></div><div class="line"> <span class="comment">// all white</span></div><div class="line"> imageA8R8G8B8->fill(SCOL_WHITE);</div><div class="line"> driver->addTexture (io::path(<span class="stringliteral">"WHITE_A8R8G8B8"</span>), imageA8R8G8B8);</div><div class="line"></div><div class="line"> <span class="comment">// all black</span></div><div class="line"> imageA8R8G8B8->fill(SCOL_BLACK);</div><div class="line"> driver->addTexture (io::path(<span class="stringliteral">"BLACK_A8R8G8B8"</span>), imageA8R8G8B8);</div><div class="line"></div><div class="line"> <span class="comment">// gray-scale</span></div><div class="line"> <span class="keywordflow">for</span> ( u32 y = 0; y < height; ++ y )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">for</span> ( u32 x = 0; x < pitch; ++x )</div><div class="line"> {</div><div class="line"> imageA8R8G8B8->setPixel (x, y, video::SColor(y, x,x,x) );</div><div class="line"> }</div><div class="line"> }</div><div class="line"> driver->addTexture (io::path(<span class="stringliteral">"GRAYSCALE_A8R8G8B8"</span>), imageA8R8G8B8);</div><div class="line"></div><div class="line"> imageA8R8G8B8->drop();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Load a texture and make sure nodes know it when more textures are available.</span></div><div class="line"> <span class="keywordtype">void</span> loadTexture(<span class="keyword">const</span> io::path &name)</div><div class="line"> {</div><div class="line"> Device->getVideoDriver()->getTexture(name);</div><div class="line"> NodeLeft.updateTextures();</div><div class="line"> NodeRight.updateTextures();</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"> SConfig Config;</div><div class="line"> <span class="keyword">volatile</span> <span class="keywordtype">bool</span> IsRunning;</div><div class="line"> IrrlichtDevice * Device;</div><div class="line"> scene::ICameraSceneNode * Camera;</div><div class="line"> SMeshNodeControl NodeLeft;</div><div class="line"> SMeshNodeControl NodeRight;</div><div class="line"> SLightNodeControl LightControl;</div><div class="line"> CColorControl * GlobalAmbient;</div><div class="line">};</div></div><!-- fragment --><p> A very short main as we do everything else in classes. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[])</div><div class="line">{</div><div class="line"> CApp APP;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> ( !APP.init(argc, argv) )</div><div class="line"> {</div><div class="line"> printf(<span class="stringliteral">"init failed\n"</span>);</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"> }</div><div class="line"></div><div class="line"> APP.run();</div><div class="line"> APP.quit();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/23.SMeshHandling/Makefile b/examples/23.SMeshHandling/Makefile new file mode 100644 index 0000000..eab5060 --- /dev/null +++ b/examples/23.SMeshHandling/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 23.SMeshHandling
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/23.SMeshHandling/SMeshHandling.cbp b/examples/23.SMeshHandling/SMeshHandling.cbp new file mode 100644 index 0000000..920efac --- /dev/null +++ b/examples/23.SMeshHandling/SMeshHandling.cbp @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 23 SMeshHandling" /> + <Option pch_mode="2" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/SMeshHandling" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/SMeshHandling" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <Compiler> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <envvars /> + <debugger /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/23.SMeshHandling/SMeshHandling.dev b/examples/23.SMeshHandling/SMeshHandling.dev new file mode 100644 index 0000000..94043f3 --- /dev/null +++ b/examples/23.SMeshHandling/SMeshHandling.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 23 SMeshHandling
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=23.SMeshHandling.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/23.SMeshHandling/SMeshHandling.vcproj b/examples/23.SMeshHandling/SMeshHandling.vcproj new file mode 100644 index 0000000..a63d583 --- /dev/null +++ b/examples/23.SMeshHandling/SMeshHandling.vcproj @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="23.SMeshHandling"
+ ProjectGUID="{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/SMeshHandling.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/QIfist /Oa"
+ Optimization="3"
+ GlobalOptimizations="TRUE"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="TRUE"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="TRUE"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="4"
+ BufferSecurityCheck="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"
+ CallingConvention="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="FALSE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/23.SMeshHandling/SMeshHandling_vc10.vcxproj b/examples/23.SMeshHandling/SMeshHandling_vc10.vcxproj new file mode 100644 index 0000000..83332f4 --- /dev/null +++ b/examples/23.SMeshHandling/SMeshHandling_vc10.vcxproj @@ -0,0 +1,192 @@ +ďťż<?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">
+ <ProjectName>23.SMeshHandling</ProjectName>
+ <ProjectGuid>{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}</ProjectGuid>
+ <RootNamespace>23.SMeshHandling</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)SMeshHandling.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\23.SMeshHandling.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)SMeshHandling.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\23.SMeshHandling.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/23.SMeshHandling/SMeshHandling_vc11.vcxproj b/examples/23.SMeshHandling/SMeshHandling_vc11.vcxproj new file mode 100644 index 0000000..83332f4 --- /dev/null +++ b/examples/23.SMeshHandling/SMeshHandling_vc11.vcxproj @@ -0,0 +1,192 @@ +ďťż<?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">
+ <ProjectName>23.SMeshHandling</ProjectName>
+ <ProjectGuid>{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}</ProjectGuid>
+ <RootNamespace>23.SMeshHandling</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)SMeshHandling.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\23.SMeshHandling.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)SMeshHandling.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\23.SMeshHandling.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/23.SMeshHandling/SMeshHandling_vc12.vcxproj b/examples/23.SMeshHandling/SMeshHandling_vc12.vcxproj new file mode 100644 index 0000000..46b2382 --- /dev/null +++ b/examples/23.SMeshHandling/SMeshHandling_vc12.vcxproj @@ -0,0 +1,192 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>23.SMeshHandling</ProjectName>
+ <ProjectGuid>{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}</ProjectGuid>
+ <RootNamespace>23.SMeshHandling</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)SMeshHandling.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\23.SMeshHandling.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)SMeshHandling.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\23.SMeshHandling.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/23.SMeshHandling/SMeshHandling_vc8.vcproj b/examples/23.SMeshHandling/SMeshHandling_vc8.vcproj new file mode 100644 index 0000000..ecc9135 --- /dev/null +++ b/examples/23.SMeshHandling/SMeshHandling_vc8.vcproj @@ -0,0 +1,190 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="23.SMeshHandling_vc8"
+ ProjectGUID="{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <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"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/SMeshHandling.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ CallingConvention="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/23.SMeshHandling/SMeshHandling_vc9.vcproj b/examples/23.SMeshHandling/SMeshHandling_vc9.vcproj new file mode 100644 index 0000000..b1b921e --- /dev/null +++ b/examples/23.SMeshHandling/SMeshHandling_vc9.vcproj @@ -0,0 +1,187 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="23.SMeshHandling_vc9"
+ ProjectGUID="{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}"
+ RootNamespace="23.SMeshHandling_vc9"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <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"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/SMeshHandling.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ ExceptionHandling="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="0"
+ CallingConvention="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/23.SMeshHandling/main.cpp b/examples/23.SMeshHandling/main.cpp new file mode 100644 index 0000000..c3c2ccf --- /dev/null +++ b/examples/23.SMeshHandling/main.cpp @@ -0,0 +1,426 @@ +/** Example 023 SMeshBufferHandling
+
+A tutorial by geoff.
+
+In this tutorial we'll learn how to create custom meshes and deal with them
+with Irrlicht. We'll create an interesting heightmap with some lighting effects.
+With keys 1,2,3 you can choose a different mesh layout, which is put into the
+mesh buffers as desired. All positions, normals, etc. are updated accordingly.
+
+Ok, let's start with the headers (I think there's nothing to say about it)
+*/
+
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+//Namespaces for the engine
+using namespace irr;
+using namespace video;
+using namespace core;
+using namespace scene;
+using namespace io;
+using namespace gui;
+
+/* This is the type of the functions which work out the colour. */
+typedef SColor colour_func(f32 x, f32 y, f32 z);
+
+/* Here comes a set of functions which can be used for coloring the nodes while
+creating the mesh. */
+
+// Greyscale, based on the height.
+SColor grey(f32, f32, f32 z)
+{
+ u32 n = (u32)(255.f * z);
+ return SColor(255, n, n, n);
+}
+
+// Interpolation between blue and white, with red added in one
+// direction and green in the other.
+SColor yellow(f32 x, f32 y, f32)
+{
+ return SColor(255, 128 + (u32)(127.f * x), 128 + (u32)(127.f * y), 255);
+}
+
+// Pure white.
+SColor white(f32, f32, f32) { return SColor(255, 255, 255, 255); }
+
+/* The type of the functions which generate the heightmap. x and y
+range between -0.5 and 0.5, and s is the scale of the heightmap. */
+
+typedef f32 generate_func(s16 x, s16 y, f32 s);
+
+// An interesting sample function :-)
+f32 eggbox(s16 x, s16 y, f32 s)
+{
+ const f32 r = 4.f*sqrtf((f32)(x*x + y*y))/s;
+ const f32 z = expf(-r * 2) * (cosf(0.2f * x) + cosf(0.2f * y));
+ return 0.25f+0.25f*z;
+}
+
+// A rather dumb sine function :-/
+f32 moresine(s16 x, s16 y, f32 s)
+{
+ const f32 xx=0.3f*(f32)x/s;
+ const f32 yy=12*y/s;
+ const f32 z = sinf(xx*xx+yy)*sinf(xx+yy*yy);
+ return 0.25f + 0.25f * z;
+}
+
+// A simple function
+f32 justexp(s16 x, s16 y, f32 s)
+{
+ const f32 xx=6*x/s;
+ const f32 yy=6*y/s;
+ const f32 z = (xx*xx+yy*yy);
+ return 0.3f*z*cosf(xx*yy);
+}
+
+/* A simple class for representing heightmaps. Most of this should be obvious. */
+
+class HeightMap
+{
+private:
+ const u16 Width;
+ const u16 Height;
+ f32 s;
+ core::array<f32> data;
+public:
+ HeightMap(u16 _w, u16 _h) : Width(_w), Height(_h), s(0.f), data(0)
+ {
+ s = sqrtf((f32)(Width * Width + Height * Height));
+ data.set_used(Width * Height);
+ }
+
+ // Fill the heightmap with values generated from f.
+ void generate(generate_func f)
+ {
+ u32 i=0;
+ for(u16 y = 0; y < Height; ++y)
+ for(u16 x = 0; x < Width; ++x)
+ set(i++, calc(f, x, y));
+ }
+
+ u16 height() const { return Height; }
+ u16 width() const { return Width; }
+
+ f32 calc(generate_func f, u16 x, u16 y) const
+ {
+ const f32 xx = (f32)x - Width*0.5f;
+ const f32 yy = (f32)y - Height*0.5f;
+ return f((u16)xx, (u16)yy, s);
+ }
+
+ // The height at (x, y) is at position y * Width + x.
+
+ void set(u16 x, u16 y, f32 z) { data[y * Width + x] = z; }
+ void set(u32 i, f32 z) { data[i] = z; }
+ f32 get(u16 x, u16 y) const { return data[y * Width + x]; }
+
+ /* The only difficult part. This considers the normal at (x, y) to
+ be the cross product of the vectors between the adjacent points
+ in the horizontal and vertical directions.
+
+ s is a scaling factor, which is necessary if the height units are
+ different from the coordinate units; for example, if your map has
+ heights in metres and the coordinates are in units of a
+ kilometer. */
+
+ vector3df getnormal(u16 x, u16 y, f32 s) const
+ {
+ const f32 zc = get(x, y);
+ f32 zl, zr, zu, zd;
+
+ if (x == 0)
+ {
+ zr = get(x + 1, y);
+ zl = zc + zc - zr;
+ }
+ else if (x == Width - 1)
+ {
+ zl = get(x - 1, y);
+ zr = zc + zc - zl;
+ }
+ else
+ {
+ zr = get(x + 1, y);
+ zl = get(x - 1, y);
+ }
+
+ if (y == 0)
+ {
+ zd = get(x, y + 1);
+ zu = zc + zc - zd;
+ }
+ else if (y == Height - 1)
+ {
+ zu = get(x, y - 1);
+ zd = zc + zc - zu;
+ }
+ else
+ {
+ zd = get(x, y + 1);
+ zu = get(x, y - 1);
+ }
+
+ return vector3df(s * 2 * (zl - zr), 4, s * 2 * (zd - zu)).normalize();
+ }
+};
+
+/* A class which generates a mesh from a heightmap. */
+class TMesh
+{
+private:
+ u16 Width;
+ u16 Height;
+ f32 Scale;
+public:
+ SMesh* Mesh;
+
+ TMesh() : Mesh(0), Width(0), Height(0), Scale(1.f)
+ {
+ Mesh = new SMesh();
+ }
+
+ ~TMesh()
+ {
+ Mesh->drop();
+ }
+
+ // Unless the heightmap is small, it won't all fit into a single
+ // SMeshBuffer. This function chops it into pieces and generates a
+ // buffer from each one.
+
+ void init(const HeightMap &hm, f32 scale, colour_func cf, IVideoDriver *driver)
+ {
+ Scale = scale;
+
+ const u32 mp = driver -> getMaximalPrimitiveCount();
+ Width = hm.width();
+ Height = hm.height();
+
+ const u32 sw = mp / (6 * Height); // the width of each piece
+
+ u32 i=0;
+ for(u32 y0 = 0; y0 < Height; y0 += sw)
+ {
+ u16 y1 = y0 + sw;
+ if (y1 >= Height)
+ y1 = Height - 1; // the last one might be narrower
+ addstrip(hm, cf, y0, y1, i);
+ ++i;
+ }
+ if (i<Mesh->getMeshBufferCount())
+ {
+ // clear the rest
+ for (u32 j=i; j<Mesh->getMeshBufferCount(); ++j)
+ {
+ Mesh->getMeshBuffer(j)->drop();
+ }
+ Mesh->MeshBuffers.erase(i,Mesh->getMeshBufferCount()-i);
+ }
+ // set dirty flag to make sure that hardware copies of this
+ // buffer are also updated, see IMesh::setHardwareMappingHint
+ Mesh->setDirty();
+ Mesh->recalculateBoundingBox();
+ }
+
+ // Generate a SMeshBuffer which represents all the vertices and
+ // indices for values of y between y0 and y1, and add it to the
+ // mesh.
+
+ void addstrip(const HeightMap &hm, colour_func cf, u16 y0, u16 y1, u32 bufNum)
+ {
+ SMeshBuffer *buf = 0;
+ if (bufNum<Mesh->getMeshBufferCount())
+ {
+ buf = (SMeshBuffer*)Mesh->getMeshBuffer(bufNum);
+ }
+ else
+ {
+ // create new buffer
+ buf = new SMeshBuffer();
+ Mesh->addMeshBuffer(buf);
+ // to simplify things we drop here but continue using buf
+ buf->drop();
+ }
+ buf->Vertices.set_used((1 + y1 - y0) * Width);
+
+ u32 i=0;
+ for (u16 y = y0; y <= y1; ++y)
+ {
+ for (u16 x = 0; x < Width; ++x)
+ {
+ const f32 z = hm.get(x, y);
+ const f32 xx = (f32)x/(f32)Width;
+ const f32 yy = (f32)y/(f32)Height;
+
+ S3DVertex& v = buf->Vertices[i++];
+ v.Pos.set(x, Scale * z, y);
+ v.Normal.set(hm.getnormal(x, y, Scale));
+ v.Color=cf(xx, yy, z);
+ v.TCoords.set(xx, yy);
+ }
+ }
+
+ buf->Indices.set_used(6 * (Width - 1) * (y1 - y0));
+ i=0;
+ for(u16 y = y0; y < y1; ++y)
+ {
+ for(u16 x = 0; x < Width - 1; ++x)
+ {
+ const u16 n = (y-y0) * Width + x;
+ buf->Indices[i]=n;
+ buf->Indices[++i]=n + Width;
+ buf->Indices[++i]=n + Width + 1;
+ buf->Indices[++i]=n + Width + 1;
+ buf->Indices[++i]=n + 1;
+ buf->Indices[++i]=n;
+ ++i;
+ }
+ }
+
+ buf->recalculateBoundingBox();
+ }
+};
+
+/*
+Our event receiver implementation, taken from tutorial 4.
+*/
+class MyEventReceiver : public IEventReceiver
+{
+public:
+ // This is the one method that we have to implement
+ virtual bool OnEvent(const SEvent& event)
+ {
+ // Remember whether each key is down or up
+ if (event.EventType == irr::EET_KEY_INPUT_EVENT)
+ KeyIsDown[event.KeyInput.Key] = event.KeyInput.PressedDown;
+
+ return false;
+ }
+
+ // This is used to check whether a key is being held down
+ virtual bool IsKeyDown(EKEY_CODE keyCode) const
+ {
+ return KeyIsDown[keyCode];
+ }
+
+ MyEventReceiver()
+ {
+ for (u32 i=0; i<KEY_KEY_CODES_COUNT; ++i)
+ KeyIsDown[i] = false;
+ }
+
+private:
+ // We use this array to store the current state of each key
+ bool KeyIsDown[KEY_KEY_CODES_COUNT];
+};
+
+/*
+Much of this is code taken from some of the examples. We merely set
+up a mesh from a heightmap, light it with a moving light, and allow
+the user to navigate around it.
+*/
+
+int main(int argc, char* argv[])
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ MyEventReceiver receiver;
+ IrrlichtDevice* device = createDevice(driverType,
+ core::dimension2du(800, 600), 32, false, false, false,
+ &receiver);
+
+ if(device == 0)
+ return 1;
+
+ IVideoDriver *driver = device->getVideoDriver();
+ ISceneManager *smgr = device->getSceneManager();
+ device->setWindowCaption(L"Irrlicht Example for SMesh usage.");
+
+ /*
+ Create the custom mesh and initialize with a heightmap
+ */
+ TMesh mesh;
+ HeightMap hm = HeightMap(255, 255);
+ hm.generate(eggbox);
+ mesh.init(hm, 50.f, grey, driver);
+
+ // Add the mesh to the scene graph
+ IMeshSceneNode* meshnode = smgr -> addMeshSceneNode(mesh.Mesh);
+ meshnode->setMaterialFlag(video::EMF_BACK_FACE_CULLING, false);
+
+ // light is just for nice effects
+ ILightSceneNode *node = smgr->addLightSceneNode(0, vector3df(0,100,0),
+ SColorf(1.0f, 0.6f, 0.7f, 1.0f), 500.0f);
+ if (node)
+ {
+ node->getLightData().Attenuation.set(0.f, 1.f/500.f, 0.f);
+ ISceneNodeAnimator* anim = smgr->createFlyCircleAnimator(vector3df(0,150,0),250.0f);
+ if (anim)
+ {
+ node->addAnimator(anim);
+ anim->drop();
+ }
+ }
+
+ ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS();
+ if (camera)
+ {
+ camera->setPosition(vector3df(-20.f, 150.f, -20.f));
+ camera->setTarget(vector3df(200.f, -80.f, 150.f));
+ camera->setFarValue(20000.0f);
+ }
+
+ /*
+ Just a usual render loop with event handling. The custom mesh is
+ a usual part of the scene graph which gets rendered by drawAll.
+ */
+ while(device->run())
+ {
+ if(!device->isWindowActive())
+ {
+ device->sleep(100);
+ continue;
+ }
+
+ if(receiver.IsKeyDown(irr::KEY_KEY_W))
+ {
+ meshnode->setMaterialFlag(video::EMF_WIREFRAME, !meshnode->getMaterial(0).Wireframe);
+ }
+ else if(receiver.IsKeyDown(irr::KEY_KEY_1))
+ {
+ hm.generate(eggbox);
+ mesh.init(hm, 50.f, grey, driver);
+ }
+ else if(receiver.IsKeyDown(irr::KEY_KEY_2))
+ {
+ hm.generate(moresine);
+ mesh.init(hm, 50.f, yellow, driver);
+ }
+ else if(receiver.IsKeyDown(irr::KEY_KEY_3))
+ {
+ hm.generate(justexp);
+ mesh.init(hm, 50.f, yellow, driver);
+ }
+
+ driver->beginScene(true, true, SColor(0xff000000));
+ smgr->drawAll();
+ driver->endScene();
+ }
+
+ device->drop();
+
+ return 0;
+}
+
+/*
+That's it! Just compile and play around with the program.
+**/
diff --git a/examples/23.SMeshHandling/tutorial.html b/examples/23.SMeshHandling/tutorial.html new file mode 100644 index 0000000..b5ef8e8 --- /dev/null +++ b/examples/23.SMeshHandling/tutorial.html @@ -0,0 +1,209 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 23: SMeshBufferHandling</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 23: SMeshBufferHandling </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/023shot.jpg" alt="023shot.jpg"/> +</div> + <p>A tutorial by geoff.</p> +<p>In this tutorial we'll learn how to create custom meshes and deal with them with Irrlicht. We'll create an interesting heightmap with some lighting effects. With keys 1,2,3 you can choose a different mesh layout, which is put into the mesh buffers as desired. All positions, normals, etc. are updated accordingly.</p> +<p>Ok, let's start with the headers (I think there's nothing to say about it) </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"><span class="comment">//Namespaces for the engine</span></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"><span class="keyword">using namespace </span>video;</div><div class="line"><span class="keyword">using namespace </span>core;</div><div class="line"><span class="keyword">using namespace </span>scene;</div><div class="line"><span class="keyword">using namespace </span>io;</div><div class="line"><span class="keyword">using namespace </span>gui;</div></div><!-- fragment --><p> This is the type of the functions which work out the colour.</p><div class="fragment"><div class="line"><span class="keyword">typedef</span> SColor colour_func(f32 x, f32 y, f32 z);</div></div><!-- fragment --><p> Here comes a set of functions which can be used for coloring the nodes while creating the mesh.</p><div class="fragment"><div class="line"><span class="comment">// Greyscale, based on the height.</span></div><div class="line">SColor grey(f32, f32, f32 z)</div><div class="line">{</div><div class="line"> u32 n = (u32)(255.f * z);</div><div class="line"> <span class="keywordflow">return</span> SColor(255, n, n, n);</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// Interpolation between blue and white, with red added in one</span></div><div class="line"><span class="comment">// direction and green in the other.</span></div><div class="line">SColor yellow(f32 x, f32 y, f32)</div><div class="line">{</div><div class="line"> <span class="keywordflow">return</span> SColor(255, 128 + (u32)(127.f * x), 128 + (u32)(127.f * y), 255);</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// Pure white.</span></div><div class="line">SColor white(f32, f32, f32) { <span class="keywordflow">return</span> SColor(255, 255, 255, 255); }</div></div><!-- fragment --><p> The type of the functions which generate the heightmap. x and y range between -0.5 and 0.5, and s is the scale of the heightmap.</p><div class="fragment"><div class="line"><span class="keyword">typedef</span> f32 generate_func(s16 x, s16 y, f32 s);</div><div class="line"></div><div class="line"><span class="comment">// An interesting sample function :-)</span></div><div class="line">f32 eggbox(s16 x, s16 y, f32 s)</div><div class="line">{</div><div class="line"> <span class="keyword">const</span> f32 r = 4.f*sqrtf((f32)(x*x + y*y))/s;</div><div class="line"> <span class="keyword">const</span> f32 z = expf(-r * 2) * (cosf(0.2f * x) + cosf(0.2f * y));</div><div class="line"> <span class="keywordflow">return</span> 0.25f+0.25f*z;</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// A rather dumb sine function :-/</span></div><div class="line">f32 moresine(s16 x, s16 y, f32 s)</div><div class="line">{</div><div class="line"> <span class="keyword">const</span> f32 xx=0.3f*(f32)x/s;</div><div class="line"> <span class="keyword">const</span> f32 yy=12*y/s;</div><div class="line"> <span class="keyword">const</span> f32 z = sinf(xx*xx+yy)*sinf(xx+yy*yy);</div><div class="line"> <span class="keywordflow">return</span> 0.25f + 0.25f * z;</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// A simple function</span></div><div class="line">f32 justexp(s16 x, s16 y, f32 s)</div><div class="line">{</div><div class="line"> <span class="keyword">const</span> f32 xx=6*x/s;</div><div class="line"> <span class="keyword">const</span> f32 yy=6*y/s;</div><div class="line"> <span class="keyword">const</span> f32 z = (xx*xx+yy*yy);</div><div class="line"> <span class="keywordflow">return</span> 0.3f*z*cosf(xx*yy);</div><div class="line">}</div></div><!-- fragment --><p> A simple class for representing heightmaps. Most of this should be obvious.</p><div class="fragment"><div class="line"><span class="keyword">class </span>HeightMap</div><div class="line">{</div><div class="line"><span class="keyword">private</span>:</div><div class="line"> <span class="keyword">const</span> u16 Width;</div><div class="line"> <span class="keyword">const</span> u16 Height;</div><div class="line"> f32 s;</div><div class="line"> core::array<f32> data;</div><div class="line"><span class="keyword">public</span>:</div><div class="line"> HeightMap(u16 _w, u16 _h) : Width(_w), Height(_h), s(0.f), data(0)</div><div class="line"> {</div><div class="line"> s = sqrtf((f32)(Width * Width + Height * Height));</div><div class="line"> data.set_used(Width * Height);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Fill the heightmap with values generated from f.</span></div><div class="line"> <span class="keywordtype">void</span> generate(generate_func f)</div><div class="line"> {</div><div class="line"> u32 i=0;</div><div class="line"> <span class="keywordflow">for</span>(u16 y = 0; y < Height; ++y)</div><div class="line"> <span class="keywordflow">for</span>(u16 x = 0; x < Width; ++x)</div><div class="line"> <span class="keyword">set</span>(i++, calc(f, x, y));</div><div class="line"> }</div><div class="line"></div><div class="line"> u16 height()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> Height; }</div><div class="line"> u16 width()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> Width; }</div><div class="line"></div><div class="line"> f32 calc(generate_func f, u16 x, u16 y)<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> <span class="keyword">const</span> f32 xx = (f32)x - Width*0.5f;</div><div class="line"> <span class="keyword">const</span> f32 yy = (f32)y - Height*0.5f;</div><div class="line"> <span class="keywordflow">return</span> f((u16)xx, (u16)yy, s);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// The height at (x, y) is at position y * Width + x.</span></div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> <span class="keyword">set</span>(u16 x, u16 y, f32 z) { data[y * Width + x] = z; }</div><div class="line"> <span class="keywordtype">void</span> <span class="keyword">set</span>(u32 i, f32 z) { data[i] = z; }</div><div class="line"> f32 <span class="keyword">get</span>(u16 x, u16 y) <span class="keyword">const</span> { <span class="keywordflow">return</span> data[y * Width + x]; }</div></div><!-- fragment --><p> The only difficult part. This considers the normal at (x, y) to be the cross product of the vectors between the adjacent points in the horizontal and vertical directions.</p> +<p>s is a scaling factor, which is necessary if the height units are different from the coordinate units; for example, if your map has heights in metres and the coordinates are in units of a kilometer.</p><div class="fragment"><div class="line"> vector3df getnormal(u16 x, u16 y, f32 s)<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> <span class="keyword">const</span> f32 zc = <span class="keyword">get</span>(x, y);</div><div class="line"> f32 zl, zr, zu, zd;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (x == 0)</div><div class="line"> {</div><div class="line"> zr = <span class="keyword">get</span>(x + 1, y);</div><div class="line"> zl = zc + zc - zr;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (x == Width - 1)</div><div class="line"> {</div><div class="line"> zl = <span class="keyword">get</span>(x - 1, y);</div><div class="line"> zr = zc + zc - zl;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> zr = <span class="keyword">get</span>(x + 1, y);</div><div class="line"> zl = <span class="keyword">get</span>(x - 1, y);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (y == 0)</div><div class="line"> {</div><div class="line"> zd = <span class="keyword">get</span>(x, y + 1);</div><div class="line"> zu = zc + zc - zd;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (y == Height - 1)</div><div class="line"> {</div><div class="line"> zu = <span class="keyword">get</span>(x, y - 1);</div><div class="line"> zd = zc + zc - zu;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> zd = <span class="keyword">get</span>(x, y + 1);</div><div class="line"> zu = <span class="keyword">get</span>(x, y - 1);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> vector3df(s * 2 * (zl - zr), 4, s * 2 * (zd - zu)).normalize();</div><div class="line"> }</div><div class="line">};</div></div><!-- fragment --><p> A class which generates a mesh from a heightmap.</p><div class="fragment"><div class="line"><span class="keyword">class </span>TMesh</div><div class="line">{</div><div class="line"><span class="keyword">private</span>:</div><div class="line"> u16 Width;</div><div class="line"> u16 Height;</div><div class="line"> f32 Scale;</div><div class="line"><span class="keyword">public</span>:</div><div class="line"> SMesh* Mesh;</div><div class="line"></div><div class="line"> TMesh() : Mesh(0), Width(0), Height(0), Scale(1.f)</div><div class="line"> {</div><div class="line"> Mesh = <span class="keyword">new</span> SMesh();</div><div class="line"> }</div><div class="line"></div><div class="line"> ~TMesh()</div><div class="line"> {</div><div class="line"> Mesh->drop();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Unless the heightmap is small, it won't all fit into a single</span></div><div class="line"> <span class="comment">// SMeshBuffer. This function chops it into pieces and generates a</span></div><div class="line"> <span class="comment">// buffer from each one.</span></div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> init(<span class="keyword">const</span> HeightMap &hm, f32 scale, colour_func cf, IVideoDriver *driver)</div><div class="line"> {</div><div class="line"> Scale = scale;</div><div class="line"></div><div class="line"> <span class="keyword">const</span> u32 mp = driver -> getMaximalPrimitiveCount();</div><div class="line"> Width = hm.width();</div><div class="line"> Height = hm.height();</div><div class="line"> </div><div class="line"> <span class="keyword">const</span> u32 sw = mp / (6 * Height); <span class="comment">// the width of each piece</span></div><div class="line"></div><div class="line"> u32 i=0;</div><div class="line"> <span class="keywordflow">for</span>(u32 y0 = 0; y0 < Height; y0 += sw)</div><div class="line"> {</div><div class="line"> u16 y1 = y0 + sw;</div><div class="line"> <span class="keywordflow">if</span> (y1 >= Height)</div><div class="line"> y1 = Height - 1; <span class="comment">// the last one might be narrower</span></div><div class="line"> addstrip(hm, cf, y0, y1, i);</div><div class="line"> ++i;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">if</span> (i<Mesh->getMeshBufferCount())</div><div class="line"> {</div><div class="line"> <span class="comment">// clear the rest</span></div><div class="line"> <span class="keywordflow">for</span> (u32 j=i; j<Mesh->getMeshBufferCount(); ++j)</div><div class="line"> {</div><div class="line"> Mesh->getMeshBuffer(j)->drop();</div><div class="line"> }</div><div class="line"> Mesh->MeshBuffers.erase(i,Mesh->getMeshBufferCount()-i);</div><div class="line"> }</div><div class="line"> <span class="comment">// set dirty flag to make sure that hardware copies of this</span></div><div class="line"> <span class="comment">// buffer are also updated, see IMesh::setHardwareMappingHint</span></div><div class="line"> Mesh->setDirty();</div><div class="line"> Mesh->recalculateBoundingBox();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Generate a SMeshBuffer which represents all the vertices and</span></div><div class="line"> <span class="comment">// indices for values of y between y0 and y1, and add it to the</span></div><div class="line"> <span class="comment">// mesh.</span></div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> addstrip(<span class="keyword">const</span> HeightMap &hm, colour_func cf, u16 y0, u16 y1, u32 bufNum)</div><div class="line"> {</div><div class="line"> SMeshBuffer *buf = 0;</div><div class="line"> <span class="keywordflow">if</span> (bufNum<Mesh->getMeshBufferCount())</div><div class="line"> {</div><div class="line"> buf = (SMeshBuffer*)Mesh->getMeshBuffer(bufNum);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> <span class="comment">// create new buffer</span></div><div class="line"> buf = <span class="keyword">new</span> SMeshBuffer();</div><div class="line"> Mesh->addMeshBuffer(buf);</div><div class="line"> <span class="comment">// to simplify things we drop here but continue using buf</span></div><div class="line"> buf->drop();</div><div class="line"> }</div><div class="line"> buf->Vertices.set_used((1 + y1 - y0) * Width);</div><div class="line"></div><div class="line"> u32 i=0;</div><div class="line"> <span class="keywordflow">for</span> (u16 y = y0; y <= y1; ++y)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">for</span> (u16 x = 0; x < Width; ++x)</div><div class="line"> {</div><div class="line"> <span class="keyword">const</span> f32 z = hm.get(x, y);</div><div class="line"> <span class="keyword">const</span> f32 xx = (f32)x/(f32)Width;</div><div class="line"> <span class="keyword">const</span> f32 yy = (f32)y/(f32)Height;</div><div class="line"></div><div class="line"> S3DVertex& v = buf->Vertices[i++];</div><div class="line"> v.Pos.set(x, Scale * z, y);</div><div class="line"> v.Normal.set(hm.getnormal(x, y, Scale));</div><div class="line"> v.Color=cf(xx, yy, z);</div><div class="line"> v.TCoords.set(xx, yy);</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> buf->Indices.set_used(6 * (Width - 1) * (y1 - y0));</div><div class="line"> i=0;</div><div class="line"> <span class="keywordflow">for</span>(u16 y = y0; y < y1; ++y)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">for</span>(u16 x = 0; x < Width - 1; ++x)</div><div class="line"> {</div><div class="line"> <span class="keyword">const</span> u16 n = (y-y0) * Width + x;</div><div class="line"> buf->Indices[i]=n;</div><div class="line"> buf->Indices[++i]=n + Width;</div><div class="line"> buf->Indices[++i]=n + Width + 1;</div><div class="line"> buf->Indices[++i]=n + Width + 1;</div><div class="line"> buf->Indices[++i]=n + 1;</div><div class="line"> buf->Indices[++i]=n;</div><div class="line"> ++i;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> buf->recalculateBoundingBox();</div><div class="line"> }</div><div class="line">};</div></div><!-- fragment --><p> Our event receiver implementation, taken from tutorial 4. </p><div class="fragment"><div class="line"><span class="keyword">class </span>MyEventReceiver : <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"> <span class="comment">// This is the one method that we have to implement</span></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent& event)</div><div class="line"> {</div><div class="line"> <span class="comment">// Remember whether each key is down or up</span></div><div class="line"> <span class="keywordflow">if</span> (event.EventType == irr::EET_KEY_INPUT_EVENT)</div><div class="line"> KeyIsDown[<span class="keyword">event</span>.KeyInput.Key] = <span class="keyword">event</span>.KeyInput.PressedDown;</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// This is used to check whether a key is being held down</span></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> IsKeyDown(EKEY_CODE keyCode)<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> <span class="keywordflow">return</span> KeyIsDown[keyCode];</div><div class="line"> }</div><div class="line"></div><div class="line"> MyEventReceiver()</div><div class="line"> {</div><div class="line"> <span class="keywordflow">for</span> (u32 i=0; i<KEY_KEY_CODES_COUNT; ++i)</div><div class="line"> KeyIsDown[i] = <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"> <span class="comment">// We use this array to store the current state of each key</span></div><div class="line"> <span class="keywordtype">bool</span> KeyIsDown[KEY_KEY_CODES_COUNT];</div><div class="line">};</div></div><!-- fragment --><p> Much of this is code taken from some of the examples. We merely set up a mesh from a heightmap, light it with a moving light, and allow the user to navigate around it. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>* argv[])</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> MyEventReceiver receiver;</div><div class="line"> IrrlichtDevice* device = createDevice(driverType,</div><div class="line"> core::dimension2du(800, 600), 32, <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">false</span>,</div><div class="line"> &receiver);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span>(device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"> </div><div class="line"> IVideoDriver *driver = device->getVideoDriver();</div><div class="line"> ISceneManager *smgr = device->getSceneManager();</div><div class="line"> device->setWindowCaption(L<span class="stringliteral">"Irrlicht Example for SMesh usage."</span>);</div></div><!-- fragment --><p> Create the custom mesh and initialize with a heightmap </p><div class="fragment"><div class="line">TMesh mesh;</div><div class="line">HeightMap hm = HeightMap(255, 255);</div><div class="line">hm.generate(eggbox);</div><div class="line">mesh.init(hm, 50.f, grey, driver);</div><div class="line"></div><div class="line"><span class="comment">// Add the mesh to the scene graph</span></div><div class="line">IMeshSceneNode* meshnode = smgr -> addMeshSceneNode(mesh.Mesh);</div><div class="line">meshnode->setMaterialFlag(video::EMF_BACK_FACE_CULLING, <span class="keyword">false</span>);</div><div class="line"></div><div class="line"><span class="comment">// light is just for nice effects</span></div><div class="line">ILightSceneNode *node = smgr->addLightSceneNode(0, vector3df(0,100,0),</div><div class="line"> SColorf(1.0f, 0.6f, 0.7f, 1.0f), 500.0f);</div><div class="line"><span class="keywordflow">if</span> (node)</div><div class="line">{</div><div class="line"> node->getLightData().Attenuation.set(0.f, 1.f/500.f, 0.f);</div><div class="line"> ISceneNodeAnimator* anim = smgr->createFlyCircleAnimator(vector3df(0,150,0),250.0f);</div><div class="line"> <span class="keywordflow">if</span> (anim)</div><div class="line"> {</div><div class="line"> node->addAnimator(anim);</div><div class="line"> anim->drop();</div><div class="line"> }</div><div class="line">}</div><div class="line"></div><div class="line">ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS();</div><div class="line"><span class="keywordflow">if</span> (camera)</div><div class="line">{</div><div class="line"> camera->setPosition(vector3df(-20.f, 150.f, -20.f));</div><div class="line"> camera->setTarget(vector3df(200.f, -80.f, 150.f));</div><div class="line"> camera->setFarValue(20000.0f);</div><div class="line">}</div></div><!-- fragment --><p> Just a usual render loop with event handling. The custom mesh is a usual part of the scene graph which gets rendered by drawAll. </p><div class="fragment"><div class="line"> <span class="keywordflow">while</span>(device->run())</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span>(!device->isWindowActive())</div><div class="line"> {</div><div class="line"> device->sleep(100);</div><div class="line"> <span class="keywordflow">continue</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span>(receiver.IsKeyDown(irr::KEY_KEY_W))</div><div class="line"> {</div><div class="line"> meshnode->setMaterialFlag(video::EMF_WIREFRAME, !meshnode->getMaterial(0).Wireframe);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span>(receiver.IsKeyDown(irr::KEY_KEY_1))</div><div class="line"> {</div><div class="line"> hm.generate(eggbox);</div><div class="line"> mesh.init(hm, 50.f, grey, driver);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span>(receiver.IsKeyDown(irr::KEY_KEY_2))</div><div class="line"> {</div><div class="line"> hm.generate(moresine);</div><div class="line"> mesh.init(hm, 50.f, yellow, driver);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span>(receiver.IsKeyDown(irr::KEY_KEY_3))</div><div class="line"> {</div><div class="line"> hm.generate(justexp);</div><div class="line"> mesh.init(hm, 50.f, yellow, driver);</div><div class="line"> }</div><div class="line"></div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, SColor(0xff000000));</div><div class="line"> smgr->drawAll();</div><div class="line"> driver->endScene();</div><div class="line"> }</div><div class="line"></div><div class="line"> device->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --><p> That's it! Just compile and play around with the program. </p> +</div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/24.CursorControl/CursorControl.cbp b/examples/24.CursorControl/CursorControl.cbp new file mode 100644 index 0000000..b8aa231 --- /dev/null +++ b/examples/24.CursorControl/CursorControl.cbp @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 24 Cursor Control" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/CursorControl" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="GL" /> + <Add library="X11" /> + <Add library="Xcursor" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/CursorControl" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/24.CursorControl/CursorControl.vcproj b/examples/24.CursorControl/CursorControl.vcproj new file mode 100644 index 0000000..1bc2f53 --- /dev/null +++ b/examples/24.CursorControl/CursorControl.vcproj @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="24.CursorControl"
+ ProjectGUID="{02B67A37-50E1-49db-BECF-905BC029C2FE}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\24.CursorControl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/CursorControl.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/QIfist /Oa"
+ Optimization="3"
+ GlobalOptimizations="TRUE"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="TRUE"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="TRUE"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="4"
+ BufferSecurityCheck="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"
+ CallingConvention="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\24.CursorControl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="FALSE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/24.CursorControl/CursorControl_vc10.vcxproj b/examples/24.CursorControl/CursorControl_vc10.vcxproj new file mode 100644 index 0000000..7eadc6f --- /dev/null +++ b/examples/24.CursorControl/CursorControl_vc10.vcxproj @@ -0,0 +1,188 @@ +ďťż<?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">
+ <ProjectName>24.CursorControl</ProjectName>
+ <ProjectGuid>{02B67A37-50E1-49DB-BECF-905BC029C2FE}</ProjectGuid>
+ <RootNamespace>24.CursorControl</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\24.CursorControl.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)CursorControl.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\24.CursorControl.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)CursorControl.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\24.CursorControl.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\24.CursorControl.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/24.CursorControl/CursorControl_vc11.vcxproj b/examples/24.CursorControl/CursorControl_vc11.vcxproj new file mode 100644 index 0000000..7eadc6f --- /dev/null +++ b/examples/24.CursorControl/CursorControl_vc11.vcxproj @@ -0,0 +1,188 @@ +ďťż<?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">
+ <ProjectName>24.CursorControl</ProjectName>
+ <ProjectGuid>{02B67A37-50E1-49DB-BECF-905BC029C2FE}</ProjectGuid>
+ <RootNamespace>24.CursorControl</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\24.CursorControl.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)CursorControl.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\24.CursorControl.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)CursorControl.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\24.CursorControl.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\24.CursorControl.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/24.CursorControl/CursorControl_vc12.vcxproj b/examples/24.CursorControl/CursorControl_vc12.vcxproj new file mode 100644 index 0000000..26fdf87 --- /dev/null +++ b/examples/24.CursorControl/CursorControl_vc12.vcxproj @@ -0,0 +1,188 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>24.CursorControl</ProjectName>
+ <ProjectGuid>{02B67A37-50E1-49DB-BECF-905BC029C2FE}</ProjectGuid>
+ <RootNamespace>24.CursorControl</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\24.CursorControl.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)CursorControl.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\24.CursorControl.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)CursorControl.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\24.CursorControl.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\24.CursorControl.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/24.CursorControl/CursorControl_vc8.vcproj b/examples/24.CursorControl/CursorControl_vc8.vcproj new file mode 100644 index 0000000..6148942 --- /dev/null +++ b/examples/24.CursorControl/CursorControl_vc8.vcproj @@ -0,0 +1,190 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="24.CursorControl_vc8"
+ ProjectGUID="{02B67A37-50E1-49DB-BECF-905BC029C2FE}"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <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"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\24.CursorControl.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/CursorControl.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ CallingConvention="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\24.CursorControl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/24.CursorControl/CursorControl_vc9.vcproj b/examples/24.CursorControl/CursorControl_vc9.vcproj new file mode 100644 index 0000000..90ebf1f --- /dev/null +++ b/examples/24.CursorControl/CursorControl_vc9.vcproj @@ -0,0 +1,185 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="24.CursorControl_vc9"
+ ProjectGUID="{02B67A37-50E1-49DB-BECF-905BC029C2FE}"
+ RootNamespace="24.CursorControl_vc9"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <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"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\24.CursorControl.exe"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/CursorControl.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ ExceptionHandling="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="0"
+ CallingConvention="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\24.CursorControl.exe"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/24.CursorControl/Makefile b/examples/24.CursorControl/Makefile new file mode 100644 index 0000000..bc2a137 --- /dev/null +++ b/examples/24.CursorControl/Makefile @@ -0,0 +1,66 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+
+# Name of the executable created (.exe will be added automatically if necessary)
+Target := 24.CursorControl
+# List of source files, separated by spaces
+Sources := main.cpp
+# Path to Irrlicht directory, should contain include/ and lib/
+IrrlichtHome := ../..
+# Path for the executable. Note that Irrlicht.dll should usually also be there for win32 systems
+BinPath = ../../bin/$(SYSTEM)
+
+# general compiler settings (might need to be set when compiling the lib, too)
+# preprocessor flags, e.g. defines and include paths
+USERCPPFLAGS =
+# compiler flags such as optimization flags
+USERCXXFLAGS = -O3 -ffast-math
+#USERCXXFLAGS = -g -Wall
+# linker flags such as additional libraries and link paths
+USERLDFLAGS =
+
+####
+#no changes necessary below this line
+####
+
+CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS)
+CXXFLAGS = $(USERCXXFLAGS)
+LDFLAGS = $(USERLDFLAGS)
+
+#default target is Linux
+all: all_linux
+
+# target specific settings
+all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
+all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32 static_win32: SUF=.exe
+static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
+all_win32: LDFLAGS += -lopengl32 -lm
+static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = $(BinPath)/$(Target)$(SUF)
+
+all_linux all_win32 static_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 static_win32 clean clean_linux clean_win32
+
+#multilib handling
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+#solaris real-time features
+ifeq ($(HOSTTYPE), sun4)
+LDFLAGS += -lrt
+endif
+
diff --git a/examples/24.CursorControl/main.cpp b/examples/24.CursorControl/main.cpp new file mode 100644 index 0000000..ff7c16f --- /dev/null +++ b/examples/24.CursorControl/main.cpp @@ -0,0 +1,563 @@ +/** Example 024 CursorControl
+
+Show how to modify cursors and offer some useful tool-functions for creating cursors.
+It can also be used for experiments with the mouse in general.
+*/
+
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+using namespace core;
+using namespace scene;
+using namespace video;
+using namespace io;
+using namespace gui;
+
+#ifdef _IRR_WINDOWS_
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+const int DELAY_TIME = 3000;
+
+enum ETimerAction
+{
+ ETA_MOUSE_VISIBLE,
+ ETA_MOUSE_INVISIBLE,
+};
+
+/*
+ Structure to allow delayed execution of some actions.
+*/
+struct TimerAction
+{
+ u32 TargetTime;
+ ETimerAction Action;
+};
+
+/*
+*/
+struct SAppContext
+{
+ SAppContext()
+ : Device(0), InfoStatic(0), EventBox(0), CursorBox(0), SpriteBox(0)
+ , ButtonSetVisible(0), ButtonSetInvisible(0), ButtonSimulateBadFps(0)
+ , ButtonChangeIcon(0)
+ , SimulateBadFps(false)
+ {
+ }
+
+ void update()
+ {
+ if (!Device)
+ return;
+ u32 timeNow = Device->getTimer()->getTime();
+ for ( u32 i=0; i < TimerActions.size(); ++i )
+ {
+ if ( timeNow >= TimerActions[i].TargetTime )
+ {
+ runTimerAction(TimerActions[i]);
+ TimerActions.erase(i);
+ }
+ else
+ {
+ ++i;
+ }
+ }
+ }
+
+ void runTimerAction(const TimerAction& action)
+ {
+ if (ETA_MOUSE_VISIBLE == action.Action)
+ {
+ Device->getCursorControl()->setVisible(true);
+ ButtonSetVisible->setEnabled(true);
+ }
+ else if ( ETA_MOUSE_INVISIBLE == action.Action)
+ {
+ Device->getCursorControl()->setVisible(false);
+ ButtonSetInvisible->setEnabled(true);
+ }
+ }
+
+ /*
+ Add another icon which the user can click and select as cursor later on.
+ */
+ void addIcon(const stringw& name, const SCursorSprite &sprite, bool addCursor=true)
+ {
+ // Sprites are just icons - not yet cursors. They can be displayed by Irrlicht sprite functions and be used to create cursors.
+ SpriteBox->addItem(name.c_str(), sprite.SpriteId);
+ Sprites.push_back(sprite);
+
+ // create the cursor together with the icon?
+ if ( addCursor )
+ {
+ /* Here we create a hardware cursor from a sprite */
+ Device->getCursorControl()->addIcon(sprite);
+
+ // ... and add it to the cursors selection listbox to the other system cursors.
+ CursorBox->addItem(name.c_str());
+ }
+ }
+
+ IrrlichtDevice * Device;
+ gui::IGUIStaticText * InfoStatic;
+ gui::IGUIListBox * EventBox;
+ gui::IGUIListBox * CursorBox;
+ gui::IGUIListBox * SpriteBox;
+ gui::IGUIButton * ButtonSetVisible;
+ gui::IGUIButton * ButtonSetInvisible;
+ gui::IGUIButton * ButtonSimulateBadFps;
+ gui::IGUIButton * ButtonChangeIcon;
+ array<TimerAction> TimerActions;
+ bool SimulateBadFps;
+ array<SCursorSprite> Sprites;
+};
+
+/*
+ Helper function to print mouse event names into a stringw
+*/
+void PrintMouseEventName(const SEvent& event, stringw &result)
+{
+ switch ( event.MouseInput.Event )
+ {
+ case EMIE_LMOUSE_PRESSED_DOWN: result += stringw(L"EMIE_LMOUSE_PRESSED_DOWN"); break;
+ case EMIE_RMOUSE_PRESSED_DOWN: result += stringw(L"EMIE_RMOUSE_PRESSED_DOWN"); break;
+ case EMIE_MMOUSE_PRESSED_DOWN: result += stringw(L"EMIE_MMOUSE_PRESSED_DOWN"); break;
+ case EMIE_LMOUSE_LEFT_UP: result += stringw(L"EMIE_LMOUSE_LEFT_UP"); break;
+ case EMIE_RMOUSE_LEFT_UP: result += stringw(L"EMIE_RMOUSE_LEFT_UP"); break;
+ case EMIE_MMOUSE_LEFT_UP: result += stringw(L"EMIE_MMOUSE_LEFT_UP"); break;
+ case EMIE_MOUSE_MOVED: result += stringw(L"EMIE_MOUSE_MOVED"); break;
+ case EMIE_MOUSE_WHEEL: result += stringw(L"EMIE_MOUSE_WHEEL"); break;
+ case EMIE_LMOUSE_DOUBLE_CLICK: result += stringw(L"EMIE_LMOUSE_DOUBLE_CLICK"); break;
+ case EMIE_RMOUSE_DOUBLE_CLICK: result += stringw(L"EMIE_RMOUSE_DOUBLE_CLICK"); break;
+ case EMIE_MMOUSE_DOUBLE_CLICK: result += stringw(L"EMIE_MMOUSE_DOUBLE_CLICK"); break;
+ case EMIE_LMOUSE_TRIPLE_CLICK: result += stringw(L"EMIE_LMOUSE_TRIPLE_CLICK"); break;
+ case EMIE_RMOUSE_TRIPLE_CLICK: result += stringw(L"EMIE_RMOUSE_TRIPLE_CLICK"); break;
+ case EMIE_MMOUSE_TRIPLE_CLICK: result += stringw(L"EMIE_MMOUSE_TRIPLE_CLICK"); break;
+ default:
+ break;
+ }
+}
+
+/*
+ Helper function to print all the state information which get from a mouse-event into a stringw
+*/
+void PrintMouseState(const SEvent& event, stringw &result)
+{
+ result += stringw(L"X: ");
+ result += stringw(event.MouseInput.X);
+ result += stringw(L"\n");
+
+ result += stringw(L"Y: ");
+ result += stringw(event.MouseInput.Y);
+ result += stringw(L"\n");
+
+
+ result += stringw(L"Wheel: ");
+ result += stringw(event.MouseInput.Wheel);
+ result += stringw(L"\n");
+
+ result += stringw(L"Shift: ");
+ if ( event.MouseInput.Shift )
+ result += stringw(L"true\n");
+ else
+ result += stringw(L"false\n");
+
+ result += stringw(L"Control: ");
+ if ( event.MouseInput.Control )
+ result += stringw(L"true\n");
+ else
+ result += stringw(L"false\n");
+
+ result += stringw(L"ButtonStates: ");
+ result += stringw(event.MouseInput.ButtonStates);
+ result += stringw(L"\n");
+
+ result += stringw(L"isLeftPressed: ");
+ if ( event.MouseInput.isLeftPressed() )
+ result += stringw(L"true\n");
+ else
+ result += stringw(L"false\n");
+
+ result += stringw(L"isRightPressed: ");
+ if ( event.MouseInput.isRightPressed() )
+ result += stringw(L"true\n");
+ else
+ result += stringw(L"false\n");
+
+ result += stringw(L"isMiddlePressed: ");
+ if ( event.MouseInput.isMiddlePressed() )
+ result += stringw(L"true\n");
+ else
+ result += stringw(L"false\n");
+
+ result += stringw(L"Event: ");
+
+ PrintMouseEventName(event, result);
+
+ result += stringw(L"\n");
+}
+
+/*
+ A typical event receiver.
+*/
+class MyEventReceiver : public IEventReceiver
+{
+public:
+ MyEventReceiver(SAppContext & context) : Context(context) { }
+
+ virtual bool OnEvent(const SEvent& event)
+ {
+ if (event.EventType == EET_GUI_EVENT )
+ {
+ switch ( event.GUIEvent.EventType )
+ {
+ case EGET_BUTTON_CLICKED:
+ {
+ u32 timeNow = Context.Device->getTimer()->getTime();
+ TimerAction action;
+ action.TargetTime = timeNow + DELAY_TIME;
+ if ( event.GUIEvent.Caller == Context.ButtonSetVisible )
+ {
+ action.Action = ETA_MOUSE_VISIBLE;
+ Context.TimerActions.push_back(action);
+ Context.ButtonSetVisible->setEnabled(false);
+ }
+ else if ( event.GUIEvent.Caller == Context.ButtonSetInvisible )
+ {
+ action.Action = ETA_MOUSE_INVISIBLE;
+ Context.TimerActions.push_back(action);
+ Context.ButtonSetInvisible->setEnabled(false);
+ }
+ else if ( event.GUIEvent.Caller == Context.ButtonSimulateBadFps )
+ {
+ Context.SimulateBadFps = Context.ButtonSimulateBadFps->isPressed();
+ }
+ else if ( event.GUIEvent.Caller == Context.ButtonChangeIcon )
+ {
+ /*
+ Replace an existing cursor icon by another icon.
+ The user has to select both - the icon which should be replaced and the icon which will replace it.
+ */
+ s32 selectedCursor = Context.CursorBox->getSelected();
+ s32 selectedSprite = Context.SpriteBox->getSelected();
+ if ( selectedCursor >= 0 && selectedSprite >= 0 )
+ {
+ /*
+ This does replace the icon.
+ */
+ Context.Device->getCursorControl()->changeIcon((ECURSOR_ICON)selectedCursor, Context.Sprites[selectedSprite] );
+
+ /*
+ Do also show the new icon.
+ */
+ Context.Device->getCursorControl()->setActiveIcon( ECURSOR_ICON(selectedCursor) );
+ }
+ }
+ }
+ break;
+ case EGET_LISTBOX_CHANGED:
+ case EGET_LISTBOX_SELECTED_AGAIN:
+ {
+ if ( event.GUIEvent.Caller == Context.CursorBox )
+ {
+ /*
+ Find out which cursor the user selected
+ */
+ s32 selected = Context.CursorBox->getSelected();
+ if ( selected >= 0 )
+ {
+ /*
+ Here we set the new cursor icon which will now be used within our window.
+ */
+ Context.Device->getCursorControl()->setActiveIcon( ECURSOR_ICON(selected) );
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (event.EventType == EET_MOUSE_INPUT_EVENT)
+ {
+ stringw infoText;
+ PrintMouseState(event, infoText);
+ Context.InfoStatic->setText(infoText.c_str());
+ if ( event.MouseInput.Event != EMIE_MOUSE_MOVED && event.MouseInput.Event != EMIE_MOUSE_WHEEL ) // no spam
+ {
+ infoText = L"";
+ PrintMouseEventName(event, infoText);
+ Context.EventBox->insertItem(0, infoText.c_str(), -1);
+ }
+ }
+
+ return false;
+ }
+
+private:
+ SAppContext & Context;
+};
+
+/*
+ Use several imagefiles as animation frames for a sprite which can be used as cursor icon.
+ The images in those files all need to have the same size.
+ Return sprite index on success or -1 on failure
+*/
+s32 AddAnimatedIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver, const array< io::path >& files, u32 frameTime )
+{
+ if ( !spriteBank || !driver || !files.size() )
+ return -1;
+
+ video::ITexture * tex = driver->getTexture( files[0] );
+ if ( tex )
+ {
+ array< rect<s32> >& spritePositions = spriteBank->getPositions();
+ u32 idxRect = spritePositions.size();
+ spritePositions.push_back( rect<s32>(0,0, tex->getSize().Width, tex->getSize().Height) );
+
+ SGUISprite sprite;
+ sprite.frameTime = frameTime;
+
+ array< SGUISprite >& sprites = spriteBank->getSprites();
+ u32 startIdx = spriteBank->getTextureCount();
+ for ( u32 f=0; f < files.size(); ++f )
+ {
+ tex = driver->getTexture( files[f] );
+ if ( tex )
+ {
+ spriteBank->addTexture( driver->getTexture(files[f]) );
+ gui::SGUISpriteFrame frame;
+ frame.rectNumber = idxRect;
+ frame.textureNumber = startIdx+f;
+ sprite.Frames.push_back( frame );
+ }
+ }
+
+ sprites.push_back( sprite );
+ return sprites.size()-1;
+ }
+
+ return -1;
+}
+
+/*
+ Use several images within one imagefile as animation frames for a sprite which can be used as cursor icon
+ The sizes of the icons within that file all need to have the same size
+ Return sprite index on success or -1 on failure
+*/
+s32 AddAnimatedIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver, const io::path& file, const array< rect<s32> >& rects, u32 frameTime )
+{
+ if ( !spriteBank || !driver || !rects.size() )
+ return -1;
+
+ video::ITexture * tex = driver->getTexture( file );
+ if ( tex )
+ {
+ array< rect<s32> >& spritePositions = spriteBank->getPositions();
+ u32 idxRect = spritePositions.size();
+ u32 idxTex = spriteBank->getTextureCount();
+ spriteBank->addTexture( tex );
+
+ SGUISprite sprite;
+ sprite.frameTime = frameTime;
+
+ array< SGUISprite >& sprites = spriteBank->getSprites();
+ for ( u32 i=0; i < rects.size(); ++i )
+ {
+ spritePositions.push_back( rects[i] );
+
+ gui::SGUISpriteFrame frame;
+ frame.rectNumber = idxRect+i;
+ frame.textureNumber = idxTex;
+ sprite.Frames.push_back( frame );
+ }
+
+ sprites.push_back( sprite );
+ return sprites.size()-1;
+ }
+
+ return -1;
+}
+
+/*
+ Create a non-animated icon from the given file and position and put it into the spritebank.
+ We can use this icon later on in a cursor.
+*/
+s32 AddIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver, const io::path& file, const core::rect<s32>& rect )
+{
+ if ( !spriteBank || !driver )
+ return -1;
+
+ video::ITexture * tex = driver->getTexture( file );
+ if ( tex )
+ {
+ core::array< core::rect<irr::s32> >& spritePositions = spriteBank->getPositions();
+ spritePositions.push_back( rect );
+ array< SGUISprite >& sprites = spriteBank->getSprites();
+ spriteBank->addTexture( tex );
+
+ gui::SGUISpriteFrame frame;
+ frame.rectNumber = spritePositions.size()-1;
+ frame.textureNumber = spriteBank->getTextureCount()-1;
+
+ SGUISprite sprite;
+ sprite.frameTime = 0;
+ sprite.Frames.push_back( frame );
+
+ sprites.push_back( sprite );
+
+ return sprites.size()-1;
+ }
+
+ return -1;
+}
+
+int main()
+{
+ video::E_DRIVER_TYPE driverType = driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ IrrlichtDevice * device = createDevice(driverType, dimension2d<u32>(640, 480));
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ // It's sometimes of interest to know how the mouse behaves after a resize
+ device->setResizable(true);
+
+ device->setWindowCaption(L"Cursor control - Irrlicht engine tutorial");
+ video::IVideoDriver* driver = device->getVideoDriver();
+ IGUIEnvironment* env = device->getGUIEnvironment();
+
+ gui::IGUISpriteBank * SpriteBankIcons;
+
+ SAppContext context;
+ context.Device = device;
+
+ rect< s32 > rectInfoStatic(10,10, 200, 200);
+ env->addStaticText (L"Cursor state information", rectInfoStatic, true, true);
+ rectInfoStatic.UpperLeftCorner += dimension2di(0, 15);
+ context.InfoStatic = env->addStaticText (L"", rectInfoStatic, true, true);
+ rect< s32 > rectEventBox(10,210, 200, 400);
+ env->addStaticText (L"click events (new on top)", rectEventBox, true, true);
+ rectEventBox.UpperLeftCorner += dimension2di(0, 15);
+ context.EventBox = env->addListBox(rectEventBox);
+ rect< s32 > rectCursorBox(210,10, 400, 250);
+ env->addStaticText (L"cursors, click to set the active one", rectCursorBox, true, true);
+ rectCursorBox.UpperLeftCorner += dimension2di(0, 15);
+ context.CursorBox = env->addListBox(rectCursorBox);
+ rect< s32 > rectSpriteBox(210,260, 400, 400);
+ env->addStaticText (L"sprites", rectSpriteBox, true, true);
+ rectSpriteBox.UpperLeftCorner += dimension2di(0, 15);
+ context.SpriteBox = env->addListBox(rectSpriteBox);
+
+ context.ButtonSetVisible = env->addButton( rect<s32>( 410, 20, 560, 40 ), 0, -1, L"set visible (delayed)" );
+ context.ButtonSetInvisible = env->addButton( rect<s32>( 410, 50, 560, 70 ), 0, -1, L"set invisible (delayed)" );
+ context.ButtonSimulateBadFps = env->addButton( rect<s32>( 410, 80, 560, 100 ), 0, -1, L"simulate bad FPS" );
+ context.ButtonSimulateBadFps->setIsPushButton(true);
+ context.ButtonChangeIcon = env->addButton( rect<s32>( 410, 140, 560, 160 ), 0, -1, L"replace cursor icon\n(cursor+sprite must be selected)" );
+
+ // set the names for all the system cursors
+ for ( int i=0; i < (int)gui::ECI_COUNT; ++i )
+ {
+ context.CursorBox->addItem(stringw( GUICursorIconNames[i] ).c_str());
+ }
+
+ /*
+ Create sprites which then can be used as cursor icons.
+ */
+ SpriteBankIcons = env->addEmptySpriteBank(io::path("cursor_icons"));
+ context.SpriteBox->setSpriteBank(SpriteBankIcons);
+
+ // create one animated icon from several files
+ array< io::path > files;
+ files.push_back( io::path("../../media/icon_crosshairs16x16bw1.png") );
+ files.push_back( io::path("../../media/icon_crosshairs16x16bw2.png") );
+ files.push_back( io::path("../../media/icon_crosshairs16x16bw3.png") );
+ files.push_back( io::path("../../media/icon_crosshairs16x16bw3.png") );
+ files.push_back( io::path("../../media/icon_crosshairs16x16bw2.png") );
+ SCursorSprite spriteBw; // the sprite + some additional information needed for cursors
+ spriteBw.SpriteId = AddAnimatedIconToSpriteBank( SpriteBankIcons, driver, files, 200 );
+ spriteBw.SpriteBank = SpriteBankIcons;
+ spriteBw.HotSpot = position2d<s32>(7,7);
+ context.addIcon(L"crosshair_bw", spriteBw);
+
+ // create one animated icon from one file
+ array< rect<s32> > iconRects;
+ iconRects.push_back( rect<s32>(0,0, 16, 16) );
+ iconRects.push_back( rect<s32>(16,0, 32, 16) );
+ iconRects.push_back( rect<s32>(0,16, 16, 32) );
+ iconRects.push_back( rect<s32>(0,16, 16, 32) );
+ iconRects.push_back( rect<s32>(16,0, 32, 16) );
+ SCursorSprite spriteCol; // the sprite + some additional information needed for cursors
+ spriteCol.SpriteId = AddAnimatedIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), iconRects, 200 );
+ spriteCol.HotSpot = position2d<s32>(7,7);
+ spriteCol.SpriteBank = SpriteBankIcons;
+ context.addIcon(L"crosshair_colored", spriteCol);
+
+ // Create some non-animated icons
+ rect<s32> rectIcon;
+ SCursorSprite spriteNonAnimated(SpriteBankIcons, 0, position2d<s32>(7,7));
+
+ rectIcon = rect<s32>(0,0, 16, 16);
+ spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), rectIcon );
+ context.addIcon(L"crosshair_col1", spriteNonAnimated, false);
+
+ rectIcon = rect<s32>(16,0, 32, 16);
+ spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), rectIcon );
+ context.addIcon(L"crosshair_col2", spriteNonAnimated, false);
+
+ rectIcon = rect<s32>(0,16, 16, 32);
+ spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), rectIcon );
+ context.addIcon(L"crosshair_col3", spriteNonAnimated, false);
+
+
+ MyEventReceiver receiver(context);
+ device->setEventReceiver(&receiver);
+
+ while(device->run() && driver)
+ {
+ // if (device->isWindowActive())
+ {
+ u32 realTimeNow = device->getTimer()->getRealTime();
+
+ context.update();
+
+ driver->beginScene(true, true, SColor(0,200,200,200));
+
+ env->drawAll();
+
+ // draw custom sprite with Irrlicht functions for comparison. It should usually look the same as the cursors.
+ if ( context.SpriteBox )
+ {
+ s32 selectedSprite = context.SpriteBox->getSelected();
+ if ( selectedSprite >= 0 && context.Sprites[selectedSprite].SpriteId >= 0 )
+ {
+ SpriteBankIcons->draw2DSprite(u32(context.Sprites[selectedSprite].SpriteId), position2di(580, 140), 0, video::SColor(255, 255, 255, 255), 0, realTimeNow);
+ }
+ }
+
+ driver->endScene();
+ }
+
+ // By simulating bad fps we can find out if hardware-support for cursors works or not. If it works the cursor will move as usual,while it otherwise will just update with 2 fps now.
+ if ( context.SimulateBadFps )
+ {
+ device->sleep(500); // 2 fps
+ }
+ else
+ {
+ device->sleep(10);
+ }
+ }
+
+ device->drop();
+
+ return 0;
+}
+
+/*
+**/
diff --git a/examples/24.CursorControl/tutorial.html b/examples/24.CursorControl/tutorial.html new file mode 100644 index 0000000..08e8b18 --- /dev/null +++ b/examples/24.CursorControl/tutorial.html @@ -0,0 +1,205 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 24: CursorControl</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 24: CursorControl </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/024shot.jpg" alt="024shot.jpg"/> +</div> + <p>Show how to modify cursors and offer some useful tool-functions for creating cursors. It can also be used for experiments with the mouse in general. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"><span class="keyword">using namespace </span>core;</div><div class="line"><span class="keyword">using namespace </span>scene;</div><div class="line"><span class="keyword">using namespace </span>video;</div><div class="line"><span class="keyword">using namespace </span>io;</div><div class="line"><span class="keyword">using namespace </span>gui;</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef _IRR_WINDOWS_</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"><span class="keyword">const</span> <span class="keywordtype">int</span> DELAY_TIME = 3000;</div><div class="line"></div><div class="line"><span class="keyword">enum</span> ETimerAction</div><div class="line">{</div><div class="line"> ETA_MOUSE_VISIBLE,</div><div class="line"> ETA_MOUSE_INVISIBLE,</div><div class="line">};</div></div><!-- fragment --><p> Structure to allow delayed execution of some actions. </p><div class="fragment"><div class="line"><span class="keyword">struct </span>TimerAction</div><div class="line">{</div><div class="line"> u32 TargetTime;</div><div class="line"> ETimerAction Action;</div><div class="line">};</div></div><!-- fragment --> <div class="fragment"><div class="line"><span class="keyword">struct </span>SAppContext</div><div class="line">{</div><div class="line"> SAppContext()</div><div class="line"> : Device(0), InfoStatic(0), EventBox(0), CursorBox(0), SpriteBox(0)</div><div class="line"> , ButtonSetVisible(0), ButtonSetInvisible(0), ButtonSimulateBadFps(0)</div><div class="line"> , ButtonChangeIcon(0)</div><div class="line"> , SimulateBadFps(false)</div><div class="line"> {</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> update()</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (!Device)</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"> u32 timeNow = Device->getTimer()->getTime();</div><div class="line"> <span class="keywordflow">for</span> ( u32 i=0; i < TimerActions.size(); ++i )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( timeNow >= TimerActions[i].TargetTime )</div><div class="line"> {</div><div class="line"> runTimerAction(TimerActions[i]);</div><div class="line"> TimerActions.erase(i);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> ++i;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> runTimerAction(<span class="keyword">const</span> TimerAction& action)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (ETA_MOUSE_VISIBLE == action.Action)</div><div class="line"> {</div><div class="line"> Device->getCursorControl()->setVisible(<span class="keyword">true</span>);</div><div class="line"> ButtonSetVisible->setEnabled(<span class="keyword">true</span>);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( ETA_MOUSE_INVISIBLE == action.Action)</div><div class="line"> {</div><div class="line"> Device->getCursorControl()->setVisible(<span class="keyword">false</span>);</div><div class="line"> ButtonSetInvisible->setEnabled(<span class="keyword">true</span>);</div><div class="line"> }</div><div class="line"> }</div></div><!-- fragment --><p> Add another icon which the user can click and select as cursor later on. </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> addIcon(<span class="keyword">const</span> stringw& name, <span class="keyword">const</span> SCursorSprite &sprite, <span class="keywordtype">bool</span> addCursor=<span class="keyword">true</span>)</div><div class="line">{</div><div class="line"> <span class="comment">// Sprites are just icons - not yet cursors. They can be displayed by Irrlicht sprite functions and be used to create cursors.</span></div><div class="line"> SpriteBox->addItem(name.c_str(), sprite.SpriteId);</div><div class="line"> Sprites.push_back(sprite);</div><div class="line"></div><div class="line"> <span class="comment">// create the cursor together with the icon?</span></div><div class="line"> <span class="keywordflow">if</span> ( addCursor )</div><div class="line"> {</div></div><!-- fragment --><p> Here we create a hardware cursor from a sprite</p><div class="fragment"><div class="line"> Device->getCursorControl()->addIcon(sprite);</div><div class="line"></div><div class="line"> <span class="comment">// ... and add it to the cursors selection listbox to the other system cursors.</span></div><div class="line"> CursorBox->addItem(name.c_str());</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> IrrlichtDevice * Device;</div><div class="line"> gui::IGUIStaticText * InfoStatic;</div><div class="line"> gui::IGUIListBox * EventBox;</div><div class="line"> gui::IGUIListBox * CursorBox;</div><div class="line"> gui::IGUIListBox * SpriteBox;</div><div class="line"> gui::IGUIButton * ButtonSetVisible;</div><div class="line"> gui::IGUIButton * ButtonSetInvisible;</div><div class="line"> gui::IGUIButton * ButtonSimulateBadFps;</div><div class="line"> gui::IGUIButton * ButtonChangeIcon;</div><div class="line"> array<TimerAction> TimerActions;</div><div class="line"> <span class="keywordtype">bool</span> SimulateBadFps;</div><div class="line"> array<SCursorSprite> Sprites;</div><div class="line">};</div></div><!-- fragment --><p> Helper function to print mouse event names into a stringw </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> PrintMouseEventName(<span class="keyword">const</span> SEvent& event, stringw &result)</div><div class="line">{</div><div class="line"> <span class="keywordflow">switch</span> ( event.MouseInput.Event )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> EMIE_LMOUSE_PRESSED_DOWN: result += stringw(L<span class="stringliteral">"EMIE_LMOUSE_PRESSED_DOWN"</span>); <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> EMIE_RMOUSE_PRESSED_DOWN: result += stringw(L<span class="stringliteral">"EMIE_RMOUSE_PRESSED_DOWN"</span>); <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> EMIE_MMOUSE_PRESSED_DOWN: result += stringw(L<span class="stringliteral">"EMIE_MMOUSE_PRESSED_DOWN"</span>); <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> EMIE_LMOUSE_LEFT_UP: result += stringw(L<span class="stringliteral">"EMIE_LMOUSE_LEFT_UP"</span>); <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> EMIE_RMOUSE_LEFT_UP: result += stringw(L<span class="stringliteral">"EMIE_RMOUSE_LEFT_UP"</span>); <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> EMIE_MMOUSE_LEFT_UP: result += stringw(L<span class="stringliteral">"EMIE_MMOUSE_LEFT_UP"</span>); <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> EMIE_MOUSE_MOVED: result += stringw(L<span class="stringliteral">"EMIE_MOUSE_MOVED"</span>); <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> EMIE_MOUSE_WHEEL: result += stringw(L<span class="stringliteral">"EMIE_MOUSE_WHEEL"</span>); <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> EMIE_LMOUSE_DOUBLE_CLICK: result += stringw(L<span class="stringliteral">"EMIE_LMOUSE_DOUBLE_CLICK"</span>); <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> EMIE_RMOUSE_DOUBLE_CLICK: result += stringw(L<span class="stringliteral">"EMIE_RMOUSE_DOUBLE_CLICK"</span>); <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> EMIE_MMOUSE_DOUBLE_CLICK: result += stringw(L<span class="stringliteral">"EMIE_MMOUSE_DOUBLE_CLICK"</span>); <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> EMIE_LMOUSE_TRIPLE_CLICK: result += stringw(L<span class="stringliteral">"EMIE_LMOUSE_TRIPLE_CLICK"</span>); <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> EMIE_RMOUSE_TRIPLE_CLICK: result += stringw(L<span class="stringliteral">"EMIE_RMOUSE_TRIPLE_CLICK"</span>); <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> EMIE_MMOUSE_TRIPLE_CLICK: result += stringw(L<span class="stringliteral">"EMIE_MMOUSE_TRIPLE_CLICK"</span>); <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">default</span>:</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line">}</div></div><!-- fragment --><p> Helper function to print all the state information which get from a mouse-event into a stringw </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> PrintMouseState(<span class="keyword">const</span> SEvent& event, stringw &result)</div><div class="line">{</div><div class="line"> result += stringw(L<span class="stringliteral">"X: "</span>);</div><div class="line"> result += stringw(event.MouseInput.X);</div><div class="line"> result += stringw(L<span class="stringliteral">"\n"</span>);</div><div class="line"></div><div class="line"> result += stringw(L<span class="stringliteral">"Y: "</span>);</div><div class="line"> result += stringw(event.MouseInput.Y);</div><div class="line"> result += stringw(L<span class="stringliteral">"\n"</span>);</div><div class="line"></div><div class="line"></div><div class="line"> result += stringw(L<span class="stringliteral">"Wheel: "</span>);</div><div class="line"> result += stringw(event.MouseInput.Wheel);</div><div class="line"> result += stringw(L<span class="stringliteral">"\n"</span>);</div><div class="line"></div><div class="line"> result += stringw(L<span class="stringliteral">"Shift: "</span>);</div><div class="line"> <span class="keywordflow">if</span> ( event.MouseInput.Shift )</div><div class="line"> result += stringw(L<span class="stringliteral">"true\n"</span>);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> result += stringw(L<span class="stringliteral">"false\n"</span>);</div><div class="line"></div><div class="line"> result += stringw(L<span class="stringliteral">"Control: "</span>);</div><div class="line"> <span class="keywordflow">if</span> ( event.MouseInput.Control )</div><div class="line"> result += stringw(L<span class="stringliteral">"true\n"</span>);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> result += stringw(L<span class="stringliteral">"false\n"</span>);</div><div class="line"></div><div class="line"> result += stringw(L<span class="stringliteral">"ButtonStates: "</span>);</div><div class="line"> result += stringw(event.MouseInput.ButtonStates);</div><div class="line"> result += stringw(L<span class="stringliteral">"\n"</span>);</div><div class="line"></div><div class="line"> result += stringw(L<span class="stringliteral">"isLeftPressed: "</span>);</div><div class="line"> <span class="keywordflow">if</span> ( event.MouseInput.isLeftPressed() )</div><div class="line"> result += stringw(L<span class="stringliteral">"true\n"</span>);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> result += stringw(L<span class="stringliteral">"false\n"</span>);</div><div class="line"></div><div class="line"> result += stringw(L<span class="stringliteral">"isRightPressed: "</span>);</div><div class="line"> <span class="keywordflow">if</span> ( event.MouseInput.isRightPressed() )</div><div class="line"> result += stringw(L<span class="stringliteral">"true\n"</span>);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> result += stringw(L<span class="stringliteral">"false\n"</span>);</div><div class="line"></div><div class="line"> result += stringw(L<span class="stringliteral">"isMiddlePressed: "</span>);</div><div class="line"> <span class="keywordflow">if</span> ( event.MouseInput.isMiddlePressed() )</div><div class="line"> result += stringw(L<span class="stringliteral">"true\n"</span>);</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> result += stringw(L<span class="stringliteral">"false\n"</span>);</div><div class="line"></div><div class="line"> result += stringw(L<span class="stringliteral">"Event: "</span>);</div><div class="line"></div><div class="line"> PrintMouseEventName(event, result);</div><div class="line"></div><div class="line"> result += stringw(L<span class="stringliteral">"\n"</span>);</div><div class="line">}</div></div><!-- fragment --><p> A typical event receiver. </p><div class="fragment"><div class="line"><span class="keyword">class </span>MyEventReceiver : <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"> MyEventReceiver(SAppContext & context) : Context(context) { }</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent& event)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (event.EventType == EET_GUI_EVENT )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">switch</span> ( event.GUIEvent.EventType )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> EGET_BUTTON_CLICKED:</div><div class="line"> {</div><div class="line"> u32 timeNow = Context.Device->getTimer()->getTime();</div><div class="line"> TimerAction action;</div><div class="line"> action.TargetTime = timeNow + DELAY_TIME;</div><div class="line"> <span class="keywordflow">if</span> ( event.GUIEvent.Caller == Context.ButtonSetVisible )</div><div class="line"> {</div><div class="line"> action.Action = ETA_MOUSE_VISIBLE;</div><div class="line"> Context.TimerActions.push_back(action);</div><div class="line"> Context.ButtonSetVisible->setEnabled(<span class="keyword">false</span>);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( event.GUIEvent.Caller == Context.ButtonSetInvisible )</div><div class="line"> {</div><div class="line"> action.Action = ETA_MOUSE_INVISIBLE;</div><div class="line"> Context.TimerActions.push_back(action);</div><div class="line"> Context.ButtonSetInvisible->setEnabled(<span class="keyword">false</span>);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( event.GUIEvent.Caller == Context.ButtonSimulateBadFps )</div><div class="line"> {</div><div class="line"> Context.SimulateBadFps = Context.ButtonSimulateBadFps->isPressed();</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( event.GUIEvent.Caller == Context.ButtonChangeIcon )</div><div class="line"> {</div></div><!-- fragment --><p> Replace an existing cursor icon by another icon. The user has to select both - the icon which should be replaced and the icon which will replace it. </p><div class="fragment"><div class="line">s32 selectedCursor = Context.CursorBox->getSelected();</div><div class="line">s32 selectedSprite = Context.SpriteBox->getSelected();</div><div class="line"><span class="keywordflow">if</span> ( selectedCursor >= 0 && selectedSprite >= 0 )</div><div class="line">{</div></div><!-- fragment --><p> This does replace the icon. </p><div class="fragment"><div class="line">Context.Device->getCursorControl()->changeIcon((ECURSOR_ICON)selectedCursor, Context.Sprites[selectedSprite] );</div></div><!-- fragment --><p> Do also show the new icon. </p><div class="fragment"><div class="line"> Context.Device->getCursorControl()->setActiveIcon( ECURSOR_ICON(selectedCursor) );</div><div class="line"> }</div><div class="line"> }</div><div class="line">}</div><div class="line"><span class="keywordflow">break</span>;</div><div class="line"><span class="keywordflow">case</span> EGET_LISTBOX_CHANGED:</div><div class="line"><span class="keywordflow">case</span> EGET_LISTBOX_SELECTED_AGAIN:</div><div class="line">{</div><div class="line"> <span class="keywordflow">if</span> ( event.GUIEvent.Caller == Context.CursorBox )</div><div class="line"> {</div></div><!-- fragment --><p> Find out which cursor the user selected </p><div class="fragment"><div class="line">s32 selected = Context.CursorBox->getSelected();</div><div class="line"><span class="keywordflow">if</span> ( selected >= 0 )</div><div class="line">{</div></div><!-- fragment --><p> Here we set the new cursor icon which will now be used within our window. </p><div class="fragment"><div class="line"> Context.Device->getCursorControl()->setActiveIcon( ECURSOR_ICON(selected) );</div><div class="line"> }</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">default</span>:</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (event.EventType == EET_MOUSE_INPUT_EVENT)</div><div class="line"> {</div><div class="line"> stringw infoText;</div><div class="line"> PrintMouseState(event, infoText);</div><div class="line"> Context.InfoStatic->setText(infoText.c_str());</div><div class="line"> <span class="keywordflow">if</span> ( event.MouseInput.Event != EMIE_MOUSE_MOVED && event.MouseInput.Event != EMIE_MOUSE_WHEEL ) <span class="comment">// no spam</span></div><div class="line"> {</div><div class="line"> infoText = L<span class="stringliteral">""</span>;</div><div class="line"> PrintMouseEventName(event, infoText);</div><div class="line"> Context.EventBox->insertItem(0, infoText.c_str(), -1);</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"> SAppContext & Context;</div><div class="line">};</div></div><!-- fragment --><p> Use several imagefiles as animation frames for a sprite which can be used as cursor icon. The images in those files all need to have the same size. Return sprite index on success or -1 on failure </p><div class="fragment"><div class="line">s32 AddAnimatedIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver, <span class="keyword">const</span> array< io::path >& files, u32 frameTime )</div><div class="line">{</div><div class="line"> <span class="keywordflow">if</span> ( !spriteBank || !driver || !files.size() )</div><div class="line"> <span class="keywordflow">return</span> -1;</div><div class="line"></div><div class="line"> video::ITexture * tex = driver->getTexture( files[0] );</div><div class="line"> <span class="keywordflow">if</span> ( tex )</div><div class="line"> {</div><div class="line"> array< rect<s32> >& spritePositions = spriteBank->getPositions();</div><div class="line"> u32 idxRect = spritePositions.size();</div><div class="line"> spritePositions.push_back( rect<s32>(0,0, tex->getSize().Width, tex->getSize().Height) );</div><div class="line"></div><div class="line"> SGUISprite sprite;</div><div class="line"> sprite.frameTime = frameTime;</div><div class="line"></div><div class="line"> array< SGUISprite >& sprites = spriteBank->getSprites();</div><div class="line"> u32 startIdx = spriteBank->getTextureCount();</div><div class="line"> <span class="keywordflow">for</span> ( u32 f=0; f < files.size(); ++f )</div><div class="line"> {</div><div class="line"> tex = driver->getTexture( files[f] );</div><div class="line"> <span class="keywordflow">if</span> ( tex )</div><div class="line"> {</div><div class="line"> spriteBank->addTexture( driver->getTexture(files[f]) );</div><div class="line"> gui::SGUISpriteFrame frame;</div><div class="line"> frame.rectNumber = idxRect;</div><div class="line"> frame.textureNumber = startIdx+f;</div><div class="line"> sprite.Frames.push_back( frame );</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> sprites.push_back( sprite );</div><div class="line"> <span class="keywordflow">return</span> sprites.size()-1;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> -1;</div><div class="line">}</div></div><!-- fragment --><p> Use several images within one imagefile as animation frames for a sprite which can be used as cursor icon The sizes of the icons within that file all need to have the same size Return sprite index on success or -1 on failure </p><div class="fragment"><div class="line">s32 AddAnimatedIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver, <span class="keyword">const</span> io::path& file, <span class="keyword">const</span> array< rect<s32> >& rects, u32 frameTime )</div><div class="line">{</div><div class="line"> <span class="keywordflow">if</span> ( !spriteBank || !driver || !rects.size() )</div><div class="line"> <span class="keywordflow">return</span> -1;</div><div class="line"></div><div class="line"> video::ITexture * tex = driver->getTexture( file );</div><div class="line"> <span class="keywordflow">if</span> ( tex )</div><div class="line"> {</div><div class="line"> array< rect<s32> >& spritePositions = spriteBank->getPositions();</div><div class="line"> u32 idxRect = spritePositions.size();</div><div class="line"> u32 idxTex = spriteBank->getTextureCount();</div><div class="line"> spriteBank->addTexture( tex );</div><div class="line"></div><div class="line"> SGUISprite sprite;</div><div class="line"> sprite.frameTime = frameTime;</div><div class="line"></div><div class="line"> array< SGUISprite >& sprites = spriteBank->getSprites();</div><div class="line"> <span class="keywordflow">for</span> ( u32 i=0; i < rects.size(); ++i )</div><div class="line"> {</div><div class="line"> spritePositions.push_back( rects[i] );</div><div class="line"></div><div class="line"> gui::SGUISpriteFrame frame;</div><div class="line"> frame.rectNumber = idxRect+i;</div><div class="line"> frame.textureNumber = idxTex;</div><div class="line"> sprite.Frames.push_back( frame );</div><div class="line"> }</div><div class="line"></div><div class="line"> sprites.push_back( sprite );</div><div class="line"> <span class="keywordflow">return</span> sprites.size()-1;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> -1;</div><div class="line">}</div></div><!-- fragment --><p> Create a non-animated icon from the given file and position and put it into the spritebank. We can use this icon later on in a cursor. </p><div class="fragment"><div class="line">s32 AddIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver, <span class="keyword">const</span> io::path& file, <span class="keyword">const</span> core::rect<s32>& rect )</div><div class="line">{</div><div class="line"> <span class="keywordflow">if</span> ( !spriteBank || !driver )</div><div class="line"> <span class="keywordflow">return</span> -1;</div><div class="line"></div><div class="line"> video::ITexture * tex = driver->getTexture( file );</div><div class="line"> <span class="keywordflow">if</span> ( tex )</div><div class="line"> {</div><div class="line"> core::array< core::rect<irr::s32> >& spritePositions = spriteBank->getPositions();</div><div class="line"> spritePositions.push_back( rect );</div><div class="line"> array< SGUISprite >& sprites = spriteBank->getSprites();</div><div class="line"> spriteBank->addTexture( tex );</div><div class="line"></div><div class="line"> gui::SGUISpriteFrame frame;</div><div class="line"> frame.rectNumber = spritePositions.size()-1;</div><div class="line"> frame.textureNumber = spriteBank->getTextureCount()-1;</div><div class="line"></div><div class="line"> SGUISprite sprite;</div><div class="line"> sprite.frameTime = 0;</div><div class="line"> sprite.Frames.push_back( frame );</div><div class="line"></div><div class="line"> sprites.push_back( sprite );</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> sprites.size()-1;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> -1;</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> video::E_DRIVER_TYPE driverType = driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> IrrlichtDevice * device = createDevice(driverType, dimension2d<u32>(640, 480));</div><div class="line"> <span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div><div class="line"></div><div class="line"> <span class="comment">// It's sometimes of interest to know how the mouse behaves after a resize</span></div><div class="line"> device->setResizable(<span class="keyword">true</span>);</div><div class="line"></div><div class="line"> device->setWindowCaption(L<span class="stringliteral">"Cursor control - Irrlicht engine tutorial"</span>);</div><div class="line"> video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line"> IGUIEnvironment* env = device->getGUIEnvironment();</div><div class="line"></div><div class="line"> gui::IGUISpriteBank * SpriteBankIcons;</div><div class="line"></div><div class="line"> SAppContext context;</div><div class="line"> context.Device = device;</div><div class="line"></div><div class="line"> rect< s32 > rectInfoStatic(10,10, 200, 200);</div><div class="line"> env->addStaticText (L<span class="stringliteral">"Cursor state information"</span>, rectInfoStatic, <span class="keyword">true</span>, <span class="keyword">true</span>);</div><div class="line"> rectInfoStatic.UpperLeftCorner += dimension2di(0, 15);</div><div class="line"> context.InfoStatic = env->addStaticText (L<span class="stringliteral">""</span>, rectInfoStatic, <span class="keyword">true</span>, <span class="keyword">true</span>);</div><div class="line"> rect< s32 > rectEventBox(10,210, 200, 400);</div><div class="line"> env->addStaticText (L<span class="stringliteral">"click events (new on top)"</span>, rectEventBox, <span class="keyword">true</span>, <span class="keyword">true</span>);</div><div class="line"> rectEventBox.UpperLeftCorner += dimension2di(0, 15);</div><div class="line"> context.EventBox = env->addListBox(rectEventBox);</div><div class="line"> rect< s32 > rectCursorBox(210,10, 400, 250);</div><div class="line"> env->addStaticText (L<span class="stringliteral">"cursors, click to set the active one"</span>, rectCursorBox, <span class="keyword">true</span>, <span class="keyword">true</span>);</div><div class="line"> rectCursorBox.UpperLeftCorner += dimension2di(0, 15);</div><div class="line"> context.CursorBox = env->addListBox(rectCursorBox);</div><div class="line"> rect< s32 > rectSpriteBox(210,260, 400, 400);</div><div class="line"> env->addStaticText (L<span class="stringliteral">"sprites"</span>, rectSpriteBox, <span class="keyword">true</span>, <span class="keyword">true</span>);</div><div class="line"> rectSpriteBox.UpperLeftCorner += dimension2di(0, 15);</div><div class="line"> context.SpriteBox = env->addListBox(rectSpriteBox);</div><div class="line"></div><div class="line"> context.ButtonSetVisible = env->addButton( rect<s32>( 410, 20, 560, 40 ), 0, -1, L<span class="stringliteral">"set visible (delayed)"</span> );</div><div class="line"> context.ButtonSetInvisible = env->addButton( rect<s32>( 410, 50, 560, 70 ), 0, -1, L<span class="stringliteral">"set invisible (delayed)"</span> );</div><div class="line"> context.ButtonSimulateBadFps = env->addButton( rect<s32>( 410, 80, 560, 100 ), 0, -1, L<span class="stringliteral">"simulate bad FPS"</span> );</div><div class="line"> context.ButtonSimulateBadFps->setIsPushButton(<span class="keyword">true</span>);</div><div class="line"> context.ButtonChangeIcon = env->addButton( rect<s32>( 410, 140, 560, 160 ), 0, -1, L<span class="stringliteral">"replace cursor icon\n(cursor+sprite must be selected)"</span> );</div><div class="line"></div><div class="line"> <span class="comment">// set the names for all the system cursors</span></div><div class="line"> <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0; i < (int)gui::ECI_COUNT; ++i )</div><div class="line"> {</div><div class="line"> context.CursorBox->addItem(stringw( GUICursorIconNames[i] ).c_str());</div><div class="line"> }</div></div><!-- fragment --><p> Create sprites which then can be used as cursor icons. </p><div class="fragment"><div class="line"> SpriteBankIcons = env->addEmptySpriteBank(io::path(<span class="stringliteral">"cursor_icons"</span>));</div><div class="line"> context.SpriteBox->setSpriteBank(SpriteBankIcons);</div><div class="line"></div><div class="line"> <span class="comment">// create one animated icon from several files</span></div><div class="line"> array< io::path > files;</div><div class="line"> files.push_back( io::path(<span class="stringliteral">"../../media/icon_crosshairs16x16bw1.png"</span>) );</div><div class="line"> files.push_back( io::path(<span class="stringliteral">"../../media/icon_crosshairs16x16bw2.png"</span>) );</div><div class="line"> files.push_back( io::path(<span class="stringliteral">"../../media/icon_crosshairs16x16bw3.png"</span>) );</div><div class="line"> files.push_back( io::path(<span class="stringliteral">"../../media/icon_crosshairs16x16bw3.png"</span>) );</div><div class="line"> files.push_back( io::path(<span class="stringliteral">"../../media/icon_crosshairs16x16bw2.png"</span>) );</div><div class="line"> SCursorSprite spriteBw; <span class="comment">// the sprite + some additional information needed for cursors</span></div><div class="line"> spriteBw.SpriteId = AddAnimatedIconToSpriteBank( SpriteBankIcons, driver, files, 200 );</div><div class="line"> spriteBw.SpriteBank = SpriteBankIcons;</div><div class="line"> spriteBw.HotSpot = position2d<s32>(7,7);</div><div class="line"> context.addIcon(L<span class="stringliteral">"crosshair_bw"</span>, spriteBw);</div><div class="line"></div><div class="line"> <span class="comment">// create one animated icon from one file</span></div><div class="line"> array< rect<s32> > iconRects;</div><div class="line"> iconRects.push_back( rect<s32>(0,0, 16, 16) );</div><div class="line"> iconRects.push_back( rect<s32>(16,0, 32, 16) );</div><div class="line"> iconRects.push_back( rect<s32>(0,16, 16, 32) );</div><div class="line"> iconRects.push_back( rect<s32>(0,16, 16, 32) );</div><div class="line"> iconRects.push_back( rect<s32>(16,0, 32, 16) );</div><div class="line"> SCursorSprite spriteCol; <span class="comment">// the sprite + some additional information needed for cursors</span></div><div class="line"> spriteCol.SpriteId = AddAnimatedIconToSpriteBank( SpriteBankIcons, driver, io::path(<span class="stringliteral">"../../media/icon_crosshairs16x16col.png"</span>), iconRects, 200 );</div><div class="line"> spriteCol.HotSpot = position2d<s32>(7,7);</div><div class="line"> spriteCol.SpriteBank = SpriteBankIcons;</div><div class="line"> context.addIcon(L<span class="stringliteral">"crosshair_colored"</span>, spriteCol);</div><div class="line"></div><div class="line"> <span class="comment">// Create some non-animated icons</span></div><div class="line"> rect<s32> rectIcon;</div><div class="line"> SCursorSprite spriteNonAnimated(SpriteBankIcons, 0, position2d<s32>(7,7));</div><div class="line"></div><div class="line"> rectIcon = rect<s32>(0,0, 16, 16);</div><div class="line"> spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path(<span class="stringliteral">"../../media/icon_crosshairs16x16col.png"</span>), rectIcon );</div><div class="line"> context.addIcon(L<span class="stringliteral">"crosshair_col1"</span>, spriteNonAnimated, <span class="keyword">false</span>);</div><div class="line"></div><div class="line"> rectIcon = rect<s32>(16,0, 32, 16);</div><div class="line"> spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path(<span class="stringliteral">"../../media/icon_crosshairs16x16col.png"</span>), rectIcon );</div><div class="line"> context.addIcon(L<span class="stringliteral">"crosshair_col2"</span>, spriteNonAnimated, <span class="keyword">false</span>);</div><div class="line"></div><div class="line"> rectIcon = rect<s32>(0,16, 16, 32);</div><div class="line"> spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path(<span class="stringliteral">"../../media/icon_crosshairs16x16col.png"</span>), rectIcon );</div><div class="line"> context.addIcon(L<span class="stringliteral">"crosshair_col3"</span>, spriteNonAnimated, <span class="keyword">false</span>);</div><div class="line"></div><div class="line"></div><div class="line"> MyEventReceiver receiver(context);</div><div class="line"> device->setEventReceiver(&receiver);</div><div class="line"></div><div class="line"> <span class="keywordflow">while</span>(device->run() && driver)</div><div class="line"> {</div><div class="line"> <span class="comment">// if (device->isWindowActive())</span></div><div class="line"> {</div><div class="line"> u32 realTimeNow = device->getTimer()->getRealTime();</div><div class="line"></div><div class="line"> context.update();</div><div class="line"></div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, SColor(0,200,200,200));</div><div class="line"></div><div class="line"> env->drawAll();</div><div class="line"></div><div class="line"> <span class="comment">// draw custom sprite with Irrlicht functions for comparison. It should usually look the same as the cursors.</span></div><div class="line"> <span class="keywordflow">if</span> ( context.SpriteBox )</div><div class="line"> {</div><div class="line"> s32 selectedSprite = context.SpriteBox->getSelected();</div><div class="line"> <span class="keywordflow">if</span> ( selectedSprite >= 0 && context.Sprites[selectedSprite].SpriteId >= 0 )</div><div class="line"> {</div><div class="line"> SpriteBankIcons->draw2DSprite(u32(context.Sprites[selectedSprite].SpriteId), position2di(580, 140), 0, video::SColor(255, 255, 255, 255), 0, realTimeNow);</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> driver->endScene();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// By simulating bad fps we can find out if hardware-support for cursors works or not. If it works the cursor will move as usual,while it otherwise will just update with 2 fps now.</span></div><div class="line"> <span class="keywordflow">if</span> ( context.SimulateBadFps )</div><div class="line"> {</div><div class="line"> device->sleep(500); <span class="comment">// 2 fps</span></div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> device->sleep(10);</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> device->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/25.XmlHandling/Makefile b/examples/25.XmlHandling/Makefile new file mode 100644 index 0000000..92f5655 --- /dev/null +++ b/examples/25.XmlHandling/Makefile @@ -0,0 +1,66 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+
+# Name of the executable created (.exe will be added automatically if necessary)
+Target := 25.XmlHandling
+# List of source files, separated by spaces
+Sources := main.cpp
+# Path to Irrlicht directory, should contain include/ and lib/
+IrrlichtHome := ../..
+# Path for the executable. Note that Irrlicht.dll should usually also be there for win32 systems
+BinPath = ../../bin/$(SYSTEM)
+
+# general compiler settings (might need to be set when compiling the lib, too)
+# preprocessor flags, e.g. defines and include paths
+USERCPPFLAGS =
+# compiler flags such as optimization flags
+USERCXXFLAGS = -O3 -ffast-math
+#USERCXXFLAGS = -g -Wall
+# linker flags such as additional libraries and link paths
+USERLDFLAGS =
+
+####
+#no changes necessary below this line
+####
+
+CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS)
+CXXFLAGS = $(USERCXXFLAGS)
+LDFLAGS = $(USERLDFLAGS)
+
+#default target is Linux
+all: all_linux
+
+# target specific settings
+all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
+all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32 static_win32: SUF=.exe
+static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
+all_win32: LDFLAGS += -lopengl32 -lm
+static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = $(BinPath)/$(Target)$(SUF)
+
+all_linux all_win32 static_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 static_win32 clean clean_linux clean_win32
+
+#multilib handling
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+#solaris real-time features
+ifeq ($(HOSTTYPE), sun4)
+LDFLAGS += -lrt
+endif
+
diff --git a/examples/25.XmlHandling/XmlHandling.cbp b/examples/25.XmlHandling/XmlHandling.cbp new file mode 100644 index 0000000..b9bc5c9 --- /dev/null +++ b/examples/25.XmlHandling/XmlHandling.cbp @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 25 Xml handling" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/XmlHandling" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/XmlHandling" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/25.XmlHandling/XmlHandling.vcproj b/examples/25.XmlHandling/XmlHandling.vcproj new file mode 100644 index 0000000..152a415 --- /dev/null +++ b/examples/25.XmlHandling/XmlHandling.vcproj @@ -0,0 +1,195 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="25.XmlHandling"
+ ProjectGUID="{8FDA260E-EF27-4f8c-8720-7AF707DD0D9E}"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="_IRR_STATIC_LIB_;WIN32;_DEBUG;_WINDOWS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\25.XmlHandling.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/XmlHandling.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/QIfist /Oa"
+ Optimization="3"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ CallingConvention="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\25.XmlHandling.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/25.XmlHandling/XmlHandling_vc10.vcxproj b/examples/25.XmlHandling/XmlHandling_vc10.vcxproj new file mode 100644 index 0000000..43f9e73 --- /dev/null +++ b/examples/25.XmlHandling/XmlHandling_vc10.vcxproj @@ -0,0 +1,182 @@ +ďťż<?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">
+ <ProjectName>25.XmlHandling</ProjectName>
+ <ProjectGuid>{8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}</ProjectGuid>
+ <RootNamespace>25.XmlHandling</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/25.XmlHandling/XmlHandling_vc11.vcxproj b/examples/25.XmlHandling/XmlHandling_vc11.vcxproj new file mode 100644 index 0000000..43f9e73 --- /dev/null +++ b/examples/25.XmlHandling/XmlHandling_vc11.vcxproj @@ -0,0 +1,182 @@ +ďťż<?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">
+ <ProjectName>25.XmlHandling</ProjectName>
+ <ProjectGuid>{8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}</ProjectGuid>
+ <RootNamespace>25.XmlHandling</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/25.XmlHandling/XmlHandling_vc12.vcxproj b/examples/25.XmlHandling/XmlHandling_vc12.vcxproj new file mode 100644 index 0000000..5354637 --- /dev/null +++ b/examples/25.XmlHandling/XmlHandling_vc12.vcxproj @@ -0,0 +1,182 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>25.XmlHandling</ProjectName>
+ <ProjectGuid>{8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}</ProjectGuid>
+ <RootNamespace>25.XmlHandling</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/25.XmlHandling/XmlHandling_vc8.vcproj b/examples/25.XmlHandling/XmlHandling_vc8.vcproj new file mode 100644 index 0000000..0831ba9 --- /dev/null +++ b/examples/25.XmlHandling/XmlHandling_vc8.vcproj @@ -0,0 +1,190 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="25.XmlHandling_vc8"
+ ProjectGUID="{8FDA260E-EF27-4f8c-8720-7AF707DD0D9E}"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <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"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\25.XmlHandling.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/XmlHandling.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ CallingConvention="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\25.XmlHandling.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/25.XmlHandling/XmlHandling_vc9.vcproj b/examples/25.XmlHandling/XmlHandling_vc9.vcproj new file mode 100644 index 0000000..79a1048 --- /dev/null +++ b/examples/25.XmlHandling/XmlHandling_vc9.vcproj @@ -0,0 +1,185 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="25.XmlHandling_vc9"
+ ProjectGUID="{8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}"
+ RootNamespace="25.XmlHandling_vc9"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <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"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\25.XmlHandling.exe"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/XmlHandling.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ ExceptionHandling="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="0"
+ CallingConvention="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\25.XmlHandling.exe"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/25.XmlHandling/main.cpp b/examples/25.XmlHandling/main.cpp new file mode 100644 index 0000000..25e813c --- /dev/null +++ b/examples/25.XmlHandling/main.cpp @@ -0,0 +1,507 @@ +/** Example 025 Xml Handling
+
+Demonstrates loading and saving of configurations via XML
+
+@author Y.M. Bosman \<yoran.bosman@gmail.com\>
+
+This demo features a fully usable system for configuration handling. The code
+can easily be integrated into own apps.
+
+*/
+
+#include <irrlicht.h>
+
+using namespace irr;
+using namespace core;
+using namespace scene;
+using namespace video;
+using namespace io;
+using namespace gui;
+
+#ifdef _IRR_WINDOWS_
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+
+/* SettingManager class.
+
+This class loads and writes the settings and manages the options.
+
+The class makes use of irrMap which is a an associative arrays using a
+red-black tree it allows easy mapping of a key to a value, along the way there
+is some information on how to use it.
+*/
+
+class SettingManager
+{
+public:
+
+ // Construct setting managers and set default settings
+ SettingManager(const stringw& settings_file): SettingsFile(settings_file), NullDevice(0)
+ {
+ // Irrlicht null device, we want to load settings before we actually created our device, therefore, nulldevice
+ NullDevice = irr::createDevice(irr::video::EDT_NULL);
+
+ //DriverOptions is an irrlicht map,
+ //we can insert values in the map in two ways by calling insert(key,value) or by using the [key] operator
+ //the [] operator overrides values if they already exist
+ DriverOptions.insert(L"Software", EDT_SOFTWARE);
+ DriverOptions.insert(L"OpenGL", EDT_OPENGL);
+ DriverOptions.insert(L"Direct3D9", EDT_DIRECT3D9);
+
+ //some resolution options
+ ResolutionOptions.insert(L"640x480", dimension2du(640,480));
+ ResolutionOptions.insert(L"800x600", dimension2du(800,600));
+ ResolutionOptions.insert(L"1024x768", dimension2du(1024,768));
+
+ //our preferred defaults
+ SettingMap.insert(L"driver", L"Direct3D9");
+ SettingMap.insert(L"resolution", L"640x480");
+ SettingMap.insert(L"fullscreen", L"0"); //0 is false
+ }
+
+ // Destructor, you could store settings automatically on exit of your
+ // application if you wanted to in our case we simply drop the
+ // nulldevice
+ ~SettingManager()
+ {
+ if (NullDevice)
+ {
+ NullDevice->closeDevice();
+ NullDevice->drop();
+ }
+ };
+
+ /*
+ Load xml from disk, overwrite default settings
+ The xml we are trying to load has the following structure
+ settings nested in sections nested in the root node, like:
+ \verbatim
+ <pre>
+ <?xml version="1.0"?>
+ <mygame>
+ <video>
+ <setting name="driver" value="Direct3D9" />
+ <setting name="fullscreen" value="0" />
+ <setting name="resolution" value="1024x768" />
+ </video>
+ </mygame>
+ </pre>
+ \endverbatim
+ */
+ bool load()
+ {
+ //if not able to create device don't attempt to load
+ if (!NullDevice)
+ return false;
+
+ irr::io::IXMLReader* xml = NullDevice->getFileSystem()->createXMLReader(SettingsFile); //create xml reader
+ if (!xml)
+ return false;
+
+ const stringw settingTag(L"setting"); //we'll be looking for this tag in the xml
+ stringw currentSection; //keep track of our current section
+ const stringw videoTag(L"video"); //constant for videotag
+
+ //while there is more to read
+ while (xml->read())
+ {
+ //check the node type
+ switch (xml->getNodeType())
+ {
+ //we found a new element
+ case irr::io::EXN_ELEMENT:
+ {
+ //we currently are in the empty or mygame section and find the video tag so we set our current section to video
+ if (currentSection.empty() && videoTag.equals_ignore_case(xml->getNodeName()))
+ {
+ currentSection = videoTag;
+ }
+ //we are in the video section and we find a setting to parse
+ else if (currentSection.equals_ignore_case(videoTag) && settingTag.equals_ignore_case(xml->getNodeName() ))
+ {
+ //read in the key
+ stringw key = xml->getAttributeValueSafe(L"name");
+ //if there actually is a key to set
+ if (!key.empty())
+ {
+ //set the setting in the map to the value,
+ //the [] operator overrides values if they already exist or inserts a new key value
+ //pair into the settings map if it was not defined yet
+ SettingMap[key] = xml->getAttributeValueSafe(L"value");
+ }
+ }
+
+ //..
+ // You can add your own sections and tags to read in here
+ //..
+ }
+ break;
+
+ //we found the end of an element
+ case irr::io::EXN_ELEMENT_END:
+ //we were at the end of the video section so we reset our tag
+ currentSection=L"";
+ break;
+ }
+ }
+
+ // don't forget to delete the xml reader
+ xml->drop();
+
+ return true;
+ }
+
+ // Save the xml to disk. We use the nulldevice.
+ bool save()
+ {
+
+ //if not able to create device don't attempt to save
+ if (!NullDevice)
+ return false;
+
+ //create xml writer
+ irr::io::IXMLWriter* xwriter = NullDevice->getFileSystem()->createXMLWriter( SettingsFile );
+ if (!xwriter)
+ return false;
+
+ //write out the obligatory xml header. Each xml-file needs to have exactly one of those.
+ xwriter->writeXMLHeader();
+
+ //start element mygame, you replace the label "mygame" with anything you want
+ xwriter->writeElement(L"mygame");
+ xwriter->writeLineBreak(); //new line
+
+ //start section with video settings
+ xwriter->writeElement(L"video");
+ xwriter->writeLineBreak(); //new line
+
+ // getIterator gets us a pointer to the first node of the settings map
+ // every iteration we increase the iterator which gives us the next map node
+ // until we reach the end we write settings one by one by using the nodes key and value functions
+ map<stringw, stringw>::Iterator i = SettingMap.getIterator();
+ for(; !i.atEnd(); i++)
+ {
+ //write element as <setting name="key" value="x" />
+ //the second parameter indicates this is an empty element with no children, just attributes
+ xwriter->writeElement(L"setting",true, L"name", i->getKey().c_str(), L"value",i->getValue().c_str() );
+ xwriter->writeLineBreak();
+ }
+ xwriter->writeLineBreak();
+
+ //close video section
+ xwriter->writeClosingTag(L"video");
+ xwriter->writeLineBreak();
+
+ //..
+ // You can add writing sound settings, savegame information etc
+ //..
+
+ //close mygame section
+ xwriter->writeClosingTag(L"mygame");
+
+ //delete xml writer
+ xwriter->drop();
+
+ return true;
+ }
+
+ // Set setting in our manager
+ void setSetting(const stringw& name, const stringw& value)
+ {
+ SettingMap[name]=value;
+ }
+
+ // set setting overload to quickly assign integers to our setting map
+ void setSetting(const stringw& name, s32 value)
+ {
+ SettingMap[name]=stringw(value);
+ }
+
+ // Get setting as string
+ stringw getSetting(const stringw& key) const
+ {
+ //the find function or irrmap returns a pointer to a map Node
+ //if the key can be found, otherwise it returns null
+ //the map node has the function getValue and getKey, as we already know the key, we return node->getValue()
+ map<stringw, stringw>::Node* n = SettingMap.find(key);
+ if (n)
+ return n->getValue();
+ else
+ return L"";
+ }
+
+ //
+ bool getSettingAsBoolean(const stringw& key ) const
+ {
+ stringw s = getSetting(key);
+ if (s.empty())
+ return false;
+ return s.equals_ignore_case(L"1");
+ }
+
+ //
+ s32 getSettingAsInteger(const stringw& key) const
+ {
+ //we implicitly cast to string instead of stringw because strtol10 does not accept wide strings
+ const stringc s = getSetting(key);
+ if (s.empty())
+ return 0;
+
+ return strtol10(s.c_str());
+ }
+
+public:
+ map<stringw, s32> DriverOptions; //available options for driver config
+ map<stringw, dimension2du> ResolutionOptions; //available options for resolution config
+private:
+ SettingManager(const SettingManager& other); // defined but not implemented
+ SettingManager& operator=(const SettingManager& other); // defined but not implemented
+
+ map<stringw, stringw> SettingMap; //current config
+
+ stringw SettingsFile; // location of the xml, usually the
+ irr::IrrlichtDevice* NullDevice;
+};
+
+/*
+Application context for global variables
+*/
+struct SAppContext
+{
+ SAppContext()
+ : Device(0),Gui(0), Driver(0), Settings(0), ShouldQuit(false),
+ ButtonSave(0), ButtonExit(0), ListboxDriver(0),
+ ListboxResolution(0), CheckboxFullscreen(0)
+ {
+ }
+
+ ~SAppContext()
+ {
+ if (Settings)
+ delete Settings;
+
+ if (Device)
+ {
+ Device->closeDevice();
+ Device->drop();
+ }
+ }
+
+ IrrlichtDevice* Device;
+ IGUIEnvironment* Gui;
+ IVideoDriver* Driver;
+ SettingManager* Settings;
+ bool ShouldQuit;
+
+ //settings dialog
+ IGUIButton* ButtonSave;
+ IGUIButton* ButtonExit;
+ IGUIListBox* ListboxDriver;
+ IGUIListBox* ListboxResolution;
+ IGUICheckBox* CheckboxFullscreen;
+};
+
+/*
+ A typical event receiver.
+*/
+class MyEventReceiver : public IEventReceiver
+{
+public:
+ MyEventReceiver(SAppContext & a) : App(a) { }
+
+ virtual bool OnEvent(const SEvent& event)
+ {
+ if (event.EventType == EET_GUI_EVENT )
+ {
+ switch ( event.GUIEvent.EventType )
+ {
+ //handle button click events
+ case EGET_BUTTON_CLICKED:
+ {
+ //Our save button was called so we obtain the settings from our dialog and save them
+ if ( event.GUIEvent.Caller == App.ButtonSave )
+ {
+ //if there is a selection write it
+ if ( App.ListboxDriver->getSelected() != -1)
+ App.Settings->setSetting(L"driver", App.ListboxDriver->getListItem(App.ListboxDriver->getSelected()));
+
+ //if there is a selection write it
+ if ( App.ListboxResolution->getSelected() != -1)
+ App.Settings->setSetting(L"resolution", App.ListboxResolution->getListItem(App.ListboxResolution->getSelected()));
+
+ App.Settings->setSetting(L"fullscreen", App.CheckboxFullscreen->isChecked());
+
+
+ if (App.Settings->save())
+ {
+ App.Gui->addMessageBox(L"settings save",L"settings saved, please restart for settings to change effect","",true);
+ }
+ }
+ // cancel/exit button clicked, tell the application to exit
+ else if ( event.GUIEvent.Caller == App.ButtonExit)
+ {
+ App.ShouldQuit = true;
+ }
+ }
+ break;
+ }
+ }
+
+ return false;
+ }
+
+private:
+ SAppContext & App;
+};
+
+
+/*
+Function to create a video settings dialog
+This dialog shows the current settings from the configuration xml and allows them to be changed
+*/
+void createSettingsDialog(SAppContext& app)
+{
+ // first get rid of alpha in gui
+ for (irr::s32 i=0; i<irr::gui::EGDC_COUNT ; ++i)
+ {
+ irr::video::SColor col = app.Gui->getSkin()->getColor((irr::gui::EGUI_DEFAULT_COLOR)i);
+ col.setAlpha(255);
+ app.Gui->getSkin()->setColor((irr::gui::EGUI_DEFAULT_COLOR)i, col);
+ }
+
+ //create video settings windows
+ gui::IGUIWindow* windowSettings = app.Gui->addWindow(rect<s32>(10,10,400,400),true,L"Videosettings");
+ app.Gui->addStaticText (L"Select your desired video settings", rect< s32 >(10,20, 200, 40), false, true, windowSettings);
+
+ // add listbox for driver choice
+ app.Gui->addStaticText (L"Driver", rect< s32 >(10,50, 200, 60), false, true, windowSettings);
+ app.ListboxDriver = app.Gui->addListBox(rect<s32>(10,60,220,120), windowSettings, 1,true);
+
+ //add all available options to the driver choice listbox
+ map<stringw, s32>::Iterator i = app.Settings->DriverOptions.getIterator();
+ for(; !i.atEnd(); i++)
+ app.ListboxDriver->addItem(i->getKey().c_str());
+
+ //set currently selected driver
+ app.ListboxDriver->setSelected(app.Settings->getSetting("driver").c_str());
+
+ // add listbox for resolution choice
+ app.Gui->addStaticText (L"Resolution", rect< s32 >(10,130, 200, 140), false, true, windowSettings);
+ app.ListboxResolution = app.Gui->addListBox(rect<s32>(10,140,220,200), windowSettings, 1,true);
+
+ //add all available options to the resolution listbox
+ map<stringw, dimension2du>::Iterator ri = app.Settings->ResolutionOptions.getIterator();
+ for(; !ri.atEnd(); ri++)
+ app.ListboxResolution->addItem(ri->getKey().c_str());
+
+ //set currently selected resolution
+ app.ListboxResolution->setSelected(app.Settings->getSetting("resolution").c_str());
+
+ //add checkbox to toggle fullscreen, initially set to loaded setting
+ app.CheckboxFullscreen = app.Gui->addCheckBox(
+ app.Settings->getSettingAsBoolean("fullscreen"),
+ rect<s32>(10,220,220,240), windowSettings, -1,
+ L"Fullscreen");
+
+ //last but not least add save button
+ app.ButtonSave = app.Gui->addButton(
+ rect<s32>(80,250,150,270), windowSettings, 2,
+ L"Save video settings");
+
+ //exit/cancel button
+ app.ButtonExit = app.Gui->addButton(
+ rect<s32>(160,250,240,270), windowSettings, 2,
+ L"Cancel and exit");
+}
+
+/*
+The main function. Creates all objects and does the XML handling.
+*/
+int main()
+{
+ //create new application context
+ SAppContext app;
+
+ //create device creation parameters that can get overwritten by our settings file
+ SIrrlichtCreationParameters param;
+ param.DriverType = EDT_SOFTWARE;
+ param.WindowSize.set(640,480);
+
+ // Try to load config.
+ // I leave it as an exercise of the reader to store the configuration in the local application data folder,
+ // the only logical place to store config data for games. For all other operating systems I redirect to your manuals
+ app.Settings = new SettingManager("../../media/settings.xml");
+ if ( !app.Settings->load() )
+ {
+ // ...
+ // Here add your own exception handling, for now we continue because there are defaults set in SettingManager constructor
+ // ...
+ }
+ else
+ {
+ //settings xml loaded from disk,
+
+ //map driversetting to driver type and test if the setting is valid
+ //the DriverOptions map contains string representations mapped to to irrlicht E_DRIVER_TYPE enum
+ //e.g "direct3d9" will become 4
+ //see DriverOptions in the settingmanager class for details
+ map<stringw, s32>::Node* driver = app.Settings->DriverOptions.find( app.Settings->getSetting("driver") );
+
+ if (driver)
+ {
+ if ( irr::IrrlichtDevice::isDriverSupported( static_cast<E_DRIVER_TYPE>( driver->getValue() )))
+ {
+ // selected driver is supported, so we use it.
+ param.DriverType = static_cast<E_DRIVER_TYPE>( driver->getValue());
+ }
+ }
+
+ //map resolution setting to dimension in a similar way as demonstrated above
+ map<stringw, dimension2du>::Node* res = app.Settings->ResolutionOptions.find( app.Settings->getSetting("resolution") );
+ if (res)
+ {
+ param.WindowSize = res->getValue();
+ }
+
+ //get fullscreen setting from config
+ param.Fullscreen = app.Settings->getSettingAsBoolean("fullscreen");
+ }
+
+ //create the irrlicht device using the settings
+ app.Device = createDeviceEx(param);
+ if (app.Device == 0)
+ {
+ // You can add your own exception handling on driver failure
+ exit(0);
+ }
+
+ app.Device->setWindowCaption(L"Xmlhandling - Irrlicht engine tutorial");
+ app.Driver = app.Device->getVideoDriver();
+ app.Gui = app.Device->getGUIEnvironment();
+
+ createSettingsDialog(app);
+
+ //set event receiver so we can respond to gui events
+ MyEventReceiver receiver(app);
+ app.Device->setEventReceiver(&receiver);
+
+ //enter main loop
+ while (!app.ShouldQuit && app.Device->run())
+ {
+ if (app.Device->isWindowActive())
+ {
+ app.Driver->beginScene(true, true, SColor(0,200,200,200));
+ app.Gui->drawAll();
+ app.Driver->endScene();
+ }
+ app.Device->sleep(10);
+ }
+
+ //app destroys device in destructor
+
+ return 0;
+}
+
+/*
+**/
diff --git a/examples/25.XmlHandling/tutorial.html b/examples/25.XmlHandling/tutorial.html new file mode 100644 index 0000000..d5d28a8 --- /dev/null +++ b/examples/25.XmlHandling/tutorial.html @@ -0,0 +1,219 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 25: Xml Handling</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 25: Xml Handling </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/025shot.jpg" alt="025shot.jpg"/> +</div> + <p>Demonstrates loading and saving of configurations via XML</p> +<dl class="section author"><dt>Author</dt><dd>Y.M. Bosman <<a href="#" onclick="location.href='mai'+'lto:'+'yor'+'an'+'.bo'+'sm'+'an@'+'gm'+'ail'+'.c'+'om'; return false;">yoran<span style="display: none;">.nosp@m.</span>.bos<span style="display: none;">.nosp@m.</span>man@g<span style="display: none;">.nosp@m.</span>mail<span style="display: none;">.nosp@m.</span>.com</a>></dd></dl> +<p>This demo features a fully usable system for configuration handling. The code can easily be integrated into own apps.</p> +<div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"><span class="keyword">using namespace </span>core;</div><div class="line"><span class="keyword">using namespace </span>scene;</div><div class="line"><span class="keyword">using namespace </span>video;</div><div class="line"><span class="keyword">using namespace </span>io;</div><div class="line"><span class="keyword">using namespace </span>gui;</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef _IRR_WINDOWS_</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> SettingManager class.</p> +<p>This class loads and writes the settings and manages the options.</p> +<p>The class makes use of irrMap which is a an associative arrays using a red-black tree it allows easy mapping of a key to a value, along the way there is some information on how to use it. </p><div class="fragment"><div class="line"><span class="keyword">class </span>SettingManager</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"></div><div class="line"> <span class="comment">// Construct setting managers and set default settings</span></div><div class="line"> SettingManager(<span class="keyword">const</span> stringw& settings_file): SettingsFile(settings_file), NullDevice(0)</div><div class="line"> {</div><div class="line"> <span class="comment">// Irrlicht null device, we want to load settings before we actually created our device, therefore, nulldevice</span></div><div class="line"> NullDevice = irr::createDevice(irr::video::EDT_NULL);</div><div class="line"></div><div class="line"> <span class="comment">//DriverOptions is an irrlicht map,</span></div><div class="line"> <span class="comment">//we can insert values in the map in two ways by calling insert(key,value) or by using the [key] operator</span></div><div class="line"> <span class="comment">//the [] operator overrides values if they already exist</span></div><div class="line"> DriverOptions.insert(L<span class="stringliteral">"Software"</span>, EDT_SOFTWARE);</div><div class="line"> DriverOptions.insert(L<span class="stringliteral">"OpenGL"</span>, EDT_OPENGL);</div><div class="line"> DriverOptions.insert(L<span class="stringliteral">"Direct3D9"</span>, EDT_DIRECT3D9);</div><div class="line"></div><div class="line"> <span class="comment">//some resolution options</span></div><div class="line"> ResolutionOptions.insert(L<span class="stringliteral">"640x480"</span>, dimension2du(640,480));</div><div class="line"> ResolutionOptions.insert(L<span class="stringliteral">"800x600"</span>, dimension2du(800,600));</div><div class="line"> ResolutionOptions.insert(L<span class="stringliteral">"1024x768"</span>, dimension2du(1024,768));</div><div class="line"></div><div class="line"> <span class="comment">//our preferred defaults</span></div><div class="line"> SettingMap.insert(L<span class="stringliteral">"driver"</span>, L<span class="stringliteral">"Direct3D9"</span>);</div><div class="line"> SettingMap.insert(L<span class="stringliteral">"resolution"</span>, L<span class="stringliteral">"640x480"</span>);</div><div class="line"> SettingMap.insert(L<span class="stringliteral">"fullscreen"</span>, L<span class="stringliteral">"0"</span>); <span class="comment">//0 is false</span></div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Destructor, you could store settings automatically on exit of your</span></div><div class="line"> <span class="comment">// application if you wanted to in our case we simply drop the</span></div><div class="line"> <span class="comment">// nulldevice</span></div><div class="line"> ~SettingManager()</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (NullDevice)</div><div class="line"> {</div><div class="line"> NullDevice->closeDevice();</div><div class="line"> NullDevice->drop();</div><div class="line"> }</div><div class="line"> };</div></div><!-- fragment --><p> Load xml from disk, overwrite default settings The xml we are trying to load has the following structure settings nested in sections nested in the root node, like: </p><pre class="fragment"> <pre> + <?xml version="1.0"?> + <mygame> + <video> + <setting name="driver" value="Direct3D9" /> + <setting name="fullscreen" value="0" /> + <setting name="resolution" value="1024x768" /> + </video> + </mygame> + </pre></pre> <div class="fragment"><div class="line"> <span class="keywordtype">bool</span> load()</div><div class="line"> {</div><div class="line"> <span class="comment">//if not able to create device don't attempt to load</span></div><div class="line"> <span class="keywordflow">if</span> (!NullDevice)</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"></div><div class="line"> irr::io::IXMLReader* xml = NullDevice->getFileSystem()->createXMLReader(SettingsFile); <span class="comment">//create xml reader</span></div><div class="line"> <span class="keywordflow">if</span> (!xml)</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"></div><div class="line"> <span class="keyword">const</span> stringw settingTag(L<span class="stringliteral">"setting"</span>); <span class="comment">//we'll be looking for this tag in the xml</span></div><div class="line"> stringw currentSection; <span class="comment">//keep track of our current section</span></div><div class="line"> <span class="keyword">const</span> stringw videoTag(L<span class="stringliteral">"video"</span>); <span class="comment">//constant for videotag</span></div><div class="line"></div><div class="line"> <span class="comment">//while there is more to read</span></div><div class="line"> <span class="keywordflow">while</span> (xml->read())</div><div class="line"> {</div><div class="line"> <span class="comment">//check the node type</span></div><div class="line"> <span class="keywordflow">switch</span> (xml->getNodeType())</div><div class="line"> {</div><div class="line"> <span class="comment">//we found a new element</span></div><div class="line"> <span class="keywordflow">case</span> irr::io::EXN_ELEMENT:</div><div class="line"> {</div><div class="line"> <span class="comment">//we currently are in the empty or mygame section and find the video tag so we set our current section to video</span></div><div class="line"> <span class="keywordflow">if</span> (currentSection.empty() && videoTag.equals_ignore_case(xml->getNodeName()))</div><div class="line"> {</div><div class="line"> currentSection = videoTag;</div><div class="line"> }</div><div class="line"> <span class="comment">//we are in the video section and we find a setting to parse</span></div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (currentSection.equals_ignore_case(videoTag) && settingTag.equals_ignore_case(xml->getNodeName() ))</div><div class="line"> {</div><div class="line"> <span class="comment">//read in the key</span></div><div class="line"> stringw key = xml->getAttributeValueSafe(L<span class="stringliteral">"name"</span>);</div><div class="line"> <span class="comment">//if there actually is a key to set</span></div><div class="line"> <span class="keywordflow">if</span> (!key.empty())</div><div class="line"> {</div><div class="line"> <span class="comment">//set the setting in the map to the value,</span></div><div class="line"> <span class="comment">//the [] operator overrides values if they already exist or inserts a new key value</span></div><div class="line"> <span class="comment">//pair into the settings map if it was not defined yet</span></div><div class="line"> SettingMap[key] = xml->getAttributeValueSafe(L<span class="stringliteral">"value"</span>);</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">//..</span></div><div class="line"> <span class="comment">// You can add your own sections and tags to read in here</span></div><div class="line"> <span class="comment">//..</span></div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"></div><div class="line"> <span class="comment">//we found the end of an element</span></div><div class="line"> <span class="keywordflow">case</span> irr::io::EXN_ELEMENT_END:</div><div class="line"> <span class="comment">//we were at the end of the video section so we reset our tag</span></div><div class="line"> currentSection=L<span class="stringliteral">""</span>;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// don't forget to delete the xml reader</span></div><div class="line"> xml->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Save the xml to disk. We use the nulldevice.</span></div><div class="line"> <span class="keywordtype">bool</span> save()</div><div class="line"> {</div><div class="line"></div><div class="line"> <span class="comment">//if not able to create device don't attempt to save</span></div><div class="line"> <span class="keywordflow">if</span> (!NullDevice)</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"></div><div class="line"> <span class="comment">//create xml writer</span></div><div class="line"> irr::io::IXMLWriter* xwriter = NullDevice->getFileSystem()->createXMLWriter( SettingsFile );</div><div class="line"> <span class="keywordflow">if</span> (!xwriter)</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"></div><div class="line"> <span class="comment">//write out the obligatory xml header. Each xml-file needs to have exactly one of those.</span></div><div class="line"> xwriter->writeXMLHeader();</div><div class="line"></div><div class="line"> <span class="comment">//start element mygame, you replace the label "mygame" with anything you want</span></div><div class="line"> xwriter->writeElement(L<span class="stringliteral">"mygame"</span>);</div><div class="line"> xwriter->writeLineBreak(); <span class="comment">//new line</span></div><div class="line"></div><div class="line"> <span class="comment">//start section with video settings</span></div><div class="line"> xwriter->writeElement(L<span class="stringliteral">"video"</span>);</div><div class="line"> xwriter->writeLineBreak(); <span class="comment">//new line</span></div><div class="line"></div><div class="line"> <span class="comment">// getIterator gets us a pointer to the first node of the settings map</span></div><div class="line"> <span class="comment">// every iteration we increase the iterator which gives us the next map node</span></div><div class="line"> <span class="comment">// until we reach the end we write settings one by one by using the nodes key and value functions</span></div><div class="line"> map<stringw, stringw>::Iterator i = SettingMap.getIterator();</div><div class="line"> <span class="keywordflow">for</span>(; !i.atEnd(); i++)</div><div class="line"> {</div><div class="line"> <span class="comment">//write element as <setting name="key" value="x" /></span></div><div class="line"> <span class="comment">//the second parameter indicates this is an empty element with no children, just attributes</span></div><div class="line"> xwriter->writeElement(L<span class="stringliteral">"setting"</span>,<span class="keyword">true</span>, L<span class="stringliteral">"name"</span>, i->getKey().c_str(), L<span class="stringliteral">"value"</span>,i->getValue().c_str() );</div><div class="line"> xwriter->writeLineBreak();</div><div class="line"> }</div><div class="line"> xwriter->writeLineBreak();</div><div class="line"></div><div class="line"> <span class="comment">//close video section</span></div><div class="line"> xwriter->writeClosingTag(L<span class="stringliteral">"video"</span>);</div><div class="line"> xwriter->writeLineBreak();</div><div class="line"></div><div class="line"> <span class="comment">//..</span></div><div class="line"> <span class="comment">// You can add writing sound settings, savegame information etc</span></div><div class="line"> <span class="comment">//..</span></div><div class="line"></div><div class="line"> <span class="comment">//close mygame section</span></div><div class="line"> xwriter->writeClosingTag(L<span class="stringliteral">"mygame"</span>);</div><div class="line"></div><div class="line"> <span class="comment">//delete xml writer</span></div><div class="line"> xwriter->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Set setting in our manager</span></div><div class="line"> <span class="keywordtype">void</span> setSetting(<span class="keyword">const</span> stringw& name, <span class="keyword">const</span> stringw& value)</div><div class="line"> {</div><div class="line"> SettingMap[name]=value;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// set setting overload to quickly assign integers to our setting map</span></div><div class="line"> <span class="keywordtype">void</span> setSetting(<span class="keyword">const</span> stringw& name, s32 value)</div><div class="line"> {</div><div class="line"> SettingMap[name]=stringw(value);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// Get setting as string</span></div><div class="line"> stringw getSetting(<span class="keyword">const</span> stringw& key)<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> <span class="comment">//the find function or irrmap returns a pointer to a map Node</span></div><div class="line"> <span class="comment">//if the key can be found, otherwise it returns null</span></div><div class="line"> <span class="comment">//the map node has the function getValue and getKey, as we already know the key, we return node->getValue()</span></div><div class="line"> map<stringw, stringw>::Node* n = SettingMap.find(key);</div><div class="line"> <span class="keywordflow">if</span> (n)</div><div class="line"> <span class="keywordflow">return</span> n->getValue();</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> <span class="keywordflow">return</span> L<span class="stringliteral">""</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">//</span></div><div class="line"> <span class="keywordtype">bool</span> getSettingAsBoolean(<span class="keyword">const</span> stringw& key )<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> stringw s = getSetting(key);</div><div class="line"> <span class="keywordflow">if</span> (s.empty())</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> <span class="keywordflow">return</span> s.equals_ignore_case(L<span class="stringliteral">"1"</span>);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">//</span></div><div class="line"> s32 getSettingAsInteger(<span class="keyword">const</span> stringw& key)<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> <span class="comment">//we implicitly cast to string instead of stringw because strtol10 does not accept wide strings</span></div><div class="line"> <span class="keyword">const</span> stringc s = getSetting(key);</div><div class="line"> <span class="keywordflow">if</span> (s.empty())</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> strtol10(s.c_str());</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">public</span>:</div><div class="line"> map<stringw, s32> DriverOptions; <span class="comment">//available options for driver config</span></div><div class="line"> map<stringw, dimension2du> ResolutionOptions; <span class="comment">//available options for resolution config</span></div><div class="line"><span class="keyword">private</span>:</div><div class="line"> SettingManager(<span class="keyword">const</span> SettingManager& other); <span class="comment">// defined but not implemented</span></div><div class="line"> SettingManager& operator=(<span class="keyword">const</span> SettingManager& other); <span class="comment">// defined but not implemented</span></div><div class="line"></div><div class="line"> map<stringw, stringw> SettingMap; <span class="comment">//current config</span></div><div class="line"></div><div class="line"> stringw SettingsFile; <span class="comment">// location of the xml, usually the</span></div><div class="line"> irr::IrrlichtDevice* NullDevice;</div><div class="line">};</div></div><!-- fragment --><p> Application context for global variables </p><div class="fragment"><div class="line"><span class="keyword">struct </span>SAppContext</div><div class="line">{</div><div class="line"> SAppContext()</div><div class="line"> : Device(0),Gui(0), Driver(0), Settings(0), ShouldQuit(false),</div><div class="line"> ButtonSave(0), ButtonExit(0), ListboxDriver(0),</div><div class="line"> ListboxResolution(0), CheckboxFullscreen(0)</div><div class="line"> {</div><div class="line"> }</div><div class="line"></div><div class="line"> ~SAppContext()</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (Settings)</div><div class="line"> <span class="keyword">delete</span> Settings;</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (Device)</div><div class="line"> {</div><div class="line"> Device->closeDevice();</div><div class="line"> Device->drop();</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> IrrlichtDevice* Device;</div><div class="line"> IGUIEnvironment* Gui;</div><div class="line"> IVideoDriver* Driver;</div><div class="line"> SettingManager* Settings;</div><div class="line"> <span class="keywordtype">bool</span> ShouldQuit;</div><div class="line"></div><div class="line"> <span class="comment">//settings dialog</span></div><div class="line"> IGUIButton* ButtonSave;</div><div class="line"> IGUIButton* ButtonExit;</div><div class="line"> IGUIListBox* ListboxDriver;</div><div class="line"> IGUIListBox* ListboxResolution;</div><div class="line"> IGUICheckBox* CheckboxFullscreen;</div><div class="line">};</div></div><!-- fragment --><p> A typical event receiver. </p><div class="fragment"><div class="line"><span class="keyword">class </span>MyEventReceiver : <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"> MyEventReceiver(SAppContext & a) : App(a) { }</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent& event)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (event.EventType == EET_GUI_EVENT )</div><div class="line"> {</div><div class="line"> <span class="keywordflow">switch</span> ( event.GUIEvent.EventType )</div><div class="line"> {</div><div class="line"> <span class="comment">//handle button click events</span></div><div class="line"> <span class="keywordflow">case</span> EGET_BUTTON_CLICKED:</div><div class="line"> {</div><div class="line"> <span class="comment">//Our save button was called so we obtain the settings from our dialog and save them</span></div><div class="line"> <span class="keywordflow">if</span> ( event.GUIEvent.Caller == App.ButtonSave )</div><div class="line"> {</div><div class="line"> <span class="comment">//if there is a selection write it</span></div><div class="line"> <span class="keywordflow">if</span> ( App.ListboxDriver->getSelected() != -1)</div><div class="line"> App.Settings->setSetting(L<span class="stringliteral">"driver"</span>, App.ListboxDriver->getListItem(App.ListboxDriver->getSelected()));</div><div class="line"></div><div class="line"> <span class="comment">//if there is a selection write it</span></div><div class="line"> <span class="keywordflow">if</span> ( App.ListboxResolution->getSelected() != -1)</div><div class="line"> App.Settings->setSetting(L<span class="stringliteral">"resolution"</span>, App.ListboxResolution->getListItem(App.ListboxResolution->getSelected()));</div><div class="line"></div><div class="line"> App.Settings->setSetting(L<span class="stringliteral">"fullscreen"</span>, App.CheckboxFullscreen->isChecked());</div><div class="line"></div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (App.Settings->save())</div><div class="line"> {</div><div class="line"> App.Gui->addMessageBox(L<span class="stringliteral">"settings save"</span>,L<span class="stringliteral">"settings saved, please restart for settings to change effect"</span>,<span class="stringliteral">""</span>,<span class="keyword">true</span>);</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="comment">// cancel/exit button clicked, tell the application to exit</span></div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( event.GUIEvent.Caller == App.ButtonExit)</div><div class="line"> {</div><div class="line"> App.ShouldQuit = <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"> SAppContext & App;</div><div class="line">};</div></div><!-- fragment --><p> Function to create a video settings dialog This dialog shows the current settings from the configuration xml and allows them to be changed </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> createSettingsDialog(SAppContext& app)</div><div class="line">{</div><div class="line"> <span class="comment">// first get rid of alpha in gui</span></div><div class="line"> <span class="keywordflow">for</span> (irr::s32 i=0; i<irr::gui::EGDC_COUNT ; ++i)</div><div class="line"> {</div><div class="line"> irr::video::SColor col = app.Gui->getSkin()->getColor((irr::gui::EGUI_DEFAULT_COLOR)i);</div><div class="line"> col.setAlpha(255);</div><div class="line"> app.Gui->getSkin()->setColor((irr::gui::EGUI_DEFAULT_COLOR)i, col);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">//create video settings windows</span></div><div class="line"> gui::IGUIWindow* windowSettings = app.Gui->addWindow(rect<s32>(10,10,400,400),<span class="keyword">true</span>,L<span class="stringliteral">"Videosettings"</span>);</div><div class="line"> app.Gui->addStaticText (L<span class="stringliteral">"Select your desired video settings"</span>, rect< s32 >(10,20, 200, 40), <span class="keyword">false</span>, <span class="keyword">true</span>, windowSettings);</div><div class="line"></div><div class="line"> <span class="comment">// add listbox for driver choice</span></div><div class="line"> app.Gui->addStaticText (L<span class="stringliteral">"Driver"</span>, rect< s32 >(10,50, 200, 60), <span class="keyword">false</span>, <span class="keyword">true</span>, windowSettings);</div><div class="line"> app.ListboxDriver = app.Gui->addListBox(rect<s32>(10,60,220,120), windowSettings, 1,<span class="keyword">true</span>);</div><div class="line"></div><div class="line"> <span class="comment">//add all available options to the driver choice listbox</span></div><div class="line"> map<stringw, s32>::Iterator i = app.Settings->DriverOptions.getIterator();</div><div class="line"> <span class="keywordflow">for</span>(; !i.atEnd(); i++)</div><div class="line"> app.ListboxDriver->addItem(i->getKey().c_str());</div><div class="line"></div><div class="line"> <span class="comment">//set currently selected driver</span></div><div class="line"> app.ListboxDriver->setSelected(app.Settings->getSetting(<span class="stringliteral">"driver"</span>).c_str());</div><div class="line"></div><div class="line"> <span class="comment">// add listbox for resolution choice</span></div><div class="line"> app.Gui->addStaticText (L<span class="stringliteral">"Resolution"</span>, rect< s32 >(10,130, 200, 140), <span class="keyword">false</span>, <span class="keyword">true</span>, windowSettings);</div><div class="line"> app.ListboxResolution = app.Gui->addListBox(rect<s32>(10,140,220,200), windowSettings, 1,<span class="keyword">true</span>);</div><div class="line"></div><div class="line"> <span class="comment">//add all available options to the resolution listbox</span></div><div class="line"> map<stringw, dimension2du>::Iterator ri = app.Settings->ResolutionOptions.getIterator();</div><div class="line"> <span class="keywordflow">for</span>(; !ri.atEnd(); ri++)</div><div class="line"> app.ListboxResolution->addItem(ri->getKey().c_str());</div><div class="line"></div><div class="line"> <span class="comment">//set currently selected resolution</span></div><div class="line"> app.ListboxResolution->setSelected(app.Settings->getSetting(<span class="stringliteral">"resolution"</span>).c_str());</div><div class="line"></div><div class="line"> <span class="comment">//add checkbox to toggle fullscreen, initially set to loaded setting</span></div><div class="line"> app.CheckboxFullscreen = app.Gui->addCheckBox(</div><div class="line"> app.Settings->getSettingAsBoolean(<span class="stringliteral">"fullscreen"</span>),</div><div class="line"> rect<s32>(10,220,220,240), windowSettings, -1,</div><div class="line"> L<span class="stringliteral">"Fullscreen"</span>);</div><div class="line"></div><div class="line"> <span class="comment">//last but not least add save button</span></div><div class="line"> app.ButtonSave = app.Gui->addButton(</div><div class="line"> rect<s32>(80,250,150,270), windowSettings, 2,</div><div class="line"> L<span class="stringliteral">"Save video settings"</span>);</div><div class="line"></div><div class="line"> <span class="comment">//exit/cancel button</span></div><div class="line"> app.ButtonExit = app.Gui->addButton(</div><div class="line"> rect<s32>(160,250,240,270), windowSettings, 2,</div><div class="line"> L<span class="stringliteral">"Cancel and exit"</span>);</div><div class="line">}</div></div><!-- fragment --><p> The main function. Creates all objects and does the XML handling. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> <span class="comment">//create new application context</span></div><div class="line"> SAppContext app;</div><div class="line"></div><div class="line"> <span class="comment">//create device creation parameters that can get overwritten by our settings file</span></div><div class="line"> SIrrlichtCreationParameters param;</div><div class="line"> param.DriverType = EDT_SOFTWARE;</div><div class="line"> param.WindowSize.set(640,480);</div><div class="line"></div><div class="line"> <span class="comment">// Try to load config.</span></div><div class="line"> <span class="comment">// I leave it as an exercise of the reader to store the configuration in the local application data folder,</span></div><div class="line"> <span class="comment">// the only logical place to store config data for games. For all other operating systems I redirect to your manuals</span></div><div class="line"> app.Settings = <span class="keyword">new</span> SettingManager(<span class="stringliteral">"../../media/settings.xml"</span>);</div><div class="line"> <span class="keywordflow">if</span> ( !app.Settings->load() )</div><div class="line"> {</div><div class="line"> <span class="comment">// ...</span></div><div class="line"> <span class="comment">// Here add your own exception handling, for now we continue because there are defaults set in SettingManager constructor</span></div><div class="line"> <span class="comment">// ...</span></div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> <span class="comment">//settings xml loaded from disk,</span></div><div class="line"></div><div class="line"> <span class="comment">//map driversetting to driver type and test if the setting is valid</span></div><div class="line"> <span class="comment">//the DriverOptions map contains string representations mapped to to irrlicht E_DRIVER_TYPE enum</span></div><div class="line"> <span class="comment">//e.g "direct3d9" will become 4</span></div><div class="line"> <span class="comment">//see DriverOptions in the settingmanager class for details</span></div><div class="line"> map<stringw, s32>::Node* driver = app.Settings->DriverOptions.find( app.Settings->getSetting(<span class="stringliteral">"driver"</span>) );</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (driver)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> ( irr::IrrlichtDevice::isDriverSupported( static_cast<E_DRIVER_TYPE>( driver->getValue() )))</div><div class="line"> {</div><div class="line"> <span class="comment">// selected driver is supported, so we use it.</span></div><div class="line"> param.DriverType = <span class="keyword">static_cast<</span>E_DRIVER_TYPE<span class="keyword">></span>( driver->getValue());</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">//map resolution setting to dimension in a similar way as demonstrated above</span></div><div class="line"> map<stringw, dimension2du>::Node* res = app.Settings->ResolutionOptions.find( app.Settings->getSetting(<span class="stringliteral">"resolution"</span>) );</div><div class="line"> <span class="keywordflow">if</span> (res)</div><div class="line"> {</div><div class="line"> param.WindowSize = res->getValue();</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">//get fullscreen setting from config</span></div><div class="line"> param.Fullscreen = app.Settings->getSettingAsBoolean(<span class="stringliteral">"fullscreen"</span>);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">//create the irrlicht device using the settings</span></div><div class="line"> app.Device = createDeviceEx(param);</div><div class="line"> <span class="keywordflow">if</span> (app.Device == 0)</div><div class="line"> {</div><div class="line"> <span class="comment">// You can add your own exception handling on driver failure</span></div><div class="line"> exit(0);</div><div class="line"> }</div><div class="line"></div><div class="line"> app.Device->setWindowCaption(L<span class="stringliteral">"Xmlhandling - Irrlicht engine tutorial"</span>);</div><div class="line"> app.Driver = app.Device->getVideoDriver();</div><div class="line"> app.Gui = app.Device->getGUIEnvironment();</div><div class="line"></div><div class="line"> createSettingsDialog(app);</div><div class="line"></div><div class="line"> <span class="comment">//set event receiver so we can respond to gui events</span></div><div class="line"> MyEventReceiver receiver(app);</div><div class="line"> app.Device->setEventReceiver(&receiver);</div><div class="line"></div><div class="line"> <span class="comment">//enter main loop</span></div><div class="line"> <span class="keywordflow">while</span> (!app.ShouldQuit && app.Device->run())</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (app.Device->isWindowActive())</div><div class="line"> {</div><div class="line"> app.Driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, SColor(0,200,200,200));</div><div class="line"> app.Gui->drawAll();</div><div class="line"> app.Driver->endScene();</div><div class="line"> }</div><div class="line"> app.Device->sleep(10);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">//app destroys device in destructor</span></div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/26.OcclusionQuery/Makefile b/examples/26.OcclusionQuery/Makefile new file mode 100644 index 0000000..87e37e4 --- /dev/null +++ b/examples/26.OcclusionQuery/Makefile @@ -0,0 +1,39 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 26.OcclusionQuery
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/26.OcclusionQuery/OcclusionQuery.cbp b/examples/26.OcclusionQuery/OcclusionQuery.cbp new file mode 100644 index 0000000..09587e5 --- /dev/null +++ b/examples/26.OcclusionQuery/OcclusionQuery.cbp @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 26 OcclusionQuery" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option output="../../bin/Win32-gcc/OcclusionQuery" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/OcclusionQuery" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/26.OcclusionQuery/OcclusionQuery.dev b/examples/26.OcclusionQuery/OcclusionQuery.dev new file mode 100644 index 0000000..e9d7c04 --- /dev/null +++ b/examples/26.OcclusionQuery/OcclusionQuery.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 26 OcclusionQuery
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=26.OcclusionQuery.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/26.OcclusionQuery/OcclusionQuery.vcproj b/examples/26.OcclusionQuery/OcclusionQuery.vcproj new file mode 100644 index 0000000..602f2d3 --- /dev/null +++ b/examples/26.OcclusionQuery/OcclusionQuery.vcproj @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="26.OcclusionQuery"
+ ProjectGUID="{735B050B-1AC5-4602-B0BE-D2D2B5893E94}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug\OcclusionQuery.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\26.OcclusionQuery.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug\OcclusionQuery.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug\OcclusionQuery.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release\OcclusionQuery.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\26.OcclusionQuery.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release\OcclusionQuery.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release\OcclusionQuery.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/26.OcclusionQuery/OcclusionQuery_vc10.vcxproj b/examples/26.OcclusionQuery/OcclusionQuery_vc10.vcxproj new file mode 100644 index 0000000..370d368 --- /dev/null +++ b/examples/26.OcclusionQuery/OcclusionQuery_vc10.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>26.OcclusionQuery</ProjectName>
+ <ProjectGuid>{5CE0E2E7-879D-4152-B61D-24E7D0707B45}</ProjectGuid>
+ <RootNamespace>OcclusionQuery</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug\OcclusionQuery.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\26.OcclusionQuery.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug\OcclusionQuery.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\26.OcclusionQuery.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release\OcclusionQuery.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\26.OcclusionQuery.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release\OcclusionQuery.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\26.OcclusionQuery.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/26.OcclusionQuery/OcclusionQuery_vc11.vcxproj b/examples/26.OcclusionQuery/OcclusionQuery_vc11.vcxproj new file mode 100644 index 0000000..370d368 --- /dev/null +++ b/examples/26.OcclusionQuery/OcclusionQuery_vc11.vcxproj @@ -0,0 +1,235 @@ +ďťż<?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">
+ <ProjectName>26.OcclusionQuery</ProjectName>
+ <ProjectGuid>{5CE0E2E7-879D-4152-B61D-24E7D0707B45}</ProjectGuid>
+ <RootNamespace>OcclusionQuery</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug\OcclusionQuery.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\26.OcclusionQuery.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug\OcclusionQuery.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\26.OcclusionQuery.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release\OcclusionQuery.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\26.OcclusionQuery.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release\OcclusionQuery.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\26.OcclusionQuery.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/26.OcclusionQuery/OcclusionQuery_vc12.vcxproj b/examples/26.OcclusionQuery/OcclusionQuery_vc12.vcxproj new file mode 100644 index 0000000..e181a45 --- /dev/null +++ b/examples/26.OcclusionQuery/OcclusionQuery_vc12.vcxproj @@ -0,0 +1,235 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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">
+ <ProjectName>26.OcclusionQuery</ProjectName>
+ <ProjectGuid>{5CE0E2E7-879D-4152-B61D-24E7D0707B45}</ProjectGuid>
+ <RootNamespace>OcclusionQuery</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug\OcclusionQuery.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\26.OcclusionQuery.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug\OcclusionQuery.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\26.OcclusionQuery.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release\OcclusionQuery.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\26.OcclusionQuery.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release\OcclusionQuery.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\26.OcclusionQuery.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/26.OcclusionQuery/OcclusionQuery_vc8.vcproj b/examples/26.OcclusionQuery/OcclusionQuery_vc8.vcproj new file mode 100644 index 0000000..faa137f --- /dev/null +++ b/examples/26.OcclusionQuery/OcclusionQuery_vc8.vcproj @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="26.OcclusionQuery_vc8"
+ ProjectGUID="{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}"
+ RootNamespace="OcclusionQuery_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug\OcclusionQuery.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug\OcclusionQuery.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\26.OcclusionQuery.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug\OcclusionQuery.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release\OcclusionQuery.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release\OcclusionQuery.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\26.OcclusionQuery.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release\OcclusionQuery.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/26.OcclusionQuery/OcclusionQuery_vc9.vcproj b/examples/26.OcclusionQuery/OcclusionQuery_vc9.vcproj new file mode 100644 index 0000000..c15a527 --- /dev/null +++ b/examples/26.OcclusionQuery/OcclusionQuery_vc9.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="26.OcclusionQuery_vc9"
+ ProjectGUID="{9A859369-0A56-4DAB-9E0C-9F93C91CF0F2}"
+ RootNamespace="OcclusionQuery_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug\OcclusionQuery.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug\OcclusionQuery.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\26.OcclusionQuery.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug\OcclusionQuery.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release\OcclusionQuery.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release\OcclusionQuery.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\26.OcclusionQuery.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release\OcclusionQuery.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/26.OcclusionQuery/main.cpp b/examples/26.OcclusionQuery/main.cpp new file mode 100644 index 0000000..17f64b2 --- /dev/null +++ b/examples/26.OcclusionQuery/main.cpp @@ -0,0 +1,213 @@ +/** Example 026 OcclusionQuery
+
+This Tutorial shows how to speed up rendering by use of the
+OcclusionQuery feature. The usual rendering tries to avoid rendering of
+scene nodes by culling those nodes which are outside the visible area, the
+view frustum. However, this technique does not cope with occluded objects
+which are still in the line of sight, but occluded by some larger object
+between the object and the eye (camera). Occlusion queries check exactly that.
+The queries basically measure the number of pixels that a previous render
+left on the screen.
+Since those pixels cannot be recognized at the end of a rendering anymore,
+the pixel count is measured directly when rendering. Thus, one needs to render
+the occluder (the object in front) first. This object needs to write to the
+z-buffer in order to become a real occluder. Then the node is rendered and in
+case a z-pass happens, i.e. the pixel is written to the framebuffer, the pixel
+is counted in the query.
+The result of a query is the number of pixels which got through. One can, based
+on this number, judge if the scene node is visible enough to be rendered, or if
+the node should be removed in the next round. Also note that the number of
+pixels is a safe over approximation in general. The pixels might be overdrawn
+later on, and the GPU tries to avoid inaccuracies which could lead to false
+negatives in the queries.
+
+As you might have recognized already, we had to render the node to get the
+numbers. So where's the benefit, you might say. There are several ways where
+occlusion queries can help. It is often a good idea to just render the bbox
+of the node instead of the actual mesh. This is really fast and is a safe over
+approximation. If you need a more exact render with the actual geometry, it's
+a good idea to render with just basic solid material. Avoid complex shaders
+and state changes through textures. There's no need while just doing the
+occlusion query. At least if the render is not used for the actual scene. This
+is the third way to optimize occlusion queries. Just check the queries every
+5th or 10th frame, or even less frequent. This depends on the movement speed
+of the objects and camera.
+*/
+
+#ifdef _MSC_VER
+// We'll also define this to stop MSVC complaining about sprintf().
+#define _CRT_SECURE_NO_WARNINGS
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+/*
+We need keyboard input events to switch some parameters
+*/
+class MyEventReceiver : public IEventReceiver
+{
+public:
+ // This is the one method that we have to implement
+ virtual bool OnEvent(const SEvent& event)
+ {
+ // Remember whether each key is down or up
+ if (event.EventType == irr::EET_KEY_INPUT_EVENT)
+ KeyIsDown[event.KeyInput.Key] = event.KeyInput.PressedDown;
+
+ return false;
+ }
+
+ // This is used to check whether a key is being held down
+ virtual bool IsKeyDown(EKEY_CODE keyCode) const
+ {
+ return KeyIsDown[keyCode];
+ }
+
+ MyEventReceiver()
+ {
+ for (u32 i=0; i<KEY_KEY_CODES_COUNT; ++i)
+ KeyIsDown[i] = false;
+ }
+
+private:
+ // We use this array to store the current state of each key
+ bool KeyIsDown[KEY_KEY_CODES_COUNT];
+};
+
+
+/*
+We create an irr::IrrlichtDevice and the scene nodes. One occluder, one
+occluded. The latter is a complex sphere, which has many triangles.
+*/
+int main()
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ // create device
+ MyEventReceiver receiver;
+
+ IrrlichtDevice* device = createDevice(driverType,
+ core::dimension2d<u32>(640, 480), 16, false, false, false, &receiver);
+
+ if (device == 0)
+ return 1; // could not create selected driver.
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* smgr = device->getSceneManager();
+
+ smgr->getGUIEnvironment()->addStaticText(L"Press Space to hide occluder.", core::recti(10,10, 200,50));
+
+ /*
+ Create the node to be occluded. We create a sphere node with high poly count.
+ */
+ scene::ISceneNode * node = smgr->addSphereSceneNode(10, 64);
+ if (node)
+ {
+ node->setPosition(core::vector3df(0,0,60));
+ node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+ node->setMaterialFlag(video::EMF_LIGHTING, false);
+ }
+
+ /*
+ Now we create another node, the occluder. It's a simple plane.
+ */
+ scene::ISceneNode* plane = smgr->addMeshSceneNode(smgr->addHillPlaneMesh(
+ "plane", core::dimension2df(10,10), core::dimension2du(2,2)), 0, -1,
+ core::vector3df(0,0,20), core::vector3df(270,0,0));
+
+ if (plane)
+ {
+ plane->setMaterialTexture(0, driver->getTexture("../../media/t351sml.jpg"));
+ plane->setMaterialFlag(video::EMF_LIGHTING, false);
+ plane->setMaterialFlag(video::EMF_BACK_FACE_CULLING, true);
+ }
+
+ /*
+ Here we create the occlusion query. Because we don't have a plain mesh scene node
+ (ESNT_MESH or ESNT_ANIMATED_MESH), we pass the base geometry as well. Instead,
+ we could also pass a simpler mesh or the bounding box. But we will use a time
+ based method, where the occlusion query renders to the frame buffer and in case
+ of success (occlusion), the mesh is not drawn for several frames.
+ */
+ driver->addOcclusionQuery(node, ((scene::IMeshSceneNode*)node)->getMesh());
+
+ /*
+ We have done everything, just a camera and draw it. We also write the
+ current frames per second and the name of the driver to the caption of the
+ window to examine the render speedup.
+ We also store the time for measuring the time since the last occlusion query ran
+ and store whether the node should be visible in the next frames.
+ */
+ smgr->addCameraSceneNode();
+ int lastFPS = -1;
+ u32 timeNow = device->getTimer()->getTime();
+ bool nodeVisible=true;
+
+ while(device->run())
+ {
+ plane->setVisible(!receiver.IsKeyDown(irr::KEY_SPACE));
+
+ driver->beginScene(true, true, video::SColor(255,113,113,133));
+ /*
+ First, we draw the scene, possibly without the occluded element. This is necessary
+ because we need the occluder to be drawn first. You can also use several scene
+ managers to collect a number of possible occluders in a separately rendered
+ scene.
+ */
+ node->setVisible(nodeVisible);
+ smgr->drawAll();
+ smgr->getGUIEnvironment()->drawAll();
+
+ /*
+ Once in a while, here every 100 ms, we check the visibility. We run the queries,
+ update the pixel value, and query the result. Since we already rendered the node
+ we render the query invisible. The update is made blocking, as we need the result
+ immediately. If you don't need the result immediately, e.g. because you have other
+ things to render, you can call the update non-blocking. This gives the GPU more
+ time to pass back the results without flushing the render pipeline.
+ If the update was called non-blocking, the result from getOcclusionQueryResult is
+ either the previous value, or 0xffffffff if no value has been generated at all, yet.
+ The result is taken immediately as visibility flag for the node.
+ */
+ if (device->getTimer()->getTime()-timeNow>100)
+ {
+ driver->runAllOcclusionQueries(false);
+ driver->updateAllOcclusionQueries();
+ nodeVisible=driver->getOcclusionQueryResult(node)>0;
+ timeNow=device->getTimer()->getTime();
+ }
+
+ driver->endScene();
+
+ int fps = driver->getFPS();
+
+ if (lastFPS != fps)
+ {
+ core::stringw tmp(L"OcclusionQuery Example [");
+ tmp += driver->getName();
+ tmp += L"] fps: ";
+ tmp += fps;
+
+ device->setWindowCaption(tmp.c_str());
+ lastFPS = fps;
+ }
+ }
+
+ /*
+ In the end, delete the Irrlicht device.
+ */
+ device->drop();
+
+ return 0;
+}
+
+/*
+That's it. Compile and play around with the program.
+**/
diff --git a/examples/26.OcclusionQuery/tutorial.html b/examples/26.OcclusionQuery/tutorial.html new file mode 100644 index 0000000..8dd4061 --- /dev/null +++ b/examples/26.OcclusionQuery/tutorial.html @@ -0,0 +1,207 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 26: OcclusionQuery</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 26: OcclusionQuery </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/026shot.jpg" alt="026shot.jpg"/> +</div> + <p>This Tutorial shows how to speed up rendering by use of the OcclusionQuery feature. The usual rendering tries to avoid rendering of scene nodes by culling those nodes which are outside the visible area, the view frustum. However, this technique does not cope with occluded objects which are still in the line of sight, but occluded by some larger object between the object and the eye (camera). Occlusion queries check exactly that. The queries basically measure the number of pixels that a previous render left on the screen. Since those pixels cannot be recognized at the end of a rendering anymore, the pixel count is measured directly when rendering. Thus, one needs to render the occluder (the object in front) first. This object needs to write to the z-buffer in order to become a real occluder. Then the node is rendered and in case a z-pass happens, i.e. the pixel is written to the framebuffer, the pixel is counted in the query. The result of a query is the number of pixels which got through. One can, based on this number, judge if the scene node is visible enough to be rendered, or if the node should be removed in the next round. Also note that the number of pixels is a safe over approximation in general. The pixels might be overdrawn later on, and the GPU tries to avoid inaccuracies which could lead to false negatives in the queries.</p> +<p>As you might have recognized already, we had to render the node to get the numbers. So where's the benefit, you might say. There are several ways where occlusion queries can help. It is often a good idea to just render the bbox of the node instead of the actual mesh. This is really fast and is a safe over approximation. If you need a more exact render with the actual geometry, it's a good idea to render with just basic solid material. Avoid complex shaders and state changes through textures. There's no need while just doing the occlusion query. At least if the render is not used for the actual scene. This is the third way to optimize occlusion queries. Just check the queries every 5th or 10th frame, or even less frequent. This depends on the movement speed of the objects and camera. </p><div class="fragment"><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="comment">// We'll also define this to stop MSVC complaining about sprintf().</span></div><div class="line"><span class="preprocessor">#define _CRT_SECURE_NO_WARNINGS</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div></div><!-- fragment --><p> We need keyboard input events to switch some parameters </p><div class="fragment"><div class="line"><span class="keyword">class </span>MyEventReceiver : <span class="keyword">public</span> IEventReceiver</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"> <span class="comment">// This is the one method that we have to implement</span></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> OnEvent(<span class="keyword">const</span> SEvent& event)</div><div class="line"> {</div><div class="line"> <span class="comment">// Remember whether each key is down or up</span></div><div class="line"> <span class="keywordflow">if</span> (event.EventType == irr::EET_KEY_INPUT_EVENT)</div><div class="line"> KeyIsDown[<span class="keyword">event</span>.KeyInput.Key] = <span class="keyword">event</span>.KeyInput.PressedDown;</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="comment">// This is used to check whether a key is being held down</span></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> IsKeyDown(EKEY_CODE keyCode)<span class="keyword"> const</span></div><div class="line"><span class="keyword"> </span>{</div><div class="line"> <span class="keywordflow">return</span> KeyIsDown[keyCode];</div><div class="line"> }</div><div class="line"> </div><div class="line"> MyEventReceiver()</div><div class="line"> {</div><div class="line"> <span class="keywordflow">for</span> (u32 i=0; i<KEY_KEY_CODES_COUNT; ++i)</div><div class="line"> KeyIsDown[i] = <span class="keyword">false</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"> <span class="comment">// We use this array to store the current state of each key</span></div><div class="line"> <span class="keywordtype">bool</span> KeyIsDown[KEY_KEY_CODES_COUNT];</div><div class="line">};</div></div><!-- fragment --><p> We create an irr::IrrlichtDevice and the scene nodes. One occluder, one occluded. The latter is a complex sphere, which has many triangles. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> <span class="comment">// create device</span></div><div class="line"> MyEventReceiver receiver;</div><div class="line"></div><div class="line"> IrrlichtDevice* device = createDevice(driverType,</div><div class="line"> core::dimension2d<u32>(640, 480), 16, <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">false</span>, &receiver);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (device == 0)</div><div class="line"> <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span></div><div class="line"></div><div class="line"> video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line"> scene::ISceneManager* smgr = device->getSceneManager();</div><div class="line"></div><div class="line"> smgr->getGUIEnvironment()->addStaticText(L<span class="stringliteral">"Press Space to hide occluder."</span>, core::recti(10,10, 200,50));</div></div><!-- fragment --><p> Create the node to be occluded. We create a sphere node with high poly count. </p><div class="fragment"><div class="line">scene::ISceneNode * node = smgr->addSphereSceneNode(10, 64);</div><div class="line"><span class="keywordflow">if</span> (node)</div><div class="line">{</div><div class="line"> node->setPosition(core::vector3df(0,0,60));</div><div class="line"> node->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/wall.bmp"</span>));</div><div class="line"> node->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line">}</div></div><!-- fragment --><p> Now we create another node, the occluder. It's a simple plane. </p><div class="fragment"><div class="line">scene::ISceneNode* plane = smgr->addMeshSceneNode(smgr->addHillPlaneMesh(</div><div class="line"> <span class="stringliteral">"plane"</span>, core::dimension2df(10,10), core::dimension2du(2,2)), 0, -1,</div><div class="line"> core::vector3df(0,0,20), core::vector3df(270,0,0));</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (plane)</div><div class="line">{</div><div class="line"> plane->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/t351sml.jpg"</span>));</div><div class="line"> plane->setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"> plane->setMaterialFlag(video::EMF_BACK_FACE_CULLING, <span class="keyword">true</span>);</div><div class="line">}</div></div><!-- fragment --><p> Here we create the occlusion query. Because we don't have a plain mesh scene node (ESNT_MESH or ESNT_ANIMATED_MESH), we pass the base geometry as well. Instead, we could also pass a simpler mesh or the bounding box. But we will use a time based method, where the occlusion query renders to the frame buffer and in case of success (occlusion), the mesh is not drawn for several frames. </p><div class="fragment"><div class="line">driver->addOcclusionQuery(node, ((scene::IMeshSceneNode*)node)->getMesh());</div></div><!-- fragment --><p> We have done everything, just a camera and draw it. We also write the current frames per second and the name of the driver to the caption of the window to examine the render speedup. We also store the time for measuring the time since the last occlusion query ran and store whether the node should be visible in the next frames. </p><div class="fragment"><div class="line">smgr->addCameraSceneNode();</div><div class="line"><span class="keywordtype">int</span> lastFPS = -1;</div><div class="line">u32 timeNow = device->getTimer()->getTime();</div><div class="line"><span class="keywordtype">bool</span> nodeVisible=<span class="keyword">true</span>;</div><div class="line"></div><div class="line"><span class="keywordflow">while</span>(device->run())</div><div class="line">{</div><div class="line"> plane->setVisible(!receiver.IsKeyDown(irr::KEY_SPACE));</div><div class="line"></div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, video::SColor(255,113,113,133));</div></div><!-- fragment --><p> First, we draw the scene, possibly without the occluded element. This is necessary because we need the occluder to be drawn first. You can also use several scene managers to collect a number of possible occluders in a separately rendered scene. </p><div class="fragment"><div class="line">node->setVisible(nodeVisible);</div><div class="line">smgr->drawAll();</div><div class="line">smgr->getGUIEnvironment()->drawAll();</div></div><!-- fragment --><p> Once in a while, here every 100 ms, we check the visibility. We run the queries, update the pixel value, and query the result. Since we already rendered the node we render the query invisible. The update is made blocking, as we need the result immediately. If you don't need the result immediately, e.g. because you have other things to render, you can call the update non-blocking. This gives the GPU more time to pass back the results without flushing the render pipeline. If the update was called non-blocking, the result from getOcclusionQueryResult is either the previous value, or 0xffffffff if no value has been generated at all, yet. The result is taken immediately as visibility flag for the node. </p><div class="fragment"><div class="line"> <span class="keywordflow">if</span> (device->getTimer()->getTime()-timeNow>100)</div><div class="line"> {</div><div class="line"> driver->runAllOcclusionQueries(<span class="keyword">false</span>);</div><div class="line"> driver->updateAllOcclusionQueries();</div><div class="line"> nodeVisible=driver->getOcclusionQueryResult(node)>0;</div><div class="line"> timeNow=device->getTimer()->getTime();</div><div class="line"> }</div><div class="line"></div><div class="line"> driver->endScene();</div><div class="line"></div><div class="line"> <span class="keywordtype">int</span> fps = driver->getFPS();</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (lastFPS != fps)</div><div class="line"> {</div><div class="line"> core::stringw tmp(L<span class="stringliteral">"OcclusionQuery Example ["</span>);</div><div class="line"> tmp += driver->getName();</div><div class="line"> tmp += L<span class="stringliteral">"] fps: "</span>;</div><div class="line"> tmp += fps;</div><div class="line"></div><div class="line"> device->setWindowCaption(tmp.c_str());</div><div class="line"> lastFPS = fps;</div><div class="line"> }</div><div class="line">}</div></div><!-- fragment --><p> In the end, delete the Irrlicht device. </p><div class="fragment"><div class="line"> device->drop();</div><div class="line"> </div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --><p> That's it. Compile and play around with the program. </p> +</div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> diff --git a/examples/BuildAllExamples.MacOSX/DemoApp-Info.plist b/examples/BuildAllExamples.MacOSX/DemoApp-Info.plist new file mode 100644 index 0000000..a754c7f --- /dev/null +++ b/examples/BuildAllExamples.MacOSX/DemoApp-Info.plist @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>com.irrlicht.${EXECUTABLE_NAME}</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>IRRL</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>NSMainNibFile</key> + <string>MainMenu</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> +</dict> +</plist> diff --git a/examples/BuildAllExamples.workspace b/examples/BuildAllExamples.workspace new file mode 100644 index 0000000..56933c1 --- /dev/null +++ b/examples/BuildAllExamples.workspace @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_workspace_file> + <Workspace title="Build all examples"> + <Project filename="../source/Irrlicht/Irrlicht-gcc.cbp" /> + <Project filename="01.HelloWorld/HelloWorld.cbp" active="1" /> + <Project filename="02.Quake3Map/Quake3Map.cbp" /> + <Project filename="03.CustomSceneNode/CustomSceneNode.cbp" /> + <Project filename="04.Movement/Movement.cbp" /> + <Project filename="05.UserInterface/UserInterface.cbp" /> + <Project filename="06.2DGraphics/2DGraphics.cbp" /> + <Project filename="07.Collision/Collision.cbp" /> + <Project filename="08.SpecialFX/SpecialFX.cbp" /> + <Project filename="09.Meshviewer/Meshviewer.cbp" /> + <Project filename="10.Shaders/Shaders.cbp" /> + <Project filename="11.PerPixelLighting/PerPixelLighting.cbp" /> + <Project filename="12.TerrainRendering/TerrainRendering.cbp" /> + <Project filename="13.RenderToTexture/RenderToTexture.cbp" /> + <Project filename="14.Win32Window/Win32Window.cbp" /> + <Project filename="15.LoadIrrFile/LoadIrrFile.cbp" /> + <Project filename="16.Quake3MapShader/Quake3MapShader.cbp" /> + <Project filename="18.SplitScreen/SplitScreen.cbp" /> + <Project filename="19.MouseAndJoystick/MouseAndJoystick.cbp" /> + <Project filename="20.ManagedLights/ManagedLights.cbp" /> + <Project filename="21.Quake3Explorer/Quake3Explorer.cbp" /> + <Project filename="22.MaterialViewer/MaterialViewer.cbp" /> + <Project filename="23.SMeshHandling/SMeshHandling.cbp" /> + <Project filename="24.CursorControl/CursorControl.cbp" /> + <Project filename="25.XmlHandling/XmlHandling.cbp" /> + <Project filename="26.OcclusionQuery/OcclusionQuery.cbp" /> + <Project filename="Demo/demo.cbp" /> + <Project filename="../tools/GUIEditor/GUIEditor_gcc.cbp" /> + <Project filename="../tools/MeshConverter/MeshConverter.cbp" /> + <Project filename="../tools/FileToHeader/FileToHeader.cbp" /> + </Workspace> +</CodeBlocks_workspace_file> diff --git a/examples/BuildAllExamples_v8.sln b/examples/BuildAllExamples_v8.sln new file mode 100644 index 0000000..4368378 --- /dev/null +++ b/examples/BuildAllExamples_v8.sln @@ -0,0 +1,236 @@ +ďťż
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrlicht\Irrlicht8.0.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01.HelloWorld_vc8", "01.HelloWorld\HelloWorld_vc8.vcproj", "{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02.Quake3Map_vc8", "02.Quake3Map\Quake3Map_vc8.vcproj", "{D1A464A2-D479-458C-98A2-60965D823CD1}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03.CustomSceneNode_vc8", "03.CustomSceneNode\CustomSceneNode_vc8.vcproj", "{171CCDFA-C140-4956-8EB7-F0168F4521D3}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "04.Movement_vc8", "04.Movement\Movement_vc8.vcproj", "{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "05.UserInterface_vc8", "05.UserInterface\UserInterface_vc8.vcproj", "{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "06.2DGraphics_vc8", "06.2DGraphics\2DGraphics_vc8.vcproj", "{E71B6F18-10DC-4101-A541-F6D33F71B2BD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "07.Collision_vc8", "07.Collision\Collision_vc8.vcproj", "{3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "08.SpecialFX_vc8", "08.SpecialFX\SpecialFX_vc8.vcproj", "{C869BF55-B9D6-4980-BC92-60FA0CF8411A}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "09.Meshviewer_vc8", "09.Meshviewer\Meshviewer_vc8.vcproj", "{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "10.Shaders_vc8", "10.Shaders\Shaders_vc8.vcproj", "{27158C82-CD15-4A9B-9848-35E7065B209F}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "11.PerPixelLighting_vc8", "11.PerPixelLighting\PerPixelLighting_vc8.vcproj", "{C4B42409-542D-4EFC-9E6B-44713FD47A33}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "12.TerrainRendering_vc8", "12.TerrainRendering\TerrainRendering_vc8.vcproj", "{3A5B74E5-6390-43B0-A459-2793B81FFD31}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "13.RenderToTexture_vc8", "13.RenderToTexture\RenderToTexture_vc8.vcproj", "{0914E5C8-5352-467B-8421-C9EB35BD5596}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "14.Win32Window_vc8", "14.Win32Window\Win32Window_vc8.vcproj", "{772FBE05-D05A-467B-9842-BEC409EEA8D0}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "15.LoadIrrFile_vc8", "15.LoadIrrFile\LoadIrrFile_vc8.vcproj", "{78C9F424-523C-49AC-94B7-823AA4A26BF9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader_vc8", "16.Quake3MapShader\Quake3MapShader_vc8.vcproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld for Windows Mobile on PC", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_v8.vcproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick_vc8", "19.MouseAndJoystick\MouseAndJoystick_vc8.vcproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights_vc8", "20.ManagedLights\ManagedLights_vc8.vcproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer_vc8", "21.Quake3Explorer\Quake3Explorer_vc8.vcproj", "{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer_vc8", "22.MaterialViewer\MaterialViewer_vc8.vcproj", "{2856AB41-9BC5-4716-9B35-762A65F6F5D1}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling_vc8", "23.SMeshHandling\SMeshHandling_vc8.vcproj", "{08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl_vc8", "24.CursorControl\CursorControl_vc8.vcproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo_vc8", "Demo\Demo_vc8.vcproj", "{6F076455-D955-45D4-9C68-4AD4E45F2D47}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.Build.0 = Debug|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.ActiveCfg = Release|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.Build.0 = Release|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.Build.0 = Debug|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.ActiveCfg = Release|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.Build.0 = Release|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.Build.0 = Debug|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.ActiveCfg = Release|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.Build.0 = Release|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.Build.0 = Debug|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.ActiveCfg = Release|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.Build.0 = Release|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.ActiveCfg = Debug|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.Build.0 = Debug|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.ActiveCfg = Release|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.Build.0 = Release|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.Build.0 = Debug|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.ActiveCfg = Release|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.Build.0 = Release|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.Build.0 = Debug|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.ActiveCfg = Release|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.Build.0 = Release|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.Build.0 = Debug|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.ActiveCfg = Release|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.Build.0 = Release|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.Build.0 = Debug|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.ActiveCfg = Release|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.Build.0 = Release|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.Build.0 = Debug|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.ActiveCfg = Release|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.Build.0 = Release|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.Build.0 = Debug|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.ActiveCfg = Release|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.Build.0 = Release|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.Build.0 = Debug|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.ActiveCfg = Release|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.Build.0 = Release|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.Build.0 = Debug|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.ActiveCfg = Release|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.Build.0 = Release|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.Build.0 = Debug|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.ActiveCfg = Release|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.Build.0 = Release|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.Build.0 = Debug|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.ActiveCfg = Release|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.Build.0 = Release|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.Build.0 = Debug|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.ActiveCfg = Release|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.Build.0 = Release|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.Build.0 = Debug|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.ActiveCfg = Release|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.Build.0 = Release|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.Build.0 = Debug|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.ActiveCfg = Release|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.Build.0 = Release|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.Build.0 = Debug|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.Build.0 = Release|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.Build.0 = Debug|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.ActiveCfg = Release|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.Build.0 = Release|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.Build.0 = Debug|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.ActiveCfg = Release|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.Build.0 = Release|Win32
+ {2856AB41-9BC5-4716-9B35-762A65F6F5D1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2856AB41-9BC5-4716-9B35-762A65F6F5D1}.Debug|Win32.Build.0 = Debug|Win32
+ {2856AB41-9BC5-4716-9B35-762A65F6F5D1}.Release|Win32.ActiveCfg = Release|Win32
+ {2856AB41-9BC5-4716-9B35-762A65F6F5D1}.Release|Win32.Build.0 = Release|Win32
+ {08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}.Debug|Win32.Build.0 = Debug|Win32
+ {08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}.Release|Win32.ActiveCfg = Release|Win32
+ {08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}.Release|Win32.Build.0 = Release|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/examples/BuildAllExamples_v9.sln b/examples/BuildAllExamples_v9.sln new file mode 100644 index 0000000..61ebb1f --- /dev/null +++ b/examples/BuildAllExamples_v9.sln @@ -0,0 +1,284 @@ +ďťż
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual C++ Express 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01.HelloWorld_vc9", "01.HelloWorld\HelloWorld_vc9.vcproj", "{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02.Quake3Map_vc9", "02.Quake3Map\Quake3Map_vc9.vcproj", "{D1A464A2-D479-458C-98A2-60965D823CD1}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03.CustomSceneNode_vc9", "03.CustomSceneNode\CustomSceneNode_vc9.vcproj", "{171CCDFA-C140-4956-8EB7-F0168F4521D3}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "04.Movement_vc9", "04.Movement\Movement_vc9.vcproj", "{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "05.UserInterface_vc8", "05.UserInterface\UserInterface_vc9.vcproj", "{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "06.2DGraphics_vc9", "06.2DGraphics\2DGraphics_vc9.vcproj", "{E71B6F18-10DC-4101-A541-F6D33F71B2BD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "07.Collision_vc9", "07.Collision\Collision_vc9.vcproj", "{3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "08.SpecialFX_vc9", "08.SpecialFX\SpecialFX_vc9.vcproj", "{C869BF55-B9D6-4980-BC92-60FA0CF8411A}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "09.Meshviewer_vc9", "09.Meshviewer\Meshviewer_vc9.vcproj", "{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "10.Shaders_vc9", "10.Shaders\Shaders_vc9.vcproj", "{27158C82-CD15-4A9B-9848-35E7065B209F}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "11.PerPixelLighting_vc9", "11.PerPixelLighting\PerPixelLighting_vc9.vcproj", "{C4B42409-542D-4EFC-9E6B-44713FD47A33}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "12.TerrainRendering_vc9", "12.TerrainRendering\TerrainRendering_vc9.vcproj", "{3A5B74E5-6390-43B0-A459-2793B81FFD31}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "13.RenderToTexture_vc9", "13.RenderToTexture\RenderToTexture_vc9.vcproj", "{0914E5C8-5352-467B-8421-C9EB35BD5596}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "14.Win32Window_vc9", "14.Win32Window\Win32Window_vc9.vcproj", "{772FBE05-D05A-467B-9842-BEC409EEA8D0}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "15.LoadIrrFile_vc9", "15.LoadIrrFile\LoadIrrFile_vc9.vcproj", "{78C9F424-523C-49AC-94B7-823AA4A26BF9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrlicht\Irrlicht9.0.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo_vc9", "Demo\Demo_vc9.vcproj", "{6F076455-D955-45D4-9C68-4AD4E45F2D47}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader_vc9", "16.Quake3MapShader\Quake3MapShader_vc9.vcproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld_Mobile_v9", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_v9.vcproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18.SplitScreen_vc9", "18.SplitScreen\SplitScreen_vc9.vcproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick_vc9", "19.MouseAndJoystick\MouseAndJoystick_vc9.vcproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights_vc9", "20.ManagedLights\ManagedLights_vc9.vcproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer_vc9", "21.Quake3Explorer\Quake3Explorer_vc9.vcproj", "{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer_vc9", "22.MaterialViewer\MaterialViewer_vc9.vcproj", "{F4C8112D-57A8-4D01-BB62-BAC6A09A6902}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling_vc9", "23.SMeshHandling\SMeshHandling_vc9.vcproj", "{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl_vc9", "24.CursorControl\CursorControl_vc9.vcproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Editor_v9", "..\tools\GUIEditor\GUI Editor_v9.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "..\tools\IrrFontTool\newFontTool\irrFontTool_v9.vcproj", "{4D53E40F-37E3-42B1-8848-F4C6F8313A17}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mesh Converter", "..\tools\MeshConverter\MeshConverter_v9.vcproj", "{E72B637E-4AA6-46F3-885F-AC67B4B470ED}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "25.XmlHandling_vc9", "25.XmlHandling\XmlHandling_vc9.vcproj", "{8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "26.OcclusionQuery_vc9", "26.OcclusionQuery\OcclusionQuery_vc9.vcproj", "{9A859369-0A56-4DAB-9E0C-9F93C91CF0F2}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.Build.0 = Debug|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.ActiveCfg = Release|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.Build.0 = Release|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.Build.0 = Debug|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.ActiveCfg = Release|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.Build.0 = Release|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.Build.0 = Debug|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.ActiveCfg = Release|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.Build.0 = Release|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.Build.0 = Debug|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.ActiveCfg = Release|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.Build.0 = Release|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.ActiveCfg = Debug|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.Build.0 = Debug|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.ActiveCfg = Release|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.Build.0 = Release|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.Build.0 = Debug|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.ActiveCfg = Release|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.Build.0 = Release|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.Build.0 = Debug|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.ActiveCfg = Release|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.Build.0 = Release|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.Build.0 = Debug|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.ActiveCfg = Release|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.Build.0 = Release|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.Build.0 = Debug|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.ActiveCfg = Release|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.Build.0 = Release|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.Build.0 = Debug|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.ActiveCfg = Release|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.Build.0 = Release|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.Build.0 = Debug|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.ActiveCfg = Release|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.Build.0 = Release|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.Build.0 = Debug|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.ActiveCfg = Release|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.Build.0 = Release|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.Build.0 = Debug|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.ActiveCfg = Release|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.Build.0 = Release|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.Build.0 = Debug|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.ActiveCfg = Release|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.Build.0 = Release|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.Build.0 = Debug|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.ActiveCfg = Release|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.Build.0 = Release|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.Build.0 = Debug|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.ActiveCfg = Release|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.Build.0 = Release|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.Build.0 = Debug|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.ActiveCfg = Release|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.Build.0 = Release|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.Build.0 = Debug|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.ActiveCfg = Release|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.Build.0 = Release|Win32
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.Build.0 = Debug|Win32
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.ActiveCfg = Release|Win32
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.Build.0 = Release|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.Build.0 = Debug|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.ActiveCfg = Release|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.Build.0 = Release|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.Build.0 = Debug|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.Build.0 = Release|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.Build.0 = Debug|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.ActiveCfg = Release|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.Build.0 = Release|Win32
+ {F4C8112D-57A8-4D01-BB62-BAC6A09A6902}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F4C8112D-57A8-4D01-BB62-BAC6A09A6902}.Debug|Win32.Build.0 = Debug|Win32
+ {F4C8112D-57A8-4D01-BB62-BAC6A09A6902}.Release|Win32.ActiveCfg = Release|Win32
+ {F4C8112D-57A8-4D01-BB62-BAC6A09A6902}.Release|Win32.Build.0 = Release|Win32
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|Win32.Build.0 = Debug|Win32
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|Win32.ActiveCfg = Release|Win32
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|Win32.Build.0 = Release|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.Build.0 = Release|Win32
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.Build.0 = Debug|Win32
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.ActiveCfg = Release|Win32
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.Build.0 = Release|Win32
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.Build.0 = Debug|Win32
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.ActiveCfg = Release|Win32
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.Build.0 = Release|Win32
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|Win32.Build.0 = Debug|Win32
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|Win32.ActiveCfg = Release|Win32
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|Win32.Build.0 = Release|Win32
+ {9A859369-0A56-4DAB-9E0C-9F93C91CF0F2}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9A859369-0A56-4DAB-9E0C-9F93C91CF0F2}.Debug|Win32.Build.0 = Debug|Win32
+ {9A859369-0A56-4DAB-9E0C-9F93C91CF0F2}.Release|Win32.ActiveCfg = Release|Win32
+ {9A859369-0A56-4DAB-9E0C-9F93C91CF0F2}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/examples/BuildAllExamples_vc10.sln b/examples/BuildAllExamples_vc10.sln new file mode 100644 index 0000000..11190a6 --- /dev/null +++ b/examples/BuildAllExamples_vc10.sln @@ -0,0 +1,409 @@ +ďťż
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrlicht\Irrlicht10.0.vcxproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01.HelloWorld", "01.HelloWorld\HelloWorld_vc10.vcxproj", "{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02.Quake3Map", "02.Quake3Map\Quake3Map_vc10.vcxproj", "{D1A464A2-D479-458C-98A2-60965D823CD1}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03.CustomSceneNode", "03.CustomSceneNode\CustomSceneNode_vc10.vcxproj", "{171CCDFA-C140-4956-8EB7-F0168F4521D3}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "04.Movement", "04.Movement\Movement_vc10.vcxproj", "{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "05.UserInterface", "05.UserInterface\UserInterface_vc10.vcxproj", "{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "06.2DGraphics", "06.2DGraphics\2DGraphics_vc10.vcxproj", "{E71B6F18-10DC-4101-A541-F6D33F71B2BD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "07.Collision", "07.Collision\Collision_vc10.vcxproj", "{3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "08.SpecialFX", "08.SpecialFX\SpecialFX_vc10.vcxproj", "{C869BF55-B9D6-4980-BC92-60FA0CF8411A}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "09.Meshviewer", "09.Meshviewer\Meshviewer_vc10.vcxproj", "{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "10.Shaders", "10.Shaders\Shaders_vc10.vcxproj", "{27158C82-CD15-4A9B-9848-35E7065B209F}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "11.PerPixelLighting", "11.PerPixelLighting\PerPixelLighting_vc10.vcxproj", "{C4B42409-542D-4EFC-9E6B-44713FD47A33}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "12.TerrainRendering", "12.TerrainRendering\TerrainRendering_vc10.vcxproj", "{3A5B74E5-6390-43B0-A459-2793B81FFD31}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "13.RenderToTexture", "13.RenderToTexture\RenderToTexture_vc10.vcxproj", "{0914E5C8-5352-467B-8421-C9EB35BD5596}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "14.Win32Window", "14.Win32Window\Win32Window_vc10.vcxproj", "{772FBE05-D05A-467B-9842-BEC409EEA8D0}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "15.LoadIrrFile", "15.LoadIrrFile\LoadIrrFile_vc10.vcxproj", "{78C9F424-523C-49AC-94B7-823AA4A26BF9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader", "16.Quake3MapShader\Quake3MapShader_vc10.vcxproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld_Mobile", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_vc10.vcxproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18.SplitScreen", "18.SplitScreen\SplitScreen_vc10.vcxproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick", "19.MouseAndJoystick\MouseAndJoystick_vc10.vcxproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "20.ManagedLights\ManagedLights_vc10.vcxproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer", "21.Quake3Explorer\Quake3Explorer_vc10.vcxproj", "{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer", "22.MaterialViewer\MaterialViewer_vc10.vcxproj", "{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling", "23.SMeshHandling\SMeshHandling_vc10.vcxproj", "{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl", "24.CursorControl\CursorControl_vc10.vcxproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo", "Demo\Demo_vc10.vcxproj", "{6F076455-D955-45D4-9C68-4AD4E45F2D47}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUIEditor", "..\tools\GUIEditor\GUI Editor_vc10.vcxproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FontTool", "..\tools\IrrFontTool\newFontTool\irrFontTool_vc10.vcxproj", "{4D53E40F-37E3-42B1-8848-F4C6F8313A17}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MeshConverter", "..\tools\MeshConverter\MeshConverter_vc10.vcxproj", "{E72B637E-4AA6-46F3-885F-AC67B4B470ED}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "26.OcclusionQuery", "26.OcclusionQuery\OcclusionQuery_vc10.vcxproj", "{5CE0E2E7-879D-4152-B61D-24E7D0707B45}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "25.XmlHandling", "25.XmlHandling\XmlHandling_vc10.vcxproj", "{8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.ActiveCfg = Debug|x64
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.0 = Debug|x64
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.2 = Static lib - Release - Fast FPU|x64
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.4 = SDL-Debug|x64
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.ActiveCfg = Release|x64
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.Build.0 = Release|x64
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.Build.0 = Debug|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|x64.ActiveCfg = Debug|x64
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|x64.Build.0 = Debug|x64
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.ActiveCfg = Release|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.Build.0 = Release|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|x64.ActiveCfg = Release|x64
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|x64.Build.0 = Release|x64
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.Build.0 = Debug|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|x64.ActiveCfg = Debug|x64
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|x64.Build.0 = Debug|x64
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.ActiveCfg = Release|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.Build.0 = Release|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|x64.ActiveCfg = Release|x64
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|x64.Build.0 = Release|x64
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.Build.0 = Debug|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|x64.ActiveCfg = Debug|x64
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|x64.Build.0 = Debug|x64
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.ActiveCfg = Release|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.Build.0 = Release|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|x64.ActiveCfg = Release|x64
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|x64.Build.0 = Release|x64
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.Build.0 = Debug|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|x64.ActiveCfg = Debug|x64
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|x64.Build.0 = Debug|x64
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.ActiveCfg = Release|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.Build.0 = Release|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|x64.ActiveCfg = Release|x64
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|x64.Build.0 = Release|x64
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.ActiveCfg = Debug|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.Build.0 = Debug|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|x64.ActiveCfg = Debug|x64
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|x64.Build.0 = Debug|x64
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.ActiveCfg = Release|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.Build.0 = Release|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|x64.ActiveCfg = Release|x64
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|x64.Build.0 = Release|x64
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.Build.0 = Debug|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|x64.ActiveCfg = Debug|x64
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|x64.Build.0 = Debug|x64
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.ActiveCfg = Release|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.Build.0 = Release|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|x64.ActiveCfg = Release|x64
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|x64.Build.0 = Release|x64
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.Build.0 = Debug|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|x64.ActiveCfg = Debug|x64
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|x64.Build.0 = Debug|x64
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.ActiveCfg = Release|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.Build.0 = Release|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|x64.ActiveCfg = Release|x64
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|x64.Build.0 = Release|x64
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.Build.0 = Debug|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|x64.ActiveCfg = Debug|x64
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|x64.Build.0 = Debug|x64
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.ActiveCfg = Release|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.Build.0 = Release|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|x64.ActiveCfg = Release|x64
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|x64.Build.0 = Release|x64
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.Build.0 = Debug|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|x64.ActiveCfg = Debug|x64
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|x64.Build.0 = Debug|x64
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.ActiveCfg = Release|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.Build.0 = Release|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|x64.ActiveCfg = Release|x64
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|x64.Build.0 = Release|x64
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.Build.0 = Debug|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|x64.ActiveCfg = Debug|x64
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|x64.Build.0 = Debug|x64
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.ActiveCfg = Release|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.Build.0 = Release|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|x64.ActiveCfg = Release|x64
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|x64.Build.0 = Release|x64
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.Build.0 = Debug|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|x64.ActiveCfg = Debug|x64
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|x64.Build.0 = Debug|x64
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.ActiveCfg = Release|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.Build.0 = Release|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|x64.ActiveCfg = Release|x64
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|x64.Build.0 = Release|x64
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.Build.0 = Debug|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|x64.ActiveCfg = Debug|x64
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|x64.Build.0 = Debug|x64
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.ActiveCfg = Release|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.Build.0 = Release|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|x64.ActiveCfg = Release|x64
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|x64.Build.0 = Release|x64
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.Build.0 = Debug|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|x64.ActiveCfg = Debug|x64
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|x64.Build.0 = Debug|x64
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.ActiveCfg = Release|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.Build.0 = Release|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|x64.ActiveCfg = Release|x64
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|x64.Build.0 = Release|x64
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.Build.0 = Debug|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|x64.ActiveCfg = Debug|x64
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|x64.Build.0 = Debug|x64
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.ActiveCfg = Release|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.Build.0 = Release|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|x64.ActiveCfg = Release|x64
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|x64.Build.0 = Release|x64
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.Build.0 = Debug|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|x64.ActiveCfg = Debug|x64
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|x64.Build.0 = Debug|x64
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.ActiveCfg = Release|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.Build.0 = Release|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|x64.ActiveCfg = Release|x64
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|x64.Build.0 = Release|x64
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.Build.0 = Debug|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|x64.ActiveCfg = Debug|x64
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|x64.Build.0 = Debug|x64
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.ActiveCfg = Release|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.Build.0 = Release|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|x64.ActiveCfg = Release|x64
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|x64.Build.0 = Release|x64
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.Build.0 = Debug|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|x64.ActiveCfg = Debug|x64
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|x64.Build.0 = Debug|x64
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.ActiveCfg = Release|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.Build.0 = Release|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|x64.ActiveCfg = Release|x64
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|x64.Build.0 = Release|x64
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.Build.0 = Debug|Win32
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|x64.ActiveCfg = Debug|x64
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|x64.Build.0 = Debug|x64
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.ActiveCfg = Release|Win32
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.Build.0 = Release|Win32
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|x64.ActiveCfg = Release|x64
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|x64.Build.0 = Release|x64
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.Build.0 = Debug|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|x64.ActiveCfg = Debug|x64
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|x64.Build.0 = Debug|x64
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.ActiveCfg = Release|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.Build.0 = Release|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|x64.ActiveCfg = Release|x64
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|x64.Build.0 = Release|x64
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.Build.0 = Debug|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|x64.ActiveCfg = Debug|x64
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|x64.Build.0 = Debug|x64
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.Build.0 = Release|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|x64.ActiveCfg = Release|x64
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|x64.Build.0 = Release|x64
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.Build.0 = Debug|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|x64.ActiveCfg = Debug|x64
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|x64.Build.0 = Debug|x64
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.ActiveCfg = Release|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.Build.0 = Release|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|x64.ActiveCfg = Release|x64
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|x64.Build.0 = Release|x64
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|Win32.Build.0 = Debug|Win32
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|x64.ActiveCfg = Debug|x64
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|x64.Build.0 = Debug|x64
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|Win32.ActiveCfg = Release|Win32
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|Win32.Build.0 = Release|Win32
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|x64.ActiveCfg = Release|x64
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|x64.Build.0 = Release|x64
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|Win32.Build.0 = Debug|Win32
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|x64.ActiveCfg = Debug|x64
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|x64.Build.0 = Debug|x64
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|Win32.ActiveCfg = Release|Win32
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|Win32.Build.0 = Release|Win32
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|x64.ActiveCfg = Release|x64
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|x64.Build.0 = Release|x64
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|x64.ActiveCfg = Debug|x64
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|x64.Build.0 = Debug|x64
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.Build.0 = Release|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|x64.ActiveCfg = Release|x64
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|x64.Build.0 = Release|x64
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.Build.0 = Debug|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|x64.ActiveCfg = Debug|x64
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|x64.Build.0 = Debug|x64
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.ActiveCfg = Release|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.Build.0 = Release|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|x64.ActiveCfg = Release|x64
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|x64.Build.0 = Release|x64
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|x64.ActiveCfg = Debug|x64
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|x64.Build.0 = Debug|x64
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|x64.ActiveCfg = Release|x64
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|x64.Build.0 = Release|x64
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.Build.0 = Debug|Win32
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|x64.ActiveCfg = Debug|x64
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|x64.Build.0 = Debug|x64
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.ActiveCfg = Release|Win32
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.Build.0 = Release|Win32
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|x64.ActiveCfg = Release|x64
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|x64.Build.0 = Release|x64
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.Build.0 = Debug|Win32
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|x64.ActiveCfg = Debug|x64
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|x64.Build.0 = Debug|x64
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.ActiveCfg = Release|Win32
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.Build.0 = Release|Win32
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|x64.ActiveCfg = Release|x64
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|x64.Build.0 = Release|x64
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|Win32.Build.0 = Debug|Win32
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|x64.ActiveCfg = Debug|x64
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|x64.Build.0 = Debug|x64
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|Win32.ActiveCfg = Release|Win32
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|Win32.Build.0 = Release|Win32
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|x64.ActiveCfg = Release|x64
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|x64.Build.0 = Release|x64
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|Win32.Build.0 = Debug|Win32
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|x64.ActiveCfg = Debug|x64
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|x64.Build.0 = Debug|x64
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|Win32.ActiveCfg = Release|Win32
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|Win32.Build.0 = Release|Win32
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|x64.ActiveCfg = Release|x64
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/examples/BuildAllExamples_vc11.sln b/examples/BuildAllExamples_vc11.sln new file mode 100644 index 0000000..50ac646 --- /dev/null +++ b/examples/BuildAllExamples_vc11.sln @@ -0,0 +1,409 @@ +ďťż
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2012
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrlicht\Irrlicht11.0.vcxproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01.HelloWorld", "01.HelloWorld\HelloWorld_vc11.vcxproj", "{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02.Quake3Map", "02.Quake3Map\Quake3Map_vc11.vcxproj", "{D1A464A2-D479-458C-98A2-60965D823CD1}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03.CustomSceneNode", "03.CustomSceneNode\CustomSceneNode_vc11.vcxproj", "{171CCDFA-C140-4956-8EB7-F0168F4521D3}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "04.Movement", "04.Movement\Movement_vc11.vcxproj", "{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "05.UserInterface", "05.UserInterface\UserInterface_vc11.vcxproj", "{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "06.2DGraphics", "06.2DGraphics\2DGraphics_vc11.vcxproj", "{E71B6F18-10DC-4101-A541-F6D33F71B2BD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "07.Collision", "07.Collision\Collision_vc11.vcxproj", "{3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "08.SpecialFX", "08.SpecialFX\SpecialFX_vc11.vcxproj", "{C869BF55-B9D6-4980-BC92-60FA0CF8411A}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "09.Meshviewer", "09.Meshviewer\Meshviewer_vc11.vcxproj", "{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "10.Shaders", "10.Shaders\Shaders_vc11.vcxproj", "{27158C82-CD15-4A9B-9848-35E7065B209F}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "11.PerPixelLighting", "11.PerPixelLighting\PerPixelLighting_vc11.vcxproj", "{C4B42409-542D-4EFC-9E6B-44713FD47A33}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "12.TerrainRendering", "12.TerrainRendering\TerrainRendering_vc11.vcxproj", "{3A5B74E5-6390-43B0-A459-2793B81FFD31}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "13.RenderToTexture", "13.RenderToTexture\RenderToTexture_vc11.vcxproj", "{0914E5C8-5352-467B-8421-C9EB35BD5596}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "14.Win32Window", "14.Win32Window\Win32Window_vc11.vcxproj", "{772FBE05-D05A-467B-9842-BEC409EEA8D0}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "15.LoadIrrFile", "15.LoadIrrFile\LoadIrrFile_vc11.vcxproj", "{78C9F424-523C-49AC-94B7-823AA4A26BF9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader", "16.Quake3MapShader\Quake3MapShader_vc11.vcxproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld_Mobile", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_vc11.vcxproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18.SplitScreen", "18.SplitScreen\SplitScreen_vc11.vcxproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick", "19.MouseAndJoystick\MouseAndJoystick_vc11.vcxproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "20.ManagedLights\ManagedLights_vc11.vcxproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer", "21.Quake3Explorer\Quake3Explorer_vc11.vcxproj", "{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer", "22.MaterialViewer\MaterialViewer_vc11.vcxproj", "{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling", "23.SMeshHandling\SMeshHandling_vc11.vcxproj", "{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl", "24.CursorControl\CursorControl_vc11.vcxproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo", "Demo\Demo_vc11.vcxproj", "{6F076455-D955-45D4-9C68-4AD4E45F2D47}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUIEditor", "..\tools\GUIEditor\GUI Editor_vc11.vcxproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FontTool", "..\tools\IrrFontTool\newFontTool\irrFontTool_vc11.vcxproj", "{4D53E40F-37E3-42B1-8848-F4C6F8313A17}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MeshConverter", "..\tools\MeshConverter\MeshConverter_vc11.vcxproj", "{E72B637E-4AA6-46F3-885F-AC67B4B470ED}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "26.OcclusionQuery", "26.OcclusionQuery\OcclusionQuery_vc11.vcxproj", "{5CE0E2E7-879D-4152-B61D-24E7D0707B45}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "25.XmlHandling", "25.XmlHandling\XmlHandling_vc11.vcxproj", "{8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.ActiveCfg = Debug|x64
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.0 = Debug|x64
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.2 = Static lib - Release - Fast FPU|x64
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.4 = SDL-Debug|x64
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.ActiveCfg = Release|x64
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.Build.0 = Release|x64
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.Build.0 = Debug|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|x64.ActiveCfg = Debug|x64
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|x64.Build.0 = Debug|x64
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.ActiveCfg = Release|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.Build.0 = Release|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|x64.ActiveCfg = Release|x64
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|x64.Build.0 = Release|x64
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.Build.0 = Debug|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|x64.ActiveCfg = Debug|x64
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|x64.Build.0 = Debug|x64
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.ActiveCfg = Release|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.Build.0 = Release|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|x64.ActiveCfg = Release|x64
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|x64.Build.0 = Release|x64
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.Build.0 = Debug|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|x64.ActiveCfg = Debug|x64
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|x64.Build.0 = Debug|x64
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.ActiveCfg = Release|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.Build.0 = Release|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|x64.ActiveCfg = Release|x64
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|x64.Build.0 = Release|x64
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.Build.0 = Debug|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|x64.ActiveCfg = Debug|x64
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|x64.Build.0 = Debug|x64
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.ActiveCfg = Release|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.Build.0 = Release|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|x64.ActiveCfg = Release|x64
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|x64.Build.0 = Release|x64
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.ActiveCfg = Debug|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.Build.0 = Debug|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|x64.ActiveCfg = Debug|x64
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|x64.Build.0 = Debug|x64
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.ActiveCfg = Release|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.Build.0 = Release|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|x64.ActiveCfg = Release|x64
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|x64.Build.0 = Release|x64
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.Build.0 = Debug|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|x64.ActiveCfg = Debug|x64
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|x64.Build.0 = Debug|x64
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.ActiveCfg = Release|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.Build.0 = Release|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|x64.ActiveCfg = Release|x64
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|x64.Build.0 = Release|x64
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.Build.0 = Debug|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|x64.ActiveCfg = Debug|x64
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|x64.Build.0 = Debug|x64
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.ActiveCfg = Release|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.Build.0 = Release|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|x64.ActiveCfg = Release|x64
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|x64.Build.0 = Release|x64
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.Build.0 = Debug|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|x64.ActiveCfg = Debug|x64
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|x64.Build.0 = Debug|x64
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.ActiveCfg = Release|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.Build.0 = Release|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|x64.ActiveCfg = Release|x64
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|x64.Build.0 = Release|x64
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.Build.0 = Debug|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|x64.ActiveCfg = Debug|x64
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|x64.Build.0 = Debug|x64
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.ActiveCfg = Release|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.Build.0 = Release|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|x64.ActiveCfg = Release|x64
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|x64.Build.0 = Release|x64
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.Build.0 = Debug|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|x64.ActiveCfg = Debug|x64
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|x64.Build.0 = Debug|x64
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.ActiveCfg = Release|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.Build.0 = Release|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|x64.ActiveCfg = Release|x64
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|x64.Build.0 = Release|x64
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.Build.0 = Debug|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|x64.ActiveCfg = Debug|x64
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|x64.Build.0 = Debug|x64
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.ActiveCfg = Release|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.Build.0 = Release|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|x64.ActiveCfg = Release|x64
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|x64.Build.0 = Release|x64
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.Build.0 = Debug|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|x64.ActiveCfg = Debug|x64
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|x64.Build.0 = Debug|x64
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.ActiveCfg = Release|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.Build.0 = Release|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|x64.ActiveCfg = Release|x64
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|x64.Build.0 = Release|x64
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.Build.0 = Debug|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|x64.ActiveCfg = Debug|x64
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|x64.Build.0 = Debug|x64
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.ActiveCfg = Release|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.Build.0 = Release|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|x64.ActiveCfg = Release|x64
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|x64.Build.0 = Release|x64
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.Build.0 = Debug|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|x64.ActiveCfg = Debug|x64
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|x64.Build.0 = Debug|x64
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.ActiveCfg = Release|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.Build.0 = Release|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|x64.ActiveCfg = Release|x64
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|x64.Build.0 = Release|x64
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.Build.0 = Debug|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|x64.ActiveCfg = Debug|x64
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|x64.Build.0 = Debug|x64
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.ActiveCfg = Release|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.Build.0 = Release|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|x64.ActiveCfg = Release|x64
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|x64.Build.0 = Release|x64
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.Build.0 = Debug|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|x64.ActiveCfg = Debug|x64
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|x64.Build.0 = Debug|x64
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.ActiveCfg = Release|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.Build.0 = Release|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|x64.ActiveCfg = Release|x64
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|x64.Build.0 = Release|x64
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.Build.0 = Debug|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|x64.ActiveCfg = Debug|x64
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|x64.Build.0 = Debug|x64
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.ActiveCfg = Release|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.Build.0 = Release|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|x64.ActiveCfg = Release|x64
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|x64.Build.0 = Release|x64
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.Build.0 = Debug|Win32
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|x64.ActiveCfg = Debug|x64
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|x64.Build.0 = Debug|x64
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.ActiveCfg = Release|Win32
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.Build.0 = Release|Win32
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|x64.ActiveCfg = Release|x64
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|x64.Build.0 = Release|x64
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.Build.0 = Debug|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|x64.ActiveCfg = Debug|x64
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|x64.Build.0 = Debug|x64
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.ActiveCfg = Release|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.Build.0 = Release|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|x64.ActiveCfg = Release|x64
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|x64.Build.0 = Release|x64
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.Build.0 = Debug|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|x64.ActiveCfg = Debug|x64
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|x64.Build.0 = Debug|x64
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.Build.0 = Release|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|x64.ActiveCfg = Release|x64
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|x64.Build.0 = Release|x64
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.Build.0 = Debug|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|x64.ActiveCfg = Debug|x64
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|x64.Build.0 = Debug|x64
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.ActiveCfg = Release|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.Build.0 = Release|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|x64.ActiveCfg = Release|x64
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|x64.Build.0 = Release|x64
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|Win32.Build.0 = Debug|Win32
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|x64.ActiveCfg = Debug|x64
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|x64.Build.0 = Debug|x64
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|Win32.ActiveCfg = Release|Win32
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|Win32.Build.0 = Release|Win32
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|x64.ActiveCfg = Release|x64
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|x64.Build.0 = Release|x64
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|Win32.Build.0 = Debug|Win32
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|x64.ActiveCfg = Debug|x64
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|x64.Build.0 = Debug|x64
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|Win32.ActiveCfg = Release|Win32
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|Win32.Build.0 = Release|Win32
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|x64.ActiveCfg = Release|x64
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|x64.Build.0 = Release|x64
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|x64.ActiveCfg = Debug|x64
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|x64.Build.0 = Debug|x64
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.Build.0 = Release|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|x64.ActiveCfg = Release|x64
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|x64.Build.0 = Release|x64
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.Build.0 = Debug|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|x64.ActiveCfg = Debug|x64
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|x64.Build.0 = Debug|x64
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.ActiveCfg = Release|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.Build.0 = Release|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|x64.ActiveCfg = Release|x64
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|x64.Build.0 = Release|x64
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|x64.ActiveCfg = Debug|x64
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|x64.Build.0 = Debug|x64
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|x64.ActiveCfg = Release|x64
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|x64.Build.0 = Release|x64
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.Build.0 = Debug|Win32
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|x64.ActiveCfg = Debug|x64
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|x64.Build.0 = Debug|x64
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.ActiveCfg = Release|Win32
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.Build.0 = Release|Win32
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|x64.ActiveCfg = Release|x64
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|x64.Build.0 = Release|x64
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.Build.0 = Debug|Win32
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|x64.ActiveCfg = Debug|x64
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|x64.Build.0 = Debug|x64
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.ActiveCfg = Release|Win32
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.Build.0 = Release|Win32
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|x64.ActiveCfg = Release|x64
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|x64.Build.0 = Release|x64
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|Win32.Build.0 = Debug|Win32
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|x64.ActiveCfg = Debug|x64
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|x64.Build.0 = Debug|x64
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|Win32.ActiveCfg = Release|Win32
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|Win32.Build.0 = Release|Win32
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|x64.ActiveCfg = Release|x64
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|x64.Build.0 = Release|x64
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|Win32.Build.0 = Debug|Win32
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|x64.ActiveCfg = Debug|x64
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|x64.Build.0 = Debug|x64
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|Win32.ActiveCfg = Release|Win32
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|Win32.Build.0 = Release|Win32
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|x64.ActiveCfg = Release|x64
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/examples/BuildAllExamples_vc12.sln b/examples/BuildAllExamples_vc12.sln new file mode 100644 index 0000000..55c96b2 --- /dev/null +++ b/examples/BuildAllExamples_vc12.sln @@ -0,0 +1,406 @@ +ďťż
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.40629.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrlicht\Irrlicht12.0.vcxproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01.HelloWorld", "01.HelloWorld\HelloWorld_vc12.vcxproj", "{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02.Quake3Map", "02.Quake3Map\Quake3Map_vc12.vcxproj", "{D1A464A2-D479-458C-98A2-60965D823CD1}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03.CustomSceneNode", "03.CustomSceneNode\CustomSceneNode_vc12.vcxproj", "{171CCDFA-C140-4956-8EB7-F0168F4521D3}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "04.Movement", "04.Movement\Movement_vc12.vcxproj", "{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "05.UserInterface", "05.UserInterface\UserInterface_vc12.vcxproj", "{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "06.2DGraphics", "06.2DGraphics\2DGraphics_vc12.vcxproj", "{E71B6F18-10DC-4101-A541-F6D33F71B2BD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "07.Collision", "07.Collision\Collision_vc12.vcxproj", "{3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "08.SpecialFX", "08.SpecialFX\SpecialFX_vc12.vcxproj", "{C869BF55-B9D6-4980-BC92-60FA0CF8411A}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "09.Meshviewer", "09.Meshviewer\Meshviewer_vc12.vcxproj", "{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "11.PerPixelLighting", "11.PerPixelLighting\PerPixelLighting_vc12.vcxproj", "{C4B42409-542D-4EFC-9E6B-44713FD47A33}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "12.TerrainRendering", "12.TerrainRendering\TerrainRendering_vc12.vcxproj", "{3A5B74E5-6390-43B0-A459-2793B81FFD31}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "13.RenderToTexture", "13.RenderToTexture\RenderToTexture_vc12.vcxproj", "{0914E5C8-5352-467B-8421-C9EB35BD5596}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "14.Win32Window", "14.Win32Window\Win32Window_vc12.vcxproj", "{772FBE05-D05A-467B-9842-BEC409EEA8D0}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "15.LoadIrrFile", "15.LoadIrrFile\LoadIrrFile_vc12.vcxproj", "{78C9F424-523C-49AC-94B7-823AA4A26BF9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader", "16.Quake3MapShader\Quake3MapShader_vc12.vcxproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld_Mobile", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_vc12.vcxproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18.SplitScreen", "18.SplitScreen\SplitScreen_vc12.vcxproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick", "19.MouseAndJoystick\MouseAndJoystick_vc12.vcxproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "20.ManagedLights\ManagedLights_vc12.vcxproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer", "21.Quake3Explorer\Quake3Explorer_vc12.vcxproj", "{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer", "22.MaterialViewer\MaterialViewer_vc12.vcxproj", "{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling", "23.SMeshHandling\SMeshHandling_vc12.vcxproj", "{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl", "24.CursorControl\CursorControl_vc12.vcxproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo", "Demo\Demo_vc12.vcxproj", "{6F076455-D955-45D4-9C68-4AD4E45F2D47}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUIEditor", "..\tools\GUIEditor\GUI Editor_vc12.vcxproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FontTool", "..\tools\IrrFontTool\newFontTool\irrFontTool_vc12.vcxproj", "{4D53E40F-37E3-42B1-8848-F4C6F8313A17}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MeshConverter", "..\tools\MeshConverter\MeshConverter_vc12.vcxproj", "{E72B637E-4AA6-46F3-885F-AC67B4B470ED}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "26.OcclusionQuery", "26.OcclusionQuery\OcclusionQuery_vc12.vcxproj", "{5CE0E2E7-879D-4152-B61D-24E7D0707B45}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "25.XmlHandling", "25.XmlHandling\XmlHandling_vc12.vcxproj", "{8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "10.Shaders", "10.Shaders\Shaders_vc12.vcxproj", "{27158C82-CD15-4A9B-9848-35E7065B209F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.ActiveCfg = Debug|x64
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.0 = Debug|x64
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.ActiveCfg = Release|x64
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.Build.0 = Release|x64
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.Build.0 = Debug|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|x64.ActiveCfg = Debug|x64
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|x64.Build.0 = Debug|x64
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.ActiveCfg = Release|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.Build.0 = Release|Win32
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|x64.ActiveCfg = Release|x64
+ {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|x64.Build.0 = Release|x64
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.Build.0 = Debug|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|x64.ActiveCfg = Debug|x64
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|x64.Build.0 = Debug|x64
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.ActiveCfg = Release|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.Build.0 = Release|Win32
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|x64.ActiveCfg = Release|x64
+ {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|x64.Build.0 = Release|x64
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.Build.0 = Debug|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|x64.ActiveCfg = Debug|x64
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|x64.Build.0 = Debug|x64
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.ActiveCfg = Release|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.Build.0 = Release|Win32
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|x64.ActiveCfg = Release|x64
+ {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|x64.Build.0 = Release|x64
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.Build.0 = Debug|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|x64.ActiveCfg = Debug|x64
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|x64.Build.0 = Debug|x64
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.ActiveCfg = Release|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.Build.0 = Release|Win32
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|x64.ActiveCfg = Release|x64
+ {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|x64.Build.0 = Release|x64
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.ActiveCfg = Debug|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.Build.0 = Debug|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|x64.ActiveCfg = Debug|x64
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|x64.Build.0 = Debug|x64
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.ActiveCfg = Release|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.Build.0 = Release|Win32
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|x64.ActiveCfg = Release|x64
+ {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|x64.Build.0 = Release|x64
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.Build.0 = Debug|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|x64.ActiveCfg = Debug|x64
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|x64.Build.0 = Debug|x64
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.ActiveCfg = Release|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.Build.0 = Release|Win32
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|x64.ActiveCfg = Release|x64
+ {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|x64.Build.0 = Release|x64
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.Build.0 = Debug|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|x64.ActiveCfg = Debug|x64
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|x64.Build.0 = Debug|x64
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.ActiveCfg = Release|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.Build.0 = Release|Win32
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|x64.ActiveCfg = Release|x64
+ {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|x64.Build.0 = Release|x64
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.Build.0 = Debug|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|x64.ActiveCfg = Debug|x64
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|x64.Build.0 = Debug|x64
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.ActiveCfg = Release|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.Build.0 = Release|Win32
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|x64.ActiveCfg = Release|x64
+ {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|x64.Build.0 = Release|x64
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.Build.0 = Debug|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|x64.ActiveCfg = Debug|x64
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|x64.Build.0 = Debug|x64
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.ActiveCfg = Release|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.Build.0 = Release|Win32
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|x64.ActiveCfg = Release|x64
+ {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|x64.Build.0 = Release|x64
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.Build.0 = Debug|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|x64.ActiveCfg = Debug|x64
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|x64.Build.0 = Debug|x64
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.ActiveCfg = Release|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.Build.0 = Release|Win32
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|x64.ActiveCfg = Release|x64
+ {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|x64.Build.0 = Release|x64
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.Build.0 = Debug|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|x64.ActiveCfg = Debug|x64
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|x64.Build.0 = Debug|x64
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.ActiveCfg = Release|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.Build.0 = Release|Win32
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|x64.ActiveCfg = Release|x64
+ {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|x64.Build.0 = Release|x64
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.Build.0 = Debug|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|x64.ActiveCfg = Debug|x64
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|x64.Build.0 = Debug|x64
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.ActiveCfg = Release|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.Build.0 = Release|Win32
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|x64.ActiveCfg = Release|x64
+ {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|x64.Build.0 = Release|x64
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.Build.0 = Debug|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|x64.ActiveCfg = Debug|x64
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|x64.Build.0 = Debug|x64
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.ActiveCfg = Release|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.Build.0 = Release|Win32
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|x64.ActiveCfg = Release|x64
+ {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|x64.Build.0 = Release|x64
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.Build.0 = Debug|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|x64.ActiveCfg = Debug|x64
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|x64.Build.0 = Debug|x64
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.ActiveCfg = Release|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.Build.0 = Release|Win32
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|x64.ActiveCfg = Release|x64
+ {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|x64.Build.0 = Release|x64
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.Build.0 = Debug|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|x64.ActiveCfg = Debug|x64
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|x64.Build.0 = Debug|x64
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.ActiveCfg = Release|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.Build.0 = Release|Win32
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|x64.ActiveCfg = Release|x64
+ {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|x64.Build.0 = Release|x64
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.Build.0 = Debug|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|x64.ActiveCfg = Debug|x64
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|x64.Build.0 = Debug|x64
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.ActiveCfg = Release|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.Build.0 = Release|Win32
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|x64.ActiveCfg = Release|x64
+ {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|x64.Build.0 = Release|x64
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.Build.0 = Debug|Win32
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|x64.ActiveCfg = Debug|x64
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|x64.Build.0 = Debug|x64
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.ActiveCfg = Release|Win32
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.Build.0 = Release|Win32
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|x64.ActiveCfg = Release|x64
+ {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|x64.Build.0 = Release|x64
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.Build.0 = Debug|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|x64.ActiveCfg = Debug|x64
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|x64.Build.0 = Debug|x64
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.ActiveCfg = Release|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.Build.0 = Release|Win32
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|x64.ActiveCfg = Release|x64
+ {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|x64.Build.0 = Release|x64
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.Build.0 = Debug|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|x64.ActiveCfg = Debug|x64
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|x64.Build.0 = Debug|x64
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.Build.0 = Release|Win32
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|x64.ActiveCfg = Release|x64
+ {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|x64.Build.0 = Release|x64
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.Build.0 = Debug|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|x64.ActiveCfg = Debug|x64
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|x64.Build.0 = Debug|x64
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.ActiveCfg = Release|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.Build.0 = Release|Win32
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|x64.ActiveCfg = Release|x64
+ {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|x64.Build.0 = Release|x64
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|Win32.Build.0 = Debug|Win32
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|x64.ActiveCfg = Debug|x64
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|x64.Build.0 = Debug|x64
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|Win32.ActiveCfg = Release|Win32
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|Win32.Build.0 = Release|Win32
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|x64.ActiveCfg = Release|x64
+ {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|x64.Build.0 = Release|x64
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|Win32.Build.0 = Debug|Win32
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|x64.ActiveCfg = Debug|x64
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|x64.Build.0 = Debug|x64
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|Win32.ActiveCfg = Release|Win32
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|Win32.Build.0 = Release|Win32
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|x64.ActiveCfg = Release|x64
+ {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|x64.Build.0 = Release|x64
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|x64.ActiveCfg = Debug|x64
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|x64.Build.0 = Debug|x64
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.Build.0 = Release|Win32
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|x64.ActiveCfg = Release|x64
+ {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|x64.Build.0 = Release|x64
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.Build.0 = Debug|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|x64.ActiveCfg = Debug|x64
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|x64.Build.0 = Debug|x64
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.ActiveCfg = Release|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.Build.0 = Release|Win32
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|x64.ActiveCfg = Release|x64
+ {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|x64.Build.0 = Release|x64
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|x64.ActiveCfg = Debug|x64
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|x64.Build.0 = Debug|x64
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|x64.ActiveCfg = Release|x64
+ {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|x64.Build.0 = Release|x64
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.Build.0 = Debug|Win32
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|x64.ActiveCfg = Debug|x64
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|x64.Build.0 = Debug|x64
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.ActiveCfg = Release|Win32
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.Build.0 = Release|Win32
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|x64.ActiveCfg = Release|x64
+ {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|x64.Build.0 = Release|x64
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.Build.0 = Debug|Win32
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|x64.ActiveCfg = Debug|x64
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|x64.Build.0 = Debug|x64
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.ActiveCfg = Release|Win32
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.Build.0 = Release|Win32
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|x64.ActiveCfg = Release|x64
+ {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|x64.Build.0 = Release|x64
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|Win32.Build.0 = Debug|Win32
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|x64.ActiveCfg = Debug|x64
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|x64.Build.0 = Debug|x64
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|Win32.ActiveCfg = Release|Win32
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|Win32.Build.0 = Release|Win32
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|x64.ActiveCfg = Release|x64
+ {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|x64.Build.0 = Release|x64
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|Win32.Build.0 = Debug|Win32
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|x64.ActiveCfg = Debug|x64
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|x64.Build.0 = Debug|x64
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|Win32.ActiveCfg = Release|Win32
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|Win32.Build.0 = Release|Win32
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|x64.ActiveCfg = Release|x64
+ {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|x64.Build.0 = Release|x64
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.Build.0 = Debug|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|x64.ActiveCfg = Debug|x64
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|x64.Build.0 = Debug|x64
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.ActiveCfg = Release|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.Build.0 = Release|Win32
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|x64.ActiveCfg = Release|x64
+ {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/examples/Demo/CDemo.cpp b/examples/Demo/CDemo.cpp new file mode 100644 index 0000000..8240025 --- /dev/null +++ b/examples/Demo/CDemo.cpp @@ -0,0 +1,815 @@ +// This is a Demo of the Irrlicht Engine (c) 2005-2009 by N.Gebhardt.
+// This file is not documented.
+
+#include "CDemo.h"
+
+CDemo::CDemo(bool f, bool m, bool s, bool a, bool v, bool fsaa, video::E_DRIVER_TYPE d)
+: fullscreen(f), music(m), shadows(s), additive(a), vsync(v), aa(fsaa),
+ driverType(d), device(0),
+#ifdef USE_IRRKLANG
+ irrKlang(0), ballSound(0), impactSound(0),
+#endif
+#ifdef USE_SDL_MIXER
+ stream(0), ballSound(0), impactSound(0),
+#endif
+ currentScene(-2), backColor(0), statusText(0), inOutFader(0),
+ quakeLevelMesh(0), quakeLevelNode(0), skyboxNode(0), model1(0), model2(0),
+ campFire(0), metaSelector(0), mapSelector(0), sceneStartTime(0),
+ timeForThisScene(0)
+{
+}
+
+
+CDemo::~CDemo()
+{
+ if (mapSelector)
+ mapSelector->drop();
+
+ if (metaSelector)
+ metaSelector->drop();
+
+#ifdef USE_IRRKLANG
+ if (irrKlang)
+ irrKlang->drop();
+#endif
+}
+
+
+void CDemo::run()
+{
+ core::dimension2d<u32> resolution (800, 600);
+
+ if ( driverType == video::EDT_BURNINGSVIDEO || driverType == video::EDT_SOFTWARE )
+ {
+ resolution.Width = 640;
+ resolution.Height = 480;
+ }
+
+ irr::SIrrlichtCreationParameters params;
+ params.DriverType=driverType;
+ params.WindowSize=resolution;
+ params.Bits=32;
+ params.Fullscreen=fullscreen;
+ params.Stencilbuffer=shadows;
+ params.Vsync=vsync;
+ params.AntiAlias=aa?8:0;
+ params.EventReceiver=this;
+
+ device = createDeviceEx(params);
+ if (!device)
+ return;
+
+ if (device->getFileSystem()->existFile("irrlicht.dat"))
+ device->getFileSystem()->addFileArchive("irrlicht.dat");
+ else
+ device->getFileSystem()->addFileArchive("../../media/irrlicht.dat");
+ if (device->getFileSystem()->existFile("map-20kdm2.pk3"))
+ device->getFileSystem()->addFileArchive("map-20kdm2.pk3");
+ else
+ device->getFileSystem()->addFileArchive("../../media/map-20kdm2.pk3");
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* smgr = device->getSceneManager();
+ gui::IGUIEnvironment* guienv = device->getGUIEnvironment();
+
+ device->setWindowCaption(L"Irrlicht Engine Demo");
+
+ // set ambient light
+ smgr->setAmbientLight ( video::SColorf ( 0x00c0c0c0 ) );
+
+ wchar_t tmp[255];
+
+ // draw everything
+
+ s32 now = 0;
+ s32 lastfps = 0;
+ sceneStartTime = device->getTimer()->getTime();
+ while(device->run() && driver)
+ {
+ if (device->isWindowActive())
+ {
+ #ifdef USE_IRRKLANG
+ // update 3D position for sound engine
+ scene::ICameraSceneNode* cam = smgr->getActiveCamera();
+ if (cam && irrKlang)
+ irrKlang->setListenerPosition(cam->getAbsolutePosition(), cam->getTarget());
+ #endif
+
+ // load next scene if necessary
+ now = device->getTimer()->getTime();
+ if (now - sceneStartTime > timeForThisScene && timeForThisScene!=-1)
+ switchToNextScene();
+
+ createParticleImpacts();
+
+ driver->beginScene(timeForThisScene != -1, true, backColor);
+
+ smgr->drawAll();
+ guienv->drawAll();
+ driver->endScene();
+
+ // write statistics
+ const s32 nowfps = driver->getFPS();
+
+ swprintf(tmp, 255, L"%ls fps:%3d triangles:%0.3f mio/s",
+ driver->getName(), driver->getFPS(),
+ driver->getPrimitiveCountDrawn(1) * (1.f / 1000000.f));
+
+ statusText->setText(tmp);
+ if ( nowfps != lastfps )
+ {
+ device->setWindowCaption(tmp);
+ lastfps = nowfps;
+ }
+ }
+ }
+
+ device->drop();
+}
+
+
+bool CDemo::OnEvent(const SEvent& event)
+{
+ if (!device)
+ return false;
+
+ if (event.EventType == EET_KEY_INPUT_EVENT &&
+ event.KeyInput.Key == KEY_ESCAPE &&
+ event.KeyInput.PressedDown == false)
+ {
+ // user wants to quit.
+ if (currentScene < 3)
+ timeForThisScene = 0;
+ else
+ device->closeDevice();
+ }
+ else
+ if (((event.EventType == EET_KEY_INPUT_EVENT &&
+ event.KeyInput.Key == KEY_SPACE &&
+ event.KeyInput.PressedDown == false) ||
+ (event.EventType == EET_MOUSE_INPUT_EVENT &&
+ event.MouseInput.Event == EMIE_LMOUSE_LEFT_UP)) &&
+ currentScene == 3)
+ {
+ // shoot
+ shoot();
+ }
+ else
+ if (event.EventType == EET_KEY_INPUT_EVENT &&
+ event.KeyInput.Key == KEY_F9 &&
+ event.KeyInput.PressedDown == false)
+ {
+ video::IImage* image = device->getVideoDriver()->createScreenShot();
+ if (image)
+ {
+ device->getVideoDriver()->writeImageToFile(image, "screenshot.bmp");
+ device->getVideoDriver()->writeImageToFile(image, "screenshot.png");
+ device->getVideoDriver()->writeImageToFile(image, "screenshot.tga");
+ device->getVideoDriver()->writeImageToFile(image, "screenshot.ppm");
+ device->getVideoDriver()->writeImageToFile(image, "screenshot.jpg");
+ device->getVideoDriver()->writeImageToFile(image, "screenshot.pcx");
+ image->drop();
+ }
+ }
+ else
+ if (device->getSceneManager()->getActiveCamera())
+ {
+ device->getSceneManager()->getActiveCamera()->OnEvent(event);
+ return true;
+ }
+
+ return false;
+}
+
+
+void CDemo::switchToNextScene()
+{
+ currentScene++;
+ if (currentScene > 3)
+ currentScene = 1;
+
+ scene::ISceneManager* sm = device->getSceneManager();
+ scene::ISceneNodeAnimator* sa = 0;
+ scene::ICameraSceneNode* camera = 0;
+
+ camera = sm->getActiveCamera();
+ if (camera)
+ {
+ sm->setActiveCamera(0);
+ camera->remove();
+ camera = 0;
+ }
+
+ switch(currentScene)
+ {
+ case -1: // loading screen
+ timeForThisScene = 0;
+ createLoadingScreen();
+ break;
+
+ case 0: // load scene
+ timeForThisScene = 0;
+ loadSceneData();
+ break;
+
+ case 1: // panorama camera
+ {
+ currentScene += 1;
+ //camera = sm->addCameraSceneNode(0, core::vector3df(0,0,0), core::vector3df(-586,708,52));
+ //camera->setTarget(core::vector3df(0,400,0));
+
+ core::array<core::vector3df> points;
+
+ points.push_back(core::vector3df(-931.473755f, 138.300003f, 987.279114f)); // -49873
+ points.push_back(core::vector3df(-847.902222f, 136.757553f, 915.792725f)); // -50559
+ points.push_back(core::vector3df(-748.680420f, 152.254501f, 826.418945f)); // -51964
+ points.push_back(core::vector3df(-708.428406f, 213.569580f, 784.466675f)); // -53251
+ points.push_back(core::vector3df(-686.217651f, 288.141174f, 762.965576f)); // -54015
+ points.push_back(core::vector3df(-679.685059f, 365.095612f, 756.551453f)); // -54733
+ points.push_back(core::vector3df(-671.317871f, 447.360107f, 749.394592f)); // -55588
+ points.push_back(core::vector3df(-669.468445f, 583.335632f, 747.711853f)); // -56178
+ points.push_back(core::vector3df(-667.611267f, 727.313232f, 746.018250f)); // -56757
+ points.push_back(core::vector3df(-665.853210f, 862.791931f, 744.436096f)); // -57859
+ points.push_back(core::vector3df(-642.649597f, 1026.047607f, 724.259827f)); // -59705
+ points.push_back(core::vector3df(-517.793884f, 838.396790f, 490.326050f)); // -60983
+ points.push_back(core::vector3df(-474.387299f, 715.691467f, 344.639984f)); // -61629
+ points.push_back(core::vector3df(-444.600250f, 601.155701f, 180.938095f)); // -62319
+ points.push_back(core::vector3df(-414.808899f, 479.691406f, 4.866660f)); // -63048
+ points.push_back(core::vector3df(-410.418945f, 429.642242f, -134.332687f)); // -63757
+ points.push_back(core::vector3df(-399.837585f, 411.498383f, -349.350983f)); // -64418
+ points.push_back(core::vector3df(-390.756653f, 403.970093f, -524.454407f)); // -65005
+ points.push_back(core::vector3df(-334.864227f, 350.065491f, -732.397400f)); // -65701
+ points.push_back(core::vector3df(-195.253387f, 349.577209f, -812.475891f)); // -66335
+ points.push_back(core::vector3df(16.255573f, 363.743134f, -833.800415f)); // -67170
+ points.push_back(core::vector3df(234.940964f, 352.957825f, -820.150696f)); // -67939
+ points.push_back(core::vector3df(436.797668f, 349.236450f, -816.914185f)); // -68596
+ points.push_back(core::vector3df(575.236206f, 356.244812f, -719.788513f)); // -69166
+ points.push_back(core::vector3df(594.131042f, 387.173828f, -609.675598f)); // -69744
+ points.push_back(core::vector3df(617.615234f, 412.002899f, -326.174072f)); // -70640
+ points.push_back(core::vector3df(606.456848f, 403.221954f, -104.179291f)); // -71390
+ points.push_back(core::vector3df(610.958252f, 407.037750f, 117.209778f)); // -72085
+ points.push_back(core::vector3df(597.956909f, 395.167877f, 345.942200f)); // -72817
+ points.push_back(core::vector3df(587.383118f, 391.444519f, 566.098633f)); // -73477
+ points.push_back(core::vector3df(559.572449f, 371.991333f, 777.689453f)); // -74124
+ points.push_back(core::vector3df(423.753204f, 329.990051f, 925.859741f)); // -74941
+ points.push_back(core::vector3df(247.520050f, 252.818954f, 935.311829f)); // -75651
+ points.push_back(core::vector3df(114.756012f, 199.799759f, 805.014160f));
+ points.push_back(core::vector3df(96.783348f, 181.639481f, 648.188110f));
+ points.push_back(core::vector3df(97.865623f, 138.905975f, 484.812561f));
+ points.push_back(core::vector3df(99.612457f, 102.463669f, 347.603210f));
+ points.push_back(core::vector3df(99.612457f, 102.463669f, 347.603210f));
+ points.push_back(core::vector3df(99.612457f, 102.463669f, 347.603210f));
+
+ timeForThisScene = (points.size()-3)* 1000;
+
+ camera = sm->addCameraSceneNode(0, points[0], core::vector3df(0 ,400,0));
+ //camera->setTarget(core::vector3df(0,400,0));
+
+ sa = sm->createFollowSplineAnimator(device->getTimer()->getTime(),
+ points);
+ camera->addAnimator(sa);
+ sa->drop();
+
+ model1->setVisible(false);
+ model2->setVisible(false);
+ campFire->setVisible(false);
+ inOutFader->fadeIn(7000);
+ }
+ break;
+
+ case 2: // down fly anim camera
+ camera = sm->addCameraSceneNode(0, core::vector3df(100,40,-80), core::vector3df(844,670,-885));
+ sa = sm->createFlyStraightAnimator(core::vector3df(94, 1002, 127),
+ core::vector3df(108, 15, -60), 10000, true);
+ camera->addAnimator(sa);
+ timeForThisScene = 9900;
+ model1->setVisible(true);
+ model2->setVisible(false);
+ campFire->setVisible(false);
+ sa->drop();
+ break;
+
+ case 3: // interactive, go around
+ {
+ model1->setVisible(true);
+ model2->setVisible(true);
+ campFire->setVisible(true);
+ timeForThisScene = -1;
+
+ SKeyMap keyMap[9];
+ keyMap[0].Action = EKA_MOVE_FORWARD;
+ keyMap[0].KeyCode = KEY_UP;
+ keyMap[1].Action = EKA_MOVE_FORWARD;
+ keyMap[1].KeyCode = KEY_KEY_W;
+
+ keyMap[2].Action = EKA_MOVE_BACKWARD;
+ keyMap[2].KeyCode = KEY_DOWN;
+ keyMap[3].Action = EKA_MOVE_BACKWARD;
+ keyMap[3].KeyCode = KEY_KEY_S;
+
+ keyMap[4].Action = EKA_STRAFE_LEFT;
+ keyMap[4].KeyCode = KEY_LEFT;
+ keyMap[5].Action = EKA_STRAFE_LEFT;
+ keyMap[5].KeyCode = KEY_KEY_A;
+
+ keyMap[6].Action = EKA_STRAFE_RIGHT;
+ keyMap[6].KeyCode = KEY_RIGHT;
+ keyMap[7].Action = EKA_STRAFE_RIGHT;
+ keyMap[7].KeyCode = KEY_KEY_D;
+
+ keyMap[8].Action = EKA_JUMP_UP;
+ keyMap[8].KeyCode = KEY_KEY_J;
+
+ camera = sm->addCameraSceneNodeFPS(0, 100.0f, .4f, -1, keyMap, 9, false, 3.f);
+ camera->setPosition(core::vector3df(108,140,-140));
+ camera->setFarValue(5000.0f);
+
+ scene::ISceneNodeAnimatorCollisionResponse* collider =
+ sm->createCollisionResponseAnimator(
+ metaSelector, camera, core::vector3df(25,50,25),
+ core::vector3df(0, quakeLevelMesh ? -10.f : 0.0f,0),
+ core::vector3df(0,45,0), 0.005f);
+
+ camera->addAnimator(collider);
+ collider->drop();
+ }
+ break;
+ }
+
+ sceneStartTime = device->getTimer()->getTime();
+}
+
+
+void CDemo::loadSceneData()
+{
+ // load quake level
+
+ video::IVideoDriver* driver = device->getVideoDriver();
+ scene::ISceneManager* sm = device->getSceneManager();
+
+ // Quake3 Shader controls Z-Writing
+ sm->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true);
+
+ quakeLevelMesh = (scene::IQ3LevelMesh*) sm->getMesh("maps/20kdm2.bsp");
+
+ if (quakeLevelMesh)
+ {
+ u32 i;
+
+ //move all quake level meshes (non-realtime)
+ core::matrix4 m;
+ m.setTranslation(core::vector3df(-1300,-70,-1249));
+
+ for ( i = 0; i != scene::quake3::E_Q3_MESH_SIZE; ++i )
+ sm->getMeshManipulator()->transform(quakeLevelMesh->getMesh(i), m);
+
+ quakeLevelNode = sm->addOctreeSceneNode(
+ quakeLevelMesh->getMesh( scene::quake3::E_Q3_MESH_GEOMETRY));
+ if (quakeLevelNode)
+ {
+ //quakeLevelNode->setPosition(core::vector3df(-1300,-70,-1249));
+ quakeLevelNode->setVisible(true);
+
+ // create map triangle selector
+ mapSelector = sm->createOctreeTriangleSelector(quakeLevelMesh->getMesh(0),
+ quakeLevelNode, 128);
+
+ // if not using shader and no gamma it's better to use more lighting, because
+ // quake3 level are usually dark
+ quakeLevelNode->setMaterialType ( video::EMT_LIGHTMAP_M4 );
+
+ // set additive blending if wanted
+ if (additive)
+ quakeLevelNode->setMaterialType(video::EMT_LIGHTMAP_ADD);
+ }
+
+ // the additional mesh can be quite huge and is unoptimized
+ scene::IMesh * additional_mesh = quakeLevelMesh->getMesh ( scene::quake3::E_Q3_MESH_ITEMS );
+
+ for ( i = 0; i!= additional_mesh->getMeshBufferCount (); ++i )
+ {
+ scene::IMeshBuffer *meshBuffer = additional_mesh->getMeshBuffer ( i );
+ const video::SMaterial &material = meshBuffer->getMaterial();
+
+ //! The ShaderIndex is stored in the material parameter
+ s32 shaderIndex = (s32) material.MaterialTypeParam2;
+
+ // the meshbuffer can be rendered without additional support, or it has no shader
+ const scene::quake3::IShader *shader = quakeLevelMesh->getShader ( shaderIndex );
+ if ( 0 == shader )
+ {
+ continue;
+ }
+ // Now add the MeshBuffer(s) with the current Shader to the Manager
+ sm->addQuake3SceneNode ( meshBuffer, shader );
+ }
+ }
+
+ // load sydney model and create 2 instances
+
+ scene::IAnimatedMesh* mesh = 0;
+ mesh = sm->getMesh("../../media/sydney.md2");
+ if (mesh)
+ {
+ model1 = sm->addAnimatedMeshSceneNode(mesh);
+ if (model1)
+ {
+ model1->setMaterialTexture(0, driver->getTexture("../../media/spheremap.jpg"));
+ model1->setPosition(core::vector3df(100,40,-80));
+ model1->setScale(core::vector3df(2,2,2));
+ model1->setMD2Animation(scene::EMAT_STAND);
+ model1->setMaterialFlag(video::EMF_LIGHTING, false);
+ model1->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
+ model1->setMaterialType(video::EMT_SPHERE_MAP);
+ model1->addShadowVolumeSceneNode();
+ }
+
+ model2 = sm->addAnimatedMeshSceneNode(mesh);
+ if (model2)
+ {
+ model2->setPosition(core::vector3df(180,15,-60));
+ model2->setScale(core::vector3df(2,2,2));
+ model2->setMD2Animation(scene::EMAT_RUN);
+ model2->setMaterialTexture(0, device->getVideoDriver()->getTexture("../../media/sydney.bmp"));
+ model2->setMaterialFlag(video::EMF_LIGHTING, true);
+ model2->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
+ model2->addShadowVolumeSceneNode();
+ }
+ }
+
+ scene::ISceneNodeAnimator* anim = 0;
+
+ // create sky box
+ driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
+ skyboxNode = sm->addSkyBoxSceneNode(
+ driver->getTexture("../../media/irrlicht2_up.jpg"),
+ driver->getTexture("../../media/irrlicht2_dn.jpg"),
+ driver->getTexture("../../media/irrlicht2_lf.jpg"),
+ driver->getTexture("../../media/irrlicht2_rt.jpg"),
+ driver->getTexture("../../media/irrlicht2_ft.jpg"),
+ driver->getTexture("../../media/irrlicht2_bk.jpg"));
+ driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true);
+
+ // create walk-between-portals animation
+
+ core::vector3df waypoint[2];
+ waypoint[0].set(-150,40,100);
+ waypoint[1].set(350,40,100);
+
+ if (model2)
+ {
+ anim = device->getSceneManager()->createFlyStraightAnimator(
+ waypoint[0], waypoint[1], 2000, true);
+ model2->addAnimator(anim);
+ anim->drop();
+ }
+
+ // create animation for portals;
+
+ core::array<video::ITexture*> textures;
+ for (s32 g=1; g<8; ++g)
+ {
+ core::stringc tmp("../../media/portal");
+ tmp += g;
+ tmp += ".bmp";
+ video::ITexture* t = driver->getTexture( tmp );
+ textures.push_back(t);
+ }
+
+ anim = sm->createTextureAnimator(textures, 100);
+
+ // create portals
+
+ scene::IBillboardSceneNode* bill = 0;
+
+ for (int r=0; r<2; ++r)
+ {
+ bill = sm->addBillboardSceneNode(0, core::dimension2d<f32>(100,100),
+ waypoint[r]+ core::vector3df(0,20,0));
+ bill->setMaterialFlag(video::EMF_LIGHTING, false);
+ bill->setMaterialTexture(0, driver->getTexture("../../media/portal1.bmp"));
+ bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+ bill->addAnimator(anim);
+ }
+
+ anim->drop();
+
+ // create cirlce flying dynamic light with transparent billboard attached
+
+ scene::ILightSceneNode* light = 0;
+
+ light = sm->addLightSceneNode(0,
+ core::vector3df(0,0,0), video::SColorf(1.0f, 1.0f, 1.f, 1.0f), 500.f);
+
+ anim = sm->createFlyCircleAnimator(
+ core::vector3df(100,150,80), 80.0f, 0.0005f);
+
+ light->addAnimator(anim);
+ anim->drop();
+
+ bill = device->getSceneManager()->addBillboardSceneNode(
+ light, core::dimension2d<f32>(40,40));
+ bill->setMaterialFlag(video::EMF_LIGHTING, false);
+ bill->setMaterialTexture(0, driver->getTexture("../../media/particlewhite.bmp"));
+ bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+
+ // create meta triangle selector with all triangles selectors in it.
+ metaSelector = sm->createMetaTriangleSelector();
+ metaSelector->addTriangleSelector(mapSelector);
+
+ // create camp fire
+
+ campFire = sm->addParticleSystemSceneNode(false);
+ campFire->setPosition(core::vector3df(100,120,600));
+ campFire->setScale(core::vector3df(2,2,2));
+
+ scene::IParticleEmitter* em = campFire->createBoxEmitter(
+ core::aabbox3d<f32>(-7,0,-7,7,1,7),
+ core::vector3df(0.0f,0.06f,0.0f),
+ 80,100, video::SColor(1,255,255,255),video::SColor(1,255,255,255), 800,2000);
+
+ em->setMinStartSize(core::dimension2d<f32>(20.0f, 10.0f));
+ em->setMaxStartSize(core::dimension2d<f32>(20.0f, 10.0f));
+ campFire->setEmitter(em);
+ em->drop();
+
+ scene::IParticleAffector* paf = campFire->createFadeOutParticleAffector();
+ campFire->addAffector(paf);
+ paf->drop();
+
+ campFire->setMaterialFlag(video::EMF_LIGHTING, false);
+ campFire->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
+ campFire->setMaterialTexture(0, driver->getTexture("../../media/fireball.bmp"));
+ campFire->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+
+ // load music
+
+ #ifdef USE_IRRKLANG
+ if (music)
+ startIrrKlang();
+ #endif
+ #ifdef USE_SDL_MIXER
+ if (music)
+ startSound();
+ #endif
+}
+
+
+void CDemo::createLoadingScreen()
+{
+ core::dimension2d<u32> size = device->getVideoDriver()->getScreenSize();
+
+ device->getCursorControl()->setVisible(false);
+
+ // setup loading screen
+
+ backColor.set(255,90,90,156);
+
+ // create in fader
+
+ inOutFader = device->getGUIEnvironment()->addInOutFader();
+ inOutFader->setColor(backColor, video::SColor ( 0, 230, 230, 230 ));
+
+ // irrlicht logo
+ device->getGUIEnvironment()->addImage(device->getVideoDriver()->getTexture("../../media/irrlichtlogo2.png"),
+ core::position2d<s32>(5,5));
+
+ // loading text
+
+ const int lwidth = size.Width - 20;
+ const int lheight = 16;
+
+ core::rect<int> pos(10, size.Height-lheight-10, 10+lwidth, size.Height-10);
+
+ device->getGUIEnvironment()->addImage(pos);
+ statusText = device->getGUIEnvironment()->addStaticText(L"Loading...", pos, true);
+ statusText->setOverrideColor(video::SColor(255,205,200,200));
+
+ // load bigger font
+
+ device->getGUIEnvironment()->getSkin()->setFont(
+ device->getGUIEnvironment()->getFont("../../media/fonthaettenschweiler.bmp"));
+
+ // set new font color
+
+ device->getGUIEnvironment()->getSkin()->setColor(gui::EGDC_BUTTON_TEXT,
+ video::SColor(255,100,100,100));
+}
+
+
+void CDemo::shoot()
+{
+ scene::ISceneManager* sm = device->getSceneManager();
+ scene::ICameraSceneNode* camera = sm->getActiveCamera();
+
+ if (!camera || !mapSelector)
+ return;
+
+ SParticleImpact imp;
+ imp.when = 0;
+
+ // get line of camera
+
+ core::vector3df start = camera->getPosition();
+ core::vector3df end = (camera->getTarget() - start);
+ end.normalize();
+ start += end*8.0f;
+ end = start + (end * camera->getFarValue());
+
+ core::triangle3df triangle;
+
+ core::line3d<f32> line(start, end);
+
+ // get intersection point with map
+ scene::ISceneNode* hitNode;
+ if (sm->getSceneCollisionManager()->getCollisionPoint(
+ line, mapSelector, end, triangle, hitNode))
+ {
+ // collides with wall
+ core::vector3df out = triangle.getNormal();
+ out.setLength(0.03f);
+
+ imp.when = 1;
+ imp.outVector = out;
+ imp.pos = end;
+ }
+ else
+ {
+ // doesnt collide with wall
+ core::vector3df start = camera->getPosition();
+ core::vector3df end = (camera->getTarget() - start);
+ end.normalize();
+ start += end*8.0f;
+ end = start + (end * camera->getFarValue());
+ }
+
+ // create fire ball
+ scene::ISceneNode* node = 0;
+ node = sm->addBillboardSceneNode(0,
+ core::dimension2d<f32>(25,25), start);
+
+ node->setMaterialFlag(video::EMF_LIGHTING, false);
+ node->setMaterialTexture(0, device->getVideoDriver()->getTexture("../../media/fireball.bmp"));
+ node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+
+ f32 length = (f32)(end - start).getLength();
+ const f32 speed = 0.6f;
+ u32 time = (u32)(length / speed);
+
+ scene::ISceneNodeAnimator* anim = 0;
+
+ // set flight line
+
+ anim = sm->createFlyStraightAnimator(start, end, time);
+ node->addAnimator(anim);
+ anim->drop();
+
+ anim = sm->createDeleteAnimator(time);
+ node->addAnimator(anim);
+ anim->drop();
+
+ if (imp.when)
+ {
+ // create impact note
+ imp.when = device->getTimer()->getTime() + (time - 100);
+ Impacts.push_back(imp);
+ }
+
+ // play sound
+ #ifdef USE_IRRKLANG
+ if (ballSound)
+ irrKlang->play2D(ballSound);
+ #endif
+ #ifdef USE_SDL_MIXER
+ if (ballSound)
+ playSound(ballSound);
+ #endif
+}
+
+
+void CDemo::createParticleImpacts()
+{
+ u32 now = device->getTimer()->getTime();
+ scene::ISceneManager* sm = device->getSceneManager();
+
+ for (s32 i=0; i<(s32)Impacts.size(); ++i)
+ if (now > Impacts[i].when)
+ {
+ // create smoke particle system
+ scene::IParticleSystemSceneNode* pas = 0;
+
+ pas = sm->addParticleSystemSceneNode(false, 0, -1, Impacts[i].pos);
+
+ pas->setParticleSize(core::dimension2d<f32>(10.0f, 10.0f));
+
+ scene::IParticleEmitter* em = pas->createBoxEmitter(
+ core::aabbox3d<f32>(-5,-5,-5,5,5,5),
+ Impacts[i].outVector, 20,40, video::SColor(50,255,255,255),video::SColor(50,255,255,255),
+ 1200,1600, 20);
+
+ pas->setEmitter(em);
+ em->drop();
+
+ scene::IParticleAffector* paf = campFire->createFadeOutParticleAffector();
+ pas->addAffector(paf);
+ paf->drop();
+
+ pas->setMaterialFlag(video::EMF_LIGHTING, false);
+ pas->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
+ pas->setMaterialTexture(0, device->getVideoDriver()->getTexture("../../media/smoke.bmp"));
+ pas->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+
+ scene::ISceneNodeAnimator* anim = sm->createDeleteAnimator(2000);
+ pas->addAnimator(anim);
+ anim->drop();
+
+ // play impact sound
+ #ifdef USE_IRRKLANG
+ if (irrKlang)
+ {
+ irrklang::ISound* sound =
+ irrKlang->play3D(impactSound, Impacts[i].pos, false, false, true);
+
+ if (sound)
+ {
+ // adjust max value a bit to make to sound of an impact louder
+ sound->setMinDistance(400);
+ sound->drop();
+ }
+ }
+ #endif
+
+ #ifdef USE_SDL_MIXER
+ if (impactSound)
+ playSound(impactSound);
+ #endif
+
+ // delete entry
+ Impacts.erase(i);
+ i--;
+ }
+}
+
+
+#ifdef USE_IRRKLANG
+void CDemo::startIrrKlang()
+{
+ irrKlang = irrklang::createIrrKlangDevice();
+
+ if (!irrKlang)
+ return;
+
+ // play music
+
+ irrklang::ISound* snd = irrKlang->play2D("../../media/IrrlichtTheme.ogg", true, false, true);
+ if ( !snd )
+ snd = irrKlang->play2D("IrrlichtTheme.ogg", true, false, true);
+
+ if (snd)
+ {
+ snd->setVolume(0.5f); // 50% volume
+ snd->drop();
+ }
+
+ // preload both sound effects
+
+ ballSound = irrKlang->getSoundSource("../../media/ball.wav");
+ impactSound = irrKlang->getSoundSource("../../media/impact.wav");
+}
+#endif
+
+
+#ifdef USE_SDL_MIXER
+void CDemo::startSound()
+{
+ stream = NULL;
+ ballSound = NULL;
+ impactSound = NULL;
+
+ SDL_Init(SDL_INIT_AUDIO);
+
+ if (Mix_OpenAudio(22050, AUDIO_S16, 2, 128))
+ return;
+
+ stream = Mix_LoadMUS("../../media/IrrlichtTheme.ogg");
+ if (stream)
+ Mix_PlayMusic(stream, -1);
+
+ ballSound = Mix_LoadWAV("../../media/ball.wav");
+ impactSound = Mix_LoadWAV("../../media/impact.wav");
+}
+
+void CDemo::playSound(Mix_Chunk *sample)
+{
+ if (sample)
+ Mix_PlayChannel(-1, sample, 0);
+}
+
+void CDemo::pollSound(void)
+{
+ SDL_Event event;
+
+ while (SDL_PollEvent(&event))
+ ;
+}
+#endif
diff --git a/examples/Demo/CDemo.h b/examples/Demo/CDemo.h new file mode 100644 index 0000000..e2c564d --- /dev/null +++ b/examples/Demo/CDemo.h @@ -0,0 +1,110 @@ +// This is a Demo of the Irrlicht Engine (c) 2006 by N.Gebhardt.
+// This file is not documented.
+
+#ifndef __C_DEMO_H_INCLUDED__
+#define __C_DEMO_H_INCLUDED__
+
+//#define USE_IRRKLANG
+//#define USE_SDL_MIXER
+
+#include <irrlicht.h>
+
+#ifdef _IRR_WINDOWS_
+#include <windows.h>
+#endif
+
+using namespace irr;
+
+// audio support
+
+#ifdef USE_IRRKLANG
+ #include <irrKlang.h> // problem here? go to http://www.ambiera.com/irrklang and download
+ // the irrKlang library or undefine USE_IRRKLANG at the beginning
+ // of this file.
+ #ifdef _IRR_WINDOWS_
+ #pragma comment (lib, "irrKlang.lib")
+ #endif
+#endif
+#ifdef USE_SDL_MIXER
+ # include <SDL/SDL.h>
+ # include <SDL/SDL_mixer.h>
+#endif
+
+const int CAMERA_COUNT = 7;
+
+class CDemo : public IEventReceiver
+{
+public:
+
+ CDemo(bool fullscreen, bool music, bool shadows, bool additive, bool vsync, bool aa, video::E_DRIVER_TYPE driver);
+
+ ~CDemo();
+
+ void run();
+
+ virtual bool OnEvent(const SEvent& event);
+
+private:
+
+ void createLoadingScreen();
+ void loadSceneData();
+ void switchToNextScene();
+ void shoot();
+ void createParticleImpacts();
+
+ bool fullscreen;
+ bool music;
+ bool shadows;
+ bool additive;
+ bool vsync;
+ bool aa;
+ video::E_DRIVER_TYPE driverType;
+ IrrlichtDevice *device;
+
+#ifdef USE_IRRKLANG
+ void startIrrKlang();
+ irrklang::ISoundEngine* irrKlang;
+ irrklang::ISoundSource* ballSound;
+ irrklang::ISoundSource* impactSound;
+#endif
+
+#ifdef USE_SDL_MIXER
+ void startSound();
+ void playSound(Mix_Chunk *);
+ void pollSound();
+ Mix_Music *stream;
+ Mix_Chunk *ballSound;
+ Mix_Chunk *impactSound;
+#endif
+
+ struct SParticleImpact
+ {
+ u32 when;
+ core::vector3df pos;
+ core::vector3df outVector;
+ };
+
+ int currentScene;
+ video::SColor backColor;
+
+ gui::IGUIStaticText* statusText;
+ gui::IGUIInOutFader* inOutFader;
+
+ scene::IQ3LevelMesh* quakeLevelMesh;
+ scene::ISceneNode* quakeLevelNode;
+ scene::ISceneNode* skyboxNode;
+ scene::IAnimatedMeshSceneNode* model1;
+ scene::IAnimatedMeshSceneNode* model2;
+ scene::IParticleSystemSceneNode* campFire;
+
+ scene::IMetaTriangleSelector* metaSelector;
+ scene::ITriangleSelector* mapSelector;
+
+ s32 sceneStartTime;
+ s32 timeForThisScene;
+
+ core::array<SParticleImpact> Impacts;
+};
+
+#endif
+
diff --git a/examples/Demo/CMainMenu.cpp b/examples/Demo/CMainMenu.cpp new file mode 100644 index 0000000..aa963e5 --- /dev/null +++ b/examples/Demo/CMainMenu.cpp @@ -0,0 +1,378 @@ +// This is a Demo of the Irrlicht Engine (c) 2005-2009 by N.Gebhardt.
+// This file is not documented.
+
+#include "CMainMenu.h"
+
+
+
+CMainMenu::CMainMenu()
+: startButton(0), MenuDevice(0), selected(2), start(false), fullscreen(true),
+ music(true), shadows(false), additive(false), transparent(true), vsync(false), aa(false)
+{
+}
+
+
+bool CMainMenu::run(bool& outFullscreen, bool& outMusic, bool& outShadows,
+ bool& outAdditive, bool& outVSync, bool& outAA,
+ video::E_DRIVER_TYPE& outDriver)
+{
+ //video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9;
+ //video::E_DRIVER_TYPE driverType = video::EDT_OPENGL;
+ video::E_DRIVER_TYPE driverType = video::EDT_BURNINGSVIDEO;
+ //video::E_DRIVER_TYPE driverType = video::EDT_SOFTWARE;
+
+ MenuDevice = createDevice(driverType,
+ core::dimension2d<u32>(512, 384), 16, false, false, false, this);
+
+ if (MenuDevice->getFileSystem()->existFile("irrlicht.dat"))
+ MenuDevice->getFileSystem()->addFileArchive("irrlicht.dat");
+ else
+ MenuDevice->getFileSystem()->addFileArchive("../../media/irrlicht.dat");
+
+ video::IVideoDriver* driver = MenuDevice->getVideoDriver();
+ scene::ISceneManager* smgr = MenuDevice->getSceneManager();
+ gui::IGUIEnvironment* guienv = MenuDevice->getGUIEnvironment();
+
+ core::stringw str = "Irrlicht Engine Demo v";
+ str += MenuDevice->getVersion();
+ MenuDevice->setWindowCaption(str.c_str());
+
+ // set new Skin
+ gui::IGUISkin* newskin = guienv->createSkin(gui::EGST_BURNING_SKIN);
+ guienv->setSkin(newskin);
+ newskin->drop();
+
+ // load font
+ gui::IGUIFont* font = guienv->getFont("../../media/fonthaettenschweiler.bmp");
+ if (font)
+ guienv->getSkin()->setFont(font);
+
+ // add images
+
+ const s32 leftX = 260;
+
+ // add tab control
+ gui::IGUITabControl* tabctrl = guienv->addTabControl(core::rect<int>(leftX,10,512-10,384-10),
+ 0, true, true);
+ gui::IGUITab* optTab = tabctrl->addTab(L"Demo");
+ gui::IGUITab* aboutTab = tabctrl->addTab(L"About");
+
+ // add list box
+
+ gui::IGUIListBox* box = guienv->addListBox(core::rect<int>(10,10,220,120), optTab, 1);
+ box->addItem(L"OpenGL 1.5");
+ box->addItem(L"Direct3D 8.1");
+ box->addItem(L"Direct3D 9.0c");
+ box->addItem(L"Burning's Video 0.47");
+ box->addItem(L"Irrlicht Software Renderer 1.0");
+ box->setSelected(selected);
+
+ // add button
+
+ startButton = guienv->addButton(core::rect<int>(30,295,200,324), optTab, 2, L"Start Demo");
+
+ // add checkbox
+
+ const s32 d = 50;
+
+ guienv->addCheckBox(fullscreen, core::rect<int>(20,85+d,130,110+d),
+ optTab, 3, L"Fullscreen");
+ guienv->addCheckBox(music, core::rect<int>(135,85+d,245,110+d),
+ optTab, 4, L"Music & Sfx");
+ guienv->addCheckBox(shadows, core::rect<int>(20,110+d,135,135+d),
+ optTab, 5, L"Realtime shadows");
+ guienv->addCheckBox(additive, core::rect<int>(20,135+d,230,160+d),
+ optTab, 6, L"Old HW compatible blending");
+ guienv->addCheckBox(vsync, core::rect<int>(20,160+d,230,185+d),
+ optTab, 7, L"Vertical synchronisation");
+ guienv->addCheckBox(aa, core::rect<int>(20,185+d,230,210+d),
+ optTab, 8, L"Antialiasing");
+
+ // add about text
+
+ const wchar_t* text2 = L"This is the tech demo of the Irrlicht engine. To start, "\
+ L"select a video driver which works best with your hardware and press 'Start Demo'.\n"\
+ L"What you currently see is displayed using the Burning Software Renderer (Thomas Alten).\n"\
+ L"The Irrlicht Engine was written by me, Nikolaus Gebhardt. The models, "\
+ L"maps and textures were placed at my disposal by B.Collins, M.Cook and J.Marton. The music was created by "\
+ L"M.Rohde and is played back by irrKlang.\n"\
+ L"For more informations, please visit the homepage of the Irrlicht engine:\nhttp://irrlicht.sourceforge.net";
+
+ guienv->addStaticText(text2, core::rect<int>(10, 10, 230, 320),
+ true, true, aboutTab);
+
+ // add md2 model
+
+ scene::IAnimatedMesh* mesh = smgr->getMesh("../../media/faerie.md2");
+ scene::IAnimatedMeshSceneNode* modelNode = smgr->addAnimatedMeshSceneNode(mesh);
+ if (modelNode)
+ {
+ modelNode->setPosition( core::vector3df(0.f, 0.f, -5.f) );
+ modelNode->setMaterialTexture(0, driver->getTexture("../../media/faerie2.bmp"));
+ modelNode->setMaterialFlag(video::EMF_LIGHTING, true);
+ modelNode->getMaterial(0).Shininess = 50.f;
+ modelNode->getMaterial(0).NormalizeNormals = true;
+ modelNode->setMD2Animation(scene::EMAT_STAND);
+ }
+
+ // set ambient light (no sun light in the catacombs)
+ smgr->setAmbientLight( video::SColorf(0.2f, 0.2f, 0.2f) );
+
+ scene::ILightSceneNode *light;
+ scene::ISceneNodeAnimator* anim;
+ scene::ISceneNode* bill;
+
+ enum eLightParticle
+ {
+ LIGHT_NONE,
+ LIGHT_GLOBAL,
+ LIGHT_RED,
+ LIGHT_BLUE
+ };
+ core::vector3df lightDir[2] = {
+ core::vector3df(0.f, 0.1f, 0.4f),
+ core::vector3df(0.f, 0.1f, -0.4f),
+ };
+
+ struct SLightParticle
+ {
+ eLightParticle type;
+ u32 dir;
+ };
+ const SLightParticle lightParticle[] =
+ {
+ //LIGHT_GLOBAL,0,
+ {LIGHT_RED,0},
+ {LIGHT_BLUE,0},
+ {LIGHT_RED,1},
+ {LIGHT_BLUE,1},
+ {LIGHT_NONE,0}
+ };
+
+ const SLightParticle *l = lightParticle;
+ while ( l->type != LIGHT_NONE )
+ {
+ switch ( l->type )
+ {
+ case LIGHT_GLOBAL:
+ // add illumination from the background
+ light = smgr->addLightSceneNode(0, core::vector3df(10.f,40.f,-5.f),
+ video::SColorf(0.2f, 0.2f, 0.2f), 90.f);
+ break;
+ case LIGHT_RED:
+ // add light nearly red
+ light = smgr->addLightSceneNode(0, core::vector3df(0,1,0),
+ video::SColorf(0.8f, 0.f, 0.f, 0.0f), 30.0f);
+ // attach red billboard to the light
+ bill = smgr->addBillboardSceneNode(light, core::dimension2d<f32>(10, 10));
+ if ( bill )
+ {
+ bill->setMaterialFlag(video::EMF_LIGHTING, false);
+ bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+ bill->setMaterialTexture(0, driver->getTexture("../../media/particlered.bmp"));
+ }
+ // add fly circle animator to the light
+ anim = smgr->createFlyCircleAnimator(core::vector3df(0.f,0.f,-5.f),20.f,
+ 0.002f, lightDir [l->dir] );
+ light->addAnimator(anim);
+ anim->drop();
+ break;
+ case LIGHT_BLUE:
+ // add light nearly blue
+ light = smgr->addLightSceneNode(0, core::vector3df(0,1,0),
+ video::SColorf(0.f, 0.0f, 0.8f, 0.0f), 30.0f);
+ // attach blue billboard to the light
+ bill = smgr->addBillboardSceneNode(light, core::dimension2d<f32>(10, 10));
+ if (bill)
+ {
+ bill->setMaterialFlag(video::EMF_LIGHTING, false);
+ bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+ bill->setMaterialTexture(0, driver->getTexture("../../media/portal1.bmp"));
+ }
+ // add fly circle animator to the light
+ anim = smgr->createFlyCircleAnimator(core::vector3df(0.f,0.f,-5.f),20.f,
+ -0.002f, lightDir [l->dir], 0.5f);
+ light->addAnimator(anim);
+ anim->drop();
+ break;
+ case LIGHT_NONE:
+ break;
+ }
+ l += 1;
+ }
+
+ // create a fixed camera
+ smgr->addCameraSceneNode(0, core::vector3df(45,0,0), core::vector3df(0,0,10));
+
+
+ // irrlicht logo and background
+ // add irrlicht logo
+ bool oldMipMapState = driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS);
+ driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
+
+ guienv->addImage(driver->getTexture("../../media/irrlichtlogo3.png"),
+ core::position2d<s32>(5,5));
+
+ video::ITexture* irrlichtBack = driver->getTexture("../../media/demoback.jpg");
+
+ driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, oldMipMapState);
+
+ // query original skin color
+ getOriginalSkinColor();
+
+ // set transparency
+ setTransparency();
+
+ // draw all
+
+ while(MenuDevice->run())
+ {
+ if (MenuDevice->isWindowActive())
+ {
+ driver->beginScene(false, true, video::SColor(0,0,0,0));
+
+ if (irrlichtBack)
+ driver->draw2DImage(irrlichtBack,
+ core::position2d<int>(0,0));
+
+ smgr->drawAll();
+ guienv->drawAll();
+ driver->endScene();
+ }
+ }
+
+ MenuDevice->drop();
+
+ outFullscreen = fullscreen;
+ outMusic = music;
+ outShadows = shadows;
+ outAdditive = additive;
+ outVSync = vsync;
+ outAA = aa;
+
+ switch(selected)
+ {
+ case 0: outDriver = video::EDT_OPENGL; break;
+ case 1: outDriver = video::EDT_DIRECT3D8; break;
+ case 2: outDriver = video::EDT_DIRECT3D9; break;
+ case 3: outDriver = video::EDT_BURNINGSVIDEO; break;
+ case 4: outDriver = video::EDT_SOFTWARE; break;
+ }
+
+ return start;
+}
+
+
+bool CMainMenu::OnEvent(const SEvent& event)
+{
+ if (event.EventType == EET_KEY_INPUT_EVENT &&
+ event.KeyInput.Key == KEY_F9 &&
+ event.KeyInput.PressedDown == false)
+ {
+ video::IImage* image = MenuDevice->getVideoDriver()->createScreenShot();
+ if (image)
+ {
+ MenuDevice->getVideoDriver()->writeImageToFile(image, "screenshot_main.jpg");
+ image->drop();
+ }
+ }
+ else
+ if (event.EventType == irr::EET_MOUSE_INPUT_EVENT &&
+ event.MouseInput.Event == EMIE_RMOUSE_LEFT_UP )
+ {
+ core::rect<s32> r(event.MouseInput.X, event.MouseInput.Y, 0, 0);
+ gui::IGUIContextMenu* menu = MenuDevice->getGUIEnvironment()->addContextMenu(r, 0, 45);
+ menu->addItem(L"transparent menus", 666, transparent == false);
+ menu->addItem(L"solid menus", 666, transparent == true);
+ menu->addSeparator();
+ menu->addItem(L"Cancel");
+ }
+ else
+ if (event.EventType == EET_GUI_EVENT)
+ {
+ s32 id = event.GUIEvent.Caller->getID();
+ switch(id)
+ {
+ case 45: // context menu
+ if (event.GUIEvent.EventType == gui::EGET_MENU_ITEM_SELECTED)
+ {
+ s32 s = ((gui::IGUIContextMenu*)event.GUIEvent.Caller)->getSelectedItem();
+ if (s == 0 || s == 1)
+ {
+ transparent = !transparent;
+ setTransparency();
+ }
+ }
+ break;
+ case 1:
+ if (event.GUIEvent.EventType == gui::EGET_LISTBOX_CHANGED ||
+ event.GUIEvent.EventType == gui::EGET_LISTBOX_SELECTED_AGAIN)
+ {
+ selected = ((gui::IGUIListBox*)event.GUIEvent.Caller)->getSelected();
+ //startButton->setEnabled(selected != 4);
+ startButton->setEnabled(true);
+ }
+ break;
+ case 2:
+ if (event.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )
+ {
+ MenuDevice->closeDevice();
+ start = true;
+ }
+ case 3:
+ if (event.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+ fullscreen = ((gui::IGUICheckBox*)event.GUIEvent.Caller)->isChecked();
+ break;
+ case 4:
+ if (event.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+ music = ((gui::IGUICheckBox*)event.GUIEvent.Caller)->isChecked();
+ break;
+ case 5:
+ if (event.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+ shadows = ((gui::IGUICheckBox*)event.GUIEvent.Caller)->isChecked();
+ break;
+ case 6:
+ if (event.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+ additive = ((gui::IGUICheckBox*)event.GUIEvent.Caller)->isChecked();
+ break;
+ case 7:
+ if (event.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+ vsync = ((gui::IGUICheckBox*)event.GUIEvent.Caller)->isChecked();
+ break;
+ case 8:
+ if (event.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+ aa = ((gui::IGUICheckBox*)event.GUIEvent.Caller)->isChecked();
+ break;
+ }
+ }
+
+ return false;
+}
+
+
+void CMainMenu::getOriginalSkinColor()
+{
+ irr::gui::IGUISkin * skin = MenuDevice->getGUIEnvironment()->getSkin();
+ for (s32 i=0; i<gui::EGDC_COUNT ; ++i)
+ {
+ SkinColor[i] = skin->getColor( (gui::EGUI_DEFAULT_COLOR)i );
+ }
+
+}
+
+
+void CMainMenu::setTransparency()
+{
+ irr::gui::IGUISkin * skin = MenuDevice->getGUIEnvironment()->getSkin();
+
+ for (u32 i=0; i<gui::EGDC_COUNT ; ++i)
+ {
+ video::SColor col = SkinColor[i];
+
+ if (false == transparent)
+ col.setAlpha(255);
+
+ skin->setColor((gui::EGUI_DEFAULT_COLOR)i, col);
+ }
+}
+
diff --git a/examples/Demo/CMainMenu.h b/examples/Demo/CMainMenu.h new file mode 100644 index 0000000..06a0d04 --- /dev/null +++ b/examples/Demo/CMainMenu.h @@ -0,0 +1,48 @@ +// This is a Demo of the Irrlicht Engine (c) 2005 by N.Gebhardt.
+// This file is not documentated.
+
+#ifndef __C_MAIN_MENU_H_INCLUDED__
+#define __C_MAIN_MENU_H_INCLUDED__
+
+#include <irrlicht.h>
+
+using namespace irr;
+
+class CMainMenu : public IEventReceiver
+{
+public:
+
+ CMainMenu();
+
+ bool run(bool& outFullscreen, bool& outMusic, bool& outShadows,
+ bool& outAdditive, bool &outVSync, bool& outAA,
+ video::E_DRIVER_TYPE& outDriver);
+
+ virtual bool OnEvent(const SEvent& event);
+
+private:
+
+ void setTransparency();
+
+ gui::IGUIButton* startButton;
+ IrrlichtDevice *MenuDevice;
+ s32 selected;
+ bool start;
+ bool fullscreen;
+ bool music;
+ bool shadows;
+ bool additive;
+ bool transparent;
+ bool vsync;
+ bool aa;
+
+ scene::IAnimatedMesh* quakeLevel;
+ scene::ISceneNode* lightMapNode;
+ scene::ISceneNode* dynamicNode;
+
+ video::SColor SkinColor [ gui::EGDC_COUNT ];
+ void getOriginalSkinColor();
+};
+
+#endif
+
diff --git a/examples/Demo/Demo.vcproj b/examples/Demo/Demo.vcproj new file mode 100644 index 0000000..fe55b37 --- /dev/null +++ b/examples/Demo/Demo.vcproj @@ -0,0 +1,223 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="Demo"
+ ProjectGUID="{6F076455-D955-45D4-9C68-4AD4E45F2D47}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/Demo.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\Demo.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Demo.pdb"
+ SubSystem="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/Demo.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/Demo.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\Demo.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/Demo.pdb"
+ SubSystem="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/Demo.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="CDemo.cpp">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="CDemo.h">
+ </File>
+ <File
+ RelativePath="CMainMenu.cpp">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="CMainMenu.h">
+ </File>
+ <File
+ RelativePath="icon.ico">
+ </File>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="resscript.rc">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/Demo/Demo_vc10.vcxproj b/examples/Demo/Demo_vc10.vcxproj new file mode 100644 index 0000000..c6d213f --- /dev/null +++ b/examples/Demo/Demo_vc10.vcxproj @@ -0,0 +1,283 @@ +ďťż<?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>{6F076455-D955-45D4-9C68-4AD4E45F2D47}</ProjectGuid>
+ <ProjectName>Demo</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/Demo.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>Default</InlineFunctionExpansion>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win64-VisualStudio\Demo.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Windows</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\Release/Demo.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>Default</InlineFunctionExpansion>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Windows</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/Demo.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\Debug/Demo.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="CDemo.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="CMainMenu.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="CDemo.h" />
+ <ClInclude Include="CMainMenu.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="icon.ico" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/Demo/Demo_vc11.vcxproj b/examples/Demo/Demo_vc11.vcxproj new file mode 100644 index 0000000..f1db13d --- /dev/null +++ b/examples/Demo/Demo_vc11.vcxproj @@ -0,0 +1,283 @@ +ďťż<?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>{6F076455-D955-45D4-9C68-4AD4E45F2D47}</ProjectGuid>
+ <ProjectName>Demo</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/Demo.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>Default</InlineFunctionExpansion>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\Demo.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Windows</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\Release/Demo.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>Default</InlineFunctionExpansion>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\Demo.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Windows</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/Demo.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\Debug/Demo.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="CDemo.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="CMainMenu.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="CDemo.h" />
+ <ClInclude Include="CMainMenu.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="icon.ico" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/Demo/Demo_vc12.vcxproj b/examples/Demo/Demo_vc12.vcxproj new file mode 100644 index 0000000..320adde --- /dev/null +++ b/examples/Demo/Demo_vc12.vcxproj @@ -0,0 +1,283 @@ +ďťż<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.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>{6F076455-D955-45D4-9C68-4AD4E45F2D47}</ProjectGuid>
+ <ProjectName>Demo</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/Demo.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>Default</InlineFunctionExpansion>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>..\..\bin\Win32-VisualStudio\Demo.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Windows</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\Release/Demo.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>Default</InlineFunctionExpansion>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Windows</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/Demo.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\Debug/Demo.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="CDemo.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="CMainMenu.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="CDemo.h" />
+ <ClInclude Include="CMainMenu.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="icon.ico" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/Demo/Demo_vc8.vcproj b/examples/Demo/Demo_vc8.vcproj new file mode 100644 index 0000000..5504310 --- /dev/null +++ b/examples/Demo/Demo_vc8.vcproj @@ -0,0 +1,300 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="Demo_vc8"
+ ProjectGUID="{6F076455-D955-45D4-9C68-4AD4E45F2D47}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/Demo.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/Demo.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\Demo.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Demo.pdb"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/Demo.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/Demo.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\Demo.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/Demo.pdb"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="CDemo.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="CDemo.h"
+ >
+ </File>
+ <File
+ RelativePath="CMainMenu.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="CMainMenu.h"
+ >
+ </File>
+ <File
+ RelativePath="icon.ico"
+ >
+ </File>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/Demo/Demo_vc9.vcproj b/examples/Demo/Demo_vc9.vcproj new file mode 100644 index 0000000..e0052aa --- /dev/null +++ b/examples/Demo/Demo_vc9.vcproj @@ -0,0 +1,300 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="Demo_vc9"
+ ProjectGUID="{6F076455-D955-45D4-9C68-4AD4E45F2D47}"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/Demo.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="0"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/Demo.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\Demo.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Demo.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/Demo.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/Demo.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\Demo.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/Demo.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="CDemo.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="CDemo.h"
+ >
+ </File>
+ <File
+ RelativePath="CMainMenu.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="CMainMenu.h"
+ >
+ </File>
+ <File
+ RelativePath="icon.ico"
+ >
+ </File>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/Demo/Makefile b/examples/Demo/Makefile new file mode 100644 index 0000000..1577ac9 --- /dev/null +++ b/examples/Demo/Makefile @@ -0,0 +1,43 @@ +# Irrlicht Engine Demo Makefile
+Target = Demo
+Sources = CDemo.cpp CMainMenu.cpp main.cpp
+
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -Wall -O3 -ffast-math
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+all: all_linux
+
+# target specific settings
+all_linux: SYSTEM=Linux
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/$(SYSTEM) -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32: LDFLAGS = -L../../lib/$(SYSTEM) -lIrrlicht -lopengl32 -lm
+
+# if you enable sound add the proper library for linking
+#LDFLAGS += -lIrrKlang
+#LDFLAGS += -laudiere
+#LDFLAGS += -lSDL_mixer -lSDL
+
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+OBJ = $(Sources:.cpp=.o)
+
+all_linux all_win32: $(OBJ)
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+ @$(RM) $(OBJ)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/Demo/demo.cbp b/examples/Demo/demo.cbp new file mode 100644 index 0000000..4c62040 --- /dev/null +++ b/examples/Demo/demo.cbp @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Tech Demo" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="../../bin/Win32-gcc/Demo" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="../../lib/Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="../../bin/Linux/Demo" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="X11" /> + <Add library="Irrlicht" /> + <Add library="GL" /> + <Add directory="../../lib/Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-Wall" /> + <Add option="-g" /> + <Add directory="../../include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + <Add directory="../../lib/gcc" /> + </Linker> + <Unit filename="CDemo.cpp" /> + <Unit filename="CDemo.h" /> + <Unit filename="CMainMenu.cpp" /> + <Unit filename="CMainMenu.h" /> + <Unit filename="main.cpp" /> + <Unit filename="resource.h" /> + <Unit filename="resscript.rc"> + <Option compilerVar="WINDRES" /> + <Option target="Windows" /> + </Unit> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/Demo/demo.dev b/examples/Demo/demo.dev new file mode 100644 index 0000000..9e1b4c0 --- /dev/null +++ b/examples/Demo/demo.dev @@ -0,0 +1,99 @@ +[Project]
+FileName=demo.dev
+Name=Irrlicht Tech Demo
+UnitCount=5
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=Demo.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
+[Unit2]
+FileName=CDemo.h
+CompileCpp=1
+Folder=Irrlicht Tech Demo
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit3]
+FileName=CMainMenu.cpp
+CompileCpp=1
+Folder=Irrlicht Tech Demo
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit4]
+FileName=CMainMenu.h
+CompileCpp=1
+Folder=Irrlicht Tech Demo
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit5]
+FileName=CDemo.cpp
+CompileCpp=1
+Folder=Irrlicht Tech Demo
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
diff --git a/examples/Demo/icon.ico b/examples/Demo/icon.ico Binary files differnew file mode 100644 index 0000000..49f8eab --- /dev/null +++ b/examples/Demo/icon.ico diff --git a/examples/Demo/main.cpp b/examples/Demo/main.cpp new file mode 100644 index 0000000..3d26999 --- /dev/null +++ b/examples/Demo/main.cpp @@ -0,0 +1,49 @@ +// This is a Demo of the Irrlicht Engine (c) 2005-2009 by N.Gebhardt.
+// This file is not documented.
+
+#include <irrlicht.h>
+#ifdef _IRR_WINDOWS_
+#include <windows.h>
+#endif
+
+#include <stdio.h>
+
+#include "CMainMenu.h"
+#include "CDemo.h"
+
+using namespace irr;
+
+#ifdef _WIN32
+
+#pragma comment(lib, "Irrlicht.lib")
+INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
+#else
+int main(int argc, char* argv[])
+#endif
+{
+ bool fullscreen = false;
+ bool music = true;
+ bool shadows = false;
+ bool additive = false;
+ bool vsync = false;
+ bool aa = false;
+
+#ifndef _IRR_WINDOWS_
+ video::E_DRIVER_TYPE driverType = video::EDT_OPENGL;
+#else
+ video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9;
+#endif
+
+ CMainMenu menu;
+
+//#ifndef _DEBUG
+ if (menu.run(fullscreen, music, shadows, additive, vsync, aa, driverType))
+//#endif
+ {
+ CDemo demo(fullscreen, music, shadows, additive, vsync, aa, driverType);
+ demo.run();
+ }
+
+ return 0;
+}
+
diff --git a/examples/Demo/resource.h b/examples/Demo/resource.h new file mode 100644 index 0000000..eb3b976 --- /dev/null +++ b/examples/Demo/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by resscript.rc
+//
+#define IDI_ICON1 101
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/examples/Demo/resscript.rc b/examples/Demo/resscript.rc new file mode 100644 index 0000000..be12eb7 --- /dev/null +++ b/examples/Demo/resscript.rc @@ -0,0 +1,72 @@ +//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Deutsch (Österreich) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEA)
+#ifdef _WIN32
+LANGUAGE LANG_GERMAN, SUBLANG_GERMAN_AUSTRIAN
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON1 ICON DISCARDABLE "icon.ico"
+#endif // Deutsch (Österreich) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/examples/Makefile b/examples/Makefile new file mode 100644 index 0000000..da65881 --- /dev/null +++ b/examples/Makefile @@ -0,0 +1,8 @@ +DIRS = $(wildcard [012]* Demo) + +all: $(DIRS) + +$(DIRS): + -@cd $@ && make clean && make + +.PHONY: $(DIRS) diff --git a/examples/buildAllExamples.sh b/examples/buildAllExamples.sh new file mode 100755 index 0000000..272a329 --- /dev/null +++ b/examples/buildAllExamples.sh @@ -0,0 +1,8 @@ +#! /bin/bash +[ -z $1 ] || TARGET=$1 +[ -z $TARGET ] && TARGET=all +for i in [012]* Demo; do + echo "Building $i"; + pushd $i && make clean $TARGET; + popd; +done diff --git a/examples/whereAreTheBinaries.txt b/examples/whereAreTheBinaries.txt new file mode 100644 index 0000000..d9f7d6a --- /dev/null +++ b/examples/whereAreTheBinaries.txt @@ -0,0 +1,7 @@ +If you are searching for executeables of the examples and the demo,
+you'll find some for Windows in the directory
+/bin/win32-VisualStudio.
+
+For Linux, just go into the directory of the example you want and
+execute a simple 'make' after you made the engine from source/Irrlicht.
+
|
