diff options
author | David Walter Seikel | 2014-01-13 19:47:58 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-01-13 19:47:58 +1000 |
commit | f9158592e1478b2013afc7041d9ed041cf2d2f4a (patch) | |
tree | b16e389d7988700e21b4c9741044cefa536dcbae /libraries/irrlicht-1.8.1/examples/22.MaterialViewer | |
parent | Libraries readme updated with change markers and more of the Irrlicht changes. (diff) | |
download | SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.zip SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.gz SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.bz2 SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.xz |
Update Irrlicht to 1.8.1. Include actual change markers this time. lol
Diffstat (limited to 'libraries/irrlicht-1.8.1/examples/22.MaterialViewer')
9 files changed, 2365 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/Makefile b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/Makefile new file mode 100644 index 0000000..8016988 --- /dev/null +++ b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/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 = 22.MaterialViewer | ||
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/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.cbp b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.cbp new file mode 100644 index 0000000..3626d10 --- /dev/null +++ b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.cbp | |||
@@ -0,0 +1,55 @@ | |||
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 22 Material Viewer" /> | ||
6 | <Option pch_mode="0" /> | ||
7 | <Option compiler="gcc" /> | ||
8 | <Build> | ||
9 | <Target title="Windows"> | ||
10 | <Option platforms="Windows;" /> | ||
11 | <Option output="..\..\bin\Win32-gcc\MaterialViewer" prefix_auto="0" extension_auto="1" /> | ||
12 | <Option type="1" /> | ||
13 | <Option compiler="gcc" /> | ||
14 | <Option projectResourceIncludeDirsRelation="1" /> | ||
15 | <Compiler> | ||
16 | <Add option="-g" /> | ||
17 | </Compiler> | ||
18 | <Linker> | ||
19 | <Add directory="..\..\lib\Win32-gcc" /> | ||
20 | </Linker> | ||
21 | </Target> | ||
22 | <Target title="Linux"> | ||
23 | <Option platforms="Unix;" /> | ||
24 | <Option output="..\..\bin\Linux\MaterialViewer" prefix_auto="0" extension_auto="0" /> | ||
25 | <Option type="1" /> | ||
26 | <Option compiler="gcc" /> | ||
27 | <Compiler> | ||
28 | <Add option="-g" /> | ||
29 | </Compiler> | ||
30 | <Linker> | ||
31 | <Add library="Xxf86vm" /> | ||
32 | <Add library="Xcursor" /> | ||
33 | <Add library="GL" /> | ||
34 | <Add directory="..\..\lib\Linux" /> | ||
35 | </Linker> | ||
36 | </Target> | ||
37 | </Build> | ||
38 | <VirtualTargets> | ||
39 | <Add alias="All" targets="Windows;Linux;" /> | ||
40 | </VirtualTargets> | ||
41 | <Compiler> | ||
42 | <Add option="-g" /> | ||
43 | <Add directory="..\..\include" /> | ||
44 | </Compiler> | ||
45 | <Linker> | ||
46 | <Add library="Irrlicht" /> | ||
47 | </Linker> | ||
48 | <Unit filename="main.cpp" /> | ||
49 | <Extensions> | ||
50 | <code_completion /> | ||
51 | <debugger /> | ||
52 | <envvars /> | ||
53 | </Extensions> | ||
54 | </Project> | ||
55 | </CodeBlocks_project_file> | ||
diff --git a/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.dev b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.dev new file mode 100644 index 0000000..dfd9d4d --- /dev/null +++ b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.dev | |||
@@ -0,0 +1,59 @@ | |||
1 | [Project] | ||
2 | FileName=example.dev | ||
3 | Name=Irrlicht Example 22 Material Viewer | ||
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=22.MaterialViewer.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/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.vcproj b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.vcproj new file mode 100644 index 0000000..7419359 --- /dev/null +++ b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.vcproj | |||
@@ -0,0 +1,229 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | ||
2 | <VisualStudioProject | ||
3 | ProjectType="Visual C++" | ||
4 | Version="7.10" | ||
5 | Name="22.MaterialViewer" | ||
6 | ProjectGUID="{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}" | ||
7 | TargetFrameworkVersion="131072" | ||
8 | > | ||
9 | <Platforms> | ||
10 | <Platform | ||
11 | Name="Win32" | ||
12 | /> | ||
13 | </Platforms> | ||
14 | <ToolFiles> | ||
15 | </ToolFiles> | ||
16 | <Configurations> | ||
17 | <Configuration | ||
18 | Name="Release|Win32" | ||
19 | OutputDirectory=".\Release" | ||
20 | IntermediateDirectory=".\Release" | ||
21 | ConfigurationType="1" | ||
22 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
23 | UseOfMFC="0" | ||
24 | ATLMinimizesCRunTimeLibraryUsage="false" | ||
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 | TypeLibraryName=".\Release/MaterialViewer.tlb" | ||
42 | HeaderFileName="" | ||
43 | /> | ||
44 | <Tool | ||
45 | Name="VCCLCompilerTool" | ||
46 | Optimization="2" | ||
47 | InlineFunctionExpansion="1" | ||
48 | AdditionalIncludeDirectories="..\..\include" | ||
49 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" | ||
50 | StringPooling="true" | ||
51 | RuntimeLibrary="0" | ||
52 | EnableFunctionLevelLinking="true" | ||
53 | UsePrecompiledHeader="0" | ||
54 | PrecompiledHeaderFile=".\Release/MaterialViewer.pch" | ||
55 | AssemblerListingLocation=".\Release/" | ||
56 | ObjectFile=".\Release/" | ||
57 | ProgramDataBaseFileName=".\Release/" | ||
58 | WarningLevel="3" | ||
59 | SuppressStartupBanner="true" | ||
60 | CompileAs="0" | ||
61 | /> | ||
62 | <Tool | ||
63 | Name="VCManagedResourceCompilerTool" | ||
64 | /> | ||
65 | <Tool | ||
66 | Name="VCResourceCompilerTool" | ||
67 | PreprocessorDefinitions="NDEBUG" | ||
68 | Culture="3079" | ||
69 | /> | ||
70 | <Tool | ||
71 | Name="VCPreLinkEventTool" | ||
72 | /> | ||
73 | <Tool | ||
74 | Name="VCLinkerTool" | ||
75 | OutputFile="..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe" | ||
76 | LinkIncremental="0" | ||
77 | SuppressStartupBanner="true" | ||
78 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | ||
79 | ProgramDatabaseFile=".\Release/MaterialViewer.pdb" | ||
80 | SubSystem="1" | ||
81 | RandomizedBaseAddress="1" | ||
82 | DataExecutionPrevention="0" | ||
83 | TargetMachine="1" | ||
84 | /> | ||
85 | <Tool | ||
86 | Name="VCALinkTool" | ||
87 | /> | ||
88 | <Tool | ||
89 | Name="VCManifestTool" | ||
90 | /> | ||
91 | <Tool | ||
92 | Name="VCXDCMakeTool" | ||
93 | /> | ||
94 | <Tool | ||
95 | Name="VCBscMakeTool" | ||
96 | /> | ||
97 | <Tool | ||
98 | Name="VCFxCopTool" | ||
99 | /> | ||
100 | <Tool | ||
101 | Name="VCAppVerifierTool" | ||
102 | /> | ||
103 | <Tool | ||
104 | Name="VCPostBuildEventTool" | ||
105 | /> | ||
106 | </Configuration> | ||
107 | <Configuration | ||
108 | Name="Debug|Win32" | ||
109 | OutputDirectory=".\Debug" | ||
110 | IntermediateDirectory=".\Debug" | ||
111 | ConfigurationType="1" | ||
112 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
113 | UseOfMFC="0" | ||
114 | ATLMinimizesCRunTimeLibraryUsage="false" | ||
115 | CharacterSet="2" | ||
116 | > | ||
117 | <Tool | ||
118 | Name="VCPreBuildEventTool" | ||
119 | /> | ||
120 | <Tool | ||
121 | Name="VCCustomBuildTool" | ||
122 | /> | ||
123 | <Tool | ||
124 | Name="VCXMLDataGeneratorTool" | ||
125 | /> | ||
126 | <Tool | ||
127 | Name="VCWebServiceProxyGeneratorTool" | ||
128 | /> | ||
129 | <Tool | ||
130 | Name="VCMIDLTool" | ||
131 | TypeLibraryName=".\Debug/MaterialViewer.tlb" | ||
132 | HeaderFileName="" | ||
133 | /> | ||
134 | <Tool | ||
135 | Name="VCCLCompilerTool" | ||
136 | Optimization="0" | ||
137 | AdditionalIncludeDirectories="..\..\include" | ||
138 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" | ||
139 | BasicRuntimeChecks="3" | ||
140 | RuntimeLibrary="1" | ||
141 | UsePrecompiledHeader="0" | ||
142 | PrecompiledHeaderFile=".\Debug/MaterialViewer.pch" | ||
143 | AssemblerListingLocation=".\Debug/" | ||
144 | ObjectFile=".\Debug/" | ||
145 | ProgramDataBaseFileName=".\Debug/" | ||
146 | WarningLevel="3" | ||
147 | SuppressStartupBanner="true" | ||
148 | DebugInformationFormat="4" | ||
149 | CompileAs="0" | ||
150 | /> | ||
151 | <Tool | ||
152 | Name="VCManagedResourceCompilerTool" | ||
153 | /> | ||
154 | <Tool | ||
155 | Name="VCResourceCompilerTool" | ||
156 | PreprocessorDefinitions="_DEBUG" | ||
157 | Culture="3079" | ||
158 | /> | ||
159 | <Tool | ||
160 | Name="VCPreLinkEventTool" | ||
161 | /> | ||
162 | <Tool | ||
163 | Name="VCLinkerTool" | ||
164 | OutputFile="..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe" | ||
165 | LinkIncremental="0" | ||
166 | SuppressStartupBanner="true" | ||
167 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | ||
168 | GenerateDebugInformation="true" | ||
169 | ProgramDatabaseFile=".\Debug/MaterialViewer.pdb" | ||
170 | SubSystem="1" | ||
171 | RandomizedBaseAddress="1" | ||
172 | DataExecutionPrevention="0" | ||
173 | TargetMachine="1" | ||
174 | /> | ||
175 | <Tool | ||
176 | Name="VCALinkTool" | ||
177 | /> | ||
178 | <Tool | ||
179 | Name="VCManifestTool" | ||
180 | /> | ||
181 | <Tool | ||
182 | Name="VCXDCMakeTool" | ||
183 | /> | ||
184 | <Tool | ||
185 | Name="VCBscMakeTool" | ||
186 | /> | ||
187 | <Tool | ||
188 | Name="VCFxCopTool" | ||
189 | /> | ||
190 | <Tool | ||
191 | Name="VCAppVerifierTool" | ||
192 | /> | ||
193 | <Tool | ||
194 | Name="VCPostBuildEventTool" | ||
195 | /> | ||
196 | </Configuration> | ||
197 | </Configurations> | ||
198 | <References> | ||
199 | </References> | ||
200 | <Files> | ||
201 | <File | ||
202 | RelativePath="main.cpp" | ||
203 | > | ||
204 | <FileConfiguration | ||
205 | Name="Release|Win32" | ||
206 | > | ||
207 | <Tool | ||
208 | Name="VCCLCompilerTool" | ||
209 | Optimization="2" | ||
210 | AdditionalIncludeDirectories="" | ||
211 | PreprocessorDefinitions="" | ||
212 | /> | ||
213 | </FileConfiguration> | ||
214 | <FileConfiguration | ||
215 | Name="Debug|Win32" | ||
216 | > | ||
217 | <Tool | ||
218 | Name="VCCLCompilerTool" | ||
219 | Optimization="0" | ||
220 | AdditionalIncludeDirectories="" | ||
221 | PreprocessorDefinitions="" | ||
222 | BasicRuntimeChecks="3" | ||
223 | /> | ||
224 | </FileConfiguration> | ||
225 | </File> | ||
226 | </Files> | ||
227 | <Globals> | ||
228 | </Globals> | ||
229 | </VisualStudioProject> | ||
diff --git a/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc10.vcxproj b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc10.vcxproj new file mode 100644 index 0000000..6a8b5c8 --- /dev/null +++ b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc10.vcxproj | |||
@@ -0,0 +1,231 @@ | |||
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>22.MaterialViewer</ProjectName> | ||
23 | <ProjectGuid>{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}</ProjectGuid> | ||
24 | <RootNamespace>MaterialViewer</RootNamespace> | ||
25 | </PropertyGroup> | ||
26 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
27 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | ||
28 | <ConfigurationType>Application</ConfigurationType> | ||
29 | <CharacterSet>MultiByte</CharacterSet> | ||
30 | </PropertyGroup> | ||
31 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | ||
32 | <ConfigurationType>Application</ConfigurationType> | ||
33 | <CharacterSet>MultiByte</CharacterSet> | ||
34 | </PropertyGroup> | ||
35 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | ||
36 | <ConfigurationType>Application</ConfigurationType> | ||
37 | <CharacterSet>MultiByte</CharacterSet> | ||
38 | </PropertyGroup> | ||
39 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | ||
40 | <ConfigurationType>Application</ConfigurationType> | ||
41 | <CharacterSet>MultiByte</CharacterSet> | ||
42 | </PropertyGroup> | ||
43 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
44 | <ImportGroup Label="ExtensionSettings"> | ||
45 | </ImportGroup> | ||
46 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> | ||
47 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
48 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | ||
49 | </ImportGroup> | ||
50 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> | ||
51 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
52 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | ||
53 | </ImportGroup> | ||
54 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> | ||
55 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
56 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | ||
57 | </ImportGroup> | ||
58 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> | ||
59 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
60 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | ||
61 | </ImportGroup> | ||
62 | <PropertyGroup Label="UserMacros" /> | ||
63 | <PropertyGroup> | ||
64 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> | ||
65 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | ||
66 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | ||
67 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | ||
68 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | ||
69 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | ||
70 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | ||
71 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | ||
72 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | ||
73 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | ||
74 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | ||
75 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | ||
76 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | ||
77 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | ||
78 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | ||
79 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | ||
80 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | ||
81 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | ||
82 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | ||
83 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | ||
84 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | ||
85 | </PropertyGroup> | ||
86 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
87 | <Midl> | ||
88 | <TypeLibraryName>.\Release/MaterialViewer.tlb</TypeLibraryName> | ||
89 | <HeaderFileName> | ||
90 | </HeaderFileName> | ||
91 | </Midl> | ||
92 | <ClCompile> | ||
93 | <Optimization>MaxSpeed</Optimization> | ||
94 | <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> | ||
95 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
96 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
97 | <StringPooling>true</StringPooling> | ||
98 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
99 | <FunctionLevelLinking>true</FunctionLevelLinking> | ||
100 | <PrecompiledHeader> | ||
101 | </PrecompiledHeader> | ||
102 | <WarningLevel>Level3</WarningLevel> | ||
103 | </ClCompile> | ||
104 | <ResourceCompile> | ||
105 | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
106 | <Culture>0x0c07</Culture> | ||
107 | </ResourceCompile> | ||
108 | <Link> | ||
109 | <OutputFile>..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe</OutputFile> | ||
110 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
111 | <ProgramDatabaseFile>.\Release/MaterialViewer.pdb</ProgramDatabaseFile> | ||
112 | <SubSystem>Console</SubSystem> | ||
113 | <DataExecutionPrevention> | ||
114 | </DataExecutionPrevention> | ||
115 | </Link> | ||
116 | </ItemDefinitionGroup> | ||
117 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
118 | <Midl> | ||
119 | <TypeLibraryName>.\Release/MaterialViewer.tlb</TypeLibraryName> | ||
120 | <HeaderFileName> | ||
121 | </HeaderFileName> | ||
122 | </Midl> | ||
123 | <ClCompile> | ||
124 | <Optimization>MaxSpeed</Optimization> | ||
125 | <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> | ||
126 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
127 | <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
128 | <StringPooling>true</StringPooling> | ||
129 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
130 | <FunctionLevelLinking>true</FunctionLevelLinking> | ||
131 | <PrecompiledHeader> | ||
132 | </PrecompiledHeader> | ||
133 | <WarningLevel>Level3</WarningLevel> | ||
134 | </ClCompile> | ||
135 | <ResourceCompile> | ||
136 | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
137 | <Culture>0x0c07</Culture> | ||
138 | </ResourceCompile> | ||
139 | <Link> | ||
140 | <OutputFile>..\..\bin\Win64-VisualStudio\22.MaterialViewer.exe</OutputFile> | ||
141 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
142 | <ProgramDatabaseFile>.\Release/MaterialViewer.pdb</ProgramDatabaseFile> | ||
143 | <SubSystem>Console</SubSystem> | ||
144 | <DataExecutionPrevention> | ||
145 | </DataExecutionPrevention> | ||
146 | </Link> | ||
147 | </ItemDefinitionGroup> | ||
148 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
149 | <Midl> | ||
150 | <TypeLibraryName>.\Debug/MaterialViewer.tlb</TypeLibraryName> | ||
151 | <HeaderFileName> | ||
152 | </HeaderFileName> | ||
153 | </Midl> | ||
154 | <ClCompile> | ||
155 | <Optimization>Disabled</Optimization> | ||
156 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
157 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
158 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | ||
159 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||
160 | <PrecompiledHeader> | ||
161 | </PrecompiledHeader> | ||
162 | <WarningLevel>Level3</WarningLevel> | ||
163 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | ||
164 | </ClCompile> | ||
165 | <ResourceCompile> | ||
166 | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
167 | <Culture>0x0c07</Culture> | ||
168 | </ResourceCompile> | ||
169 | <Link> | ||
170 | <OutputFile>..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe</OutputFile> | ||
171 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
172 | <GenerateDebugInformation>true</GenerateDebugInformation> | ||
173 | <ProgramDatabaseFile>.\Debug/MaterialViewer.pdb</ProgramDatabaseFile> | ||
174 | <SubSystem>Console</SubSystem> | ||
175 | <DataExecutionPrevention> | ||
176 | </DataExecutionPrevention> | ||
177 | </Link> | ||
178 | </ItemDefinitionGroup> | ||
179 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
180 | <Midl> | ||
181 | <TypeLibraryName>.\Debug/MaterialViewer.tlb</TypeLibraryName> | ||
182 | <HeaderFileName> | ||
183 | </HeaderFileName> | ||
184 | </Midl> | ||
185 | <ClCompile> | ||
186 | <Optimization>Disabled</Optimization> | ||
187 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
188 | <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
189 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | ||
190 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||
191 | <PrecompiledHeader> | ||
192 | </PrecompiledHeader> | ||
193 | <WarningLevel>Level3</WarningLevel> | ||
194 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | ||
195 | </ClCompile> | ||
196 | <ResourceCompile> | ||
197 | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
198 | <Culture>0x0c07</Culture> | ||
199 | </ResourceCompile> | ||
200 | <Link> | ||
201 | <OutputFile>..\..\bin\Win64-VisualStudio\22.MaterialViewer.exe</OutputFile> | ||
202 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
203 | <GenerateDebugInformation>true</GenerateDebugInformation> | ||
204 | <ProgramDatabaseFile>.\Debug/MaterialViewer.pdb</ProgramDatabaseFile> | ||
205 | <SubSystem>Console</SubSystem> | ||
206 | <DataExecutionPrevention> | ||
207 | </DataExecutionPrevention> | ||
208 | </Link> | ||
209 | </ItemDefinitionGroup> | ||
210 | <ItemGroup> | ||
211 | <ClCompile Include="main.cpp"> | ||
212 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> | ||
213 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> | ||
214 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
215 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
216 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
217 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
218 | <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> | ||
219 | <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> | ||
220 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> | ||
221 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> | ||
222 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
223 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
224 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
225 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
226 | </ClCompile> | ||
227 | </ItemGroup> | ||
228 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
229 | <ImportGroup Label="ExtensionTargets"> | ||
230 | </ImportGroup> | ||
231 | </Project> \ No newline at end of file | ||
diff --git a/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc11.vcxproj b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc11.vcxproj new file mode 100644 index 0000000..6ea9a2b --- /dev/null +++ b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc11.vcxproj | |||
@@ -0,0 +1,235 @@ | |||
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>22.MaterialViewer</ProjectName> | ||
23 | <ProjectGuid>{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}</ProjectGuid> | ||
24 | <RootNamespace>MaterialViewer</RootNamespace> | ||
25 | </PropertyGroup> | ||
26 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
27 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | ||
28 | <ConfigurationType>Application</ConfigurationType> | ||
29 | <CharacterSet>MultiByte</CharacterSet> | ||
30 | <PlatformToolset>v110</PlatformToolset> | ||
31 | </PropertyGroup> | ||
32 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | ||
33 | <ConfigurationType>Application</ConfigurationType> | ||
34 | <CharacterSet>MultiByte</CharacterSet> | ||
35 | <PlatformToolset>v110</PlatformToolset> | ||
36 | </PropertyGroup> | ||
37 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | ||
38 | <ConfigurationType>Application</ConfigurationType> | ||
39 | <CharacterSet>MultiByte</CharacterSet> | ||
40 | <PlatformToolset>v110</PlatformToolset> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | ||
43 | <ConfigurationType>Application</ConfigurationType> | ||
44 | <CharacterSet>MultiByte</CharacterSet> | ||
45 | <PlatformToolset>v110</PlatformToolset> | ||
46 | </PropertyGroup> | ||
47 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
48 | <ImportGroup Label="ExtensionSettings"> | ||
49 | </ImportGroup> | ||
50 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> | ||
51 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
52 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | ||
53 | </ImportGroup> | ||
54 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> | ||
55 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
56 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | ||
57 | </ImportGroup> | ||
58 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> | ||
59 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
60 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | ||
61 | </ImportGroup> | ||
62 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> | ||
63 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
64 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | ||
65 | </ImportGroup> | ||
66 | <PropertyGroup Label="UserMacros" /> | ||
67 | <PropertyGroup> | ||
68 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> | ||
69 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | ||
70 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | ||
71 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | ||
72 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | ||
73 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | ||
74 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | ||
75 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | ||
76 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | ||
77 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | ||
78 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | ||
79 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | ||
80 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | ||
81 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | ||
82 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | ||
83 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | ||
84 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | ||
85 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | ||
86 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | ||
87 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | ||
88 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | ||
89 | </PropertyGroup> | ||
90 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
91 | <Midl> | ||
92 | <TypeLibraryName>.\Release/MaterialViewer.tlb</TypeLibraryName> | ||
93 | <HeaderFileName> | ||
94 | </HeaderFileName> | ||
95 | </Midl> | ||
96 | <ClCompile> | ||
97 | <Optimization>MaxSpeed</Optimization> | ||
98 | <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> | ||
99 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
100 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
101 | <StringPooling>true</StringPooling> | ||
102 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
103 | <FunctionLevelLinking>true</FunctionLevelLinking> | ||
104 | <PrecompiledHeader> | ||
105 | </PrecompiledHeader> | ||
106 | <WarningLevel>Level3</WarningLevel> | ||
107 | </ClCompile> | ||
108 | <ResourceCompile> | ||
109 | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
110 | <Culture>0x0c07</Culture> | ||
111 | </ResourceCompile> | ||
112 | <Link> | ||
113 | <OutputFile>..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe</OutputFile> | ||
114 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
115 | <ProgramDatabaseFile>.\Release/MaterialViewer.pdb</ProgramDatabaseFile> | ||
116 | <SubSystem>Console</SubSystem> | ||
117 | <DataExecutionPrevention> | ||
118 | </DataExecutionPrevention> | ||
119 | </Link> | ||
120 | </ItemDefinitionGroup> | ||
121 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
122 | <Midl> | ||
123 | <TypeLibraryName>.\Release/MaterialViewer.tlb</TypeLibraryName> | ||
124 | <HeaderFileName> | ||
125 | </HeaderFileName> | ||
126 | </Midl> | ||
127 | <ClCompile> | ||
128 | <Optimization>MaxSpeed</Optimization> | ||
129 | <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> | ||
130 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
131 | <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
132 | <StringPooling>true</StringPooling> | ||
133 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
134 | <FunctionLevelLinking>true</FunctionLevelLinking> | ||
135 | <PrecompiledHeader> | ||
136 | </PrecompiledHeader> | ||
137 | <WarningLevel>Level3</WarningLevel> | ||
138 | </ClCompile> | ||
139 | <ResourceCompile> | ||
140 | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
141 | <Culture>0x0c07</Culture> | ||
142 | </ResourceCompile> | ||
143 | <Link> | ||
144 | <OutputFile>..\..\bin\Win64-VisualStudio\22.MaterialViewer.exe</OutputFile> | ||
145 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
146 | <ProgramDatabaseFile>.\Release/MaterialViewer.pdb</ProgramDatabaseFile> | ||
147 | <SubSystem>Console</SubSystem> | ||
148 | <DataExecutionPrevention> | ||
149 | </DataExecutionPrevention> | ||
150 | </Link> | ||
151 | </ItemDefinitionGroup> | ||
152 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
153 | <Midl> | ||
154 | <TypeLibraryName>.\Debug/MaterialViewer.tlb</TypeLibraryName> | ||
155 | <HeaderFileName> | ||
156 | </HeaderFileName> | ||
157 | </Midl> | ||
158 | <ClCompile> | ||
159 | <Optimization>Disabled</Optimization> | ||
160 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
161 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
162 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | ||
163 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||
164 | <PrecompiledHeader> | ||
165 | </PrecompiledHeader> | ||
166 | <WarningLevel>Level3</WarningLevel> | ||
167 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | ||
168 | </ClCompile> | ||
169 | <ResourceCompile> | ||
170 | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
171 | <Culture>0x0c07</Culture> | ||
172 | </ResourceCompile> | ||
173 | <Link> | ||
174 | <OutputFile>..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe</OutputFile> | ||
175 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
176 | <GenerateDebugInformation>true</GenerateDebugInformation> | ||
177 | <ProgramDatabaseFile>.\Debug/MaterialViewer.pdb</ProgramDatabaseFile> | ||
178 | <SubSystem>Console</SubSystem> | ||
179 | <DataExecutionPrevention> | ||
180 | </DataExecutionPrevention> | ||
181 | </Link> | ||
182 | </ItemDefinitionGroup> | ||
183 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
184 | <Midl> | ||
185 | <TypeLibraryName>.\Debug/MaterialViewer.tlb</TypeLibraryName> | ||
186 | <HeaderFileName> | ||
187 | </HeaderFileName> | ||
188 | </Midl> | ||
189 | <ClCompile> | ||
190 | <Optimization>Disabled</Optimization> | ||
191 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
192 | <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
193 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | ||
194 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||
195 | <PrecompiledHeader> | ||
196 | </PrecompiledHeader> | ||
197 | <WarningLevel>Level3</WarningLevel> | ||
198 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | ||
199 | </ClCompile> | ||
200 | <ResourceCompile> | ||
201 | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
202 | <Culture>0x0c07</Culture> | ||
203 | </ResourceCompile> | ||
204 | <Link> | ||
205 | <OutputFile>..\..\bin\Win64-VisualStudio\22.MaterialViewer.exe</OutputFile> | ||
206 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
207 | <GenerateDebugInformation>true</GenerateDebugInformation> | ||
208 | <ProgramDatabaseFile>.\Debug/MaterialViewer.pdb</ProgramDatabaseFile> | ||
209 | <SubSystem>Console</SubSystem> | ||
210 | <DataExecutionPrevention> | ||
211 | </DataExecutionPrevention> | ||
212 | </Link> | ||
213 | </ItemDefinitionGroup> | ||
214 | <ItemGroup> | ||
215 | <ClCompile Include="main.cpp"> | ||
216 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> | ||
217 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> | ||
218 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
219 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
220 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
221 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
222 | <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> | ||
223 | <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> | ||
224 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> | ||
225 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> | ||
226 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
227 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
228 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
229 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
230 | </ClCompile> | ||
231 | </ItemGroup> | ||
232 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
233 | <ImportGroup Label="ExtensionTargets"> | ||
234 | </ImportGroup> | ||
235 | </Project> \ No newline at end of file | ||
diff --git a/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc8.vcproj b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc8.vcproj new file mode 100644 index 0000000..1e7c0db --- /dev/null +++ b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc8.vcproj | |||
@@ -0,0 +1,231 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | ||
2 | <VisualStudioProject | ||
3 | ProjectType="Visual C++" | ||
4 | Version="8,00" | ||
5 | Name="22.MaterialViewer_vc8" | ||
6 | ProjectGUID="{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}" | ||
7 | RootNamespace="MaterialViewer_vc8" | ||
8 | > | ||
9 | <Platforms> | ||
10 | <Platform | ||
11 | Name="Win32" | ||
12 | /> | ||
13 | </Platforms> | ||
14 | <ToolFiles> | ||
15 | </ToolFiles> | ||
16 | <Configurations> | ||
17 | <Configuration | ||
18 | Name="Release|Win32" | ||
19 | OutputDirectory=".\Release" | ||
20 | IntermediateDirectory=".\Release" | ||
21 | ConfigurationType="1" | ||
22 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
23 | UseOfMFC="0" | ||
24 | ATLMinimizesCRunTimeLibraryUsage="false" | ||
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 | TypeLibraryName=".\Release/MaterialViewer.tlb" | ||
42 | HeaderFileName="" | ||
43 | /> | ||
44 | <Tool | ||
45 | Name="VCCLCompilerTool" | ||
46 | Optimization="2" | ||
47 | InlineFunctionExpansion="1" | ||
48 | AdditionalIncludeDirectories="..\..\include" | ||
49 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" | ||
50 | StringPooling="true" | ||
51 | RuntimeLibrary="0" | ||
52 | EnableFunctionLevelLinking="true" | ||
53 | UsePrecompiledHeader="0" | ||
54 | PrecompiledHeaderFile=".\Release/MaterialViewer.pch" | ||
55 | AssemblerListingLocation=".\Release/" | ||
56 | ObjectFile=".\Release/" | ||
57 | ProgramDataBaseFileName=".\Release/" | ||
58 | WarningLevel="3" | ||
59 | SuppressStartupBanner="true" | ||
60 | CompileAs="0" | ||
61 | /> | ||
62 | <Tool | ||
63 | Name="VCManagedResourceCompilerTool" | ||
64 | /> | ||
65 | <Tool | ||
66 | Name="VCResourceCompilerTool" | ||
67 | PreprocessorDefinitions="NDEBUG" | ||
68 | Culture="3079" | ||
69 | /> | ||
70 | <Tool | ||
71 | Name="VCPreLinkEventTool" | ||
72 | /> | ||
73 | <Tool | ||
74 | Name="VCLinkerTool" | ||
75 | OutputFile="..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe" | ||
76 | LinkIncremental="0" | ||
77 | SuppressStartupBanner="true" | ||
78 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | ||
79 | ProgramDatabaseFile=".\Release/MaterialViewer.pdb" | ||
80 | SubSystem="1" | ||
81 | TargetMachine="1" | ||
82 | /> | ||
83 | <Tool | ||
84 | Name="VCALinkTool" | ||
85 | /> | ||
86 | <Tool | ||
87 | Name="VCManifestTool" | ||
88 | /> | ||
89 | <Tool | ||
90 | Name="VCXDCMakeTool" | ||
91 | /> | ||
92 | <Tool | ||
93 | Name="VCBscMakeTool" | ||
94 | /> | ||
95 | <Tool | ||
96 | Name="VCFxCopTool" | ||
97 | /> | ||
98 | <Tool | ||
99 | Name="VCAppVerifierTool" | ||
100 | /> | ||
101 | <Tool | ||
102 | Name="VCWebDeploymentTool" | ||
103 | /> | ||
104 | <Tool | ||
105 | Name="VCPostBuildEventTool" | ||
106 | /> | ||
107 | </Configuration> | ||
108 | <Configuration | ||
109 | Name="Debug|Win32" | ||
110 | OutputDirectory=".\Debug" | ||
111 | IntermediateDirectory=".\Debug" | ||
112 | ConfigurationType="1" | ||
113 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
114 | UseOfMFC="0" | ||
115 | ATLMinimizesCRunTimeLibraryUsage="false" | ||
116 | CharacterSet="2" | ||
117 | > | ||
118 | <Tool | ||
119 | Name="VCPreBuildEventTool" | ||
120 | /> | ||
121 | <Tool | ||
122 | Name="VCCustomBuildTool" | ||
123 | /> | ||
124 | <Tool | ||
125 | Name="VCXMLDataGeneratorTool" | ||
126 | /> | ||
127 | <Tool | ||
128 | Name="VCWebServiceProxyGeneratorTool" | ||
129 | /> | ||
130 | <Tool | ||
131 | Name="VCMIDLTool" | ||
132 | TypeLibraryName=".\Debug/MaterialViewer.tlb" | ||
133 | HeaderFileName="" | ||
134 | /> | ||
135 | <Tool | ||
136 | Name="VCCLCompilerTool" | ||
137 | Optimization="0" | ||
138 | AdditionalIncludeDirectories="..\..\include" | ||
139 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" | ||
140 | BasicRuntimeChecks="3" | ||
141 | RuntimeLibrary="1" | ||
142 | UsePrecompiledHeader="0" | ||
143 | PrecompiledHeaderFile=".\Debug/MaterialViewer.pch" | ||
144 | AssemblerListingLocation=".\Debug/" | ||
145 | ObjectFile=".\Debug/" | ||
146 | ProgramDataBaseFileName=".\Debug/" | ||
147 | WarningLevel="3" | ||
148 | SuppressStartupBanner="true" | ||
149 | DebugInformationFormat="4" | ||
150 | CompileAs="0" | ||
151 | /> | ||
152 | <Tool | ||
153 | Name="VCManagedResourceCompilerTool" | ||
154 | /> | ||
155 | <Tool | ||
156 | Name="VCResourceCompilerTool" | ||
157 | PreprocessorDefinitions="_DEBUG" | ||
158 | Culture="3079" | ||
159 | /> | ||
160 | <Tool | ||
161 | Name="VCPreLinkEventTool" | ||
162 | /> | ||
163 | <Tool | ||
164 | Name="VCLinkerTool" | ||
165 | OutputFile="..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe" | ||
166 | LinkIncremental="0" | ||
167 | SuppressStartupBanner="true" | ||
168 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | ||
169 | GenerateDebugInformation="true" | ||
170 | ProgramDatabaseFile=".\Debug/MaterialViewer.pdb" | ||
171 | SubSystem="1" | ||
172 | TargetMachine="1" | ||
173 | /> | ||
174 | <Tool | ||
175 | Name="VCALinkTool" | ||
176 | /> | ||
177 | <Tool | ||
178 | Name="VCManifestTool" | ||
179 | /> | ||
180 | <Tool | ||
181 | Name="VCXDCMakeTool" | ||
182 | /> | ||
183 | <Tool | ||
184 | Name="VCBscMakeTool" | ||
185 | /> | ||
186 | <Tool | ||
187 | Name="VCFxCopTool" | ||
188 | /> | ||
189 | <Tool | ||
190 | Name="VCAppVerifierTool" | ||
191 | /> | ||
192 | <Tool | ||
193 | Name="VCWebDeploymentTool" | ||
194 | /> | ||
195 | <Tool | ||
196 | Name="VCPostBuildEventTool" | ||
197 | /> | ||
198 | </Configuration> | ||
199 | </Configurations> | ||
200 | <References> | ||
201 | </References> | ||
202 | <Files> | ||
203 | <File | ||
204 | RelativePath="main.cpp" | ||
205 | > | ||
206 | <FileConfiguration | ||
207 | Name="Release|Win32" | ||
208 | > | ||
209 | <Tool | ||
210 | Name="VCCLCompilerTool" | ||
211 | Optimization="2" | ||
212 | AdditionalIncludeDirectories="" | ||
213 | PreprocessorDefinitions="" | ||
214 | /> | ||
215 | </FileConfiguration> | ||
216 | <FileConfiguration | ||
217 | Name="Debug|Win32" | ||
218 | > | ||
219 | <Tool | ||
220 | Name="VCCLCompilerTool" | ||
221 | Optimization="0" | ||
222 | AdditionalIncludeDirectories="" | ||
223 | PreprocessorDefinitions="" | ||
224 | BasicRuntimeChecks="3" | ||
225 | /> | ||
226 | </FileConfiguration> | ||
227 | </File> | ||
228 | </Files> | ||
229 | <Globals> | ||
230 | </Globals> | ||
231 | </VisualStudioProject> | ||
diff --git a/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc9.vcproj b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc9.vcproj new file mode 100644 index 0000000..8ce9803 --- /dev/null +++ b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc9.vcproj | |||
@@ -0,0 +1,230 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | ||
2 | <VisualStudioProject | ||
3 | ProjectType="Visual C++" | ||
4 | Version="9.00" | ||
5 | Name="22.MaterialViewer_vc9" | ||
6 | ProjectGUID="{F4C8112D-57A8-4D01-BB62-BAC6A09A6902}" | ||
7 | RootNamespace="MaterialViewer_vc9" | ||
8 | TargetFrameworkVersion="131072" | ||
9 | > | ||
10 | <Platforms> | ||
11 | <Platform | ||
12 | Name="Win32" | ||
13 | /> | ||
14 | </Platforms> | ||
15 | <ToolFiles> | ||
16 | </ToolFiles> | ||
17 | <Configurations> | ||
18 | <Configuration | ||
19 | Name="Release|Win32" | ||
20 | OutputDirectory=".\Release" | ||
21 | IntermediateDirectory=".\Release" | ||
22 | ConfigurationType="1" | ||
23 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
24 | UseOfMFC="0" | ||
25 | ATLMinimizesCRunTimeLibraryUsage="false" | ||
26 | CharacterSet="2" | ||
27 | > | ||
28 | <Tool | ||
29 | Name="VCPreBuildEventTool" | ||
30 | /> | ||
31 | <Tool | ||
32 | Name="VCCustomBuildTool" | ||
33 | /> | ||
34 | <Tool | ||
35 | Name="VCXMLDataGeneratorTool" | ||
36 | /> | ||
37 | <Tool | ||
38 | Name="VCWebServiceProxyGeneratorTool" | ||
39 | /> | ||
40 | <Tool | ||
41 | Name="VCMIDLTool" | ||
42 | TypeLibraryName=".\Release/MaterialViewer.tlb" | ||
43 | HeaderFileName="" | ||
44 | /> | ||
45 | <Tool | ||
46 | Name="VCCLCompilerTool" | ||
47 | Optimization="2" | ||
48 | InlineFunctionExpansion="1" | ||
49 | AdditionalIncludeDirectories="..\..\include" | ||
50 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" | ||
51 | StringPooling="true" | ||
52 | RuntimeLibrary="0" | ||
53 | EnableFunctionLevelLinking="true" | ||
54 | UsePrecompiledHeader="0" | ||
55 | PrecompiledHeaderFile=".\Release/MaterialViewer.pch" | ||
56 | AssemblerListingLocation=".\Release/" | ||
57 | ObjectFile=".\Release/" | ||
58 | ProgramDataBaseFileName=".\Release/" | ||
59 | WarningLevel="3" | ||
60 | SuppressStartupBanner="true" | ||
61 | CompileAs="0" | ||
62 | /> | ||
63 | <Tool | ||
64 | Name="VCManagedResourceCompilerTool" | ||
65 | /> | ||
66 | <Tool | ||
67 | Name="VCResourceCompilerTool" | ||
68 | PreprocessorDefinitions="NDEBUG" | ||
69 | Culture="3079" | ||
70 | /> | ||
71 | <Tool | ||
72 | Name="VCPreLinkEventTool" | ||
73 | /> | ||
74 | <Tool | ||
75 | Name="VCLinkerTool" | ||
76 | OutputFile="..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe" | ||
77 | LinkIncremental="0" | ||
78 | SuppressStartupBanner="true" | ||
79 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | ||
80 | ProgramDatabaseFile=".\Release/MaterialViewer.pdb" | ||
81 | SubSystem="1" | ||
82 | RandomizedBaseAddress="1" | ||
83 | DataExecutionPrevention="0" | ||
84 | TargetMachine="1" | ||
85 | /> | ||
86 | <Tool | ||
87 | Name="VCALinkTool" | ||
88 | /> | ||
89 | <Tool | ||
90 | Name="VCManifestTool" | ||
91 | /> | ||
92 | <Tool | ||
93 | Name="VCXDCMakeTool" | ||
94 | /> | ||
95 | <Tool | ||
96 | Name="VCBscMakeTool" | ||
97 | /> | ||
98 | <Tool | ||
99 | Name="VCFxCopTool" | ||
100 | /> | ||
101 | <Tool | ||
102 | Name="VCAppVerifierTool" | ||
103 | /> | ||
104 | <Tool | ||
105 | Name="VCPostBuildEventTool" | ||
106 | /> | ||
107 | </Configuration> | ||
108 | <Configuration | ||
109 | Name="Debug|Win32" | ||
110 | OutputDirectory=".\Debug" | ||
111 | IntermediateDirectory=".\Debug" | ||
112 | ConfigurationType="1" | ||
113 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
114 | UseOfMFC="0" | ||
115 | ATLMinimizesCRunTimeLibraryUsage="false" | ||
116 | CharacterSet="2" | ||
117 | > | ||
118 | <Tool | ||
119 | Name="VCPreBuildEventTool" | ||
120 | /> | ||
121 | <Tool | ||
122 | Name="VCCustomBuildTool" | ||
123 | /> | ||
124 | <Tool | ||
125 | Name="VCXMLDataGeneratorTool" | ||
126 | /> | ||
127 | <Tool | ||
128 | Name="VCWebServiceProxyGeneratorTool" | ||
129 | /> | ||
130 | <Tool | ||
131 | Name="VCMIDLTool" | ||
132 | TypeLibraryName=".\Debug/MaterialViewer.tlb" | ||
133 | HeaderFileName="" | ||
134 | /> | ||
135 | <Tool | ||
136 | Name="VCCLCompilerTool" | ||
137 | Optimization="0" | ||
138 | AdditionalIncludeDirectories="..\..\include" | ||
139 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" | ||
140 | BasicRuntimeChecks="3" | ||
141 | RuntimeLibrary="1" | ||
142 | UsePrecompiledHeader="0" | ||
143 | PrecompiledHeaderFile=".\Debug/MaterialViewer.pch" | ||
144 | AssemblerListingLocation=".\Debug/" | ||
145 | ObjectFile=".\Debug/" | ||
146 | ProgramDataBaseFileName=".\Debug/" | ||
147 | WarningLevel="3" | ||
148 | SuppressStartupBanner="true" | ||
149 | DebugInformationFormat="4" | ||
150 | CompileAs="0" | ||
151 | /> | ||
152 | <Tool | ||
153 | Name="VCManagedResourceCompilerTool" | ||
154 | /> | ||
155 | <Tool | ||
156 | Name="VCResourceCompilerTool" | ||
157 | PreprocessorDefinitions="_DEBUG" | ||
158 | Culture="3079" | ||
159 | /> | ||
160 | <Tool | ||
161 | Name="VCPreLinkEventTool" | ||
162 | /> | ||
163 | <Tool | ||
164 | Name="VCLinkerTool" | ||
165 | OutputFile="..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe" | ||
166 | LinkIncremental="0" | ||
167 | SuppressStartupBanner="true" | ||
168 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | ||
169 | GenerateDebugInformation="true" | ||
170 | ProgramDatabaseFile=".\Debug/MaterialViewer.pdb" | ||
171 | SubSystem="1" | ||
172 | RandomizedBaseAddress="1" | ||
173 | DataExecutionPrevention="0" | ||
174 | TargetMachine="1" | ||
175 | /> | ||
176 | <Tool | ||
177 | Name="VCALinkTool" | ||
178 | /> | ||
179 | <Tool | ||
180 | Name="VCManifestTool" | ||
181 | /> | ||
182 | <Tool | ||
183 | Name="VCXDCMakeTool" | ||
184 | /> | ||
185 | <Tool | ||
186 | Name="VCBscMakeTool" | ||
187 | /> | ||
188 | <Tool | ||
189 | Name="VCFxCopTool" | ||
190 | /> | ||
191 | <Tool | ||
192 | Name="VCAppVerifierTool" | ||
193 | /> | ||
194 | <Tool | ||
195 | Name="VCPostBuildEventTool" | ||
196 | /> | ||
197 | </Configuration> | ||
198 | </Configurations> | ||
199 | <References> | ||
200 | </References> | ||
201 | <Files> | ||
202 | <File | ||
203 | RelativePath="main.cpp" | ||
204 | > | ||
205 | <FileConfiguration | ||
206 | Name="Release|Win32" | ||
207 | > | ||
208 | <Tool | ||
209 | Name="VCCLCompilerTool" | ||
210 | Optimization="2" | ||
211 | AdditionalIncludeDirectories="" | ||
212 | PreprocessorDefinitions="" | ||
213 | /> | ||
214 | </FileConfiguration> | ||
215 | <FileConfiguration | ||
216 | Name="Debug|Win32" | ||
217 | > | ||
218 | <Tool | ||
219 | Name="VCCLCompilerTool" | ||
220 | Optimization="0" | ||
221 | AdditionalIncludeDirectories="" | ||
222 | PreprocessorDefinitions="" | ||
223 | BasicRuntimeChecks="3" | ||
224 | /> | ||
225 | </FileConfiguration> | ||
226 | </File> | ||
227 | </Files> | ||
228 | <Globals> | ||
229 | </Globals> | ||
230 | </VisualStudioProject> | ||
diff --git a/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/main.cpp b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/main.cpp new file mode 100644 index 0000000..5dcab19 --- /dev/null +++ b/libraries/irrlicht-1.8.1/examples/22.MaterialViewer/main.cpp | |||
@@ -0,0 +1,1057 @@ | |||
1 | /** Example 022 Material Viewer | ||
2 | |||
3 | This example can be used to play around with material settings and watch the results. | ||
4 | Only the default non-shader materials are used in here. | ||
5 | |||
6 | You have two nodes to make it easier to see which difference your settings will make. | ||
7 | Additionally you have one lightscenenode and you can set the global ambient values. | ||
8 | */ | ||
9 | |||
10 | #include <irrlicht.h> | ||
11 | #include "driverChoice.h" | ||
12 | |||
13 | using namespace irr; | ||
14 | |||
15 | #ifdef _MSC_VER | ||
16 | #pragma comment(lib, "Irrlicht.lib") | ||
17 | #endif | ||
18 | |||
19 | /* | ||
20 | Variables within the empty namespace are globals which are restricted to this file. | ||
21 | */ | ||
22 | namespace | ||
23 | { | ||
24 | const wchar_t* const DriverTypeNames[] = | ||
25 | { | ||
26 | L"NULL", | ||
27 | L"SOFTWARE", | ||
28 | L"BURNINGSVIDEO", | ||
29 | L"DIRECT3D8", | ||
30 | L"DIRECT3D9", | ||
31 | L"OPENGL", | ||
32 | 0, | ||
33 | }; | ||
34 | |||
35 | // For the gui id's | ||
36 | enum EGUI_IDS | ||
37 | { | ||
38 | GUI_ID_OPEN_TEXTURE = 1, | ||
39 | GUI_ID_QUIT, | ||
40 | GUI_ID_MAX | ||
41 | }; | ||
42 | |||
43 | // Name used in texture selection to clear the textures on the node | ||
44 | const core::stringw CLEAR_TEXTURE = L"CLEAR texture"; | ||
45 | |||
46 | // some useful color constants | ||
47 | const video::SColor SCOL_BLACK = video::SColor(255, 0, 0, 0); | ||
48 | const video::SColor SCOL_BLUE = video::SColor(255, 0, 0, 255); | ||
49 | const video::SColor SCOL_CYAN = video::SColor(255, 0, 255, 255); | ||
50 | const video::SColor SCOL_GRAY = video::SColor(255, 128,128, 128); | ||
51 | const video::SColor SCOL_GREEN = video::SColor(255, 0, 255, 0); | ||
52 | const video::SColor SCOL_MAGENTA = video::SColor(255, 255, 0, 255); | ||
53 | const video::SColor SCOL_RED = video::SColor(255, 255, 0, 0); | ||
54 | const video::SColor SCOL_YELLOW = video::SColor(255, 255, 255, 0); | ||
55 | const video::SColor SCOL_WHITE = video::SColor(255, 255, 255, 255); | ||
56 | }; // namespace | ||
57 | |||
58 | /* | ||
59 | Returns a new unique number on each call. | ||
60 | */ | ||
61 | s32 makeUniqueId() | ||
62 | { | ||
63 | static int unique = GUI_ID_MAX; | ||
64 | ++unique; | ||
65 | return unique; | ||
66 | } | ||
67 | |||
68 | /* | ||
69 | Find out which vertex-type is needed for the given material type. | ||
70 | */ | ||
71 | video::E_VERTEX_TYPE getVertexTypeForMaterialType(video::E_MATERIAL_TYPE materialType) | ||
72 | { | ||
73 | using namespace video; | ||
74 | |||
75 | switch ( materialType ) | ||
76 | { | ||
77 | case EMT_SOLID: | ||
78 | return EVT_STANDARD; | ||
79 | |||
80 | case EMT_SOLID_2_LAYER: | ||
81 | return EVT_STANDARD; | ||
82 | |||
83 | case EMT_LIGHTMAP: | ||
84 | case EMT_LIGHTMAP_ADD: | ||
85 | case EMT_LIGHTMAP_M2: | ||
86 | case EMT_LIGHTMAP_M4: | ||
87 | case EMT_LIGHTMAP_LIGHTING: | ||
88 | case EMT_LIGHTMAP_LIGHTING_M2: | ||
89 | case EMT_LIGHTMAP_LIGHTING_M4: | ||
90 | return EVT_2TCOORDS; | ||
91 | |||
92 | case EMT_DETAIL_MAP: | ||
93 | return EVT_2TCOORDS; | ||
94 | |||
95 | case EMT_SPHERE_MAP: | ||
96 | return EVT_STANDARD; | ||
97 | |||
98 | case EMT_REFLECTION_2_LAYER: | ||
99 | return EVT_2TCOORDS; | ||
100 | |||
101 | case EMT_TRANSPARENT_ADD_COLOR: | ||
102 | return EVT_STANDARD; | ||
103 | |||
104 | case EMT_TRANSPARENT_ALPHA_CHANNEL: | ||
105 | return EVT_STANDARD; | ||
106 | |||
107 | case EMT_TRANSPARENT_ALPHA_CHANNEL_REF: | ||
108 | return EVT_STANDARD; | ||
109 | |||
110 | case EMT_TRANSPARENT_VERTEX_ALPHA: | ||
111 | return EVT_STANDARD; | ||
112 | |||
113 | case EMT_TRANSPARENT_REFLECTION_2_LAYER: | ||
114 | return EVT_2TCOORDS; | ||
115 | |||
116 | case EMT_NORMAL_MAP_SOLID: | ||
117 | case EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR: | ||
118 | case EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA: | ||
119 | case EMT_PARALLAX_MAP_SOLID: | ||
120 | case EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR: | ||
121 | case EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA: | ||
122 | return EVT_TANGENTS; | ||
123 | |||
124 | case EMT_ONETEXTURE_BLEND: | ||
125 | return EVT_STANDARD; | ||
126 | |||
127 | case EMT_FORCE_32BIT: | ||
128 | return EVT_STANDARD; | ||
129 | } | ||
130 | return EVT_STANDARD; | ||
131 | } | ||
132 | |||
133 | /* | ||
134 | Custom GUI-control to edit colorvalues. | ||
135 | */ | ||
136 | class CColorControl : public gui::IGUIElement | ||
137 | { | ||
138 | public: | ||
139 | // Constructor | ||
140 | CColorControl(gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, const wchar_t *text, IGUIElement* parent, s32 id=-1 ) | ||
141 | : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect< s32 >(pos, pos+core::dimension2d<s32>(80, 75))) | ||
142 | , DirtyFlag(true) | ||
143 | , ColorStatic(0) | ||
144 | , EditAlpha(0) | ||
145 | , EditRed(0) | ||
146 | , EditGreen(0) | ||
147 | , EditBlue(0) | ||
148 | { | ||
149 | using namespace gui; | ||
150 | ButtonSetId = makeUniqueId(); | ||
151 | |||
152 | const core::rect< s32 > rectControls(0,0,AbsoluteRect.getWidth(),AbsoluteRect.getHeight() ); | ||
153 | IGUIStaticText * groupElement = guiEnv->addStaticText (L"", rectControls, true, false, this, -1, false); | ||
154 | groupElement->setNotClipped(true); | ||
155 | |||
156 | guiEnv->addStaticText (text, core::rect<s32>(0,0,80,15), false, false, groupElement, -1, false); | ||
157 | |||
158 | EditAlpha = addEditForNumbers(guiEnv, core::position2d<s32>(0,15), L"a", -1, groupElement ); | ||
159 | EditRed = addEditForNumbers(guiEnv, core::position2d<s32>(0,30), L"r", -1, groupElement ); | ||
160 | EditGreen = addEditForNumbers(guiEnv, core::position2d<s32>(0,45), L"g", -1, groupElement ); | ||
161 | EditBlue = addEditForNumbers(guiEnv, core::position2d<s32>(0,60), L"b", -1, groupElement ); | ||
162 | |||
163 | ColorStatic = guiEnv->addStaticText (L"", core::rect<s32>(60,15,80,75), true, false, groupElement, -1, true); | ||
164 | |||
165 | guiEnv->addButton (core::rect<s32>(60,35,80,50), groupElement, ButtonSetId, L"set"); | ||
166 | SetEditsFromColor(Color); | ||
167 | } | ||
168 | |||
169 | // event receiver | ||
170 | virtual bool OnEvent(const SEvent &event) | ||
171 | { | ||
172 | if ( event.EventType != EET_GUI_EVENT ) | ||
173 | return false; | ||
174 | |||
175 | if ( event.GUIEvent.Caller->getID() == ButtonSetId && event.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED ) | ||
176 | { | ||
177 | Color = GetColorFromEdits(); | ||
178 | SetEditsFromColor(Color); | ||
179 | } | ||
180 | |||
181 | return false; | ||
182 | } | ||
183 | |||
184 | // set the color values | ||
185 | void setColor(const video::SColor& col) | ||
186 | { | ||
187 | DirtyFlag = true; | ||
188 | Color = col; | ||
189 | SetEditsFromColor(Color); | ||
190 | } | ||
191 | |||
192 | // get the color values | ||
193 | const video::SColor& getColor() const | ||
194 | { | ||
195 | return Color; | ||
196 | } | ||
197 | |||
198 | // To reset the dirty flag | ||
199 | void resetDirty() | ||
200 | { | ||
201 | DirtyFlag = false; | ||
202 | } | ||
203 | |||
204 | // when the color was changed the dirty flag is set | ||
205 | bool isDirty() const | ||
206 | { | ||
207 | return DirtyFlag; | ||
208 | }; | ||
209 | |||
210 | protected: | ||
211 | |||
212 | // Add a staticbox for a description + an editbox so users can enter numbers | ||
213 | gui::IGUIEditBox* addEditForNumbers(gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, const wchar_t *text, s32 id, gui::IGUIElement * parent) | ||
214 | { | ||
215 | using namespace gui; | ||
216 | |||
217 | core::rect< s32 > rect(pos, pos+core::dimension2d<s32>(10, 15)); | ||
218 | guiEnv->addStaticText (text, rect, false, false, parent, -1, false); | ||
219 | rect += core::position2d<s32>( 20, 0 ); | ||
220 | rect.LowerRightCorner.X += 20; | ||
221 | gui::IGUIEditBox* edit = guiEnv->addEditBox(L"0", rect, true, parent, id); | ||
222 | return edit; | ||
223 | } | ||
224 | |||
225 | // Get the color value from the editfields | ||
226 | video::SColor GetColorFromEdits() | ||
227 | { | ||
228 | video::SColor col; | ||
229 | |||
230 | if (EditAlpha) | ||
231 | { | ||
232 | u32 alpha = core::strtoul10(core::stringc(EditAlpha->getText()).c_str()); | ||
233 | if (alpha > 255) | ||
234 | alpha = 255; | ||
235 | col.setAlpha(alpha); | ||
236 | } | ||
237 | |||
238 | if (EditRed) | ||
239 | { | ||
240 | u32 red = core::strtoul10(core::stringc(EditRed->getText()).c_str()); | ||
241 | if (red > 255) | ||
242 | red = 255; | ||
243 | col.setRed(red); | ||
244 | } | ||
245 | |||
246 | if (EditGreen) | ||
247 | { | ||
248 | u32 green = core::strtoul10(core::stringc(EditGreen->getText()).c_str()); | ||
249 | if (green > 255) | ||
250 | green = 255; | ||
251 | col.setGreen(green); | ||
252 | } | ||
253 | |||
254 | if (EditBlue) | ||
255 | { | ||
256 | u32 blue = core::strtoul10(core::stringc(EditBlue->getText()).c_str()); | ||
257 | if (blue > 255) | ||
258 | blue = 255; | ||
259 | col.setBlue(blue); | ||
260 | } | ||
261 | |||
262 | return col; | ||
263 | } | ||
264 | |||
265 | // Fill the editfields with the value for the given color | ||
266 | void SetEditsFromColor(video::SColor col) | ||
267 | { | ||
268 | DirtyFlag = true; | ||
269 | if ( EditAlpha ) | ||
270 | EditAlpha->setText( core::stringw(col.getAlpha()).c_str() ); | ||
271 | if ( EditRed ) | ||
272 | EditRed->setText( core::stringw(col.getRed()).c_str() ); | ||
273 | if ( EditGreen ) | ||
274 | EditGreen->setText( core::stringw(col.getGreen()).c_str() ); | ||
275 | if ( EditBlue ) | ||
276 | EditBlue->setText( core::stringw(col.getBlue()).c_str() ); | ||
277 | if ( ColorStatic ) | ||
278 | ColorStatic->setBackgroundColor(col); | ||
279 | } | ||
280 | |||
281 | private: | ||
282 | |||
283 | bool DirtyFlag; | ||
284 | video::SColor Color; | ||
285 | s32 ButtonSetId; | ||
286 | gui::IGUIStaticText * ColorStatic; | ||
287 | gui::IGUIEditBox * EditAlpha; | ||
288 | gui::IGUIEditBox * EditRed; | ||
289 | gui::IGUIEditBox * EditGreen; | ||
290 | gui::IGUIEditBox * EditBlue; | ||
291 | }; | ||
292 | |||
293 | /* | ||
294 | Custom GUI-control for to edit all colors typically used in materials and lights | ||
295 | */ | ||
296 | class CAllColorsControl : public gui::IGUIElement | ||
297 | { | ||
298 | public: | ||
299 | // Constructor | ||
300 | CAllColorsControl(gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, const wchar_t * description, bool hasEmissive, IGUIElement* parent, s32 id=-1) | ||
301 | : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect<s32>(pos,pos+core::dimension2d<s32>(60,250))) | ||
302 | , ControlAmbientColor(0), ControlDiffuseColor(0), ControlSpecularColor(0), ControlEmissiveColor(0) | ||
303 | { | ||
304 | core::rect<s32> rect(0, 0, 60, 15); | ||
305 | guiEnv->addStaticText (description, rect, false, false, this, -1, false); | ||
306 | createColorControls(guiEnv, core::position2d<s32>(0, 15), hasEmissive); | ||
307 | } | ||
308 | |||
309 | // Destructor | ||
310 | virtual ~CAllColorsControl() | ||
311 | { | ||
312 | ControlAmbientColor->drop(); | ||
313 | ControlDiffuseColor->drop(); | ||
314 | if ( ControlEmissiveColor ) | ||
315 | ControlEmissiveColor->drop(); | ||
316 | ControlSpecularColor->drop(); | ||
317 | } | ||
318 | |||
319 | // Set the color values to those within the material | ||
320 | void setColorsToMaterialColors(const video::SMaterial & material) | ||
321 | { | ||
322 | ControlAmbientColor->setColor(material.AmbientColor); | ||
323 | ControlDiffuseColor->setColor(material.DiffuseColor); | ||
324 | ControlEmissiveColor->setColor(material.EmissiveColor); | ||
325 | ControlSpecularColor->setColor(material.SpecularColor); | ||
326 | } | ||
327 | |||
328 | // Update all changed colors in the material | ||
329 | void updateMaterialColors(video::SMaterial & material) | ||
330 | { | ||
331 | if ( ControlAmbientColor->isDirty() ) | ||
332 | material.AmbientColor = ControlAmbientColor->getColor(); | ||
333 | if ( ControlDiffuseColor->isDirty() ) | ||
334 | material.DiffuseColor = ControlDiffuseColor->getColor(); | ||
335 | if ( ControlEmissiveColor->isDirty() ) | ||
336 | material.EmissiveColor = ControlEmissiveColor->getColor(); | ||
337 | if ( ControlSpecularColor->isDirty() ) | ||
338 | material.SpecularColor = ControlSpecularColor->getColor(); | ||
339 | } | ||
340 | |||
341 | // Set the color values to those from the light data | ||
342 | void setColorsToLightDataColors(const video::SLight & lightData) | ||
343 | { | ||
344 | ControlAmbientColor->setColor(lightData.AmbientColor.toSColor()); | ||
345 | ControlAmbientColor->setColor(lightData.DiffuseColor.toSColor()); | ||
346 | ControlAmbientColor->setColor(lightData.SpecularColor.toSColor()); | ||
347 | } | ||
348 | |||
349 | // Update all changed colors in the light data | ||
350 | void updateLightColors(video::SLight & lightData) | ||
351 | { | ||
352 | if ( ControlAmbientColor->isDirty() ) | ||
353 | lightData.AmbientColor = video::SColorf( ControlAmbientColor->getColor() ); | ||
354 | if ( ControlDiffuseColor->isDirty() ) | ||
355 | lightData.DiffuseColor = video::SColorf( ControlDiffuseColor->getColor() ); | ||
356 | if ( ControlSpecularColor->isDirty() ) | ||
357 | lightData.SpecularColor = video::SColorf(ControlSpecularColor->getColor() ); | ||
358 | } | ||
359 | |||
360 | // To reset the dirty flags | ||
361 | void resetDirty() | ||
362 | { | ||
363 | ControlAmbientColor->resetDirty(); | ||
364 | ControlDiffuseColor->resetDirty(); | ||
365 | ControlSpecularColor->resetDirty(); | ||
366 | if ( ControlEmissiveColor ) | ||
367 | ControlEmissiveColor->resetDirty(); | ||
368 | } | ||
369 | |||
370 | protected: | ||
371 | void createColorControls(gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, bool hasEmissive) | ||
372 | { | ||
373 | ControlAmbientColor = new CColorControl( guiEnv, pos, L"ambient", this); | ||
374 | ControlDiffuseColor = new CColorControl( guiEnv, pos + core::position2d<s32>(0, 75), L"diffuse", this ); | ||
375 | ControlSpecularColor = new CColorControl( guiEnv, pos + core::position2d<s32>(0, 150), L"specular", this ); | ||
376 | if ( hasEmissive ) | ||
377 | { | ||
378 | ControlEmissiveColor = new CColorControl( guiEnv, pos + core::position2d<s32>(0, 225), L"emissive", this ); | ||
379 | } | ||
380 | } | ||
381 | |||
382 | private: | ||
383 | CColorControl* ControlAmbientColor; | ||
384 | CColorControl* ControlDiffuseColor; | ||
385 | CColorControl* ControlSpecularColor; | ||
386 | CColorControl* ControlEmissiveColor; | ||
387 | }; | ||
388 | |||
389 | /* | ||
390 | GUI-Control to offer a selection of available textures. | ||
391 | */ | ||
392 | class CTextureControl : public gui::IGUIElement | ||
393 | { | ||
394 | public: | ||
395 | CTextureControl(gui::IGUIEnvironment* guiEnv, video::IVideoDriver * driver, const core::position2d<s32> & pos, IGUIElement* parent, s32 id=-1) | ||
396 | : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect<s32>(pos,pos+core::dimension2d<s32>(100,15))) | ||
397 | , DirtyFlag(true), ComboTexture(0) | ||
398 | { | ||
399 | core::rect<s32> rectCombo(0, 0, AbsoluteRect.getWidth(),AbsoluteRect.getHeight()); | ||
400 | ComboTexture = guiEnv->addComboBox (rectCombo, this); | ||
401 | updateTextures(driver); | ||
402 | } | ||
403 | |||
404 | virtual bool OnEvent(const SEvent &event) | ||
405 | { | ||
406 | if ( event.EventType != EET_GUI_EVENT ) | ||
407 | return false; | ||
408 | |||
409 | if ( event.GUIEvent.Caller == ComboTexture && event.GUIEvent.EventType == gui::EGET_COMBO_BOX_CHANGED ) | ||
410 | { | ||
411 | DirtyFlag = true; | ||
412 | } | ||
413 | |||
414 | return false; | ||
415 | } | ||
416 | |||
417 | // Workaround for a problem with comboboxes. | ||
418 | // We have to get in front when the combobox wants to get in front or combobox-list might be drawn below other elements. | ||
419 | virtual bool bringToFront(IGUIElement* element) | ||
420 | { | ||
421 | bool result = gui::IGUIElement::bringToFront(element); | ||
422 | if ( Parent && element == ComboTexture ) | ||
423 | result &= Parent->bringToFront(this); | ||
424 | return result; | ||
425 | } | ||
426 | |||
427 | // return selected texturename (if any, otherwise 0) | ||
428 | const wchar_t * getSelectedTextureName() const | ||
429 | { | ||
430 | s32 selected = ComboTexture->getSelected(); | ||
431 | if ( selected < 0 ) | ||
432 | return 0; | ||
433 | return ComboTexture->getItem(selected); | ||
434 | } | ||
435 | |||
436 | // reset the dirty flag | ||
437 | void resetDirty() | ||
438 | { | ||
439 | DirtyFlag = false; | ||
440 | } | ||
441 | |||
442 | // when the texture was changed the dirty flag is set | ||
443 | bool isDirty() const | ||
444 | { | ||
445 | return DirtyFlag; | ||
446 | }; | ||
447 | |||
448 | // Put the names of all currently loaded textures in a combobox | ||
449 | void updateTextures(video::IVideoDriver * driver) | ||
450 | { | ||
451 | s32 oldSelected = ComboTexture->getSelected(); | ||
452 | s32 selectNew = -1; | ||
453 | const wchar_t * oldTextureName = 0; | ||
454 | if ( oldSelected >= 0 ) | ||
455 | { | ||
456 | oldTextureName = ComboTexture->getItem(oldSelected); | ||
457 | } | ||
458 | ComboTexture->clear(); | ||
459 | for ( u32 i=0; i < driver->getTextureCount(); ++i ) | ||
460 | { | ||
461 | video::ITexture * texture = driver->getTextureByIndex(i); | ||
462 | core::stringw name( texture->getName() ); | ||
463 | ComboTexture->addItem( name.c_str() ); | ||
464 | if ( oldTextureName && selectNew < 0 && name == oldTextureName ) | ||
465 | selectNew = i; | ||
466 | } | ||
467 | |||
468 | // add another name which can be used to clear the texture | ||
469 | ComboTexture->addItem( CLEAR_TEXTURE.c_str() ); | ||
470 | if ( CLEAR_TEXTURE == oldTextureName ) | ||
471 | selectNew = ComboTexture->getItemCount()-1; | ||
472 | |||
473 | if ( selectNew >= 0 ) | ||
474 | ComboTexture->setSelected(selectNew); | ||
475 | |||
476 | DirtyFlag = true; | ||
477 | } | ||
478 | |||
479 | private: | ||
480 | bool DirtyFlag; | ||
481 | gui::IGUIComboBox * ComboTexture; | ||
482 | }; | ||
483 | |||
484 | /* | ||
485 | Control which allows setting some of the material values for a meshscenenode | ||
486 | */ | ||
487 | struct SMeshNodeControl | ||
488 | { | ||
489 | // constructor | ||
490 | SMeshNodeControl() | ||
491 | : Initialized(false), Driver(0), MeshManipulator(0), SceneNode(0), SceneNode2T(0), SceneNodeTangents(0) | ||
492 | , AllColorsControl(0), ButtonLighting(0), InfoLighting(0), ComboMaterial(0), TextureControl1(0), TextureControl2(0), ControlVertexColors(0) | ||
493 | { | ||
494 | } | ||
495 | |||
496 | // Destructor | ||
497 | virtual ~SMeshNodeControl() | ||
498 | { | ||
499 | if ( TextureControl1 ) | ||
500 | TextureControl1->drop(); | ||
501 | if ( TextureControl2 ) | ||
502 | TextureControl2->drop(); | ||
503 | if ( ControlVertexColors ) | ||
504 | ControlVertexColors->drop(); | ||
505 | if ( AllColorsControl ) | ||
506 | AllColorsControl->drop(); | ||
507 | } | ||
508 | |||
509 | void init(scene::IMeshSceneNode* node, IrrlichtDevice * device, const core::position2d<s32> & pos, const wchar_t * description) | ||
510 | { | ||
511 | if ( Initialized || !node || !device) // initializing twice or with invalid data not allowed | ||
512 | return; | ||
513 | |||
514 | Driver = device->getVideoDriver (); | ||
515 | gui::IGUIEnvironment* guiEnv = device->getGUIEnvironment(); | ||
516 | scene::ISceneManager* smgr = device->getSceneManager(); | ||
517 | MeshManipulator = smgr->getMeshManipulator(); | ||
518 | |||
519 | SceneNode = node; | ||
520 | scene::IMeshManipulator * meshManip = smgr->getMeshManipulator(); | ||
521 | |||
522 | scene::IMesh * mesh2T = meshManip->createMeshWith2TCoords(node->getMesh()); | ||
523 | SceneNode2T = smgr->addMeshSceneNode(mesh2T, 0, -1, SceneNode->getPosition(), SceneNode->getRotation(), SceneNode->getScale() ); | ||
524 | mesh2T->drop(); | ||
525 | |||
526 | scene::IMesh * meshTangents = meshManip->createMeshWithTangents(node->getMesh(), false, false, false); | ||
527 | SceneNodeTangents = smgr->addMeshSceneNode(meshTangents, 0, -1 | ||
528 | , SceneNode->getPosition(), SceneNode->getRotation(), SceneNode->getScale() ); | ||
529 | meshTangents->drop(); | ||
530 | |||
531 | video::SMaterial & material = SceneNode->getMaterial(0); | ||
532 | material.Lighting = true; | ||
533 | AllColorsControl = new CAllColorsControl(guiEnv, pos, description, true, guiEnv->getRootGUIElement()); | ||
534 | AllColorsControl->setColorsToMaterialColors(material); | ||
535 | |||
536 | core::rect<s32> rectBtn(pos + core::position2d<s32>(0, 320), core::dimension2d<s32>(60, 15)); | ||
537 | ButtonLighting = guiEnv->addButton (rectBtn, 0, -1, L"Lighting"); | ||
538 | ButtonLighting->setIsPushButton(true); | ||
539 | ButtonLighting->setPressed(material.Lighting); | ||
540 | core::rect<s32> rectInfo( rectBtn.LowerRightCorner.X, rectBtn.UpperLeftCorner.Y, rectBtn.LowerRightCorner.X+40, rectBtn.UpperLeftCorner.Y+15 ); | ||
541 | InfoLighting = guiEnv->addStaticText(L"", rectInfo, true, false ); | ||
542 | InfoLighting->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_CENTER ); | ||
543 | |||
544 | core::rect<s32> rectCombo(pos.X, rectBtn.LowerRightCorner.Y, pos.X+100, rectBtn.LowerRightCorner.Y+15); | ||
545 | ComboMaterial = guiEnv->addComboBox (rectCombo); | ||
546 | for ( int i=0; i <= (int)video::EMT_ONETEXTURE_BLEND; ++i ) | ||
547 | { | ||
548 | ComboMaterial->addItem( core::stringw(video::sBuiltInMaterialTypeNames[i]).c_str() ); | ||
549 | } | ||
550 | ComboMaterial->setSelected( (s32)material.MaterialType ); | ||
551 | |||
552 | core::position2d<s32> posTex(rectCombo.UpperLeftCorner.X,rectCombo.LowerRightCorner.Y); | ||
553 | TextureControl1 = new CTextureControl(guiEnv, Driver, posTex, guiEnv->getRootGUIElement()); | ||
554 | posTex.Y += 15; | ||
555 | TextureControl2 = new CTextureControl(guiEnv, Driver, posTex, guiEnv->getRootGUIElement()); | ||
556 | |||
557 | core::position2d<s32> posVertexColors( posTex.X, posTex.Y + 15); | ||
558 | ControlVertexColors = new CColorControl( guiEnv, posVertexColors, L"Vertex colors", guiEnv->getRootGUIElement()); | ||
559 | |||
560 | video::S3DVertex * vertices = (video::S3DVertex *)node->getMesh()->getMeshBuffer(0)->getVertices(); | ||
561 | if ( vertices ) | ||
562 | { | ||
563 | ControlVertexColors->setColor(vertices[0].Color); | ||
564 | } | ||
565 | |||
566 | Initialized = true; | ||
567 | } | ||
568 | |||
569 | void update() | ||
570 | { | ||
571 | if ( !Initialized ) | ||
572 | return; | ||
573 | |||
574 | video::SMaterial & material = SceneNode->getMaterial(0); | ||
575 | video::SMaterial & material2T = SceneNode2T->getMaterial(0); | ||
576 | video::SMaterial & materialTangents = SceneNodeTangents->getMaterial(0); | ||
577 | |||
578 | s32 selectedMaterial = ComboMaterial->getSelected(); | ||
579 | if ( selectedMaterial >= (s32)video::EMT_SOLID && selectedMaterial <= (s32)video::EMT_ONETEXTURE_BLEND) | ||
580 | { | ||
581 | video::E_VERTEX_TYPE vertexType = getVertexTypeForMaterialType((video::E_MATERIAL_TYPE)selectedMaterial); | ||
582 | switch ( vertexType ) | ||
583 | { | ||
584 | case video::EVT_STANDARD: | ||
585 | material.MaterialType = (video::E_MATERIAL_TYPE)selectedMaterial; | ||
586 | SceneNode->setVisible(true); | ||
587 | SceneNode2T->setVisible(false); | ||
588 | SceneNodeTangents->setVisible(false); | ||
589 | break; | ||
590 | case video::EVT_2TCOORDS: | ||
591 | material2T.MaterialType = (video::E_MATERIAL_TYPE)selectedMaterial; | ||
592 | SceneNode->setVisible(false); | ||
593 | SceneNode2T->setVisible(true); | ||
594 | SceneNodeTangents->setVisible(false); | ||
595 | break; | ||
596 | case video::EVT_TANGENTS: | ||
597 | materialTangents.MaterialType = (video::E_MATERIAL_TYPE)selectedMaterial; | ||
598 | SceneNode->setVisible(false); | ||
599 | SceneNode2T->setVisible(false); | ||
600 | SceneNodeTangents->setVisible(true); | ||
601 | break; | ||
602 | } | ||
603 | } | ||
604 | |||
605 | updateMaterial(material); | ||
606 | updateMaterial(material2T); | ||
607 | updateMaterial(materialTangents); | ||
608 | |||
609 | if ( ButtonLighting->isPressed() ) | ||
610 | InfoLighting->setText(L"on"); | ||
611 | else | ||
612 | InfoLighting->setText(L"off"); | ||
613 | |||
614 | AllColorsControl->resetDirty(); | ||
615 | TextureControl1->resetDirty(); | ||
616 | TextureControl2->resetDirty(); | ||
617 | ControlVertexColors->resetDirty(); | ||
618 | } | ||
619 | |||
620 | void updateTextures() | ||
621 | { | ||
622 | TextureControl1->updateTextures(Driver); | ||
623 | TextureControl2->updateTextures(Driver); | ||
624 | } | ||
625 | |||
626 | protected: | ||
627 | |||
628 | void updateMaterial(video::SMaterial & material) | ||
629 | { | ||
630 | AllColorsControl->updateMaterialColors(material); | ||
631 | material.Lighting = ButtonLighting->isPressed(); | ||
632 | if ( TextureControl1->isDirty() ) | ||
633 | { | ||
634 | material.TextureLayer[0].Texture = Driver->getTexture( io::path(TextureControl1->getSelectedTextureName()) ); | ||
635 | } | ||
636 | if ( TextureControl2->isDirty() ) | ||
637 | { | ||
638 | material.TextureLayer[1].Texture = Driver->getTexture( io::path(TextureControl2->getSelectedTextureName()) ); | ||
639 | } | ||
640 | if ( ControlVertexColors->isDirty() ) | ||
641 | { | ||
642 | MeshManipulator->setVertexColors (SceneNode->getMesh(), ControlVertexColors->getColor()); | ||
643 | MeshManipulator->setVertexColors (SceneNode2T->getMesh(), ControlVertexColors->getColor()); | ||
644 | MeshManipulator->setVertexColors (SceneNodeTangents->getMesh(), ControlVertexColors->getColor()); | ||
645 | } | ||
646 | } | ||
647 | |||
648 | bool Initialized; | ||
649 | video::IVideoDriver * Driver; | ||
650 | scene::IMeshManipulator* MeshManipulator; | ||
651 | scene::IMeshSceneNode* SceneNode; | ||
652 | scene::IMeshSceneNode* SceneNode2T; | ||
653 | scene::IMeshSceneNode* SceneNodeTangents; | ||
654 | CAllColorsControl* AllColorsControl; | ||
655 | gui::IGUIButton * ButtonLighting; | ||
656 | gui::IGUIStaticText* InfoLighting; | ||
657 | gui::IGUIComboBox * ComboMaterial; | ||
658 | CTextureControl* TextureControl1; | ||
659 | CTextureControl* TextureControl2; | ||
660 | CColorControl* ControlVertexColors; | ||
661 | }; | ||
662 | |||
663 | /* | ||
664 | Control to allow setting the color values of a lightscenenode. | ||
665 | */ | ||
666 | struct SLightNodeControl | ||
667 | { | ||
668 | // constructor | ||
669 | SLightNodeControl() : Initialized(false), SceneNode(0), AllColorsControl(0) | ||
670 | { | ||
671 | } | ||
672 | |||
673 | virtual ~SLightNodeControl() | ||
674 | { | ||
675 | if ( AllColorsControl ) | ||
676 | AllColorsControl->drop(); | ||
677 | } | ||
678 | |||
679 | void init(scene::ILightSceneNode* node, gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, const wchar_t * description) | ||
680 | { | ||
681 | if ( Initialized || !node || !guiEnv) // initializing twice or with invalid data not allowed | ||
682 | return; | ||
683 | SceneNode = node; | ||
684 | AllColorsControl = new CAllColorsControl(guiEnv, pos, description, false, guiEnv->getRootGUIElement()); | ||
685 | const video::SLight & lightData = SceneNode->getLightData(); | ||
686 | AllColorsControl->setColorsToLightDataColors(lightData); | ||
687 | Initialized = true; | ||
688 | } | ||
689 | |||
690 | void update() | ||
691 | { | ||
692 | if ( !Initialized ) | ||
693 | return; | ||
694 | |||
695 | video::SLight & lightData = SceneNode->getLightData(); | ||
696 | AllColorsControl->updateLightColors(lightData); | ||
697 | } | ||
698 | |||
699 | protected: | ||
700 | bool Initialized; | ||
701 | scene::ILightSceneNode* SceneNode; | ||
702 | CAllColorsControl* AllColorsControl; | ||
703 | }; | ||
704 | |||
705 | /* | ||
706 | Application configuration | ||
707 | */ | ||
708 | struct SConfig | ||
709 | { | ||
710 | SConfig() | ||
711 | : RenderInBackground(true) | ||
712 | , DriverType(video::EDT_BURNINGSVIDEO) | ||
713 | , ScreenSize(640, 480) | ||
714 | { | ||
715 | } | ||
716 | |||
717 | bool RenderInBackground; | ||
718 | video::E_DRIVER_TYPE DriverType; | ||
719 | core::dimension2d<u32> ScreenSize; | ||
720 | }; | ||
721 | |||
722 | /* | ||
723 | Main application class | ||
724 | */ | ||
725 | class CApp : public IEventReceiver | ||
726 | { | ||
727 | friend int main(int argc, char *argv[]); | ||
728 | |||
729 | public: | ||
730 | // constructor | ||
731 | CApp() | ||
732 | : IsRunning(false) | ||
733 | , Device(0) | ||
734 | , Camera(0) | ||
735 | , GlobalAmbient(0) | ||
736 | { | ||
737 | } | ||
738 | |||
739 | // destructor | ||
740 | ~CApp() | ||
741 | { | ||
742 | } | ||
743 | |||
744 | // stop running - will quit at end of mainloop | ||
745 | void stopApp() | ||
746 | { | ||
747 | IsRunning = false; | ||
748 | } | ||
749 | |||
750 | // Event handler | ||
751 | virtual bool OnEvent(const SEvent &event) | ||
752 | { | ||
753 | if (event.EventType == EET_GUI_EVENT) | ||
754 | { | ||
755 | gui::IGUIEnvironment* env = Device->getGUIEnvironment(); | ||
756 | |||
757 | switch(event.GUIEvent.EventType) | ||
758 | { | ||
759 | case gui::EGET_MENU_ITEM_SELECTED: | ||
760 | { | ||
761 | gui::IGUIContextMenu* menu = (gui::IGUIContextMenu*)event.GUIEvent.Caller; | ||
762 | s32 id = menu->getItemCommandId(menu->getSelectedItem()); | ||
763 | |||
764 | switch(id) | ||
765 | { | ||
766 | case GUI_ID_OPEN_TEXTURE: // File -> Open Texture | ||
767 | env->addFileOpenDialog(L"Please select a texture file to open"); | ||
768 | break; | ||
769 | case GUI_ID_QUIT: // File -> Quit | ||
770 | stopApp(); | ||
771 | break; | ||
772 | } | ||
773 | } | ||
774 | break; | ||
775 | |||
776 | case gui::EGET_FILE_SELECTED: | ||
777 | { | ||
778 | // load the model file, selected in the file open dialog | ||
779 | gui::IGUIFileOpenDialog* dialog = | ||
780 | (gui::IGUIFileOpenDialog*)event.GUIEvent.Caller; | ||
781 | loadTexture(io::path(dialog->getFileName()).c_str()); | ||
782 | } | ||
783 | break; | ||
784 | |||
785 | default: | ||
786 | break; | ||
787 | } | ||
788 | } | ||
789 | |||
790 | return false; | ||
791 | } | ||
792 | |||
793 | protected: | ||
794 | |||
795 | // Application initialization | ||
796 | // returns true when it was successful initialized, otherwise false. | ||
797 | bool init(int argc, char *argv[]) | ||
798 | { | ||
799 | // ask user for driver | ||
800 | Config.DriverType=driverChoiceConsole(); | ||
801 | if (Config.DriverType==video::EDT_COUNT) | ||
802 | return false; | ||
803 | |||
804 | // create the device with the settings from our config | ||
805 | Device = createDevice(Config.DriverType, Config.ScreenSize); | ||
806 | if (!Device) | ||
807 | return false; | ||
808 | Device->setWindowCaption( DriverTypeNames[Config.DriverType] ); | ||
809 | Device->setEventReceiver(this); | ||
810 | |||
811 | scene::ISceneManager* smgr = Device->getSceneManager(); | ||
812 | video::IVideoDriver * driver = Device->getVideoDriver (); | ||
813 | gui::IGUIEnvironment* guiEnv = Device->getGUIEnvironment(); | ||
814 | |||
815 | // set a nicer font | ||
816 | gui::IGUISkin* skin = guiEnv->getSkin(); | ||
817 | gui::IGUIFont* font = guiEnv->getFont("../../media/fonthaettenschweiler.bmp"); | ||
818 | if (font) | ||
819 | skin->setFont(font); | ||
820 | |||
821 | // remove some alpha value because it makes those menus harder to read otherwise | ||
822 | video::SColor col3dHighLight( skin->getColor(gui::EGDC_APP_WORKSPACE) ); | ||
823 | col3dHighLight.setAlpha(255); | ||
824 | video::SColor colHighLight( col3dHighLight ); | ||
825 | skin->setColor(gui::EGDC_HIGH_LIGHT, colHighLight ); | ||
826 | skin->setColor(gui::EGDC_3D_HIGH_LIGHT, col3dHighLight ); | ||
827 | |||
828 | // Add some textures which are useful to test material settings | ||
829 | createDefaultTextures(driver); | ||
830 | |||
831 | // create a menu | ||
832 | gui::IGUIContextMenu * menuBar = guiEnv->addMenu(); | ||
833 | menuBar->addItem(L"File", -1, true, true); | ||
834 | |||
835 | gui::IGUIContextMenu* subMenuFile = menuBar->getSubMenu(0); | ||
836 | subMenuFile->addItem(L"Open texture ...", GUI_ID_OPEN_TEXTURE); | ||
837 | subMenuFile->addSeparator(); | ||
838 | subMenuFile->addItem(L"Quit", GUI_ID_QUIT); | ||
839 | |||
840 | // a static camera | ||
841 | Camera = smgr->addCameraSceneNode (0, core::vector3df(0, 0, 0), | ||
842 | core::vector3df(0, 0, 100), | ||
843 | -1); | ||
844 | |||
845 | // add the nodes which are used to show the materials | ||
846 | scene::IMeshSceneNode* nodeL = smgr->addCubeSceneNode (30.0f, 0, -1, | ||
847 | core::vector3df(-35, 0, 100), | ||
848 | core::vector3df(0, 0, 0), | ||
849 | core::vector3df(1.0f, 1.0f, 1.0f)); | ||
850 | NodeLeft.init( nodeL, Device, core::position2d<s32>(10,20), L"left node" ); | ||
851 | |||
852 | scene::IMeshSceneNode* nodeR = smgr->addCubeSceneNode (30.0f, 0, -1, | ||
853 | core::vector3df(35, 0, 100), | ||
854 | core::vector3df(0, 0, 0), | ||
855 | core::vector3df(1.0f, 1.0f, 1.0f)); | ||
856 | NodeRight.init( nodeR, Device, core::position2d<s32>(530,20), L"right node" ); | ||
857 | |||
858 | // add one light | ||
859 | scene::ILightSceneNode* nodeLight = smgr->addLightSceneNode(0, core::vector3df(0, 0, 0), | ||
860 | video::SColorf(1.0f, 1.0f, 1.0f), | ||
861 | 100.0f); | ||
862 | LightControl.init(nodeLight, guiEnv, core::position2d<s32>(270,20), L"light" ); | ||
863 | |||
864 | // one large cube around everything. That's mainly to make the light more obvious. | ||
865 | scene::IMeshSceneNode* backgroundCube = smgr->addCubeSceneNode (200.0f, 0, -1, core::vector3df(0, 0, 0), | ||
866 | core::vector3df(45, 0, 0), | ||
867 | core::vector3df(1.0f, 1.0f, 1.0f)); | ||
868 | backgroundCube->getMaterial(0).BackfaceCulling = false; // we are within the cube, so we have to disable backface culling to see it | ||
869 | backgroundCube->getMaterial(0).EmissiveColor.set(255,50,50,50); // we keep some self lighting to keep texts visible | ||
870 | |||
871 | // set the ambient light value | ||
872 | GlobalAmbient = new CColorControl( guiEnv, core::position2d<s32>(270, 300), L"global ambient", guiEnv->getRootGUIElement()); | ||
873 | GlobalAmbient->setColor( smgr->getAmbientLight().toSColor() ); | ||
874 | |||
875 | return true; | ||
876 | } | ||
877 | |||
878 | // Update one frame | ||
879 | bool update() | ||
880 | { | ||
881 | using namespace irr; | ||
882 | |||
883 | video::IVideoDriver* videoDriver = Device->getVideoDriver(); | ||
884 | if ( !Device->run() ) | ||
885 | return false; | ||
886 | |||
887 | if ( Device->isWindowActive() || Config.RenderInBackground ) | ||
888 | { | ||
889 | gui::IGUIEnvironment* guiEnv = Device->getGUIEnvironment(); | ||
890 | scene::ISceneManager* smgr = Device->getSceneManager(); | ||
891 | gui::IGUISkin * skin = guiEnv->getSkin(); | ||
892 | |||
893 | // update our controls | ||
894 | NodeLeft.update(); | ||
895 | NodeRight.update(); | ||
896 | LightControl.update(); | ||
897 | |||
898 | // update ambient light settings | ||
899 | if ( GlobalAmbient->isDirty() ) | ||
900 | { | ||
901 | smgr->setAmbientLight( GlobalAmbient->getColor() ); | ||
902 | GlobalAmbient->resetDirty(); | ||
903 | } | ||
904 | |||
905 | // draw everything | ||
906 | video::SColor bkColor( skin->getColor(gui::EGDC_APP_WORKSPACE) ); | ||
907 | videoDriver->beginScene(true, true, bkColor); | ||
908 | |||
909 | smgr->drawAll(); | ||
910 | guiEnv->drawAll(); | ||
911 | |||
912 | videoDriver->endScene(); | ||
913 | } | ||
914 | |||
915 | return true; | ||
916 | } | ||
917 | |||
918 | // Run the application. Our main loop. | ||
919 | void run() | ||
920 | { | ||
921 | IsRunning = true; | ||
922 | |||
923 | if ( !Device ) | ||
924 | return; | ||
925 | |||
926 | // main application loop | ||
927 | while(IsRunning) | ||
928 | { | ||
929 | if ( !update() ) | ||
930 | break; | ||
931 | |||
932 | Device->sleep( 5 ); | ||
933 | } | ||
934 | } | ||
935 | |||
936 | // Close down the application | ||
937 | void quit() | ||
938 | { | ||
939 | IsRunning = false; | ||
940 | GlobalAmbient->drop(); | ||
941 | GlobalAmbient = NULL; | ||
942 | if ( Device ) | ||
943 | { | ||
944 | Device->closeDevice(); | ||
945 | Device->drop(); | ||
946 | Device = NULL; | ||
947 | } | ||
948 | } | ||
949 | |||
950 | // Create some useful textures. | ||
951 | // Note that the function put readability over speed, you shouldn't use setPixel at runtime but for initialization it's nice. | ||
952 | void createDefaultTextures(video::IVideoDriver * driver) | ||
953 | { | ||
954 | const u32 width = 256; | ||
955 | const u32 height = 256; | ||
956 | video::IImage * imageA8R8G8B8 = driver->createImage (video::ECF_A8R8G8B8, core::dimension2d<u32>(width, height)); | ||
957 | if ( !imageA8R8G8B8 ) | ||
958 | return; | ||
959 | const u32 pitch = imageA8R8G8B8->getPitch(); | ||
960 | |||
961 | // some nice square-pattern with 9 typical colors | ||
962 | for ( u32 y = 0; y < height; ++ y ) | ||
963 | { | ||
964 | for ( u32 x = 0; x < pitch; ++x ) | ||
965 | { | ||
966 | if ( y < height/3 ) | ||
967 | { | ||
968 | if ( x < width/3 ) | ||
969 | imageA8R8G8B8->setPixel (x, y, SCOL_BLACK); | ||
970 | else if ( x < 2*width/3 ) | ||
971 | imageA8R8G8B8->setPixel (x, y, SCOL_BLUE); | ||
972 | else | ||
973 | imageA8R8G8B8->setPixel (x, y, SCOL_CYAN); | ||
974 | } | ||
975 | else if ( y < 2*height/3 ) | ||
976 | { | ||
977 | if ( x < width/3 ) | ||
978 | imageA8R8G8B8->setPixel (x, y, SCOL_GRAY); | ||
979 | else if ( x < 2*width/3 ) | ||
980 | imageA8R8G8B8->setPixel (x, y, SCOL_GREEN); | ||
981 | else | ||
982 | imageA8R8G8B8->setPixel (x, y, SCOL_MAGENTA); | ||
983 | } | ||
984 | else | ||
985 | { | ||
986 | if ( x < width/3 ) | ||
987 | imageA8R8G8B8->setPixel (x, y, SCOL_RED); | ||
988 | else if ( x < 2*width/3 ) | ||
989 | imageA8R8G8B8->setPixel (x, y, SCOL_YELLOW); | ||
990 | else | ||
991 | imageA8R8G8B8->setPixel (x, y, SCOL_WHITE); | ||
992 | } | ||
993 | } | ||
994 | } | ||
995 | driver->addTexture (io::path("CARO_A8R8G8B8"), imageA8R8G8B8); | ||
996 | |||
997 | // all white | ||
998 | imageA8R8G8B8->fill(SCOL_WHITE); | ||
999 | driver->addTexture (io::path("WHITE_A8R8G8B8"), imageA8R8G8B8); | ||
1000 | |||
1001 | // all black | ||
1002 | imageA8R8G8B8->fill(SCOL_BLACK); | ||
1003 | driver->addTexture (io::path("BLACK_A8R8G8B8"), imageA8R8G8B8); | ||
1004 | |||
1005 | // gray-scale | ||
1006 | for ( u32 y = 0; y < height; ++ y ) | ||
1007 | { | ||
1008 | for ( u32 x = 0; x < pitch; ++x ) | ||
1009 | { | ||
1010 | imageA8R8G8B8->setPixel (x, y, video::SColor(y, x,x,x) ); | ||
1011 | } | ||
1012 | } | ||
1013 | driver->addTexture (io::path("GRAYSCALE_A8R8G8B8"), imageA8R8G8B8); | ||
1014 | |||
1015 | imageA8R8G8B8->drop(); | ||
1016 | } | ||
1017 | |||
1018 | // Load a texture and make sure nodes know it when more textures are available. | ||
1019 | void loadTexture(const io::path &name) | ||
1020 | { | ||
1021 | Device->getVideoDriver()->getTexture(name); | ||
1022 | NodeLeft.updateTextures(); | ||
1023 | NodeRight.updateTextures(); | ||
1024 | } | ||
1025 | |||
1026 | private: | ||
1027 | SConfig Config; | ||
1028 | volatile bool IsRunning; | ||
1029 | IrrlichtDevice * Device; | ||
1030 | scene::ICameraSceneNode * Camera; | ||
1031 | SMeshNodeControl NodeLeft; | ||
1032 | SMeshNodeControl NodeRight; | ||
1033 | SLightNodeControl LightControl; | ||
1034 | CColorControl * GlobalAmbient; | ||
1035 | }; | ||
1036 | |||
1037 | /* | ||
1038 | A very short main as we do everything else in classes. | ||
1039 | */ | ||
1040 | int main(int argc, char *argv[]) | ||
1041 | { | ||
1042 | CApp APP; | ||
1043 | |||
1044 | if ( !APP.init(argc, argv) ) | ||
1045 | { | ||
1046 | printf("init failed\n"); | ||
1047 | return 1; | ||
1048 | } | ||
1049 | |||
1050 | APP.run(); | ||
1051 | APP.quit(); | ||
1052 | |||
1053 | return 0; | ||
1054 | } | ||
1055 | |||
1056 | /* | ||
1057 | **/ | ||