diff options
author | David Walter Seikel | 2016-03-28 22:28:34 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-03-28 22:28:34 +1000 |
commit | 7028cbe09c688437910a25623098762bf0fa592d (patch) | |
tree | 10b5af58277d9880380c2251f109325542c4e6eb /src/others/irrlicht-1.8.1/examples/23.SMeshHandling | |
parent | Move lemon to the src/others directory. (diff) | |
download | SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.zip SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.gz SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.bz2 SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.xz |
Move Irrlicht to src/others.
Diffstat (limited to 'src/others/irrlicht-1.8.1/examples/23.SMeshHandling')
9 files changed, 1456 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/Makefile b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/Makefile new file mode 100644 index 0000000..eab5060 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/Makefile | |||
@@ -0,0 +1,38 @@ | |||
1 | # Makefile for Irrlicht Examples | ||
2 | # It's usually sufficient to change just the target name and source file list | ||
3 | # and be sure that CXX is set to a valid compiler | ||
4 | Target = 23.SMeshHandling | ||
5 | Sources = main.cpp | ||
6 | |||
7 | # general compiler settings | ||
8 | CPPFLAGS = -I../../include -I/usr/X11R6/include | ||
9 | CXXFLAGS = -O3 -ffast-math | ||
10 | #CXXFLAGS = -g -Wall | ||
11 | |||
12 | #default target is Linux | ||
13 | all: all_linux | ||
14 | |||
15 | ifeq ($(HOSTTYPE), x86_64) | ||
16 | LIBSELECT=64 | ||
17 | endif | ||
18 | |||
19 | # target specific settings | ||
20 | all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor | ||
21 | all_linux clean_linux: SYSTEM=Linux | ||
22 | all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm | ||
23 | all_win32 clean_win32: SYSTEM=Win32-gcc | ||
24 | all_win32 clean_win32: SUF=.exe | ||
25 | # name of the binary - only valid for targets which set SYSTEM | ||
26 | DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) | ||
27 | |||
28 | all_linux all_win32: | ||
29 | $(warning Building...) | ||
30 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) | ||
31 | |||
32 | clean: clean_linux clean_win32 | ||
33 | $(warning Cleaning...) | ||
34 | |||
35 | clean_linux clean_win32: | ||
36 | @$(RM) $(DESTPATH) | ||
37 | |||
38 | .PHONY: all all_win32 clean clean_linux clean_win32 | ||
diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.cbp b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.cbp new file mode 100644 index 0000000..2fbcfe2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.cbp | |||
@@ -0,0 +1,44 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> | ||
2 | <CodeBlocks_project_file> | ||
3 | <FileVersion major="1" minor="6" /> | ||
4 | <Project> | ||
5 | <Option title="Irrlicht Example 23 SMeshHandling" /> | ||
6 | <Option pch_mode="2" /> | ||
7 | <Option compiler="gcc" /> | ||
8 | <Build> | ||
9 | <Target title="Windows"> | ||
10 | <Option platforms="Windows;" /> | ||
11 | <Option output="..\..\bin\Win32-gcc\SMeshHandling" prefix_auto="0" extension_auto="1" /> | ||
12 | <Option type="1" /> | ||
13 | <Option compiler="gcc" /> | ||
14 | <Linker> | ||
15 | <Add directory="..\..\lib\Win32-gcc" /> | ||
16 | </Linker> | ||
17 | </Target> | ||
18 | <Target title="Linux"> | ||
19 | <Option platforms="Unix;" /> | ||
20 | <Option output="..\..\bin\Linux\SMeshHandling" prefix_auto="0" extension_auto="0" /> | ||
21 | <Option type="1" /> | ||
22 | <Option compiler="gcc" /> | ||
23 | <Linker> | ||
24 | <Add library="Xxf86vm" /> | ||
25 | <Add library="Xcursor" /> | ||
26 | <Add library="GL" /> | ||
27 | <Add directory="..\..\lib\Linux" /> | ||
28 | </Linker> | ||
29 | </Target> | ||
30 | </Build> | ||
31 | <Compiler> | ||
32 | <Add directory="..\..\include" /> | ||
33 | </Compiler> | ||
34 | <Linker> | ||
35 | <Add library="Irrlicht" /> | ||
36 | </Linker> | ||
37 | <Unit filename="main.cpp" /> | ||
38 | <Extensions> | ||
39 | <code_completion /> | ||
40 | <envvars /> | ||
41 | <debugger /> | ||
42 | </Extensions> | ||
43 | </Project> | ||
44 | </CodeBlocks_project_file> | ||
diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.dev b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.dev new file mode 100644 index 0000000..94043f3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.dev | |||
@@ -0,0 +1,59 @@ | |||
1 | [Project] | ||
2 | FileName=example.dev | ||
3 | Name=Irrlicht Example 23 SMeshHandling | ||
4 | UnitCount=1 | ||
5 | Type=1 | ||
6 | Ver=1 | ||
7 | ObjFiles= | ||
8 | Includes=..\..\include | ||
9 | Libs= | ||
10 | PrivateResource= | ||
11 | ResourceIncludes= | ||
12 | MakeIncludes= | ||
13 | Compiler= | ||
14 | CppCompiler= | ||
15 | Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ | ||
16 | IsCpp=1 | ||
17 | Icon= | ||
18 | ExeOutput=../../bin/Win32-gcc | ||
19 | ObjectOutput=obj | ||
20 | OverrideOutput=1 | ||
21 | OverrideOutputName=23.SMeshHandling.exe | ||
22 | HostApplication= | ||
23 | Folders= | ||
24 | CommandLine= | ||
25 | IncludeVersionInfo=0 | ||
26 | SupportXPThemes=0 | ||
27 | CompilerSet=0 | ||
28 | CompilerSettings=0000000000000000000000 | ||
29 | UseCustomMakefile=0 | ||
30 | CustomMakefile= | ||
31 | |||
32 | [Unit1] | ||
33 | FileName=main.cpp | ||
34 | CompileCpp=1 | ||
35 | Folder=Projekt1 | ||
36 | Compile=1 | ||
37 | Link=1 | ||
38 | Priority=1000 | ||
39 | OverrideBuildCmd=0 | ||
40 | BuildCmd= | ||
41 | |||
42 | [VersionInfo] | ||
43 | Major=0 | ||
44 | Minor=1 | ||
45 | Release=1 | ||
46 | Build=1 | ||
47 | LanguageID=1033 | ||
48 | CharsetID=1252 | ||
49 | CompanyName= | ||
50 | FileVersion= | ||
51 | FileDescription=Irrlicht Engine example compiled using DevCpp and gcc | ||
52 | InternalName= | ||
53 | LegalCopyright= | ||
54 | LegalTrademarks= | ||
55 | OriginalFilename= | ||
56 | ProductName= | ||
57 | ProductVersion= | ||
58 | AutoIncBuildNr=0 | ||
59 | |||
diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.vcproj b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.vcproj new file mode 100644 index 0000000..a63d583 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.vcproj | |||
@@ -0,0 +1,132 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | ||
2 | <VisualStudioProject | ||
3 | ProjectType="Visual C++" | ||
4 | Version="7.10" | ||
5 | Name="23.SMeshHandling" | ||
6 | ProjectGUID="{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}" | ||
7 | Keyword="Win32Proj"> | ||
8 | <Platforms> | ||
9 | <Platform | ||
10 | Name="Win32"/> | ||
11 | </Platforms> | ||
12 | <Configurations> | ||
13 | <Configuration | ||
14 | Name="Debug|Win32" | ||
15 | OutputDirectory="Debug" | ||
16 | IntermediateDirectory="Debug" | ||
17 | ConfigurationType="1" | ||
18 | CharacterSet="2"> | ||
19 | <Tool | ||
20 | Name="VCCLCompilerTool" | ||
21 | Optimization="0" | ||
22 | AdditionalIncludeDirectories="..\..\include" | ||
23 | PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" | ||
24 | MinimalRebuild="TRUE" | ||
25 | BasicRuntimeChecks="3" | ||
26 | RuntimeLibrary="5" | ||
27 | UsePrecompiledHeader="0" | ||
28 | WarningLevel="3" | ||
29 | Detect64BitPortabilityProblems="TRUE" | ||
30 | DebugInformationFormat="4"/> | ||
31 | <Tool | ||
32 | Name="VCCustomBuildTool"/> | ||
33 | <Tool | ||
34 | Name="VCLinkerTool" | ||
35 | OutputFile="..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe" | ||
36 | LinkIncremental="1" | ||
37 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | ||
38 | GenerateDebugInformation="TRUE" | ||
39 | ProgramDatabaseFile="$(OutDir)/SMeshHandling.pdb" | ||
40 | SubSystem="1" | ||
41 | TargetMachine="1"/> | ||
42 | <Tool | ||
43 | Name="VCMIDLTool"/> | ||
44 | <Tool | ||
45 | Name="VCPostBuildEventTool"/> | ||
46 | <Tool | ||
47 | Name="VCPreBuildEventTool"/> | ||
48 | <Tool | ||
49 | Name="VCPreLinkEventTool"/> | ||
50 | <Tool | ||
51 | Name="VCResourceCompilerTool"/> | ||
52 | <Tool | ||
53 | Name="VCWebServiceProxyGeneratorTool"/> | ||
54 | <Tool | ||
55 | Name="VCXMLDataGeneratorTool"/> | ||
56 | <Tool | ||
57 | Name="VCWebDeploymentTool"/> | ||
58 | <Tool | ||
59 | Name="VCManagedWrapperGeneratorTool"/> | ||
60 | <Tool | ||
61 | Name="VCAuxiliaryManagedWrapperGeneratorTool"/> | ||
62 | </Configuration> | ||
63 | <Configuration | ||
64 | Name="Release|Win32" | ||
65 | OutputDirectory="Release" | ||
66 | IntermediateDirectory="Release" | ||
67 | ConfigurationType="1" | ||
68 | CharacterSet="2" | ||
69 | WholeProgramOptimization="TRUE"> | ||
70 | <Tool | ||
71 | Name="VCCLCompilerTool" | ||
72 | AdditionalOptions="/QIfist /Oa" | ||
73 | Optimization="3" | ||
74 | GlobalOptimizations="TRUE" | ||
75 | InlineFunctionExpansion="2" | ||
76 | EnableIntrinsicFunctions="TRUE" | ||
77 | FavorSizeOrSpeed="1" | ||
78 | OmitFramePointers="TRUE" | ||
79 | AdditionalIncludeDirectories="..\..\include" | ||
80 | PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" | ||
81 | RuntimeLibrary="4" | ||
82 | BufferSecurityCheck="FALSE" | ||
83 | UsePrecompiledHeader="0" | ||
84 | WarningLevel="3" | ||
85 | Detect64BitPortabilityProblems="TRUE" | ||
86 | DebugInformationFormat="0" | ||
87 | CallingConvention="1"/> | ||
88 | <Tool | ||
89 | Name="VCCustomBuildTool"/> | ||
90 | <Tool | ||
91 | Name="VCLinkerTool" | ||
92 | OutputFile="..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe" | ||
93 | LinkIncremental="1" | ||
94 | SuppressStartupBanner="TRUE" | ||
95 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | ||
96 | GenerateDebugInformation="FALSE" | ||
97 | SubSystem="1" | ||
98 | OptimizeReferences="2" | ||
99 | EnableCOMDATFolding="2" | ||
100 | TargetMachine="1"/> | ||
101 | <Tool | ||
102 | Name="VCMIDLTool"/> | ||
103 | <Tool | ||
104 | Name="VCPostBuildEventTool"/> | ||
105 | <Tool | ||
106 | Name="VCPreBuildEventTool"/> | ||
107 | <Tool | ||
108 | Name="VCPreLinkEventTool"/> | ||
109 | <Tool | ||
110 | Name="VCResourceCompilerTool"/> | ||
111 | <Tool | ||
112 | Name="VCWebServiceProxyGeneratorTool"/> | ||
113 | <Tool | ||
114 | Name="VCXMLDataGeneratorTool"/> | ||
115 | <Tool | ||
116 | Name="VCWebDeploymentTool"/> | ||
117 | <Tool | ||
118 | Name="VCManagedWrapperGeneratorTool"/> | ||
119 | <Tool | ||
120 | Name="VCAuxiliaryManagedWrapperGeneratorTool"/> | ||
121 | </Configuration> | ||
122 | </Configurations> | ||
123 | <References> | ||
124 | </References> | ||
125 | <Files> | ||
126 | <File | ||
127 | RelativePath=".\main.cpp"> | ||
128 | </File> | ||
129 | </Files> | ||
130 | <Globals> | ||
131 | </Globals> | ||
132 | </VisualStudioProject> | ||
diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc10.vcxproj new file mode 100644 index 0000000..51a6f9e --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc10.vcxproj | |||
@@ -0,0 +1,188 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
3 | <ItemGroup Label="ProjectConfigurations"> | ||
4 | <ProjectConfiguration Include="Debug|Win32"> | ||
5 | <Configuration>Debug</Configuration> | ||
6 | <Platform>Win32</Platform> | ||
7 | </ProjectConfiguration> | ||
8 | <ProjectConfiguration Include="Debug|x64"> | ||
9 | <Configuration>Debug</Configuration> | ||
10 | <Platform>x64</Platform> | ||
11 | </ProjectConfiguration> | ||
12 | <ProjectConfiguration Include="Release|Win32"> | ||
13 | <Configuration>Release</Configuration> | ||
14 | <Platform>Win32</Platform> | ||
15 | </ProjectConfiguration> | ||
16 | <ProjectConfiguration Include="Release|x64"> | ||
17 | <Configuration>Release</Configuration> | ||
18 | <Platform>x64</Platform> | ||
19 | </ProjectConfiguration> | ||
20 | </ItemGroup> | ||
21 | <PropertyGroup Label="Globals"> | ||
22 | <ProjectName>23.SMeshHandling</ProjectName> | ||
23 | <ProjectGuid>{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}</ProjectGuid> | ||
24 | <RootNamespace>23.SMeshHandling</RootNamespace> | ||
25 | <Keyword>Win32Proj</Keyword> | ||
26 | </PropertyGroup> | ||
27 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
28 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | ||
29 | <ConfigurationType>Application</ConfigurationType> | ||
30 | <CharacterSet>MultiByte</CharacterSet> | ||
31 | </PropertyGroup> | ||
32 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | ||
33 | <ConfigurationType>Application</ConfigurationType> | ||
34 | <CharacterSet>MultiByte</CharacterSet> | ||
35 | </PropertyGroup> | ||
36 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | ||
37 | <ConfigurationType>Application</ConfigurationType> | ||
38 | <CharacterSet>MultiByte</CharacterSet> | ||
39 | </PropertyGroup> | ||
40 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | ||
41 | <ConfigurationType>Application</ConfigurationType> | ||
42 | <CharacterSet>MultiByte</CharacterSet> | ||
43 | </PropertyGroup> | ||
44 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
45 | <ImportGroup Label="ExtensionSettings"> | ||
46 | </ImportGroup> | ||
47 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> | ||
48 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
49 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | ||
50 | </ImportGroup> | ||
51 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> | ||
52 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
53 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | ||
54 | </ImportGroup> | ||
55 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> | ||
56 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
57 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | ||
58 | </ImportGroup> | ||
59 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> | ||
60 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
61 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | ||
62 | </ImportGroup> | ||
63 | <PropertyGroup Label="UserMacros" /> | ||
64 | <PropertyGroup> | ||
65 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> | ||
66 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | ||
67 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | ||
68 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> | ||
69 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> | ||
70 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | ||
71 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | ||
72 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> | ||
73 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> | ||
74 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | ||
75 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | ||
76 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | ||
77 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | ||
78 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | ||
79 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | ||
80 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | ||
81 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | ||
82 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | ||
83 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | ||
84 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | ||
85 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | ||
86 | </PropertyGroup> | ||
87 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
88 | <ClCompile> | ||
89 | <Optimization>Disabled</Optimization> | ||
90 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
91 | <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
92 | <MinimalRebuild>true</MinimalRebuild> | ||
93 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | ||
94 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||
95 | <PrecompiledHeader> | ||
96 | </PrecompiledHeader> | ||
97 | <WarningLevel>Level3</WarningLevel> | ||
98 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | ||
99 | </ClCompile> | ||
100 | <Link> | ||
101 | <OutputFile>..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe</OutputFile> | ||
102 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
103 | <GenerateDebugInformation>true</GenerateDebugInformation> | ||
104 | <ProgramDatabaseFile>$(OutDir)SMeshHandling.pdb</ProgramDatabaseFile> | ||
105 | <SubSystem>Console</SubSystem> | ||
106 | <DataExecutionPrevention> | ||
107 | </DataExecutionPrevention> | ||
108 | </Link> | ||
109 | </ItemDefinitionGroup> | ||
110 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
111 | <ClCompile> | ||
112 | <Optimization>Disabled</Optimization> | ||
113 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
114 | <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
115 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | ||
116 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||
117 | <PrecompiledHeader> | ||
118 | </PrecompiledHeader> | ||
119 | <WarningLevel>Level3</WarningLevel> | ||
120 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | ||
121 | </ClCompile> | ||
122 | <Link> | ||
123 | <OutputFile>..\..\bin\Win64-VisualStudio\23.SMeshHandling.exe</OutputFile> | ||
124 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
125 | <GenerateDebugInformation>true</GenerateDebugInformation> | ||
126 | <ProgramDatabaseFile>$(OutDir)SMeshHandling.pdb</ProgramDatabaseFile> | ||
127 | <SubSystem>Console</SubSystem> | ||
128 | <DataExecutionPrevention> | ||
129 | </DataExecutionPrevention> | ||
130 | </Link> | ||
131 | </ItemDefinitionGroup> | ||
132 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
133 | <ClCompile> | ||
134 | <IntrinsicFunctions>true</IntrinsicFunctions> | ||
135 | <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> | ||
136 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
137 | <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
138 | <ExceptionHandling>Sync</ExceptionHandling> | ||
139 | <PrecompiledHeader> | ||
140 | </PrecompiledHeader> | ||
141 | <WarningLevel>Level3</WarningLevel> | ||
142 | <DebugInformationFormat> | ||
143 | </DebugInformationFormat> | ||
144 | <CallingConvention>Cdecl</CallingConvention> | ||
145 | </ClCompile> | ||
146 | <Link> | ||
147 | <OutputFile>..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe</OutputFile> | ||
148 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
149 | <GenerateDebugInformation>false</GenerateDebugInformation> | ||
150 | <SubSystem>Console</SubSystem> | ||
151 | <OptimizeReferences>true</OptimizeReferences> | ||
152 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
153 | <DataExecutionPrevention> | ||
154 | </DataExecutionPrevention> | ||
155 | </Link> | ||
156 | </ItemDefinitionGroup> | ||
157 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
158 | <ClCompile> | ||
159 | <IntrinsicFunctions>true</IntrinsicFunctions> | ||
160 | <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> | ||
161 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
162 | <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
163 | <ExceptionHandling>Sync</ExceptionHandling> | ||
164 | <PrecompiledHeader> | ||
165 | </PrecompiledHeader> | ||
166 | <WarningLevel>Level3</WarningLevel> | ||
167 | <DebugInformationFormat> | ||
168 | </DebugInformationFormat> | ||
169 | <CallingConvention>Cdecl</CallingConvention> | ||
170 | </ClCompile> | ||
171 | <Link> | ||
172 | <OutputFile>..\..\bin\Win64-VisualStudio\23.SMeshHandling.exe</OutputFile> | ||
173 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
174 | <GenerateDebugInformation>false</GenerateDebugInformation> | ||
175 | <SubSystem>Console</SubSystem> | ||
176 | <OptimizeReferences>true</OptimizeReferences> | ||
177 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
178 | <DataExecutionPrevention> | ||
179 | </DataExecutionPrevention> | ||
180 | </Link> | ||
181 | </ItemDefinitionGroup> | ||
182 | <ItemGroup> | ||
183 | <ClCompile Include="main.cpp" /> | ||
184 | </ItemGroup> | ||
185 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
186 | <ImportGroup Label="ExtensionTargets"> | ||
187 | </ImportGroup> | ||
188 | </Project> \ No newline at end of file | ||
diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc11.vcxproj new file mode 100644 index 0000000..7f2a781 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc11.vcxproj | |||
@@ -0,0 +1,192 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
3 | <ItemGroup Label="ProjectConfigurations"> | ||
4 | <ProjectConfiguration Include="Debug|Win32"> | ||
5 | <Configuration>Debug</Configuration> | ||
6 | <Platform>Win32</Platform> | ||
7 | </ProjectConfiguration> | ||
8 | <ProjectConfiguration Include="Debug|x64"> | ||
9 | <Configuration>Debug</Configuration> | ||
10 | <Platform>x64</Platform> | ||
11 | </ProjectConfiguration> | ||
12 | <ProjectConfiguration Include="Release|Win32"> | ||
13 | <Configuration>Release</Configuration> | ||
14 | <Platform>Win32</Platform> | ||
15 | </ProjectConfiguration> | ||
16 | <ProjectConfiguration Include="Release|x64"> | ||
17 | <Configuration>Release</Configuration> | ||
18 | <Platform>x64</Platform> | ||
19 | </ProjectConfiguration> | ||
20 | </ItemGroup> | ||
21 | <PropertyGroup Label="Globals"> | ||
22 | <ProjectName>23.SMeshHandling</ProjectName> | ||
23 | <ProjectGuid>{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}</ProjectGuid> | ||
24 | <RootNamespace>23.SMeshHandling</RootNamespace> | ||
25 | <Keyword>Win32Proj</Keyword> | ||
26 | </PropertyGroup> | ||
27 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
28 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | ||
29 | <ConfigurationType>Application</ConfigurationType> | ||
30 | <CharacterSet>MultiByte</CharacterSet> | ||
31 | <PlatformToolset>v110</PlatformToolset> | ||
32 | </PropertyGroup> | ||
33 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | ||
34 | <ConfigurationType>Application</ConfigurationType> | ||
35 | <CharacterSet>MultiByte</CharacterSet> | ||
36 | <PlatformToolset>v110</PlatformToolset> | ||
37 | </PropertyGroup> | ||
38 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | ||
39 | <ConfigurationType>Application</ConfigurationType> | ||
40 | <CharacterSet>MultiByte</CharacterSet> | ||
41 | <PlatformToolset>v110</PlatformToolset> | ||
42 | </PropertyGroup> | ||
43 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | ||
44 | <ConfigurationType>Application</ConfigurationType> | ||
45 | <CharacterSet>MultiByte</CharacterSet> | ||
46 | <PlatformToolset>v110</PlatformToolset> | ||
47 | </PropertyGroup> | ||
48 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
49 | <ImportGroup Label="ExtensionSettings"> | ||
50 | </ImportGroup> | ||
51 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> | ||
52 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
53 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | ||
54 | </ImportGroup> | ||
55 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> | ||
56 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
57 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | ||
58 | </ImportGroup> | ||
59 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> | ||
60 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
61 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | ||
62 | </ImportGroup> | ||
63 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> | ||
64 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
65 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | ||
66 | </ImportGroup> | ||
67 | <PropertyGroup Label="UserMacros" /> | ||
68 | <PropertyGroup> | ||
69 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> | ||
70 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | ||
71 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | ||
72 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> | ||
73 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> | ||
74 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | ||
75 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | ||
76 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> | ||
77 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> | ||
78 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | ||
79 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | ||
80 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | ||
81 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | ||
82 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | ||
83 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | ||
84 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | ||
85 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | ||
86 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | ||
87 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | ||
88 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | ||
89 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | ||
90 | </PropertyGroup> | ||
91 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
92 | <ClCompile> | ||
93 | <Optimization>Disabled</Optimization> | ||
94 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
95 | <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
96 | <MinimalRebuild>true</MinimalRebuild> | ||
97 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | ||
98 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||
99 | <PrecompiledHeader> | ||
100 | </PrecompiledHeader> | ||
101 | <WarningLevel>Level3</WarningLevel> | ||
102 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | ||
103 | </ClCompile> | ||
104 | <Link> | ||
105 | <OutputFile>..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe</OutputFile> | ||
106 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
107 | <GenerateDebugInformation>true</GenerateDebugInformation> | ||
108 | <ProgramDatabaseFile>$(OutDir)SMeshHandling.pdb</ProgramDatabaseFile> | ||
109 | <SubSystem>Console</SubSystem> | ||
110 | <DataExecutionPrevention> | ||
111 | </DataExecutionPrevention> | ||
112 | </Link> | ||
113 | </ItemDefinitionGroup> | ||
114 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
115 | <ClCompile> | ||
116 | <Optimization>Disabled</Optimization> | ||
117 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
118 | <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
119 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | ||
120 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||
121 | <PrecompiledHeader> | ||
122 | </PrecompiledHeader> | ||
123 | <WarningLevel>Level3</WarningLevel> | ||
124 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | ||
125 | </ClCompile> | ||
126 | <Link> | ||
127 | <OutputFile>..\..\bin\Win64-VisualStudio\23.SMeshHandling.exe</OutputFile> | ||
128 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
129 | <GenerateDebugInformation>true</GenerateDebugInformation> | ||
130 | <ProgramDatabaseFile>$(OutDir)SMeshHandling.pdb</ProgramDatabaseFile> | ||
131 | <SubSystem>Console</SubSystem> | ||
132 | <DataExecutionPrevention> | ||
133 | </DataExecutionPrevention> | ||
134 | </Link> | ||
135 | </ItemDefinitionGroup> | ||
136 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
137 | <ClCompile> | ||
138 | <IntrinsicFunctions>true</IntrinsicFunctions> | ||
139 | <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> | ||
140 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
141 | <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
142 | <ExceptionHandling>Sync</ExceptionHandling> | ||
143 | <PrecompiledHeader> | ||
144 | </PrecompiledHeader> | ||
145 | <WarningLevel>Level3</WarningLevel> | ||
146 | <DebugInformationFormat> | ||
147 | </DebugInformationFormat> | ||
148 | <CallingConvention>Cdecl</CallingConvention> | ||
149 | </ClCompile> | ||
150 | <Link> | ||
151 | <OutputFile>..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe</OutputFile> | ||
152 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
153 | <GenerateDebugInformation>false</GenerateDebugInformation> | ||
154 | <SubSystem>Console</SubSystem> | ||
155 | <OptimizeReferences>true</OptimizeReferences> | ||
156 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
157 | <DataExecutionPrevention> | ||
158 | </DataExecutionPrevention> | ||
159 | </Link> | ||
160 | </ItemDefinitionGroup> | ||
161 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
162 | <ClCompile> | ||
163 | <IntrinsicFunctions>true</IntrinsicFunctions> | ||
164 | <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> | ||
165 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
166 | <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
167 | <ExceptionHandling>Sync</ExceptionHandling> | ||
168 | <PrecompiledHeader> | ||
169 | </PrecompiledHeader> | ||
170 | <WarningLevel>Level3</WarningLevel> | ||
171 | <DebugInformationFormat> | ||
172 | </DebugInformationFormat> | ||
173 | <CallingConvention>Cdecl</CallingConvention> | ||
174 | </ClCompile> | ||
175 | <Link> | ||
176 | <OutputFile>..\..\bin\Win64-VisualStudio\23.SMeshHandling.exe</OutputFile> | ||
177 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
178 | <GenerateDebugInformation>false</GenerateDebugInformation> | ||
179 | <SubSystem>Console</SubSystem> | ||
180 | <OptimizeReferences>true</OptimizeReferences> | ||
181 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
182 | <DataExecutionPrevention> | ||
183 | </DataExecutionPrevention> | ||
184 | </Link> | ||
185 | </ItemDefinitionGroup> | ||
186 | <ItemGroup> | ||
187 | <ClCompile Include="main.cpp" /> | ||
188 | </ItemGroup> | ||
189 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
190 | <ImportGroup Label="ExtensionTargets"> | ||
191 | </ImportGroup> | ||
192 | </Project> \ No newline at end of file | ||
diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc8.vcproj new file mode 100644 index 0000000..ecc9135 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc8.vcproj | |||
@@ -0,0 +1,190 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | ||
2 | <VisualStudioProject | ||
3 | ProjectType="Visual C++" | ||
4 | Version="8,00" | ||
5 | Name="23.SMeshHandling_vc8" | ||
6 | ProjectGUID="{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}" | ||
7 | Keyword="Win32Proj" | ||
8 | > | ||
9 | <Platforms> | ||
10 | <Platform | ||
11 | Name="Win32" | ||
12 | /> | ||
13 | </Platforms> | ||
14 | <ToolFiles> | ||
15 | </ToolFiles> | ||
16 | <Configurations> | ||
17 | <Configuration | ||
18 | Name="Debug|Win32" | ||
19 | OutputDirectory="Debug" | ||
20 | IntermediateDirectory="Debug" | ||
21 | ConfigurationType="1" | ||
22 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
23 | CharacterSet="2" | ||
24 | > | ||
25 | <Tool | ||
26 | Name="VCPreBuildEventTool" | ||
27 | /> | ||
28 | <Tool | ||
29 | Name="VCCustomBuildTool" | ||
30 | /> | ||
31 | <Tool | ||
32 | Name="VCXMLDataGeneratorTool" | ||
33 | /> | ||
34 | <Tool | ||
35 | Name="VCWebServiceProxyGeneratorTool" | ||
36 | /> | ||
37 | <Tool | ||
38 | Name="VCMIDLTool" | ||
39 | /> | ||
40 | <Tool | ||
41 | Name="VCCLCompilerTool" | ||
42 | Optimization="0" | ||
43 | AdditionalIncludeDirectories="..\..\include" | ||
44 | PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" | ||
45 | MinimalRebuild="true" | ||
46 | BasicRuntimeChecks="3" | ||
47 | RuntimeLibrary="1" | ||
48 | UsePrecompiledHeader="0" | ||
49 | WarningLevel="3" | ||
50 | Detect64BitPortabilityProblems="true" | ||
51 | DebugInformationFormat="4" | ||
52 | /> | ||
53 | <Tool | ||
54 | Name="VCManagedResourceCompilerTool" | ||
55 | /> | ||
56 | <Tool | ||
57 | Name="VCResourceCompilerTool" | ||
58 | /> | ||
59 | <Tool | ||
60 | Name="VCPreLinkEventTool" | ||
61 | /> | ||
62 | <Tool | ||
63 | Name="VCLinkerTool" | ||
64 | OutputFile="..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe" | ||
65 | LinkIncremental="2" | ||
66 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | ||
67 | GenerateDebugInformation="true" | ||
68 | ProgramDatabaseFile="$(OutDir)/SMeshHandling.pdb" | ||
69 | SubSystem="1" | ||
70 | TargetMachine="1" | ||
71 | /> | ||
72 | <Tool | ||
73 | Name="VCALinkTool" | ||
74 | /> | ||
75 | <Tool | ||
76 | Name="VCManifestTool" | ||
77 | /> | ||
78 | <Tool | ||
79 | Name="VCXDCMakeTool" | ||
80 | /> | ||
81 | <Tool | ||
82 | Name="VCBscMakeTool" | ||
83 | /> | ||
84 | <Tool | ||
85 | Name="VCFxCopTool" | ||
86 | /> | ||
87 | <Tool | ||
88 | Name="VCAppVerifierTool" | ||
89 | /> | ||
90 | <Tool | ||
91 | Name="VCWebDeploymentTool" | ||
92 | /> | ||
93 | <Tool | ||
94 | Name="VCPostBuildEventTool" | ||
95 | /> | ||
96 | </Configuration> | ||
97 | <Configuration | ||
98 | Name="Release|Win32" | ||
99 | OutputDirectory="Release" | ||
100 | IntermediateDirectory="Release" | ||
101 | ConfigurationType="1" | ||
102 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
103 | CharacterSet="2" | ||
104 | > | ||
105 | <Tool | ||
106 | Name="VCPreBuildEventTool" | ||
107 | /> | ||
108 | <Tool | ||
109 | Name="VCCustomBuildTool" | ||
110 | /> | ||
111 | <Tool | ||
112 | Name="VCXMLDataGeneratorTool" | ||
113 | /> | ||
114 | <Tool | ||
115 | Name="VCWebServiceProxyGeneratorTool" | ||
116 | /> | ||
117 | <Tool | ||
118 | Name="VCMIDLTool" | ||
119 | /> | ||
120 | <Tool | ||
121 | Name="VCCLCompilerTool" | ||
122 | EnableIntrinsicFunctions="true" | ||
123 | FavorSizeOrSpeed="1" | ||
124 | AdditionalIncludeDirectories="..\..\include" | ||
125 | PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" | ||
126 | RuntimeLibrary="0" | ||
127 | BufferSecurityCheck="false" | ||
128 | UsePrecompiledHeader="0" | ||
129 | WarningLevel="3" | ||
130 | Detect64BitPortabilityProblems="true" | ||
131 | DebugInformationFormat="0" | ||
132 | CallingConvention="1" | ||
133 | /> | ||
134 | <Tool | ||
135 | Name="VCManagedResourceCompilerTool" | ||
136 | /> | ||
137 | <Tool | ||
138 | Name="VCResourceCompilerTool" | ||
139 | /> | ||
140 | <Tool | ||
141 | Name="VCPreLinkEventTool" | ||
142 | /> | ||
143 | <Tool | ||
144 | Name="VCLinkerTool" | ||
145 | OutputFile="..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe" | ||
146 | LinkIncremental="1" | ||
147 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | ||
148 | GenerateDebugInformation="false" | ||
149 | SubSystem="1" | ||
150 | OptimizeReferences="2" | ||
151 | EnableCOMDATFolding="2" | ||
152 | TargetMachine="1" | ||
153 | /> | ||
154 | <Tool | ||
155 | Name="VCALinkTool" | ||
156 | /> | ||
157 | <Tool | ||
158 | Name="VCManifestTool" | ||
159 | /> | ||
160 | <Tool | ||
161 | Name="VCXDCMakeTool" | ||
162 | /> | ||
163 | <Tool | ||
164 | Name="VCBscMakeTool" | ||
165 | /> | ||
166 | <Tool | ||
167 | Name="VCFxCopTool" | ||
168 | /> | ||
169 | <Tool | ||
170 | Name="VCAppVerifierTool" | ||
171 | /> | ||
172 | <Tool | ||
173 | Name="VCWebDeploymentTool" | ||
174 | /> | ||
175 | <Tool | ||
176 | Name="VCPostBuildEventTool" | ||
177 | /> | ||
178 | </Configuration> | ||
179 | </Configurations> | ||
180 | <References> | ||
181 | </References> | ||
182 | <Files> | ||
183 | <File | ||
184 | RelativePath=".\main.cpp" | ||
185 | > | ||
186 | </File> | ||
187 | </Files> | ||
188 | <Globals> | ||
189 | </Globals> | ||
190 | </VisualStudioProject> | ||
diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc9.vcproj new file mode 100644 index 0000000..b1b921e --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc9.vcproj | |||
@@ -0,0 +1,187 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | ||
2 | <VisualStudioProject | ||
3 | ProjectType="Visual C++" | ||
4 | Version="9,00" | ||
5 | Name="23.SMeshHandling_vc9" | ||
6 | ProjectGUID="{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}" | ||
7 | RootNamespace="23.SMeshHandling_vc9" | ||
8 | Keyword="Win32Proj" | ||
9 | TargetFrameworkVersion="131072" | ||
10 | > | ||
11 | <Platforms> | ||
12 | <Platform | ||
13 | Name="Win32" | ||
14 | /> | ||
15 | </Platforms> | ||
16 | <ToolFiles> | ||
17 | </ToolFiles> | ||
18 | <Configurations> | ||
19 | <Configuration | ||
20 | Name="Debug|Win32" | ||
21 | OutputDirectory="Debug" | ||
22 | IntermediateDirectory="Debug" | ||
23 | ConfigurationType="1" | ||
24 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
25 | CharacterSet="2" | ||
26 | > | ||
27 | <Tool | ||
28 | Name="VCPreBuildEventTool" | ||
29 | /> | ||
30 | <Tool | ||
31 | Name="VCCustomBuildTool" | ||
32 | /> | ||
33 | <Tool | ||
34 | Name="VCXMLDataGeneratorTool" | ||
35 | /> | ||
36 | <Tool | ||
37 | Name="VCWebServiceProxyGeneratorTool" | ||
38 | /> | ||
39 | <Tool | ||
40 | Name="VCMIDLTool" | ||
41 | /> | ||
42 | <Tool | ||
43 | Name="VCCLCompilerTool" | ||
44 | Optimization="0" | ||
45 | AdditionalIncludeDirectories="..\..\include" | ||
46 | PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" | ||
47 | MinimalRebuild="true" | ||
48 | BasicRuntimeChecks="3" | ||
49 | RuntimeLibrary="1" | ||
50 | UsePrecompiledHeader="0" | ||
51 | WarningLevel="3" | ||
52 | DebugInformationFormat="4" | ||
53 | /> | ||
54 | <Tool | ||
55 | Name="VCManagedResourceCompilerTool" | ||
56 | /> | ||
57 | <Tool | ||
58 | Name="VCResourceCompilerTool" | ||
59 | /> | ||
60 | <Tool | ||
61 | Name="VCPreLinkEventTool" | ||
62 | /> | ||
63 | <Tool | ||
64 | Name="VCLinkerTool" | ||
65 | OutputFile="..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe" | ||
66 | LinkIncremental="2" | ||
67 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | ||
68 | GenerateDebugInformation="true" | ||
69 | ProgramDatabaseFile="$(OutDir)/SMeshHandling.pdb" | ||
70 | SubSystem="1" | ||
71 | RandomizedBaseAddress="1" | ||
72 | DataExecutionPrevention="0" | ||
73 | TargetMachine="1" | ||
74 | /> | ||
75 | <Tool | ||
76 | Name="VCALinkTool" | ||
77 | /> | ||
78 | <Tool | ||
79 | Name="VCManifestTool" | ||
80 | /> | ||
81 | <Tool | ||
82 | Name="VCXDCMakeTool" | ||
83 | /> | ||
84 | <Tool | ||
85 | Name="VCBscMakeTool" | ||
86 | /> | ||
87 | <Tool | ||
88 | Name="VCFxCopTool" | ||
89 | /> | ||
90 | <Tool | ||
91 | Name="VCAppVerifierTool" | ||
92 | /> | ||
93 | <Tool | ||
94 | Name="VCPostBuildEventTool" | ||
95 | /> | ||
96 | </Configuration> | ||
97 | <Configuration | ||
98 | Name="Release|Win32" | ||
99 | OutputDirectory="Release" | ||
100 | IntermediateDirectory="Release" | ||
101 | ConfigurationType="1" | ||
102 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
103 | CharacterSet="2" | ||
104 | > | ||
105 | <Tool | ||
106 | Name="VCPreBuildEventTool" | ||
107 | /> | ||
108 | <Tool | ||
109 | Name="VCCustomBuildTool" | ||
110 | /> | ||
111 | <Tool | ||
112 | Name="VCXMLDataGeneratorTool" | ||
113 | /> | ||
114 | <Tool | ||
115 | Name="VCWebServiceProxyGeneratorTool" | ||
116 | /> | ||
117 | <Tool | ||
118 | Name="VCMIDLTool" | ||
119 | /> | ||
120 | <Tool | ||
121 | Name="VCCLCompilerTool" | ||
122 | EnableIntrinsicFunctions="true" | ||
123 | FavorSizeOrSpeed="1" | ||
124 | AdditionalIncludeDirectories="..\..\include" | ||
125 | PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" | ||
126 | ExceptionHandling="1" | ||
127 | UsePrecompiledHeader="0" | ||
128 | WarningLevel="3" | ||
129 | DebugInformationFormat="0" | ||
130 | CallingConvention="0" | ||
131 | /> | ||
132 | <Tool | ||
133 | Name="VCManagedResourceCompilerTool" | ||
134 | /> | ||
135 | <Tool | ||
136 | Name="VCResourceCompilerTool" | ||
137 | /> | ||
138 | <Tool | ||
139 | Name="VCPreLinkEventTool" | ||
140 | /> | ||
141 | <Tool | ||
142 | Name="VCLinkerTool" | ||
143 | OutputFile="..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe" | ||
144 | LinkIncremental="1" | ||
145 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | ||
146 | GenerateDebugInformation="false" | ||
147 | SubSystem="1" | ||
148 | OptimizeReferences="2" | ||
149 | EnableCOMDATFolding="2" | ||
150 | RandomizedBaseAddress="1" | ||
151 | DataExecutionPrevention="0" | ||
152 | TargetMachine="1" | ||
153 | /> | ||
154 | <Tool | ||
155 | Name="VCALinkTool" | ||
156 | /> | ||
157 | <Tool | ||
158 | Name="VCManifestTool" | ||
159 | /> | ||
160 | <Tool | ||
161 | Name="VCXDCMakeTool" | ||
162 | /> | ||
163 | <Tool | ||
164 | Name="VCBscMakeTool" | ||
165 | /> | ||
166 | <Tool | ||
167 | Name="VCFxCopTool" | ||
168 | /> | ||
169 | <Tool | ||
170 | Name="VCAppVerifierTool" | ||
171 | /> | ||
172 | <Tool | ||
173 | Name="VCPostBuildEventTool" | ||
174 | /> | ||
175 | </Configuration> | ||
176 | </Configurations> | ||
177 | <References> | ||
178 | </References> | ||
179 | <Files> | ||
180 | <File | ||
181 | RelativePath=".\main.cpp" | ||
182 | > | ||
183 | </File> | ||
184 | </Files> | ||
185 | <Globals> | ||
186 | </Globals> | ||
187 | </VisualStudioProject> | ||
diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/main.cpp b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/main.cpp new file mode 100644 index 0000000..c3c2ccf --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/main.cpp | |||
@@ -0,0 +1,426 @@ | |||
1 | /** Example 023 SMeshBufferHandling | ||
2 | |||
3 | A tutorial by geoff. | ||
4 | |||
5 | In this tutorial we'll learn how to create custom meshes and deal with them | ||
6 | with Irrlicht. We'll create an interesting heightmap with some lighting effects. | ||
7 | With keys 1,2,3 you can choose a different mesh layout, which is put into the | ||
8 | mesh buffers as desired. All positions, normals, etc. are updated accordingly. | ||
9 | |||
10 | Ok, let's start with the headers (I think there's nothing to say about it) | ||
11 | */ | ||
12 | |||
13 | #include <irrlicht.h> | ||
14 | #include "driverChoice.h" | ||
15 | |||
16 | #ifdef _MSC_VER | ||
17 | #pragma comment(lib, "Irrlicht.lib") | ||
18 | #endif | ||
19 | |||
20 | //Namespaces for the engine | ||
21 | using namespace irr; | ||
22 | using namespace video; | ||
23 | using namespace core; | ||
24 | using namespace scene; | ||
25 | using namespace io; | ||
26 | using namespace gui; | ||
27 | |||
28 | /* This is the type of the functions which work out the colour. */ | ||
29 | typedef SColor colour_func(f32 x, f32 y, f32 z); | ||
30 | |||
31 | /* Here comes a set of functions which can be used for coloring the nodes while | ||
32 | creating the mesh. */ | ||
33 | |||
34 | // Greyscale, based on the height. | ||
35 | SColor grey(f32, f32, f32 z) | ||
36 | { | ||
37 | u32 n = (u32)(255.f * z); | ||
38 | return SColor(255, n, n, n); | ||
39 | } | ||
40 | |||
41 | // Interpolation between blue and white, with red added in one | ||
42 | // direction and green in the other. | ||
43 | SColor yellow(f32 x, f32 y, f32) | ||
44 | { | ||
45 | return SColor(255, 128 + (u32)(127.f * x), 128 + (u32)(127.f * y), 255); | ||
46 | } | ||
47 | |||
48 | // Pure white. | ||
49 | SColor white(f32, f32, f32) { return SColor(255, 255, 255, 255); } | ||
50 | |||
51 | /* The type of the functions which generate the heightmap. x and y | ||
52 | range between -0.5 and 0.5, and s is the scale of the heightmap. */ | ||
53 | |||
54 | typedef f32 generate_func(s16 x, s16 y, f32 s); | ||
55 | |||
56 | // An interesting sample function :-) | ||
57 | f32 eggbox(s16 x, s16 y, f32 s) | ||
58 | { | ||
59 | const f32 r = 4.f*sqrtf((f32)(x*x + y*y))/s; | ||
60 | const f32 z = expf(-r * 2) * (cosf(0.2f * x) + cosf(0.2f * y)); | ||
61 | return 0.25f+0.25f*z; | ||
62 | } | ||
63 | |||
64 | // A rather dumb sine function :-/ | ||
65 | f32 moresine(s16 x, s16 y, f32 s) | ||
66 | { | ||
67 | const f32 xx=0.3f*(f32)x/s; | ||
68 | const f32 yy=12*y/s; | ||
69 | const f32 z = sinf(xx*xx+yy)*sinf(xx+yy*yy); | ||
70 | return 0.25f + 0.25f * z; | ||
71 | } | ||
72 | |||
73 | // A simple function | ||
74 | f32 justexp(s16 x, s16 y, f32 s) | ||
75 | { | ||
76 | const f32 xx=6*x/s; | ||
77 | const f32 yy=6*y/s; | ||
78 | const f32 z = (xx*xx+yy*yy); | ||
79 | return 0.3f*z*cosf(xx*yy); | ||
80 | } | ||
81 | |||
82 | /* A simple class for representing heightmaps. Most of this should be obvious. */ | ||
83 | |||
84 | class HeightMap | ||
85 | { | ||
86 | private: | ||
87 | const u16 Width; | ||
88 | const u16 Height; | ||
89 | f32 s; | ||
90 | core::array<f32> data; | ||
91 | public: | ||
92 | HeightMap(u16 _w, u16 _h) : Width(_w), Height(_h), s(0.f), data(0) | ||
93 | { | ||
94 | s = sqrtf((f32)(Width * Width + Height * Height)); | ||
95 | data.set_used(Width * Height); | ||
96 | } | ||
97 | |||
98 | // Fill the heightmap with values generated from f. | ||
99 | void generate(generate_func f) | ||
100 | { | ||
101 | u32 i=0; | ||
102 | for(u16 y = 0; y < Height; ++y) | ||
103 | for(u16 x = 0; x < Width; ++x) | ||
104 | set(i++, calc(f, x, y)); | ||
105 | } | ||
106 | |||
107 | u16 height() const { return Height; } | ||
108 | u16 width() const { return Width; } | ||
109 | |||
110 | f32 calc(generate_func f, u16 x, u16 y) const | ||
111 | { | ||
112 | const f32 xx = (f32)x - Width*0.5f; | ||
113 | const f32 yy = (f32)y - Height*0.5f; | ||
114 | return f((u16)xx, (u16)yy, s); | ||
115 | } | ||
116 | |||
117 | // The height at (x, y) is at position y * Width + x. | ||
118 | |||
119 | void set(u16 x, u16 y, f32 z) { data[y * Width + x] = z; } | ||
120 | void set(u32 i, f32 z) { data[i] = z; } | ||
121 | f32 get(u16 x, u16 y) const { return data[y * Width + x]; } | ||
122 | |||
123 | /* The only difficult part. This considers the normal at (x, y) to | ||
124 | be the cross product of the vectors between the adjacent points | ||
125 | in the horizontal and vertical directions. | ||
126 | |||
127 | s is a scaling factor, which is necessary if the height units are | ||
128 | different from the coordinate units; for example, if your map has | ||
129 | heights in metres and the coordinates are in units of a | ||
130 | kilometer. */ | ||
131 | |||
132 | vector3df getnormal(u16 x, u16 y, f32 s) const | ||
133 | { | ||
134 | const f32 zc = get(x, y); | ||
135 | f32 zl, zr, zu, zd; | ||
136 | |||
137 | if (x == 0) | ||
138 | { | ||
139 | zr = get(x + 1, y); | ||
140 | zl = zc + zc - zr; | ||
141 | } | ||
142 | else if (x == Width - 1) | ||
143 | { | ||
144 | zl = get(x - 1, y); | ||
145 | zr = zc + zc - zl; | ||
146 | } | ||
147 | else | ||
148 | { | ||
149 | zr = get(x + 1, y); | ||
150 | zl = get(x - 1, y); | ||
151 | } | ||
152 | |||
153 | if (y == 0) | ||
154 | { | ||
155 | zd = get(x, y + 1); | ||
156 | zu = zc + zc - zd; | ||
157 | } | ||
158 | else if (y == Height - 1) | ||
159 | { | ||
160 | zu = get(x, y - 1); | ||
161 | zd = zc + zc - zu; | ||
162 | } | ||
163 | else | ||
164 | { | ||
165 | zd = get(x, y + 1); | ||
166 | zu = get(x, y - 1); | ||
167 | } | ||
168 | |||
169 | return vector3df(s * 2 * (zl - zr), 4, s * 2 * (zd - zu)).normalize(); | ||
170 | } | ||
171 | }; | ||
172 | |||
173 | /* A class which generates a mesh from a heightmap. */ | ||
174 | class TMesh | ||
175 | { | ||
176 | private: | ||
177 | u16 Width; | ||
178 | u16 Height; | ||
179 | f32 Scale; | ||
180 | public: | ||
181 | SMesh* Mesh; | ||
182 | |||
183 | TMesh() : Mesh(0), Width(0), Height(0), Scale(1.f) | ||
184 | { | ||
185 | Mesh = new SMesh(); | ||
186 | } | ||
187 | |||
188 | ~TMesh() | ||
189 | { | ||
190 | Mesh->drop(); | ||
191 | } | ||
192 | |||
193 | // Unless the heightmap is small, it won't all fit into a single | ||
194 | // SMeshBuffer. This function chops it into pieces and generates a | ||
195 | // buffer from each one. | ||
196 | |||
197 | void init(const HeightMap &hm, f32 scale, colour_func cf, IVideoDriver *driver) | ||
198 | { | ||
199 | Scale = scale; | ||
200 | |||
201 | const u32 mp = driver -> getMaximalPrimitiveCount(); | ||
202 | Width = hm.width(); | ||
203 | Height = hm.height(); | ||
204 | |||
205 | const u32 sw = mp / (6 * Height); // the width of each piece | ||
206 | |||
207 | u32 i=0; | ||
208 | for(u32 y0 = 0; y0 < Height; y0 += sw) | ||
209 | { | ||
210 | u16 y1 = y0 + sw; | ||
211 | if (y1 >= Height) | ||
212 | y1 = Height - 1; // the last one might be narrower | ||
213 | addstrip(hm, cf, y0, y1, i); | ||
214 | ++i; | ||
215 | } | ||
216 | if (i<Mesh->getMeshBufferCount()) | ||
217 | { | ||
218 | // clear the rest | ||
219 | for (u32 j=i; j<Mesh->getMeshBufferCount(); ++j) | ||
220 | { | ||
221 | Mesh->getMeshBuffer(j)->drop(); | ||
222 | } | ||
223 | Mesh->MeshBuffers.erase(i,Mesh->getMeshBufferCount()-i); | ||
224 | } | ||
225 | // set dirty flag to make sure that hardware copies of this | ||
226 | // buffer are also updated, see IMesh::setHardwareMappingHint | ||
227 | Mesh->setDirty(); | ||
228 | Mesh->recalculateBoundingBox(); | ||
229 | } | ||
230 | |||
231 | // Generate a SMeshBuffer which represents all the vertices and | ||
232 | // indices for values of y between y0 and y1, and add it to the | ||
233 | // mesh. | ||
234 | |||
235 | void addstrip(const HeightMap &hm, colour_func cf, u16 y0, u16 y1, u32 bufNum) | ||
236 | { | ||
237 | SMeshBuffer *buf = 0; | ||
238 | if (bufNum<Mesh->getMeshBufferCount()) | ||
239 | { | ||
240 | buf = (SMeshBuffer*)Mesh->getMeshBuffer(bufNum); | ||
241 | } | ||
242 | else | ||
243 | { | ||
244 | // create new buffer | ||
245 | buf = new SMeshBuffer(); | ||
246 | Mesh->addMeshBuffer(buf); | ||
247 | // to simplify things we drop here but continue using buf | ||
248 | buf->drop(); | ||
249 | } | ||
250 | buf->Vertices.set_used((1 + y1 - y0) * Width); | ||
251 | |||
252 | u32 i=0; | ||
253 | for (u16 y = y0; y <= y1; ++y) | ||
254 | { | ||
255 | for (u16 x = 0; x < Width; ++x) | ||
256 | { | ||
257 | const f32 z = hm.get(x, y); | ||
258 | const f32 xx = (f32)x/(f32)Width; | ||
259 | const f32 yy = (f32)y/(f32)Height; | ||
260 | |||
261 | S3DVertex& v = buf->Vertices[i++]; | ||
262 | v.Pos.set(x, Scale * z, y); | ||
263 | v.Normal.set(hm.getnormal(x, y, Scale)); | ||
264 | v.Color=cf(xx, yy, z); | ||
265 | v.TCoords.set(xx, yy); | ||
266 | } | ||
267 | } | ||
268 | |||
269 | buf->Indices.set_used(6 * (Width - 1) * (y1 - y0)); | ||
270 | i=0; | ||
271 | for(u16 y = y0; y < y1; ++y) | ||
272 | { | ||
273 | for(u16 x = 0; x < Width - 1; ++x) | ||
274 | { | ||
275 | const u16 n = (y-y0) * Width + x; | ||
276 | buf->Indices[i]=n; | ||
277 | buf->Indices[++i]=n + Width; | ||
278 | buf->Indices[++i]=n + Width + 1; | ||
279 | buf->Indices[++i]=n + Width + 1; | ||
280 | buf->Indices[++i]=n + 1; | ||
281 | buf->Indices[++i]=n; | ||
282 | ++i; | ||
283 | } | ||
284 | } | ||
285 | |||
286 | buf->recalculateBoundingBox(); | ||
287 | } | ||
288 | }; | ||
289 | |||
290 | /* | ||
291 | Our event receiver implementation, taken from tutorial 4. | ||
292 | */ | ||
293 | class MyEventReceiver : public IEventReceiver | ||
294 | { | ||
295 | public: | ||
296 | // This is the one method that we have to implement | ||
297 | virtual bool OnEvent(const SEvent& event) | ||
298 | { | ||
299 | // Remember whether each key is down or up | ||
300 | if (event.EventType == irr::EET_KEY_INPUT_EVENT) | ||
301 | KeyIsDown[event.KeyInput.Key] = event.KeyInput.PressedDown; | ||
302 | |||
303 | return false; | ||
304 | } | ||
305 | |||
306 | // This is used to check whether a key is being held down | ||
307 | virtual bool IsKeyDown(EKEY_CODE keyCode) const | ||
308 | { | ||
309 | return KeyIsDown[keyCode]; | ||
310 | } | ||
311 | |||
312 | MyEventReceiver() | ||
313 | { | ||
314 | for (u32 i=0; i<KEY_KEY_CODES_COUNT; ++i) | ||
315 | KeyIsDown[i] = false; | ||
316 | } | ||
317 | |||
318 | private: | ||
319 | // We use this array to store the current state of each key | ||
320 | bool KeyIsDown[KEY_KEY_CODES_COUNT]; | ||
321 | }; | ||
322 | |||
323 | /* | ||
324 | Much of this is code taken from some of the examples. We merely set | ||
325 | up a mesh from a heightmap, light it with a moving light, and allow | ||
326 | the user to navigate around it. | ||
327 | */ | ||
328 | |||
329 | int main(int argc, char* argv[]) | ||
330 | { | ||
331 | // ask user for driver | ||
332 | video::E_DRIVER_TYPE driverType=driverChoiceConsole(); | ||
333 | if (driverType==video::EDT_COUNT) | ||
334 | return 1; | ||
335 | |||
336 | MyEventReceiver receiver; | ||
337 | IrrlichtDevice* device = createDevice(driverType, | ||
338 | core::dimension2du(800, 600), 32, false, false, false, | ||
339 | &receiver); | ||
340 | |||
341 | if(device == 0) | ||
342 | return 1; | ||
343 | |||
344 | IVideoDriver *driver = device->getVideoDriver(); | ||
345 | ISceneManager *smgr = device->getSceneManager(); | ||
346 | device->setWindowCaption(L"Irrlicht Example for SMesh usage."); | ||
347 | |||
348 | /* | ||
349 | Create the custom mesh and initialize with a heightmap | ||
350 | */ | ||
351 | TMesh mesh; | ||
352 | HeightMap hm = HeightMap(255, 255); | ||
353 | hm.generate(eggbox); | ||
354 | mesh.init(hm, 50.f, grey, driver); | ||
355 | |||
356 | // Add the mesh to the scene graph | ||
357 | IMeshSceneNode* meshnode = smgr -> addMeshSceneNode(mesh.Mesh); | ||
358 | meshnode->setMaterialFlag(video::EMF_BACK_FACE_CULLING, false); | ||
359 | |||
360 | // light is just for nice effects | ||
361 | ILightSceneNode *node = smgr->addLightSceneNode(0, vector3df(0,100,0), | ||
362 | SColorf(1.0f, 0.6f, 0.7f, 1.0f), 500.0f); | ||
363 | if (node) | ||
364 | { | ||
365 | node->getLightData().Attenuation.set(0.f, 1.f/500.f, 0.f); | ||
366 | ISceneNodeAnimator* anim = smgr->createFlyCircleAnimator(vector3df(0,150,0),250.0f); | ||
367 | if (anim) | ||
368 | { | ||
369 | node->addAnimator(anim); | ||
370 | anim->drop(); | ||
371 | } | ||
372 | } | ||
373 | |||
374 | ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS(); | ||
375 | if (camera) | ||
376 | { | ||
377 | camera->setPosition(vector3df(-20.f, 150.f, -20.f)); | ||
378 | camera->setTarget(vector3df(200.f, -80.f, 150.f)); | ||
379 | camera->setFarValue(20000.0f); | ||
380 | } | ||
381 | |||
382 | /* | ||
383 | Just a usual render loop with event handling. The custom mesh is | ||
384 | a usual part of the scene graph which gets rendered by drawAll. | ||
385 | */ | ||
386 | while(device->run()) | ||
387 | { | ||
388 | if(!device->isWindowActive()) | ||
389 | { | ||
390 | device->sleep(100); | ||
391 | continue; | ||
392 | } | ||
393 | |||
394 | if(receiver.IsKeyDown(irr::KEY_KEY_W)) | ||
395 | { | ||
396 | meshnode->setMaterialFlag(video::EMF_WIREFRAME, !meshnode->getMaterial(0).Wireframe); | ||
397 | } | ||
398 | else if(receiver.IsKeyDown(irr::KEY_KEY_1)) | ||
399 | { | ||
400 | hm.generate(eggbox); | ||
401 | mesh.init(hm, 50.f, grey, driver); | ||
402 | } | ||
403 | else if(receiver.IsKeyDown(irr::KEY_KEY_2)) | ||
404 | { | ||
405 | hm.generate(moresine); | ||
406 | mesh.init(hm, 50.f, yellow, driver); | ||
407 | } | ||
408 | else if(receiver.IsKeyDown(irr::KEY_KEY_3)) | ||
409 | { | ||
410 | hm.generate(justexp); | ||
411 | mesh.init(hm, 50.f, yellow, driver); | ||
412 | } | ||
413 | |||
414 | driver->beginScene(true, true, SColor(0xff000000)); | ||
415 | smgr->drawAll(); | ||
416 | driver->endScene(); | ||
417 | } | ||
418 | |||
419 | device->drop(); | ||
420 | |||
421 | return 0; | ||
422 | } | ||
423 | |||
424 | /* | ||
425 | That's it! Just compile and play around with the program. | ||
426 | **/ | ||