summaryrefslogtreecommitdiff
path: root/examples/17.HelloWorld_Mobile
diff options
context:
space:
mode:
Diffstat (limited to 'examples/17.HelloWorld_Mobile')
-rw-r--r--examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v8.vcproj185
-rw-r--r--examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v9.vcproj184
-rw-r--r--examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc10.vcxproj180
-rw-r--r--examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc11.vcxproj180
-rw-r--r--examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc12.vcxproj180
-rw-r--r--examples/17.HelloWorld_Mobile/HelloWorld_mobile.sln33
-rw-r--r--examples/17.HelloWorld_Mobile/HelloWorld_mobile.vcproj198
-rw-r--r--examples/17.HelloWorld_Mobile/main.cpp503
-rw-r--r--examples/17.HelloWorld_Mobile/tutorial.html206
9 files changed, 1849 insertions, 0 deletions
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 &lt;irrlicht.h&gt;</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 &lt;windows.h&gt;</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, &quot;Irrlicht.lib&quot;)</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&amp; 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-&gt;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-&gt;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&lt;f32&gt; 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&lt;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-&gt;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-&gt;getVideoDriver();</div><div class="line"></div><div class="line"> driver-&gt;setMaterial(Material);</div><div class="line"> driver-&gt;setTransform(ETS_WORLD, AbsoluteTransformation);</div><div class="line"> driver-&gt;drawIndexedTriangleList(&amp;Vertices[0], 4, &amp;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&lt;f32&gt;&amp; 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&amp; 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&lt;u32&gt;(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&lt;u32&gt;(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-&gt;getVideoDriver();</div><div class="line"> ISceneManager* smgr = device-&gt;getSceneManager();</div><div class="line"> IGUIEnvironment* guienv = device-&gt;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">&#39;\\&#39;</span> ) + 1 );</div><div class="line"> device-&gt;getFileSystem()-&gt;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-&gt;addStaticText(L<span class="stringliteral">&quot;FPS: 25&quot;</span>,</div><div class="line"> rect&lt;s32&gt;(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-&gt;addButton(core::rect&lt;int&gt;(200,10,238,30), 0, 2, L<span class="stringliteral">&quot;Quit&quot;</span>);</div><div class="line"></div><div class="line"> <span class="comment">// add irrlicht logo</span></div><div class="line"> guienv-&gt;addImage(driver-&gt;getTexture(<span class="stringliteral">&quot;../../media/irrlichtlogo3.png&quot;</span>),</div><div class="line"> core::position2d&lt;s32&gt;(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-&gt;run())</div><div class="line"> <span class="keywordflow">if</span> (device-&gt;isWindowActive())</div><div class="line"> {</div><div class="line"> device-&gt;getVideoDriver()-&gt;beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, SColor(0,100,100,100));</div><div class="line"> device-&gt;getSceneManager()-&gt;drawAll();</div><div class="line"> device-&gt;getGUIEnvironment()-&gt;drawAll();</div><div class="line"> device-&gt;getVideoDriver()-&gt;endScene ();</div><div class="line"></div><div class="line"> IGUIElement *stat = device-&gt;getGUIEnvironment()-&gt;</div><div class="line"> getRootGUIElement()-&gt;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">&quot;FPS: &quot;</span>;</div><div class="line"> str += (s32)device-&gt;getVideoDriver()-&gt;getFPS();</div><div class="line"></div><div class="line"> stat-&gt;setText ( str.c_str() );</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> device-&gt;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-&gt;setEventReceiver(&amp;receiver);</div><div class="line"> </div><div class="line"> IVideoDriver* driver = device-&gt;getVideoDriver();</div><div class="line"> ISceneManager* smgr = device-&gt;getSceneManager();</div><div class="line"> IGUIEnvironment* guienv = device-&gt;getGUIEnvironment();</div><div class="line"></div><div class="line"></div><div class="line"> smgr-&gt;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-&gt;getRootSceneNode(), smgr, 666);</div><div class="line"></div><div class="line"> ISceneNodeAnimator* anim = </div><div class="line"> smgr-&gt;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-&gt;addAnimator(anim);</div><div class="line"> anim-&gt;drop();</div><div class="line"> anim = 0; <span class="comment">// As I shouldn&#39;t refer to it again, ensure that I can&#39;t</span></div><div class="line"> }</div><div class="line"></div><div class="line"> myNode-&gt;drop();</div><div class="line"> myNode = 0; <span class="comment">// As I shouldn&#39;t refer to it again, ensure that I can&#39;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-&gt;setVisible(<span class="keyword">true</span>);</div><div class="line"> Skydome-&gt;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&amp; 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-&gt;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-&gt;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 &#39;W&#39; or &#39;D&#39;</span></div><div class="line"> <span class="keywordflow">if</span> (event.EventType == irr::EET_KEY_INPUT_EVENT &amp;&amp; !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-&gt;setMaterialFlag(video::EMF_WIREFRAME,</div><div class="line"> !Terrain-&gt;getMaterial(0).Wireframe);</div><div class="line"> Terrain-&gt;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-&gt;setMaterialFlag(video::EMF_POINTCLOUD,</div><div class="line"> !Terrain-&gt;getMaterial(0).PointCloud);</div><div class="line"> Terrain-&gt;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-&gt;setMaterialType(</div><div class="line"> Terrain-&gt;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-&gt;setVisible(showBox);</div><div class="line"> Skydome-&gt;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-&gt;getVideoDriver();</div><div class="line">scene::ISceneManager* smgr = device-&gt;getSceneManager();</div><div class="line">gui::IGUIEnvironment* env = device-&gt;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-&gt;getSkin()-&gt;setFont(env-&gt;getFont(&quot;../../media/fontlucida.png&quot;));</span></div><div class="line"></div><div class="line"><span class="comment">// add some help text</span></div><div class="line">env-&gt;addStaticText(</div><div class="line"> L<span class="stringliteral">&quot;Press &#39;W&#39; to change wireframe mode\nPress &#39;D&#39; to toggle detail map\nPress &#39;S&#39; to toggle skybox/skydome&quot;</span>,</div><div class="line"> core::rect&lt;s32&gt;(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-&gt;addCameraSceneNodeFPS(0,100.0f,1.2f);</div><div class="line"></div><div class="line">camera-&gt;setPosition(core::vector3df(2700*2,255*2,2600*2));</div><div class="line">camera-&gt;setTarget(core::vector3df(2397*2,343*2,2700*2));</div><div class="line">camera-&gt;setFarValue(42000.0f);</div><div class="line"></div><div class="line"><span class="comment">// disable mouse cursor</span></div><div class="line">device-&gt;getCursorControl()-&gt;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-&gt;addTerrainSceneNode(</div><div class="line"> <span class="stringliteral">&quot;../../media/terrain-heightmap.bmp&quot;</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-&gt;setMaterialFlag(video::EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"></div><div class="line"> terrain-&gt;setMaterialTexture(0,</div><div class="line"> driver-&gt;getTexture(<span class="stringliteral">&quot;../../media/terrain-texture.jpg&quot;</span>));</div><div class="line"> terrain-&gt;setMaterialTexture(1,</div><div class="line"> driver-&gt;getTexture(<span class="stringliteral">&quot;../../media/detailmap3.jpg&quot;</span>));</div><div class="line"> </div><div class="line"> terrain-&gt;setMaterialType(video::EMT_DETAIL_MAP);</div><div class="line"></div><div class="line"> terrain-&gt;scaleTexture(1.0f, 20.0f);</div><div class="line"> <span class="comment">//terrain-&gt;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-&gt;createTerrainTriangleSelector(terrain, 0);</div><div class="line">terrain-&gt;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-&gt;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-&gt;drop();</div><div class="line">camera-&gt;addAnimator(anim);</div><div class="line">anim-&gt;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-&gt;getMeshBufferForLOD(*buffer, 0);</div><div class="line"> video::S3DVertex2TCoords* data = (video::S3DVertex2TCoords*)buffer-&gt;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-&gt;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-&gt;setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, <span class="keyword">false</span>);</div><div class="line"></div><div class="line"> scene::ISceneNode* skybox=smgr-&gt;addSkyBoxSceneNode(</div><div class="line"> driver-&gt;getTexture(<span class="stringliteral">&quot;../../media/irrlicht2_up.jpg&quot;</span>),</div><div class="line"> driver-&gt;getTexture(<span class="stringliteral">&quot;../../media/irrlicht2_dn.jpg&quot;</span>),</div><div class="line"> driver-&gt;getTexture(<span class="stringliteral">&quot;../../media/irrlicht2_lf.jpg&quot;</span>),</div><div class="line"> driver-&gt;getTexture(<span class="stringliteral">&quot;../../media/irrlicht2_rt.jpg&quot;</span>),</div><div class="line"> driver-&gt;getTexture(<span class="stringliteral">&quot;../../media/irrlicht2_ft.jpg&quot;</span>),</div><div class="line"> driver-&gt;getTexture(<span class="stringliteral">&quot;../../media/irrlicht2_bk.jpg&quot;</span>));</div><div class="line"> scene::ISceneNode* skydome=smgr-&gt;addSkyDomeSceneNode(driver-&gt;getTexture(<span class="stringliteral">&quot;../../media/skydome.jpg&quot;</span>),16,8,0.95f,2.0f);</div><div class="line"></div><div class="line"> driver-&gt;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-&gt;setEventReceiver(&amp;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-&gt;getVideoDriver();</div><div class="line"> ISceneManager* smgr = device-&gt;getSceneManager();</div><div class="line"> IGUIEnvironment* guienv = device-&gt;getGUIEnvironment();</div><div class="line"></div><div class="line"> IAnimatedMesh* mesh = smgr-&gt;getMesh(<span class="stringliteral">&quot;../../media/sydney.md2&quot;</span>);</div><div class="line"> <span class="keywordflow">if</span> (!mesh)</div><div class="line"> {</div><div class="line"> device-&gt;drop();</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"> }</div><div class="line"> IAnimatedMeshSceneNode* node = smgr-&gt;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-&gt;setMaterialFlag(EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"> node-&gt;setMD2Animation(scene::EMAT_STAND);</div><div class="line"> node-&gt;setMaterialTexture( 0, driver-&gt;getTexture(<span class="stringliteral">&quot;../../media/sydney.bmp&quot;</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-&gt;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-&gt;setEventReceiver(&amp;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, &quot;/subsystem:WINDOWSCE /ENTRY:main&quot;) </span></div><div class="line"><span class="preprocessor">#elif defined (_IRR_WINDOWS_)</span></div><div class="line"><span class="preprocessor"> #pragma comment(linker, &quot;/subsystem:windows /ENTRY:mainCRTStartup&quot;)</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>&nbsp;</p>
+</body>
+</html>