diff options
Diffstat (limited to 'libraries/irrlicht-1.8/examples/10.Shaders')
9 files changed, 2194 insertions, 2194 deletions
diff --git a/libraries/irrlicht-1.8/examples/10.Shaders/Makefile b/libraries/irrlicht-1.8/examples/10.Shaders/Makefile index ff2df2a..383573a 100644 --- a/libraries/irrlicht-1.8/examples/10.Shaders/Makefile +++ b/libraries/irrlicht-1.8/examples/10.Shaders/Makefile | |||
@@ -1,38 +1,38 @@ | |||
1 | # Makefile for Irrlicht Examples | 1 | # Makefile for Irrlicht Examples |
2 | # It's usually sufficient to change just the target name and source file list | 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 | 3 | # and be sure that CXX is set to a valid compiler |
4 | Target = 10.Shaders | 4 | Target = 10.Shaders |
5 | Sources = main.cpp | 5 | Sources = main.cpp |
6 | 6 | ||
7 | # general compiler settings | 7 | # general compiler settings |
8 | CPPFLAGS = -I../../include -I/usr/X11R6/include | 8 | CPPFLAGS = -I../../include -I/usr/X11R6/include |
9 | CXXFLAGS = -O3 -ffast-math | 9 | CXXFLAGS = -O3 -ffast-math |
10 | #CXXFLAGS = -g -Wall | 10 | #CXXFLAGS = -g -Wall |
11 | 11 | ||
12 | #default target is Linux | 12 | #default target is Linux |
13 | all: all_linux | 13 | all: all_linux |
14 | 14 | ||
15 | ifeq ($(HOSTTYPE), x86_64) | 15 | ifeq ($(HOSTTYPE), x86_64) |
16 | LIBSELECT=64 | 16 | LIBSELECT=64 |
17 | endif | 17 | endif |
18 | 18 | ||
19 | # target specific settings | 19 | # target specific settings |
20 | all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor | 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 | 21 | all_linux clean_linux: SYSTEM=Linux |
22 | all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm | 22 | all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm |
23 | all_win32 clean_win32: SYSTEM=Win32-gcc | 23 | all_win32 clean_win32: SYSTEM=Win32-gcc |
24 | all_win32 clean_win32: SUF=.exe | 24 | all_win32 clean_win32: SUF=.exe |
25 | # name of the binary - only valid for targets which set SYSTEM | 25 | # name of the binary - only valid for targets which set SYSTEM |
26 | DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) | 26 | DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) |
27 | 27 | ||
28 | all_linux all_win32: | 28 | all_linux all_win32: |
29 | $(warning Building...) | 29 | $(warning Building...) |
30 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) | 30 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) |
31 | 31 | ||
32 | clean: clean_linux clean_win32 | 32 | clean: clean_linux clean_win32 |
33 | $(warning Cleaning...) | 33 | $(warning Cleaning...) |
34 | 34 | ||
35 | clean_linux clean_win32: | 35 | clean_linux clean_win32: |
36 | @$(RM) $(DESTPATH) | 36 | @$(RM) $(DESTPATH) |
37 | 37 | ||
38 | .PHONY: all all_win32 clean clean_linux clean_win32 | 38 | .PHONY: all all_win32 clean clean_linux clean_win32 |
diff --git a/libraries/irrlicht-1.8/examples/10.Shaders/Shaders.dev b/libraries/irrlicht-1.8/examples/10.Shaders/Shaders.dev index bcaa4f8..e3514d3 100644 --- a/libraries/irrlicht-1.8/examples/10.Shaders/Shaders.dev +++ b/libraries/irrlicht-1.8/examples/10.Shaders/Shaders.dev | |||
@@ -1,59 +1,59 @@ | |||
1 | [Project] | 1 | [Project] |
2 | FileName=example.dev | 2 | FileName=example.dev |
3 | Name=Irrlicht Example 10 Shaders | 3 | Name=Irrlicht Example 10 Shaders |
4 | UnitCount=1 | 4 | UnitCount=1 |
5 | Type=1 | 5 | Type=1 |
6 | Ver=1 | 6 | Ver=1 |
7 | ObjFiles= | 7 | ObjFiles= |
8 | Includes=..\..\include | 8 | Includes=..\..\include |
9 | Libs= | 9 | Libs= |
10 | PrivateResource= | 10 | PrivateResource= |
11 | ResourceIncludes= | 11 | ResourceIncludes= |
12 | MakeIncludes= | 12 | MakeIncludes= |
13 | Compiler= | 13 | Compiler= |
14 | CppCompiler= | 14 | CppCompiler= |
15 | Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ | 15 | Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ |
16 | IsCpp=1 | 16 | IsCpp=1 |
17 | Icon= | 17 | Icon= |
18 | ExeOutput=../../bin/Win32-gcc | 18 | ExeOutput=../../bin/Win32-gcc |
19 | ObjectOutput=obj | 19 | ObjectOutput=obj |
20 | OverrideOutput=1 | 20 | OverrideOutput=1 |
21 | OverrideOutputName=10.Shaders.exe | 21 | OverrideOutputName=10.Shaders.exe |
22 | HostApplication= | 22 | HostApplication= |
23 | Folders= | 23 | Folders= |
24 | CommandLine= | 24 | CommandLine= |
25 | IncludeVersionInfo=0 | 25 | IncludeVersionInfo=0 |
26 | SupportXPThemes=0 | 26 | SupportXPThemes=0 |
27 | CompilerSet=0 | 27 | CompilerSet=0 |
28 | CompilerSettings=0000000000000000000000 | 28 | CompilerSettings=0000000000000000000000 |
29 | UseCustomMakefile=0 | 29 | UseCustomMakefile=0 |
30 | CustomMakefile= | 30 | CustomMakefile= |
31 | 31 | ||
32 | [Unit1] | 32 | [Unit1] |
33 | FileName=main.cpp | 33 | FileName=main.cpp |
34 | CompileCpp=1 | 34 | CompileCpp=1 |
35 | Folder=Projekt1 | 35 | Folder=Projekt1 |
36 | Compile=1 | 36 | Compile=1 |
37 | Link=1 | 37 | Link=1 |
38 | Priority=1000 | 38 | Priority=1000 |
39 | OverrideBuildCmd=0 | 39 | OverrideBuildCmd=0 |
40 | BuildCmd= | 40 | BuildCmd= |
41 | 41 | ||
42 | [VersionInfo] | 42 | [VersionInfo] |
43 | Major=0 | 43 | Major=0 |
44 | Minor=1 | 44 | Minor=1 |
45 | Release=1 | 45 | Release=1 |
46 | Build=1 | 46 | Build=1 |
47 | LanguageID=1033 | 47 | LanguageID=1033 |
48 | CharsetID=1252 | 48 | CharsetID=1252 |
49 | CompanyName= | 49 | CompanyName= |
50 | FileVersion= | 50 | FileVersion= |
51 | FileDescription=Irrlicht Engine example compiled using DevCpp and gcc | 51 | FileDescription=Irrlicht Engine example compiled using DevCpp and gcc |
52 | InternalName= | 52 | InternalName= |
53 | LegalCopyright= | 53 | LegalCopyright= |
54 | LegalTrademarks= | 54 | LegalTrademarks= |
55 | OriginalFilename= | 55 | OriginalFilename= |
56 | ProductName= | 56 | ProductName= |
57 | ProductVersion= | 57 | ProductVersion= |
58 | AutoIncBuildNr=0 | 58 | AutoIncBuildNr=0 |
59 | 59 | ||
diff --git a/libraries/irrlicht-1.8/examples/10.Shaders/Shaders.vcproj b/libraries/irrlicht-1.8/examples/10.Shaders/Shaders.vcproj index e730a2f..7cb8b13 100644 --- a/libraries/irrlicht-1.8/examples/10.Shaders/Shaders.vcproj +++ b/libraries/irrlicht-1.8/examples/10.Shaders/Shaders.vcproj | |||
@@ -1,163 +1,163 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | 1 | <?xml version="1.0" encoding="Windows-1252"?> |
2 | <VisualStudioProject | 2 | <VisualStudioProject |
3 | ProjectType="Visual C++" | 3 | ProjectType="Visual C++" |
4 | Version="7.10" | 4 | Version="7.10" |
5 | Name="10.Shaders" | 5 | Name="10.Shaders" |
6 | ProjectGUID="{A4F71E8D-4042-4909-9AB8-1BA4CF5B926D}" | 6 | ProjectGUID="{A4F71E8D-4042-4909-9AB8-1BA4CF5B926D}" |
7 | SccProjectName="" | 7 | SccProjectName="" |
8 | SccLocalPath=""> | 8 | SccLocalPath=""> |
9 | <Platforms> | 9 | <Platforms> |
10 | <Platform | 10 | <Platform |
11 | Name="Win32"/> | 11 | Name="Win32"/> |
12 | </Platforms> | 12 | </Platforms> |
13 | <Configurations> | 13 | <Configurations> |
14 | <Configuration | 14 | <Configuration |
15 | Name="Debug|Win32" | 15 | Name="Debug|Win32" |
16 | OutputDirectory=".\Debug" | 16 | OutputDirectory=".\Debug" |
17 | IntermediateDirectory=".\Debug" | 17 | IntermediateDirectory=".\Debug" |
18 | ConfigurationType="1" | 18 | ConfigurationType="1" |
19 | UseOfMFC="0" | 19 | UseOfMFC="0" |
20 | ATLMinimizesCRunTimeLibraryUsage="FALSE" | 20 | ATLMinimizesCRunTimeLibraryUsage="FALSE" |
21 | CharacterSet="2"> | 21 | CharacterSet="2"> |
22 | <Tool | 22 | <Tool |
23 | Name="VCCLCompilerTool" | 23 | Name="VCCLCompilerTool" |
24 | Optimization="0" | 24 | Optimization="0" |
25 | AdditionalIncludeDirectories="..\..\include" | 25 | AdditionalIncludeDirectories="..\..\include" |
26 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" | 26 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" |
27 | BasicRuntimeChecks="3" | 27 | BasicRuntimeChecks="3" |
28 | RuntimeLibrary="5" | 28 | RuntimeLibrary="5" |
29 | UsePrecompiledHeader="2" | 29 | UsePrecompiledHeader="2" |
30 | PrecompiledHeaderFile=".\Debug/Shaders.pch" | 30 | PrecompiledHeaderFile=".\Debug/Shaders.pch" |
31 | AssemblerListingLocation=".\Debug/" | 31 | AssemblerListingLocation=".\Debug/" |
32 | ObjectFile=".\Debug/" | 32 | ObjectFile=".\Debug/" |
33 | ProgramDataBaseFileName=".\Debug/" | 33 | ProgramDataBaseFileName=".\Debug/" |
34 | WarningLevel="3" | 34 | WarningLevel="3" |
35 | SuppressStartupBanner="TRUE" | 35 | SuppressStartupBanner="TRUE" |
36 | DebugInformationFormat="4" | 36 | DebugInformationFormat="4" |
37 | CompileAs="0"/> | 37 | CompileAs="0"/> |
38 | <Tool | 38 | <Tool |
39 | Name="VCCustomBuildTool"/> | 39 | Name="VCCustomBuildTool"/> |
40 | <Tool | 40 | <Tool |
41 | Name="VCLinkerTool" | 41 | Name="VCLinkerTool" |
42 | OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe" | 42 | OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe" |
43 | LinkIncremental="0" | 43 | LinkIncremental="0" |
44 | SuppressStartupBanner="TRUE" | 44 | SuppressStartupBanner="TRUE" |
45 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | 45 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" |
46 | GenerateDebugInformation="TRUE" | 46 | GenerateDebugInformation="TRUE" |
47 | ProgramDatabaseFile=".\Debug/Shaders.pdb" | 47 | ProgramDatabaseFile=".\Debug/Shaders.pdb" |
48 | SubSystem="1" | 48 | SubSystem="1" |
49 | TargetMachine="1"/> | 49 | TargetMachine="1"/> |
50 | <Tool | 50 | <Tool |
51 | Name="VCMIDLTool" | 51 | Name="VCMIDLTool" |
52 | TypeLibraryName=".\Debug/Shaders.tlb" | 52 | TypeLibraryName=".\Debug/Shaders.tlb" |
53 | HeaderFileName=""/> | 53 | HeaderFileName=""/> |
54 | <Tool | 54 | <Tool |
55 | Name="VCPostBuildEventTool"/> | 55 | Name="VCPostBuildEventTool"/> |
56 | <Tool | 56 | <Tool |
57 | Name="VCPreBuildEventTool"/> | 57 | Name="VCPreBuildEventTool"/> |
58 | <Tool | 58 | <Tool |
59 | Name="VCPreLinkEventTool"/> | 59 | Name="VCPreLinkEventTool"/> |
60 | <Tool | 60 | <Tool |
61 | Name="VCResourceCompilerTool" | 61 | Name="VCResourceCompilerTool" |
62 | PreprocessorDefinitions="_DEBUG" | 62 | PreprocessorDefinitions="_DEBUG" |
63 | Culture="3079"/> | 63 | Culture="3079"/> |
64 | <Tool | 64 | <Tool |
65 | Name="VCWebServiceProxyGeneratorTool"/> | 65 | Name="VCWebServiceProxyGeneratorTool"/> |
66 | <Tool | 66 | <Tool |
67 | Name="VCXMLDataGeneratorTool"/> | 67 | Name="VCXMLDataGeneratorTool"/> |
68 | <Tool | 68 | <Tool |
69 | Name="VCWebDeploymentTool"/> | 69 | Name="VCWebDeploymentTool"/> |
70 | <Tool | 70 | <Tool |
71 | Name="VCManagedWrapperGeneratorTool"/> | 71 | Name="VCManagedWrapperGeneratorTool"/> |
72 | <Tool | 72 | <Tool |
73 | Name="VCAuxiliaryManagedWrapperGeneratorTool"/> | 73 | Name="VCAuxiliaryManagedWrapperGeneratorTool"/> |
74 | </Configuration> | 74 | </Configuration> |
75 | <Configuration | 75 | <Configuration |
76 | Name="Release|Win32" | 76 | Name="Release|Win32" |
77 | OutputDirectory=".\Release" | 77 | OutputDirectory=".\Release" |
78 | IntermediateDirectory=".\Release" | 78 | IntermediateDirectory=".\Release" |
79 | ConfigurationType="1" | 79 | ConfigurationType="1" |
80 | UseOfMFC="0" | 80 | UseOfMFC="0" |
81 | ATLMinimizesCRunTimeLibraryUsage="FALSE" | 81 | ATLMinimizesCRunTimeLibraryUsage="FALSE" |
82 | CharacterSet="2"> | 82 | CharacterSet="2"> |
83 | <Tool | 83 | <Tool |
84 | Name="VCCLCompilerTool" | 84 | Name="VCCLCompilerTool" |
85 | Optimization="2" | 85 | Optimization="2" |
86 | InlineFunctionExpansion="1" | 86 | InlineFunctionExpansion="1" |
87 | AdditionalIncludeDirectories="..\..\include" | 87 | AdditionalIncludeDirectories="..\..\include" |
88 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" | 88 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" |
89 | StringPooling="TRUE" | 89 | StringPooling="TRUE" |
90 | RuntimeLibrary="4" | 90 | RuntimeLibrary="4" |
91 | EnableFunctionLevelLinking="TRUE" | 91 | EnableFunctionLevelLinking="TRUE" |
92 | UsePrecompiledHeader="2" | 92 | UsePrecompiledHeader="2" |
93 | PrecompiledHeaderFile=".\Release/Shaders.pch" | 93 | PrecompiledHeaderFile=".\Release/Shaders.pch" |
94 | AssemblerListingLocation=".\Release/" | 94 | AssemblerListingLocation=".\Release/" |
95 | ObjectFile=".\Release/" | 95 | ObjectFile=".\Release/" |
96 | ProgramDataBaseFileName=".\Release/" | 96 | ProgramDataBaseFileName=".\Release/" |
97 | WarningLevel="3" | 97 | WarningLevel="3" |
98 | SuppressStartupBanner="TRUE" | 98 | SuppressStartupBanner="TRUE" |
99 | CompileAs="0"/> | 99 | CompileAs="0"/> |
100 | <Tool | 100 | <Tool |
101 | Name="VCCustomBuildTool"/> | 101 | Name="VCCustomBuildTool"/> |
102 | <Tool | 102 | <Tool |
103 | Name="VCLinkerTool" | 103 | Name="VCLinkerTool" |
104 | OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe" | 104 | OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe" |
105 | LinkIncremental="0" | 105 | LinkIncremental="0" |
106 | SuppressStartupBanner="TRUE" | 106 | SuppressStartupBanner="TRUE" |
107 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | 107 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" |
108 | ProgramDatabaseFile=".\Release/Shaders.pdb" | 108 | ProgramDatabaseFile=".\Release/Shaders.pdb" |
109 | SubSystem="1" | 109 | SubSystem="1" |
110 | TargetMachine="1"/> | 110 | TargetMachine="1"/> |
111 | <Tool | 111 | <Tool |
112 | Name="VCMIDLTool" | 112 | Name="VCMIDLTool" |
113 | TypeLibraryName=".\Release/Shaders.tlb" | 113 | TypeLibraryName=".\Release/Shaders.tlb" |
114 | HeaderFileName=""/> | 114 | HeaderFileName=""/> |
115 | <Tool | 115 | <Tool |
116 | Name="VCPostBuildEventTool"/> | 116 | Name="VCPostBuildEventTool"/> |
117 | <Tool | 117 | <Tool |
118 | Name="VCPreBuildEventTool"/> | 118 | Name="VCPreBuildEventTool"/> |
119 | <Tool | 119 | <Tool |
120 | Name="VCPreLinkEventTool"/> | 120 | Name="VCPreLinkEventTool"/> |
121 | <Tool | 121 | <Tool |
122 | Name="VCResourceCompilerTool" | 122 | Name="VCResourceCompilerTool" |
123 | PreprocessorDefinitions="NDEBUG" | 123 | PreprocessorDefinitions="NDEBUG" |
124 | Culture="3079"/> | 124 | Culture="3079"/> |
125 | <Tool | 125 | <Tool |
126 | Name="VCWebServiceProxyGeneratorTool"/> | 126 | Name="VCWebServiceProxyGeneratorTool"/> |
127 | <Tool | 127 | <Tool |
128 | Name="VCXMLDataGeneratorTool"/> | 128 | Name="VCXMLDataGeneratorTool"/> |
129 | <Tool | 129 | <Tool |
130 | Name="VCWebDeploymentTool"/> | 130 | Name="VCWebDeploymentTool"/> |
131 | <Tool | 131 | <Tool |
132 | Name="VCManagedWrapperGeneratorTool"/> | 132 | Name="VCManagedWrapperGeneratorTool"/> |
133 | <Tool | 133 | <Tool |
134 | Name="VCAuxiliaryManagedWrapperGeneratorTool"/> | 134 | Name="VCAuxiliaryManagedWrapperGeneratorTool"/> |
135 | </Configuration> | 135 | </Configuration> |
136 | </Configurations> | 136 | </Configurations> |
137 | <References> | 137 | <References> |
138 | </References> | 138 | </References> |
139 | <Files> | 139 | <Files> |
140 | <File | 140 | <File |
141 | RelativePath="main.cpp"> | 141 | RelativePath="main.cpp"> |
142 | <FileConfiguration | 142 | <FileConfiguration |
143 | Name="Debug|Win32"> | 143 | Name="Debug|Win32"> |
144 | <Tool | 144 | <Tool |
145 | Name="VCCLCompilerTool" | 145 | Name="VCCLCompilerTool" |
146 | Optimization="0" | 146 | Optimization="0" |
147 | AdditionalIncludeDirectories="" | 147 | AdditionalIncludeDirectories="" |
148 | PreprocessorDefinitions="" | 148 | PreprocessorDefinitions="" |
149 | BasicRuntimeChecks="3"/> | 149 | BasicRuntimeChecks="3"/> |
150 | </FileConfiguration> | 150 | </FileConfiguration> |
151 | <FileConfiguration | 151 | <FileConfiguration |
152 | Name="Release|Win32"> | 152 | Name="Release|Win32"> |
153 | <Tool | 153 | <Tool |
154 | Name="VCCLCompilerTool" | 154 | Name="VCCLCompilerTool" |
155 | Optimization="2" | 155 | Optimization="2" |
156 | AdditionalIncludeDirectories="" | 156 | AdditionalIncludeDirectories="" |
157 | PreprocessorDefinitions=""/> | 157 | PreprocessorDefinitions=""/> |
158 | </FileConfiguration> | 158 | </FileConfiguration> |
159 | </File> | 159 | </File> |
160 | </Files> | 160 | </Files> |
161 | <Globals> | 161 | <Globals> |
162 | </Globals> | 162 | </Globals> |
163 | </VisualStudioProject> | 163 | </VisualStudioProject> |
diff --git a/libraries/irrlicht-1.8/examples/10.Shaders/Shaders_vc10.vcxproj b/libraries/irrlicht-1.8/examples/10.Shaders/Shaders_vc10.vcxproj index c2a526e..13b87e0 100644 --- a/libraries/irrlicht-1.8/examples/10.Shaders/Shaders_vc10.vcxproj +++ b/libraries/irrlicht-1.8/examples/10.Shaders/Shaders_vc10.vcxproj | |||
@@ -1,231 +1,231 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | <ItemGroup Label="ProjectConfigurations"> | 3 | <ItemGroup Label="ProjectConfigurations"> |
4 | <ProjectConfiguration Include="Debug|Win32"> | 4 | <ProjectConfiguration Include="Debug|Win32"> |
5 | <Configuration>Debug</Configuration> | 5 | <Configuration>Debug</Configuration> |
6 | <Platform>Win32</Platform> | 6 | <Platform>Win32</Platform> |
7 | </ProjectConfiguration> | 7 | </ProjectConfiguration> |
8 | <ProjectConfiguration Include="Debug|x64"> | 8 | <ProjectConfiguration Include="Debug|x64"> |
9 | <Configuration>Debug</Configuration> | 9 | <Configuration>Debug</Configuration> |
10 | <Platform>x64</Platform> | 10 | <Platform>x64</Platform> |
11 | </ProjectConfiguration> | 11 | </ProjectConfiguration> |
12 | <ProjectConfiguration Include="Release|Win32"> | 12 | <ProjectConfiguration Include="Release|Win32"> |
13 | <Configuration>Release</Configuration> | 13 | <Configuration>Release</Configuration> |
14 | <Platform>Win32</Platform> | 14 | <Platform>Win32</Platform> |
15 | </ProjectConfiguration> | 15 | </ProjectConfiguration> |
16 | <ProjectConfiguration Include="Release|x64"> | 16 | <ProjectConfiguration Include="Release|x64"> |
17 | <Configuration>Release</Configuration> | 17 | <Configuration>Release</Configuration> |
18 | <Platform>x64</Platform> | 18 | <Platform>x64</Platform> |
19 | </ProjectConfiguration> | 19 | </ProjectConfiguration> |
20 | </ItemGroup> | 20 | </ItemGroup> |
21 | <PropertyGroup Label="Globals"> | 21 | <PropertyGroup Label="Globals"> |
22 | <ProjectName>10.Shaders</ProjectName> | 22 | <ProjectName>10.Shaders</ProjectName> |
23 | <ProjectGuid>{27158C82-CD15-4A9B-9848-35E7065B209F}</ProjectGuid> | 23 | <ProjectGuid>{27158C82-CD15-4A9B-9848-35E7065B209F}</ProjectGuid> |
24 | <RootNamespace>Shaders</RootNamespace> | 24 | <RootNamespace>Shaders</RootNamespace> |
25 | </PropertyGroup> | 25 | </PropertyGroup> |
26 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | 26 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
27 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | 27 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
28 | <ConfigurationType>Application</ConfigurationType> | 28 | <ConfigurationType>Application</ConfigurationType> |
29 | <UseOfMfc>false</UseOfMfc> | 29 | <UseOfMfc>false</UseOfMfc> |
30 | <CharacterSet>MultiByte</CharacterSet> | 30 | <CharacterSet>MultiByte</CharacterSet> |
31 | </PropertyGroup> | 31 | </PropertyGroup> |
32 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | 32 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
33 | <ConfigurationType>Application</ConfigurationType> | 33 | <ConfigurationType>Application</ConfigurationType> |
34 | <UseOfMfc>false</UseOfMfc> | 34 | <UseOfMfc>false</UseOfMfc> |
35 | <CharacterSet>MultiByte</CharacterSet> | 35 | <CharacterSet>MultiByte</CharacterSet> |
36 | </PropertyGroup> | 36 | </PropertyGroup> |
37 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | 37 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
38 | <ConfigurationType>Application</ConfigurationType> | 38 | <ConfigurationType>Application</ConfigurationType> |
39 | <UseOfMfc>false</UseOfMfc> | 39 | <UseOfMfc>false</UseOfMfc> |
40 | <CharacterSet>MultiByte</CharacterSet> | 40 | <CharacterSet>MultiByte</CharacterSet> |
41 | </PropertyGroup> | 41 | </PropertyGroup> |
42 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | 42 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
43 | <ConfigurationType>Application</ConfigurationType> | 43 | <ConfigurationType>Application</ConfigurationType> |
44 | <UseOfMfc>false</UseOfMfc> | 44 | <UseOfMfc>false</UseOfMfc> |
45 | <CharacterSet>MultiByte</CharacterSet> | 45 | <CharacterSet>MultiByte</CharacterSet> |
46 | </PropertyGroup> | 46 | </PropertyGroup> |
47 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 47 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
48 | <ImportGroup Label="ExtensionSettings"> | 48 | <ImportGroup Label="ExtensionSettings"> |
49 | </ImportGroup> | 49 | </ImportGroup> |
50 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> | 50 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> |
51 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 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" /> | 52 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
53 | </ImportGroup> | 53 | </ImportGroup> |
54 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> | 54 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> |
55 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 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" /> | 56 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
57 | </ImportGroup> | 57 | </ImportGroup> |
58 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> | 58 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> |
59 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 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" /> | 60 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
61 | </ImportGroup> | 61 | </ImportGroup> |
62 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> | 62 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> |
63 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 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" /> | 64 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
65 | </ImportGroup> | 65 | </ImportGroup> |
66 | <PropertyGroup Label="UserMacros" /> | 66 | <PropertyGroup Label="UserMacros" /> |
67 | <PropertyGroup> | 67 | <PropertyGroup> |
68 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> | 68 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> |
69 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | 69 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> |
70 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | 70 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> |
71 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 71 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
72 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 72 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
73 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | 73 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> |
74 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | 74 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> |
75 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 75 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
76 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 76 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
77 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | 77 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> |
78 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | 78 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> |
79 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 79 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
80 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 80 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
81 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 81 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
82 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 82 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
83 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | 83 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> |
84 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | 84 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> |
85 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 85 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
86 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 86 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
87 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 87 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
88 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 88 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
89 | </PropertyGroup> | 89 | </PropertyGroup> |
90 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | 90 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
91 | <Midl> | 91 | <Midl> |
92 | <TypeLibraryName>.\Debug/Shaders.tlb</TypeLibraryName> | 92 | <TypeLibraryName>.\Debug/Shaders.tlb</TypeLibraryName> |
93 | <HeaderFileName> | 93 | <HeaderFileName> |
94 | </HeaderFileName> | 94 | </HeaderFileName> |
95 | </Midl> | 95 | </Midl> |
96 | <ClCompile> | 96 | <ClCompile> |
97 | <Optimization>Disabled</Optimization> | 97 | <Optimization>Disabled</Optimization> |
98 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 98 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
99 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 99 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
100 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 100 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
101 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 101 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
102 | <PrecompiledHeader> | 102 | <PrecompiledHeader> |
103 | </PrecompiledHeader> | 103 | </PrecompiledHeader> |
104 | <WarningLevel>Level3</WarningLevel> | 104 | <WarningLevel>Level3</WarningLevel> |
105 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | 105 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |
106 | </ClCompile> | 106 | </ClCompile> |
107 | <ResourceCompile> | 107 | <ResourceCompile> |
108 | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 108 | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
109 | <Culture>0x0c07</Culture> | 109 | <Culture>0x0c07</Culture> |
110 | </ResourceCompile> | 110 | </ResourceCompile> |
111 | <Link> | 111 | <Link> |
112 | <OutputFile>..\..\bin\Win32-VisualStudio\10.Shaders.exe</OutputFile> | 112 | <OutputFile>..\..\bin\Win32-VisualStudio\10.Shaders.exe</OutputFile> |
113 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 113 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
114 | <GenerateDebugInformation>true</GenerateDebugInformation> | 114 | <GenerateDebugInformation>true</GenerateDebugInformation> |
115 | <SubSystem>Console</SubSystem> | 115 | <SubSystem>Console</SubSystem> |
116 | <DataExecutionPrevention> | 116 | <DataExecutionPrevention> |
117 | </DataExecutionPrevention> | 117 | </DataExecutionPrevention> |
118 | </Link> | 118 | </Link> |
119 | </ItemDefinitionGroup> | 119 | </ItemDefinitionGroup> |
120 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | 120 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
121 | <Midl> | 121 | <Midl> |
122 | <TypeLibraryName>.\Debug/Shaders.tlb</TypeLibraryName> | 122 | <TypeLibraryName>.\Debug/Shaders.tlb</TypeLibraryName> |
123 | <HeaderFileName> | 123 | <HeaderFileName> |
124 | </HeaderFileName> | 124 | </HeaderFileName> |
125 | </Midl> | 125 | </Midl> |
126 | <ClCompile> | 126 | <ClCompile> |
127 | <Optimization>Disabled</Optimization> | 127 | <Optimization>Disabled</Optimization> |
128 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 128 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
129 | <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 129 | <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
130 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 130 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
131 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 131 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
132 | <PrecompiledHeader> | 132 | <PrecompiledHeader> |
133 | </PrecompiledHeader> | 133 | </PrecompiledHeader> |
134 | <WarningLevel>Level3</WarningLevel> | 134 | <WarningLevel>Level3</WarningLevel> |
135 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 135 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
136 | </ClCompile> | 136 | </ClCompile> |
137 | <ResourceCompile> | 137 | <ResourceCompile> |
138 | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 138 | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
139 | <Culture>0x0c07</Culture> | 139 | <Culture>0x0c07</Culture> |
140 | </ResourceCompile> | 140 | </ResourceCompile> |
141 | <Link> | 141 | <Link> |
142 | <OutputFile>..\..\bin\Win64-VisualStudio\10.Shaders.exe</OutputFile> | 142 | <OutputFile>..\..\bin\Win64-VisualStudio\10.Shaders.exe</OutputFile> |
143 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 143 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
144 | <GenerateDebugInformation>true</GenerateDebugInformation> | 144 | <GenerateDebugInformation>true</GenerateDebugInformation> |
145 | <SubSystem>Console</SubSystem> | 145 | <SubSystem>Console</SubSystem> |
146 | <DataExecutionPrevention> | 146 | <DataExecutionPrevention> |
147 | </DataExecutionPrevention> | 147 | </DataExecutionPrevention> |
148 | </Link> | 148 | </Link> |
149 | </ItemDefinitionGroup> | 149 | </ItemDefinitionGroup> |
150 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | 150 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
151 | <Midl> | 151 | <Midl> |
152 | <TypeLibraryName>.\Release/Shaders.tlb</TypeLibraryName> | 152 | <TypeLibraryName>.\Release/Shaders.tlb</TypeLibraryName> |
153 | <HeaderFileName> | 153 | <HeaderFileName> |
154 | </HeaderFileName> | 154 | </HeaderFileName> |
155 | </Midl> | 155 | </Midl> |
156 | <ClCompile> | 156 | <ClCompile> |
157 | <Optimization>MaxSpeed</Optimization> | 157 | <Optimization>MaxSpeed</Optimization> |
158 | <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> | 158 | <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> |
159 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 159 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
160 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 160 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
161 | <StringPooling>true</StringPooling> | 161 | <StringPooling>true</StringPooling> |
162 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | 162 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
163 | <FunctionLevelLinking>true</FunctionLevelLinking> | 163 | <FunctionLevelLinking>true</FunctionLevelLinking> |
164 | <PrecompiledHeader> | 164 | <PrecompiledHeader> |
165 | </PrecompiledHeader> | 165 | </PrecompiledHeader> |
166 | <WarningLevel>Level3</WarningLevel> | 166 | <WarningLevel>Level3</WarningLevel> |
167 | </ClCompile> | 167 | </ClCompile> |
168 | <ResourceCompile> | 168 | <ResourceCompile> |
169 | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 169 | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
170 | <Culture>0x0c07</Culture> | 170 | <Culture>0x0c07</Culture> |
171 | </ResourceCompile> | 171 | </ResourceCompile> |
172 | <Link> | 172 | <Link> |
173 | <OutputFile>..\..\bin\Win32-VisualStudio\10.Shaders.exe</OutputFile> | 173 | <OutputFile>..\..\bin\Win32-VisualStudio\10.Shaders.exe</OutputFile> |
174 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 174 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
175 | <SubSystem>Console</SubSystem> | 175 | <SubSystem>Console</SubSystem> |
176 | <DataExecutionPrevention> | 176 | <DataExecutionPrevention> |
177 | </DataExecutionPrevention> | 177 | </DataExecutionPrevention> |
178 | </Link> | 178 | </Link> |
179 | </ItemDefinitionGroup> | 179 | </ItemDefinitionGroup> |
180 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | 180 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
181 | <Midl> | 181 | <Midl> |
182 | <TypeLibraryName>.\Release/Shaders.tlb</TypeLibraryName> | 182 | <TypeLibraryName>.\Release/Shaders.tlb</TypeLibraryName> |
183 | <HeaderFileName> | 183 | <HeaderFileName> |
184 | </HeaderFileName> | 184 | </HeaderFileName> |
185 | </Midl> | 185 | </Midl> |
186 | <ClCompile> | 186 | <ClCompile> |
187 | <Optimization>MaxSpeed</Optimization> | 187 | <Optimization>MaxSpeed</Optimization> |
188 | <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> | 188 | <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> |
189 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 189 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
190 | <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 190 | <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
191 | <StringPooling>true</StringPooling> | 191 | <StringPooling>true</StringPooling> |
192 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | 192 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
193 | <FunctionLevelLinking>true</FunctionLevelLinking> | 193 | <FunctionLevelLinking>true</FunctionLevelLinking> |
194 | <PrecompiledHeader> | 194 | <PrecompiledHeader> |
195 | </PrecompiledHeader> | 195 | </PrecompiledHeader> |
196 | <WarningLevel>Level3</WarningLevel> | 196 | <WarningLevel>Level3</WarningLevel> |
197 | </ClCompile> | 197 | </ClCompile> |
198 | <ResourceCompile> | 198 | <ResourceCompile> |
199 | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 199 | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
200 | <Culture>0x0c07</Culture> | 200 | <Culture>0x0c07</Culture> |
201 | </ResourceCompile> | 201 | </ResourceCompile> |
202 | <Link> | 202 | <Link> |
203 | <OutputFile>..\..\bin\Win64-VisualStudio\10.Shaders.exe</OutputFile> | 203 | <OutputFile>..\..\bin\Win64-VisualStudio\10.Shaders.exe</OutputFile> |
204 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 204 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
205 | <SubSystem>Console</SubSystem> | 205 | <SubSystem>Console</SubSystem> |
206 | <DataExecutionPrevention> | 206 | <DataExecutionPrevention> |
207 | </DataExecutionPrevention> | 207 | </DataExecutionPrevention> |
208 | </Link> | 208 | </Link> |
209 | </ItemDefinitionGroup> | 209 | </ItemDefinitionGroup> |
210 | <ItemGroup> | 210 | <ItemGroup> |
211 | <ClCompile Include="main.cpp"> | 211 | <ClCompile Include="main.cpp"> |
212 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> | 212 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> |
213 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> | 213 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> |
214 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 214 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
215 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 215 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
216 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> | 216 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> |
217 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> | 217 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> |
218 | <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> | 218 | <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> |
219 | <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> | 219 | <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> |
220 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> | 220 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> |
221 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> | 221 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> |
222 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 222 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
223 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 223 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
224 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> | 224 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> |
225 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> | 225 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> |
226 | </ClCompile> | 226 | </ClCompile> |
227 | </ItemGroup> | 227 | </ItemGroup> |
228 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 228 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
229 | <ImportGroup Label="ExtensionTargets"> | 229 | <ImportGroup Label="ExtensionTargets"> |
230 | </ImportGroup> | 230 | </ImportGroup> |
231 | </Project> \ No newline at end of file | 231 | </Project> \ No newline at end of file |
diff --git a/libraries/irrlicht-1.8/examples/10.Shaders/Shaders_vc11.vcxproj b/libraries/irrlicht-1.8/examples/10.Shaders/Shaders_vc11.vcxproj index 30ae642..df95120 100644 --- a/libraries/irrlicht-1.8/examples/10.Shaders/Shaders_vc11.vcxproj +++ b/libraries/irrlicht-1.8/examples/10.Shaders/Shaders_vc11.vcxproj | |||
@@ -1,235 +1,235 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | <ItemGroup Label="ProjectConfigurations"> | 3 | <ItemGroup Label="ProjectConfigurations"> |
4 | <ProjectConfiguration Include="Debug|Win32"> | 4 | <ProjectConfiguration Include="Debug|Win32"> |
5 | <Configuration>Debug</Configuration> | 5 | <Configuration>Debug</Configuration> |
6 | <Platform>Win32</Platform> | 6 | <Platform>Win32</Platform> |
7 | </ProjectConfiguration> | 7 | </ProjectConfiguration> |
8 | <ProjectConfiguration Include="Debug|x64"> | 8 | <ProjectConfiguration Include="Debug|x64"> |
9 | <Configuration>Debug</Configuration> | 9 | <Configuration>Debug</Configuration> |
10 | <Platform>x64</Platform> | 10 | <Platform>x64</Platform> |
11 | </ProjectConfiguration> | 11 | </ProjectConfiguration> |
12 | <ProjectConfiguration Include="Release|Win32"> | 12 | <ProjectConfiguration Include="Release|Win32"> |
13 | <Configuration>Release</Configuration> | 13 | <Configuration>Release</Configuration> |
14 | <Platform>Win32</Platform> | 14 | <Platform>Win32</Platform> |
15 | </ProjectConfiguration> | 15 | </ProjectConfiguration> |
16 | <ProjectConfiguration Include="Release|x64"> | 16 | <ProjectConfiguration Include="Release|x64"> |
17 | <Configuration>Release</Configuration> | 17 | <Configuration>Release</Configuration> |
18 | <Platform>x64</Platform> | 18 | <Platform>x64</Platform> |
19 | </ProjectConfiguration> | 19 | </ProjectConfiguration> |
20 | </ItemGroup> | 20 | </ItemGroup> |
21 | <PropertyGroup Label="Globals"> | 21 | <PropertyGroup Label="Globals"> |
22 | <ProjectName>10.Shaders</ProjectName> | 22 | <ProjectName>10.Shaders</ProjectName> |
23 | <ProjectGuid>{27158C82-CD15-4A9B-9848-35E7065B209F}</ProjectGuid> | 23 | <ProjectGuid>{27158C82-CD15-4A9B-9848-35E7065B209F}</ProjectGuid> |
24 | <RootNamespace>Shaders</RootNamespace> | 24 | <RootNamespace>Shaders</RootNamespace> |
25 | </PropertyGroup> | 25 | </PropertyGroup> |
26 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | 26 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
27 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | 27 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
28 | <ConfigurationType>Application</ConfigurationType> | 28 | <ConfigurationType>Application</ConfigurationType> |
29 | <UseOfMfc>false</UseOfMfc> | 29 | <UseOfMfc>false</UseOfMfc> |
30 | <CharacterSet>MultiByte</CharacterSet> | 30 | <CharacterSet>MultiByte</CharacterSet> |
31 | <PlatformToolset>v110</PlatformToolset> | 31 | <PlatformToolset>v110</PlatformToolset> |
32 | </PropertyGroup> | 32 | </PropertyGroup> |
33 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | 33 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
34 | <ConfigurationType>Application</ConfigurationType> | 34 | <ConfigurationType>Application</ConfigurationType> |
35 | <UseOfMfc>false</UseOfMfc> | 35 | <UseOfMfc>false</UseOfMfc> |
36 | <CharacterSet>MultiByte</CharacterSet> | 36 | <CharacterSet>MultiByte</CharacterSet> |
37 | <PlatformToolset>v110</PlatformToolset> | 37 | <PlatformToolset>v110</PlatformToolset> |
38 | </PropertyGroup> | 38 | </PropertyGroup> |
39 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | 39 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
40 | <ConfigurationType>Application</ConfigurationType> | 40 | <ConfigurationType>Application</ConfigurationType> |
41 | <UseOfMfc>false</UseOfMfc> | 41 | <UseOfMfc>false</UseOfMfc> |
42 | <CharacterSet>MultiByte</CharacterSet> | 42 | <CharacterSet>MultiByte</CharacterSet> |
43 | <PlatformToolset>v110</PlatformToolset> | 43 | <PlatformToolset>v110</PlatformToolset> |
44 | </PropertyGroup> | 44 | </PropertyGroup> |
45 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | 45 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
46 | <ConfigurationType>Application</ConfigurationType> | 46 | <ConfigurationType>Application</ConfigurationType> |
47 | <UseOfMfc>false</UseOfMfc> | 47 | <UseOfMfc>false</UseOfMfc> |
48 | <CharacterSet>MultiByte</CharacterSet> | 48 | <CharacterSet>MultiByte</CharacterSet> |
49 | <PlatformToolset>v110</PlatformToolset> | 49 | <PlatformToolset>v110</PlatformToolset> |
50 | </PropertyGroup> | 50 | </PropertyGroup> |
51 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 51 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
52 | <ImportGroup Label="ExtensionSettings"> | 52 | <ImportGroup Label="ExtensionSettings"> |
53 | </ImportGroup> | 53 | </ImportGroup> |
54 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> | 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" /> | 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" /> | 56 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
57 | </ImportGroup> | 57 | </ImportGroup> |
58 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> | 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" /> | 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" /> | 60 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
61 | </ImportGroup> | 61 | </ImportGroup> |
62 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> | 62 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> |
63 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 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" /> | 64 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
65 | </ImportGroup> | 65 | </ImportGroup> |
66 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> | 66 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> |
67 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 67 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
68 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 68 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
69 | </ImportGroup> | 69 | </ImportGroup> |
70 | <PropertyGroup Label="UserMacros" /> | 70 | <PropertyGroup Label="UserMacros" /> |
71 | <PropertyGroup> | 71 | <PropertyGroup> |
72 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> | 72 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> |
73 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | 73 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> |
74 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | 74 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> |
75 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 75 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
76 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 76 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
77 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | 77 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> |
78 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | 78 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> |
79 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 79 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
80 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 80 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
81 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | 81 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> |
82 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | 82 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> |
83 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 83 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
84 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 84 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
85 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 85 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
86 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 86 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
87 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | 87 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> |
88 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | 88 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> |
89 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 89 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
90 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 90 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
91 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 91 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
92 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 92 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
93 | </PropertyGroup> | 93 | </PropertyGroup> |
94 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | 94 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
95 | <Midl> | 95 | <Midl> |
96 | <TypeLibraryName>.\Debug/Shaders.tlb</TypeLibraryName> | 96 | <TypeLibraryName>.\Debug/Shaders.tlb</TypeLibraryName> |
97 | <HeaderFileName> | 97 | <HeaderFileName> |
98 | </HeaderFileName> | 98 | </HeaderFileName> |
99 | </Midl> | 99 | </Midl> |
100 | <ClCompile> | 100 | <ClCompile> |
101 | <Optimization>Disabled</Optimization> | 101 | <Optimization>Disabled</Optimization> |
102 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 102 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
103 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 103 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
104 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 104 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
105 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 105 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
106 | <PrecompiledHeader> | 106 | <PrecompiledHeader> |
107 | </PrecompiledHeader> | 107 | </PrecompiledHeader> |
108 | <WarningLevel>Level3</WarningLevel> | 108 | <WarningLevel>Level3</WarningLevel> |
109 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | 109 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |
110 | </ClCompile> | 110 | </ClCompile> |
111 | <ResourceCompile> | 111 | <ResourceCompile> |
112 | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 112 | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
113 | <Culture>0x0c07</Culture> | 113 | <Culture>0x0c07</Culture> |
114 | </ResourceCompile> | 114 | </ResourceCompile> |
115 | <Link> | 115 | <Link> |
116 | <OutputFile>..\..\bin\Win32-VisualStudio\10.Shaders.exe</OutputFile> | 116 | <OutputFile>..\..\bin\Win32-VisualStudio\10.Shaders.exe</OutputFile> |
117 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 117 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
118 | <GenerateDebugInformation>true</GenerateDebugInformation> | 118 | <GenerateDebugInformation>true</GenerateDebugInformation> |
119 | <SubSystem>Console</SubSystem> | 119 | <SubSystem>Console</SubSystem> |
120 | <DataExecutionPrevention> | 120 | <DataExecutionPrevention> |
121 | </DataExecutionPrevention> | 121 | </DataExecutionPrevention> |
122 | </Link> | 122 | </Link> |
123 | </ItemDefinitionGroup> | 123 | </ItemDefinitionGroup> |
124 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | 124 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
125 | <Midl> | 125 | <Midl> |
126 | <TypeLibraryName>.\Debug/Shaders.tlb</TypeLibraryName> | 126 | <TypeLibraryName>.\Debug/Shaders.tlb</TypeLibraryName> |
127 | <HeaderFileName> | 127 | <HeaderFileName> |
128 | </HeaderFileName> | 128 | </HeaderFileName> |
129 | </Midl> | 129 | </Midl> |
130 | <ClCompile> | 130 | <ClCompile> |
131 | <Optimization>Disabled</Optimization> | 131 | <Optimization>Disabled</Optimization> |
132 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 132 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
133 | <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 133 | <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
134 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 134 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
135 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 135 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
136 | <PrecompiledHeader> | 136 | <PrecompiledHeader> |
137 | </PrecompiledHeader> | 137 | </PrecompiledHeader> |
138 | <WarningLevel>Level3</WarningLevel> | 138 | <WarningLevel>Level3</WarningLevel> |
139 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 139 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
140 | </ClCompile> | 140 | </ClCompile> |
141 | <ResourceCompile> | 141 | <ResourceCompile> |
142 | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 142 | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
143 | <Culture>0x0c07</Culture> | 143 | <Culture>0x0c07</Culture> |
144 | </ResourceCompile> | 144 | </ResourceCompile> |
145 | <Link> | 145 | <Link> |
146 | <OutputFile>..\..\bin\Win64-VisualStudio\10.Shaders.exe</OutputFile> | 146 | <OutputFile>..\..\bin\Win64-VisualStudio\10.Shaders.exe</OutputFile> |
147 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 147 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
148 | <GenerateDebugInformation>true</GenerateDebugInformation> | 148 | <GenerateDebugInformation>true</GenerateDebugInformation> |
149 | <SubSystem>Console</SubSystem> | 149 | <SubSystem>Console</SubSystem> |
150 | <DataExecutionPrevention> | 150 | <DataExecutionPrevention> |
151 | </DataExecutionPrevention> | 151 | </DataExecutionPrevention> |
152 | </Link> | 152 | </Link> |
153 | </ItemDefinitionGroup> | 153 | </ItemDefinitionGroup> |
154 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | 154 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
155 | <Midl> | 155 | <Midl> |
156 | <TypeLibraryName>.\Release/Shaders.tlb</TypeLibraryName> | 156 | <TypeLibraryName>.\Release/Shaders.tlb</TypeLibraryName> |
157 | <HeaderFileName> | 157 | <HeaderFileName> |
158 | </HeaderFileName> | 158 | </HeaderFileName> |
159 | </Midl> | 159 | </Midl> |
160 | <ClCompile> | 160 | <ClCompile> |
161 | <Optimization>MaxSpeed</Optimization> | 161 | <Optimization>MaxSpeed</Optimization> |
162 | <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> | 162 | <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> |
163 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 163 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
164 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 164 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
165 | <StringPooling>true</StringPooling> | 165 | <StringPooling>true</StringPooling> |
166 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | 166 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
167 | <FunctionLevelLinking>true</FunctionLevelLinking> | 167 | <FunctionLevelLinking>true</FunctionLevelLinking> |
168 | <PrecompiledHeader> | 168 | <PrecompiledHeader> |
169 | </PrecompiledHeader> | 169 | </PrecompiledHeader> |
170 | <WarningLevel>Level3</WarningLevel> | 170 | <WarningLevel>Level3</WarningLevel> |
171 | </ClCompile> | 171 | </ClCompile> |
172 | <ResourceCompile> | 172 | <ResourceCompile> |
173 | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 173 | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
174 | <Culture>0x0c07</Culture> | 174 | <Culture>0x0c07</Culture> |
175 | </ResourceCompile> | 175 | </ResourceCompile> |
176 | <Link> | 176 | <Link> |
177 | <OutputFile>..\..\bin\Win32-VisualStudio\10.Shaders.exe</OutputFile> | 177 | <OutputFile>..\..\bin\Win32-VisualStudio\10.Shaders.exe</OutputFile> |
178 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 178 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
179 | <SubSystem>Console</SubSystem> | 179 | <SubSystem>Console</SubSystem> |
180 | <DataExecutionPrevention> | 180 | <DataExecutionPrevention> |
181 | </DataExecutionPrevention> | 181 | </DataExecutionPrevention> |
182 | </Link> | 182 | </Link> |
183 | </ItemDefinitionGroup> | 183 | </ItemDefinitionGroup> |
184 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | 184 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
185 | <Midl> | 185 | <Midl> |
186 | <TypeLibraryName>.\Release/Shaders.tlb</TypeLibraryName> | 186 | <TypeLibraryName>.\Release/Shaders.tlb</TypeLibraryName> |
187 | <HeaderFileName> | 187 | <HeaderFileName> |
188 | </HeaderFileName> | 188 | </HeaderFileName> |
189 | </Midl> | 189 | </Midl> |
190 | <ClCompile> | 190 | <ClCompile> |
191 | <Optimization>MaxSpeed</Optimization> | 191 | <Optimization>MaxSpeed</Optimization> |
192 | <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> | 192 | <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> |
193 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 193 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
194 | <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 194 | <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
195 | <StringPooling>true</StringPooling> | 195 | <StringPooling>true</StringPooling> |
196 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | 196 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
197 | <FunctionLevelLinking>true</FunctionLevelLinking> | 197 | <FunctionLevelLinking>true</FunctionLevelLinking> |
198 | <PrecompiledHeader> | 198 | <PrecompiledHeader> |
199 | </PrecompiledHeader> | 199 | </PrecompiledHeader> |
200 | <WarningLevel>Level3</WarningLevel> | 200 | <WarningLevel>Level3</WarningLevel> |
201 | </ClCompile> | 201 | </ClCompile> |
202 | <ResourceCompile> | 202 | <ResourceCompile> |
203 | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 203 | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
204 | <Culture>0x0c07</Culture> | 204 | <Culture>0x0c07</Culture> |
205 | </ResourceCompile> | 205 | </ResourceCompile> |
206 | <Link> | 206 | <Link> |
207 | <OutputFile>..\..\bin\Win64-VisualStudio\10.Shaders.exe</OutputFile> | 207 | <OutputFile>..\..\bin\Win64-VisualStudio\10.Shaders.exe</OutputFile> |
208 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 208 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
209 | <SubSystem>Console</SubSystem> | 209 | <SubSystem>Console</SubSystem> |
210 | <DataExecutionPrevention> | 210 | <DataExecutionPrevention> |
211 | </DataExecutionPrevention> | 211 | </DataExecutionPrevention> |
212 | </Link> | 212 | </Link> |
213 | </ItemDefinitionGroup> | 213 | </ItemDefinitionGroup> |
214 | <ItemGroup> | 214 | <ItemGroup> |
215 | <ClCompile Include="main.cpp"> | 215 | <ClCompile Include="main.cpp"> |
216 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> | 216 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> |
217 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> | 217 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> |
218 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 218 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
219 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 219 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
220 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> | 220 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> |
221 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> | 221 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> |
222 | <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> | 222 | <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> |
223 | <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> | 223 | <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> |
224 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> | 224 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> |
225 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> | 225 | <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> |
226 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 226 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
227 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 227 | <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
228 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> | 228 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> |
229 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> | 229 | <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> |
230 | </ClCompile> | 230 | </ClCompile> |
231 | </ItemGroup> | 231 | </ItemGroup> |
232 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 232 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
233 | <ImportGroup Label="ExtensionTargets"> | 233 | <ImportGroup Label="ExtensionTargets"> |
234 | </ImportGroup> | 234 | </ImportGroup> |
235 | </Project> \ No newline at end of file | 235 | </Project> \ No newline at end of file |
diff --git a/libraries/irrlicht-1.8/examples/10.Shaders/Shaders_vc8.vcproj b/libraries/irrlicht-1.8/examples/10.Shaders/Shaders_vc8.vcproj index f107140..17be17c 100644 --- a/libraries/irrlicht-1.8/examples/10.Shaders/Shaders_vc8.vcproj +++ b/libraries/irrlicht-1.8/examples/10.Shaders/Shaders_vc8.vcproj | |||
@@ -1,231 +1,231 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | 1 | <?xml version="1.0" encoding="Windows-1252"?> |
2 | <VisualStudioProject | 2 | <VisualStudioProject |
3 | ProjectType="Visual C++" | 3 | ProjectType="Visual C++" |
4 | Version="8.00" | 4 | Version="8.00" |
5 | Name="10.Shaders_vc8" | 5 | Name="10.Shaders_vc8" |
6 | ProjectGUID="{27158C82-CD15-4A9B-9848-35E7065B209F}" | 6 | ProjectGUID="{27158C82-CD15-4A9B-9848-35E7065B209F}" |
7 | RootNamespace="Shaders_vc8" | 7 | RootNamespace="Shaders_vc8" |
8 | > | 8 | > |
9 | <Platforms> | 9 | <Platforms> |
10 | <Platform | 10 | <Platform |
11 | Name="Win32" | 11 | Name="Win32" |
12 | /> | 12 | /> |
13 | </Platforms> | 13 | </Platforms> |
14 | <ToolFiles> | 14 | <ToolFiles> |
15 | </ToolFiles> | 15 | </ToolFiles> |
16 | <Configurations> | 16 | <Configurations> |
17 | <Configuration | 17 | <Configuration |
18 | Name="Debug|Win32" | 18 | Name="Debug|Win32" |
19 | OutputDirectory=".\Debug" | 19 | OutputDirectory=".\Debug" |
20 | IntermediateDirectory=".\Debug" | 20 | IntermediateDirectory=".\Debug" |
21 | ConfigurationType="1" | 21 | ConfigurationType="1" |
22 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 22 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
23 | UseOfMFC="0" | 23 | UseOfMFC="0" |
24 | ATLMinimizesCRunTimeLibraryUsage="false" | 24 | ATLMinimizesCRunTimeLibraryUsage="false" |
25 | CharacterSet="2" | 25 | CharacterSet="2" |
26 | > | 26 | > |
27 | <Tool | 27 | <Tool |
28 | Name="VCPreBuildEventTool" | 28 | Name="VCPreBuildEventTool" |
29 | /> | 29 | /> |
30 | <Tool | 30 | <Tool |
31 | Name="VCCustomBuildTool" | 31 | Name="VCCustomBuildTool" |
32 | /> | 32 | /> |
33 | <Tool | 33 | <Tool |
34 | Name="VCXMLDataGeneratorTool" | 34 | Name="VCXMLDataGeneratorTool" |
35 | /> | 35 | /> |
36 | <Tool | 36 | <Tool |
37 | Name="VCWebServiceProxyGeneratorTool" | 37 | Name="VCWebServiceProxyGeneratorTool" |
38 | /> | 38 | /> |
39 | <Tool | 39 | <Tool |
40 | Name="VCMIDLTool" | 40 | Name="VCMIDLTool" |
41 | TypeLibraryName=".\Debug/Shaders.tlb" | 41 | TypeLibraryName=".\Debug/Shaders.tlb" |
42 | HeaderFileName="" | 42 | HeaderFileName="" |
43 | /> | 43 | /> |
44 | <Tool | 44 | <Tool |
45 | Name="VCCLCompilerTool" | 45 | Name="VCCLCompilerTool" |
46 | Optimization="0" | 46 | Optimization="0" |
47 | AdditionalIncludeDirectories="..\..\include" | 47 | AdditionalIncludeDirectories="..\..\include" |
48 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" | 48 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" |
49 | BasicRuntimeChecks="3" | 49 | BasicRuntimeChecks="3" |
50 | RuntimeLibrary="1" | 50 | RuntimeLibrary="1" |
51 | UsePrecompiledHeader="0" | 51 | UsePrecompiledHeader="0" |
52 | PrecompiledHeaderFile=".\Debug/Shaders.pch" | 52 | PrecompiledHeaderFile=".\Debug/Shaders.pch" |
53 | AssemblerListingLocation=".\Debug/" | 53 | AssemblerListingLocation=".\Debug/" |
54 | ObjectFile=".\Debug/" | 54 | ObjectFile=".\Debug/" |
55 | ProgramDataBaseFileName=".\Debug/" | 55 | ProgramDataBaseFileName=".\Debug/" |
56 | WarningLevel="3" | 56 | WarningLevel="3" |
57 | SuppressStartupBanner="true" | 57 | SuppressStartupBanner="true" |
58 | DebugInformationFormat="4" | 58 | DebugInformationFormat="4" |
59 | CompileAs="0" | 59 | CompileAs="0" |
60 | /> | 60 | /> |
61 | <Tool | 61 | <Tool |
62 | Name="VCManagedResourceCompilerTool" | 62 | Name="VCManagedResourceCompilerTool" |
63 | /> | 63 | /> |
64 | <Tool | 64 | <Tool |
65 | Name="VCResourceCompilerTool" | 65 | Name="VCResourceCompilerTool" |
66 | PreprocessorDefinitions="_DEBUG" | 66 | PreprocessorDefinitions="_DEBUG" |
67 | Culture="3079" | 67 | Culture="3079" |
68 | /> | 68 | /> |
69 | <Tool | 69 | <Tool |
70 | Name="VCPreLinkEventTool" | 70 | Name="VCPreLinkEventTool" |
71 | /> | 71 | /> |
72 | <Tool | 72 | <Tool |
73 | Name="VCLinkerTool" | 73 | Name="VCLinkerTool" |
74 | OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe" | 74 | OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe" |
75 | LinkIncremental="0" | 75 | LinkIncremental="0" |
76 | SuppressStartupBanner="true" | 76 | SuppressStartupBanner="true" |
77 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | 77 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" |
78 | GenerateDebugInformation="true" | 78 | GenerateDebugInformation="true" |
79 | ProgramDatabaseFile=".\Debug/Shaders.pdb" | 79 | ProgramDatabaseFile=".\Debug/Shaders.pdb" |
80 | SubSystem="1" | 80 | SubSystem="1" |
81 | TargetMachine="1" | 81 | TargetMachine="1" |
82 | /> | 82 | /> |
83 | <Tool | 83 | <Tool |
84 | Name="VCALinkTool" | 84 | Name="VCALinkTool" |
85 | /> | 85 | /> |
86 | <Tool | 86 | <Tool |
87 | Name="VCManifestTool" | 87 | Name="VCManifestTool" |
88 | /> | 88 | /> |
89 | <Tool | 89 | <Tool |
90 | Name="VCXDCMakeTool" | 90 | Name="VCXDCMakeTool" |
91 | /> | 91 | /> |
92 | <Tool | 92 | <Tool |
93 | Name="VCBscMakeTool" | 93 | Name="VCBscMakeTool" |
94 | /> | 94 | /> |
95 | <Tool | 95 | <Tool |
96 | Name="VCFxCopTool" | 96 | Name="VCFxCopTool" |
97 | /> | 97 | /> |
98 | <Tool | 98 | <Tool |
99 | Name="VCAppVerifierTool" | 99 | Name="VCAppVerifierTool" |
100 | /> | 100 | /> |
101 | <Tool | 101 | <Tool |
102 | Name="VCWebDeploymentTool" | 102 | Name="VCWebDeploymentTool" |
103 | /> | 103 | /> |
104 | <Tool | 104 | <Tool |
105 | Name="VCPostBuildEventTool" | 105 | Name="VCPostBuildEventTool" |
106 | /> | 106 | /> |
107 | </Configuration> | 107 | </Configuration> |
108 | <Configuration | 108 | <Configuration |
109 | Name="Release|Win32" | 109 | Name="Release|Win32" |
110 | OutputDirectory=".\Release" | 110 | OutputDirectory=".\Release" |
111 | IntermediateDirectory=".\Release" | 111 | IntermediateDirectory=".\Release" |
112 | ConfigurationType="1" | 112 | ConfigurationType="1" |
113 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 113 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
114 | UseOfMFC="0" | 114 | UseOfMFC="0" |
115 | ATLMinimizesCRunTimeLibraryUsage="false" | 115 | ATLMinimizesCRunTimeLibraryUsage="false" |
116 | CharacterSet="2" | 116 | CharacterSet="2" |
117 | > | 117 | > |
118 | <Tool | 118 | <Tool |
119 | Name="VCPreBuildEventTool" | 119 | Name="VCPreBuildEventTool" |
120 | /> | 120 | /> |
121 | <Tool | 121 | <Tool |
122 | Name="VCCustomBuildTool" | 122 | Name="VCCustomBuildTool" |
123 | /> | 123 | /> |
124 | <Tool | 124 | <Tool |
125 | Name="VCXMLDataGeneratorTool" | 125 | Name="VCXMLDataGeneratorTool" |
126 | /> | 126 | /> |
127 | <Tool | 127 | <Tool |
128 | Name="VCWebServiceProxyGeneratorTool" | 128 | Name="VCWebServiceProxyGeneratorTool" |
129 | /> | 129 | /> |
130 | <Tool | 130 | <Tool |
131 | Name="VCMIDLTool" | 131 | Name="VCMIDLTool" |
132 | TypeLibraryName=".\Release/Shaders.tlb" | 132 | TypeLibraryName=".\Release/Shaders.tlb" |
133 | HeaderFileName="" | 133 | HeaderFileName="" |
134 | /> | 134 | /> |
135 | <Tool | 135 | <Tool |
136 | Name="VCCLCompilerTool" | 136 | Name="VCCLCompilerTool" |
137 | Optimization="2" | 137 | Optimization="2" |
138 | InlineFunctionExpansion="1" | 138 | InlineFunctionExpansion="1" |
139 | AdditionalIncludeDirectories="..\..\include" | 139 | AdditionalIncludeDirectories="..\..\include" |
140 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" | 140 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" |
141 | StringPooling="true" | 141 | StringPooling="true" |
142 | RuntimeLibrary="0" | 142 | RuntimeLibrary="0" |
143 | EnableFunctionLevelLinking="true" | 143 | EnableFunctionLevelLinking="true" |
144 | UsePrecompiledHeader="0" | 144 | UsePrecompiledHeader="0" |
145 | PrecompiledHeaderFile=".\Release/Shaders.pch" | 145 | PrecompiledHeaderFile=".\Release/Shaders.pch" |
146 | AssemblerListingLocation=".\Release/" | 146 | AssemblerListingLocation=".\Release/" |
147 | ObjectFile=".\Release/" | 147 | ObjectFile=".\Release/" |
148 | ProgramDataBaseFileName=".\Release/" | 148 | ProgramDataBaseFileName=".\Release/" |
149 | WarningLevel="3" | 149 | WarningLevel="3" |
150 | SuppressStartupBanner="true" | 150 | SuppressStartupBanner="true" |
151 | CompileAs="0" | 151 | CompileAs="0" |
152 | /> | 152 | /> |
153 | <Tool | 153 | <Tool |
154 | Name="VCManagedResourceCompilerTool" | 154 | Name="VCManagedResourceCompilerTool" |
155 | /> | 155 | /> |
156 | <Tool | 156 | <Tool |
157 | Name="VCResourceCompilerTool" | 157 | Name="VCResourceCompilerTool" |
158 | PreprocessorDefinitions="NDEBUG" | 158 | PreprocessorDefinitions="NDEBUG" |
159 | Culture="3079" | 159 | Culture="3079" |
160 | /> | 160 | /> |
161 | <Tool | 161 | <Tool |
162 | Name="VCPreLinkEventTool" | 162 | Name="VCPreLinkEventTool" |
163 | /> | 163 | /> |
164 | <Tool | 164 | <Tool |
165 | Name="VCLinkerTool" | 165 | Name="VCLinkerTool" |
166 | OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe" | 166 | OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe" |
167 | LinkIncremental="0" | 167 | LinkIncremental="0" |
168 | SuppressStartupBanner="true" | 168 | SuppressStartupBanner="true" |
169 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | 169 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" |
170 | ProgramDatabaseFile=".\Release/Shaders.pdb" | 170 | ProgramDatabaseFile=".\Release/Shaders.pdb" |
171 | SubSystem="1" | 171 | SubSystem="1" |
172 | TargetMachine="1" | 172 | TargetMachine="1" |
173 | /> | 173 | /> |
174 | <Tool | 174 | <Tool |
175 | Name="VCALinkTool" | 175 | Name="VCALinkTool" |
176 | /> | 176 | /> |
177 | <Tool | 177 | <Tool |
178 | Name="VCManifestTool" | 178 | Name="VCManifestTool" |
179 | /> | 179 | /> |
180 | <Tool | 180 | <Tool |
181 | Name="VCXDCMakeTool" | 181 | Name="VCXDCMakeTool" |
182 | /> | 182 | /> |
183 | <Tool | 183 | <Tool |
184 | Name="VCBscMakeTool" | 184 | Name="VCBscMakeTool" |
185 | /> | 185 | /> |
186 | <Tool | 186 | <Tool |
187 | Name="VCFxCopTool" | 187 | Name="VCFxCopTool" |
188 | /> | 188 | /> |
189 | <Tool | 189 | <Tool |
190 | Name="VCAppVerifierTool" | 190 | Name="VCAppVerifierTool" |
191 | /> | 191 | /> |
192 | <Tool | 192 | <Tool |
193 | Name="VCWebDeploymentTool" | 193 | Name="VCWebDeploymentTool" |
194 | /> | 194 | /> |
195 | <Tool | 195 | <Tool |
196 | Name="VCPostBuildEventTool" | 196 | Name="VCPostBuildEventTool" |
197 | /> | 197 | /> |
198 | </Configuration> | 198 | </Configuration> |
199 | </Configurations> | 199 | </Configurations> |
200 | <References> | 200 | <References> |
201 | </References> | 201 | </References> |
202 | <Files> | 202 | <Files> |
203 | <File | 203 | <File |
204 | RelativePath="main.cpp" | 204 | RelativePath="main.cpp" |
205 | > | 205 | > |
206 | <FileConfiguration | 206 | <FileConfiguration |
207 | Name="Debug|Win32" | 207 | Name="Debug|Win32" |
208 | > | 208 | > |
209 | <Tool | 209 | <Tool |
210 | Name="VCCLCompilerTool" | 210 | Name="VCCLCompilerTool" |
211 | Optimization="0" | 211 | Optimization="0" |
212 | AdditionalIncludeDirectories="" | 212 | AdditionalIncludeDirectories="" |
213 | PreprocessorDefinitions="" | 213 | PreprocessorDefinitions="" |
214 | BasicRuntimeChecks="3" | 214 | BasicRuntimeChecks="3" |
215 | /> | 215 | /> |
216 | </FileConfiguration> | 216 | </FileConfiguration> |
217 | <FileConfiguration | 217 | <FileConfiguration |
218 | Name="Release|Win32" | 218 | Name="Release|Win32" |
219 | > | 219 | > |
220 | <Tool | 220 | <Tool |
221 | Name="VCCLCompilerTool" | 221 | Name="VCCLCompilerTool" |
222 | Optimization="2" | 222 | Optimization="2" |
223 | AdditionalIncludeDirectories="" | 223 | AdditionalIncludeDirectories="" |
224 | PreprocessorDefinitions="" | 224 | PreprocessorDefinitions="" |
225 | /> | 225 | /> |
226 | </FileConfiguration> | 226 | </FileConfiguration> |
227 | </File> | 227 | </File> |
228 | </Files> | 228 | </Files> |
229 | <Globals> | 229 | <Globals> |
230 | </Globals> | 230 | </Globals> |
231 | </VisualStudioProject> | 231 | </VisualStudioProject> |
diff --git a/libraries/irrlicht-1.8/examples/10.Shaders/Shaders_vc9.vcproj b/libraries/irrlicht-1.8/examples/10.Shaders/Shaders_vc9.vcproj index d870b03..004ec37 100644 --- a/libraries/irrlicht-1.8/examples/10.Shaders/Shaders_vc9.vcproj +++ b/libraries/irrlicht-1.8/examples/10.Shaders/Shaders_vc9.vcproj | |||
@@ -1,230 +1,230 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | 1 | <?xml version="1.0" encoding="Windows-1252"?> |
2 | <VisualStudioProject | 2 | <VisualStudioProject |
3 | ProjectType="Visual C++" | 3 | ProjectType="Visual C++" |
4 | Version="9.00" | 4 | Version="9.00" |
5 | Name="10.Shaders_vc9" | 5 | Name="10.Shaders_vc9" |
6 | ProjectGUID="{27158C82-CD15-4A9B-9848-35E7065B209F}" | 6 | ProjectGUID="{27158C82-CD15-4A9B-9848-35E7065B209F}" |
7 | RootNamespace="Shaders_vc9" | 7 | RootNamespace="Shaders_vc9" |
8 | TargetFrameworkVersion="131072" | 8 | TargetFrameworkVersion="131072" |
9 | > | 9 | > |
10 | <Platforms> | 10 | <Platforms> |
11 | <Platform | 11 | <Platform |
12 | Name="Win32" | 12 | Name="Win32" |
13 | /> | 13 | /> |
14 | </Platforms> | 14 | </Platforms> |
15 | <ToolFiles> | 15 | <ToolFiles> |
16 | </ToolFiles> | 16 | </ToolFiles> |
17 | <Configurations> | 17 | <Configurations> |
18 | <Configuration | 18 | <Configuration |
19 | Name="Debug|Win32" | 19 | Name="Debug|Win32" |
20 | OutputDirectory=".\Debug" | 20 | OutputDirectory=".\Debug" |
21 | IntermediateDirectory=".\Debug" | 21 | IntermediateDirectory=".\Debug" |
22 | ConfigurationType="1" | 22 | ConfigurationType="1" |
23 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 23 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
24 | UseOfMFC="0" | 24 | UseOfMFC="0" |
25 | ATLMinimizesCRunTimeLibraryUsage="false" | 25 | ATLMinimizesCRunTimeLibraryUsage="false" |
26 | CharacterSet="2" | 26 | CharacterSet="2" |
27 | > | 27 | > |
28 | <Tool | 28 | <Tool |
29 | Name="VCPreBuildEventTool" | 29 | Name="VCPreBuildEventTool" |
30 | /> | 30 | /> |
31 | <Tool | 31 | <Tool |
32 | Name="VCCustomBuildTool" | 32 | Name="VCCustomBuildTool" |
33 | /> | 33 | /> |
34 | <Tool | 34 | <Tool |
35 | Name="VCXMLDataGeneratorTool" | 35 | Name="VCXMLDataGeneratorTool" |
36 | /> | 36 | /> |
37 | <Tool | 37 | <Tool |
38 | Name="VCWebServiceProxyGeneratorTool" | 38 | Name="VCWebServiceProxyGeneratorTool" |
39 | /> | 39 | /> |
40 | <Tool | 40 | <Tool |
41 | Name="VCMIDLTool" | 41 | Name="VCMIDLTool" |
42 | TypeLibraryName=".\Debug/Shaders.tlb" | 42 | TypeLibraryName=".\Debug/Shaders.tlb" |
43 | HeaderFileName="" | 43 | HeaderFileName="" |
44 | /> | 44 | /> |
45 | <Tool | 45 | <Tool |
46 | Name="VCCLCompilerTool" | 46 | Name="VCCLCompilerTool" |
47 | Optimization="0" | 47 | Optimization="0" |
48 | AdditionalIncludeDirectories="..\..\include" | 48 | AdditionalIncludeDirectories="..\..\include" |
49 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" | 49 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" |
50 | BasicRuntimeChecks="3" | 50 | BasicRuntimeChecks="3" |
51 | RuntimeLibrary="1" | 51 | RuntimeLibrary="1" |
52 | UsePrecompiledHeader="0" | 52 | UsePrecompiledHeader="0" |
53 | PrecompiledHeaderFile=".\Debug/Shaders.pch" | 53 | PrecompiledHeaderFile=".\Debug/Shaders.pch" |
54 | AssemblerListingLocation=".\Debug/" | 54 | AssemblerListingLocation=".\Debug/" |
55 | ObjectFile=".\Debug/" | 55 | ObjectFile=".\Debug/" |
56 | ProgramDataBaseFileName=".\Debug/" | 56 | ProgramDataBaseFileName=".\Debug/" |
57 | WarningLevel="3" | 57 | WarningLevel="3" |
58 | SuppressStartupBanner="true" | 58 | SuppressStartupBanner="true" |
59 | DebugInformationFormat="4" | 59 | DebugInformationFormat="4" |
60 | CompileAs="0" | 60 | CompileAs="0" |
61 | /> | 61 | /> |
62 | <Tool | 62 | <Tool |
63 | Name="VCManagedResourceCompilerTool" | 63 | Name="VCManagedResourceCompilerTool" |
64 | /> | 64 | /> |
65 | <Tool | 65 | <Tool |
66 | Name="VCResourceCompilerTool" | 66 | Name="VCResourceCompilerTool" |
67 | PreprocessorDefinitions="_DEBUG" | 67 | PreprocessorDefinitions="_DEBUG" |
68 | Culture="3079" | 68 | Culture="3079" |
69 | /> | 69 | /> |
70 | <Tool | 70 | <Tool |
71 | Name="VCPreLinkEventTool" | 71 | Name="VCPreLinkEventTool" |
72 | /> | 72 | /> |
73 | <Tool | 73 | <Tool |
74 | Name="VCLinkerTool" | 74 | Name="VCLinkerTool" |
75 | OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe" | 75 | OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe" |
76 | LinkIncremental="0" | 76 | LinkIncremental="0" |
77 | SuppressStartupBanner="true" | 77 | SuppressStartupBanner="true" |
78 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | 78 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" |
79 | GenerateDebugInformation="true" | 79 | GenerateDebugInformation="true" |
80 | ProgramDatabaseFile=".\Debug/Shaders.pdb" | 80 | ProgramDatabaseFile=".\Debug/Shaders.pdb" |
81 | SubSystem="1" | 81 | SubSystem="1" |
82 | RandomizedBaseAddress="1" | 82 | RandomizedBaseAddress="1" |
83 | DataExecutionPrevention="0" | 83 | DataExecutionPrevention="0" |
84 | TargetMachine="1" | 84 | TargetMachine="1" |
85 | /> | 85 | /> |
86 | <Tool | 86 | <Tool |
87 | Name="VCALinkTool" | 87 | Name="VCALinkTool" |
88 | /> | 88 | /> |
89 | <Tool | 89 | <Tool |
90 | Name="VCManifestTool" | 90 | Name="VCManifestTool" |
91 | /> | 91 | /> |
92 | <Tool | 92 | <Tool |
93 | Name="VCXDCMakeTool" | 93 | Name="VCXDCMakeTool" |
94 | /> | 94 | /> |
95 | <Tool | 95 | <Tool |
96 | Name="VCBscMakeTool" | 96 | Name="VCBscMakeTool" |
97 | /> | 97 | /> |
98 | <Tool | 98 | <Tool |
99 | Name="VCFxCopTool" | 99 | Name="VCFxCopTool" |
100 | /> | 100 | /> |
101 | <Tool | 101 | <Tool |
102 | Name="VCAppVerifierTool" | 102 | Name="VCAppVerifierTool" |
103 | /> | 103 | /> |
104 | <Tool | 104 | <Tool |
105 | Name="VCPostBuildEventTool" | 105 | Name="VCPostBuildEventTool" |
106 | /> | 106 | /> |
107 | </Configuration> | 107 | </Configuration> |
108 | <Configuration | 108 | <Configuration |
109 | Name="Release|Win32" | 109 | Name="Release|Win32" |
110 | OutputDirectory=".\Release" | 110 | OutputDirectory=".\Release" |
111 | IntermediateDirectory=".\Release" | 111 | IntermediateDirectory=".\Release" |
112 | ConfigurationType="1" | 112 | ConfigurationType="1" |
113 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 113 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
114 | UseOfMFC="0" | 114 | UseOfMFC="0" |
115 | ATLMinimizesCRunTimeLibraryUsage="false" | 115 | ATLMinimizesCRunTimeLibraryUsage="false" |
116 | CharacterSet="2" | 116 | CharacterSet="2" |
117 | > | 117 | > |
118 | <Tool | 118 | <Tool |
119 | Name="VCPreBuildEventTool" | 119 | Name="VCPreBuildEventTool" |
120 | /> | 120 | /> |
121 | <Tool | 121 | <Tool |
122 | Name="VCCustomBuildTool" | 122 | Name="VCCustomBuildTool" |
123 | /> | 123 | /> |
124 | <Tool | 124 | <Tool |
125 | Name="VCXMLDataGeneratorTool" | 125 | Name="VCXMLDataGeneratorTool" |
126 | /> | 126 | /> |
127 | <Tool | 127 | <Tool |
128 | Name="VCWebServiceProxyGeneratorTool" | 128 | Name="VCWebServiceProxyGeneratorTool" |
129 | /> | 129 | /> |
130 | <Tool | 130 | <Tool |
131 | Name="VCMIDLTool" | 131 | Name="VCMIDLTool" |
132 | TypeLibraryName=".\Release/Shaders.tlb" | 132 | TypeLibraryName=".\Release/Shaders.tlb" |
133 | HeaderFileName="" | 133 | HeaderFileName="" |
134 | /> | 134 | /> |
135 | <Tool | 135 | <Tool |
136 | Name="VCCLCompilerTool" | 136 | Name="VCCLCompilerTool" |
137 | Optimization="2" | 137 | Optimization="2" |
138 | InlineFunctionExpansion="1" | 138 | InlineFunctionExpansion="1" |
139 | AdditionalIncludeDirectories="..\..\include" | 139 | AdditionalIncludeDirectories="..\..\include" |
140 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" | 140 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" |
141 | StringPooling="true" | 141 | StringPooling="true" |
142 | RuntimeLibrary="0" | 142 | RuntimeLibrary="0" |
143 | EnableFunctionLevelLinking="true" | 143 | EnableFunctionLevelLinking="true" |
144 | UsePrecompiledHeader="0" | 144 | UsePrecompiledHeader="0" |
145 | PrecompiledHeaderFile=".\Release/Shaders.pch" | 145 | PrecompiledHeaderFile=".\Release/Shaders.pch" |
146 | AssemblerListingLocation=".\Release/" | 146 | AssemblerListingLocation=".\Release/" |
147 | ObjectFile=".\Release/" | 147 | ObjectFile=".\Release/" |
148 | ProgramDataBaseFileName=".\Release/" | 148 | ProgramDataBaseFileName=".\Release/" |
149 | WarningLevel="3" | 149 | WarningLevel="3" |
150 | SuppressStartupBanner="true" | 150 | SuppressStartupBanner="true" |
151 | CompileAs="0" | 151 | CompileAs="0" |
152 | /> | 152 | /> |
153 | <Tool | 153 | <Tool |
154 | Name="VCManagedResourceCompilerTool" | 154 | Name="VCManagedResourceCompilerTool" |
155 | /> | 155 | /> |
156 | <Tool | 156 | <Tool |
157 | Name="VCResourceCompilerTool" | 157 | Name="VCResourceCompilerTool" |
158 | PreprocessorDefinitions="NDEBUG" | 158 | PreprocessorDefinitions="NDEBUG" |
159 | Culture="3079" | 159 | Culture="3079" |
160 | /> | 160 | /> |
161 | <Tool | 161 | <Tool |
162 | Name="VCPreLinkEventTool" | 162 | Name="VCPreLinkEventTool" |
163 | /> | 163 | /> |
164 | <Tool | 164 | <Tool |
165 | Name="VCLinkerTool" | 165 | Name="VCLinkerTool" |
166 | OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe" | 166 | OutputFile="..\..\bin\Win32-VisualStudio\10.Shaders.exe" |
167 | LinkIncremental="0" | 167 | LinkIncremental="0" |
168 | SuppressStartupBanner="true" | 168 | SuppressStartupBanner="true" |
169 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" | 169 | AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" |
170 | ProgramDatabaseFile=".\Release/Shaders.pdb" | 170 | ProgramDatabaseFile=".\Release/Shaders.pdb" |
171 | SubSystem="1" | 171 | SubSystem="1" |
172 | RandomizedBaseAddress="1" | 172 | RandomizedBaseAddress="1" |
173 | DataExecutionPrevention="0" | 173 | DataExecutionPrevention="0" |
174 | TargetMachine="1" | 174 | TargetMachine="1" |
175 | /> | 175 | /> |
176 | <Tool | 176 | <Tool |
177 | Name="VCALinkTool" | 177 | Name="VCALinkTool" |
178 | /> | 178 | /> |
179 | <Tool | 179 | <Tool |
180 | Name="VCManifestTool" | 180 | Name="VCManifestTool" |
181 | /> | 181 | /> |
182 | <Tool | 182 | <Tool |
183 | Name="VCXDCMakeTool" | 183 | Name="VCXDCMakeTool" |
184 | /> | 184 | /> |
185 | <Tool | 185 | <Tool |
186 | Name="VCBscMakeTool" | 186 | Name="VCBscMakeTool" |
187 | /> | 187 | /> |
188 | <Tool | 188 | <Tool |
189 | Name="VCFxCopTool" | 189 | Name="VCFxCopTool" |
190 | /> | 190 | /> |
191 | <Tool | 191 | <Tool |
192 | Name="VCAppVerifierTool" | 192 | Name="VCAppVerifierTool" |
193 | /> | 193 | /> |
194 | <Tool | 194 | <Tool |
195 | Name="VCPostBuildEventTool" | 195 | Name="VCPostBuildEventTool" |
196 | /> | 196 | /> |
197 | </Configuration> | 197 | </Configuration> |
198 | </Configurations> | 198 | </Configurations> |
199 | <References> | 199 | <References> |
200 | </References> | 200 | </References> |
201 | <Files> | 201 | <Files> |
202 | <File | 202 | <File |
203 | RelativePath="main.cpp" | 203 | RelativePath="main.cpp" |
204 | > | 204 | > |
205 | <FileConfiguration | 205 | <FileConfiguration |
206 | Name="Debug|Win32" | 206 | Name="Debug|Win32" |
207 | > | 207 | > |
208 | <Tool | 208 | <Tool |
209 | Name="VCCLCompilerTool" | 209 | Name="VCCLCompilerTool" |
210 | Optimization="0" | 210 | Optimization="0" |
211 | AdditionalIncludeDirectories="" | 211 | AdditionalIncludeDirectories="" |
212 | PreprocessorDefinitions="" | 212 | PreprocessorDefinitions="" |
213 | BasicRuntimeChecks="3" | 213 | BasicRuntimeChecks="3" |
214 | /> | 214 | /> |
215 | </FileConfiguration> | 215 | </FileConfiguration> |
216 | <FileConfiguration | 216 | <FileConfiguration |
217 | Name="Release|Win32" | 217 | Name="Release|Win32" |
218 | > | 218 | > |
219 | <Tool | 219 | <Tool |
220 | Name="VCCLCompilerTool" | 220 | Name="VCCLCompilerTool" |
221 | Optimization="2" | 221 | Optimization="2" |
222 | AdditionalIncludeDirectories="" | 222 | AdditionalIncludeDirectories="" |
223 | PreprocessorDefinitions="" | 223 | PreprocessorDefinitions="" |
224 | /> | 224 | /> |
225 | </FileConfiguration> | 225 | </FileConfiguration> |
226 | </File> | 226 | </File> |
227 | </Files> | 227 | </Files> |
228 | <Globals> | 228 | <Globals> |
229 | </Globals> | 229 | </Globals> |
230 | </VisualStudioProject> | 230 | </VisualStudioProject> |
diff --git a/libraries/irrlicht-1.8/examples/10.Shaders/main.cpp b/libraries/irrlicht-1.8/examples/10.Shaders/main.cpp index 269c47f..13a4599 100644 --- a/libraries/irrlicht-1.8/examples/10.Shaders/main.cpp +++ b/libraries/irrlicht-1.8/examples/10.Shaders/main.cpp | |||
@@ -1,443 +1,443 @@ | |||
1 | /** Example 010 Shaders | 1 | /** Example 010 Shaders |
2 | 2 | ||
3 | This tutorial shows how to use shaders for D3D8, D3D9, OpenGL, and Cg with the | 3 | This tutorial shows how to use shaders for D3D8, D3D9, OpenGL, and Cg with the |
4 | engine and how to create new material types with them. It also shows how to | 4 | engine and how to create new material types with them. It also shows how to |
5 | disable the generation of mipmaps at texture loading, and how to use text scene | 5 | disable the generation of mipmaps at texture loading, and how to use text scene |
6 | nodes. | 6 | nodes. |
7 | 7 | ||
8 | This tutorial does not explain how shaders work. I would recommend to read the | 8 | This tutorial does not explain how shaders work. I would recommend to read the |
9 | D3D, OpenGL, or Cg documentation, to search a tutorial, or to read a book about | 9 | D3D, OpenGL, or Cg documentation, to search a tutorial, or to read a book about |
10 | this. | 10 | this. |
11 | 11 | ||
12 | At first, we need to include all headers and do the stuff we always do, like in | 12 | At first, we need to include all headers and do the stuff we always do, like in |
13 | nearly all other tutorials: | 13 | nearly all other tutorials: |
14 | */ | 14 | */ |
15 | #include <irrlicht.h> | 15 | #include <irrlicht.h> |
16 | #include <iostream> | 16 | #include <iostream> |
17 | #include "driverChoice.h" | 17 | #include "driverChoice.h" |
18 | 18 | ||
19 | using namespace irr; | 19 | using namespace irr; |
20 | 20 | ||
21 | #ifdef _MSC_VER | 21 | #ifdef _MSC_VER |
22 | #pragma comment(lib, "Irrlicht.lib") | 22 | #pragma comment(lib, "Irrlicht.lib") |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | /* | 25 | /* |
26 | Because we want to use some interesting shaders in this tutorials, we need to | 26 | Because we want to use some interesting shaders in this tutorials, we need to |
27 | set some data for them to make them able to compute nice colors. In this | 27 | set some data for them to make them able to compute nice colors. In this |
28 | example, we'll use a simple vertex shader which will calculate the color of the | 28 | example, we'll use a simple vertex shader which will calculate the color of the |
29 | vertex based on the position of the camera. | 29 | vertex based on the position of the camera. |
30 | For this, the shader needs the following data: The inverted world matrix for | 30 | For this, the shader needs the following data: The inverted world matrix for |
31 | transforming the normal, the clip matrix for transforming the position, the | 31 | transforming the normal, the clip matrix for transforming the position, the |
32 | camera position and the world position of the object for the calculation of the | 32 | camera position and the world position of the object for the calculation of the |
33 | angle of light, and the color of the light. To be able to tell the shader all | 33 | angle of light, and the color of the light. To be able to tell the shader all |
34 | this data every frame, we have to derive a class from the | 34 | this data every frame, we have to derive a class from the |
35 | IShaderConstantSetCallBack interface and override its only method, namely | 35 | IShaderConstantSetCallBack interface and override its only method, namely |
36 | OnSetConstants(). This method will be called every time the material is set. | 36 | OnSetConstants(). This method will be called every time the material is set. |
37 | The method setVertexShaderConstant() of the IMaterialRendererServices interface | 37 | The method setVertexShaderConstant() of the IMaterialRendererServices interface |
38 | is used to set the data the shader needs. If the user chose to use a High Level | 38 | is used to set the data the shader needs. If the user chose to use a High Level |
39 | shader language like HLSL instead of Assembler in this example, you have to set | 39 | shader language like HLSL instead of Assembler in this example, you have to set |
40 | the variable name as parameter instead of the register index. | 40 | the variable name as parameter instead of the register index. |
41 | */ | 41 | */ |
42 | 42 | ||
43 | IrrlichtDevice* device = 0; | 43 | IrrlichtDevice* device = 0; |
44 | bool UseHighLevelShaders = false; | 44 | bool UseHighLevelShaders = false; |
45 | bool UseCgShaders = false; | 45 | bool UseCgShaders = false; |
46 | 46 | ||
47 | class MyShaderCallBack : public video::IShaderConstantSetCallBack | 47 | class MyShaderCallBack : public video::IShaderConstantSetCallBack |
48 | { | 48 | { |
49 | public: | 49 | public: |
50 | 50 | ||
51 | virtual void OnSetConstants(video::IMaterialRendererServices* services, | 51 | virtual void OnSetConstants(video::IMaterialRendererServices* services, |
52 | s32 userData) | 52 | s32 userData) |
53 | { | 53 | { |
54 | video::IVideoDriver* driver = services->getVideoDriver(); | 54 | video::IVideoDriver* driver = services->getVideoDriver(); |
55 | 55 | ||
56 | // set inverted world matrix | 56 | // set inverted world matrix |
57 | // if we are using highlevel shaders (the user can select this when | 57 | // if we are using highlevel shaders (the user can select this when |
58 | // starting the program), we must set the constants by name. | 58 | // starting the program), we must set the constants by name. |
59 | 59 | ||
60 | core::matrix4 invWorld = driver->getTransform(video::ETS_WORLD); | 60 | core::matrix4 invWorld = driver->getTransform(video::ETS_WORLD); |
61 | invWorld.makeInverse(); | 61 | invWorld.makeInverse(); |
62 | 62 | ||
63 | if (UseHighLevelShaders) | 63 | if (UseHighLevelShaders) |
64 | services->setVertexShaderConstant("mInvWorld", invWorld.pointer(), 16); | 64 | services->setVertexShaderConstant("mInvWorld", invWorld.pointer(), 16); |
65 | else | 65 | else |
66 | services->setVertexShaderConstant(invWorld.pointer(), 0, 4); | 66 | services->setVertexShaderConstant(invWorld.pointer(), 0, 4); |
67 | 67 | ||
68 | // set clip matrix | 68 | // set clip matrix |
69 | 69 | ||
70 | core::matrix4 worldViewProj; | 70 | core::matrix4 worldViewProj; |
71 | worldViewProj = driver->getTransform(video::ETS_PROJECTION); | 71 | worldViewProj = driver->getTransform(video::ETS_PROJECTION); |
72 | worldViewProj *= driver->getTransform(video::ETS_VIEW); | 72 | worldViewProj *= driver->getTransform(video::ETS_VIEW); |
73 | worldViewProj *= driver->getTransform(video::ETS_WORLD); | 73 | worldViewProj *= driver->getTransform(video::ETS_WORLD); |
74 | 74 | ||
75 | if (UseHighLevelShaders) | 75 | if (UseHighLevelShaders) |
76 | services->setVertexShaderConstant("mWorldViewProj", worldViewProj.pointer(), 16); | 76 | services->setVertexShaderConstant("mWorldViewProj", worldViewProj.pointer(), 16); |
77 | else | 77 | else |
78 | services->setVertexShaderConstant(worldViewProj.pointer(), 4, 4); | 78 | services->setVertexShaderConstant(worldViewProj.pointer(), 4, 4); |
79 | 79 | ||
80 | // set camera position | 80 | // set camera position |
81 | 81 | ||
82 | core::vector3df pos = device->getSceneManager()-> | 82 | core::vector3df pos = device->getSceneManager()-> |
83 | getActiveCamera()->getAbsolutePosition(); | 83 | getActiveCamera()->getAbsolutePosition(); |
84 | 84 | ||
85 | if (UseHighLevelShaders) | 85 | if (UseHighLevelShaders) |
86 | services->setVertexShaderConstant("mLightPos", reinterpret_cast<f32*>(&pos), 3); | 86 | services->setVertexShaderConstant("mLightPos", reinterpret_cast<f32*>(&pos), 3); |
87 | else | 87 | else |
88 | services->setVertexShaderConstant(reinterpret_cast<f32*>(&pos), 8, 1); | 88 | services->setVertexShaderConstant(reinterpret_cast<f32*>(&pos), 8, 1); |
89 | 89 | ||
90 | // set light color | 90 | // set light color |
91 | 91 | ||
92 | video::SColorf col(0.0f,1.0f,1.0f,0.0f); | 92 | video::SColorf col(0.0f,1.0f,1.0f,0.0f); |
93 | 93 | ||
94 | if (UseHighLevelShaders) | 94 | if (UseHighLevelShaders) |
95 | services->setVertexShaderConstant("mLightColor", | 95 | services->setVertexShaderConstant("mLightColor", |
96 | reinterpret_cast<f32*>(&col), 4); | 96 | reinterpret_cast<f32*>(&col), 4); |
97 | else | 97 | else |
98 | services->setVertexShaderConstant(reinterpret_cast<f32*>(&col), 9, 1); | 98 | services->setVertexShaderConstant(reinterpret_cast<f32*>(&col), 9, 1); |
99 | 99 | ||
100 | // set transposed world matrix | 100 | // set transposed world matrix |
101 | 101 | ||
102 | core::matrix4 world = driver->getTransform(video::ETS_WORLD); | 102 | core::matrix4 world = driver->getTransform(video::ETS_WORLD); |
103 | world = world.getTransposed(); | 103 | world = world.getTransposed(); |
104 | 104 | ||
105 | if (UseHighLevelShaders) | 105 | if (UseHighLevelShaders) |
106 | { | 106 | { |
107 | services->setVertexShaderConstant("mTransWorld", world.pointer(), 16); | 107 | services->setVertexShaderConstant("mTransWorld", world.pointer(), 16); |
108 | 108 | ||
109 | // set texture, for textures you can use both an int and a float setPixelShaderConstant interfaces (You need it only for an OpenGL driver). | 109 | // set texture, for textures you can use both an int and a float setPixelShaderConstant interfaces (You need it only for an OpenGL driver). |
110 | s32 TextureLayerID = 0; | 110 | s32 TextureLayerID = 0; |
111 | if (UseHighLevelShaders) | 111 | if (UseHighLevelShaders) |
112 | services->setPixelShaderConstant("myTexture", &TextureLayerID, 1); | 112 | services->setPixelShaderConstant("myTexture", &TextureLayerID, 1); |
113 | } | 113 | } |
114 | else | 114 | else |
115 | services->setVertexShaderConstant(world.pointer(), 10, 4); | 115 | services->setVertexShaderConstant(world.pointer(), 10, 4); |
116 | } | 116 | } |
117 | }; | 117 | }; |
118 | 118 | ||
119 | /* | 119 | /* |
120 | The next few lines start up the engine just like in most other tutorials | 120 | The next few lines start up the engine just like in most other tutorials |
121 | before. But in addition, we ask the user if he wants to use high level shaders | 121 | before. But in addition, we ask the user if he wants to use high level shaders |
122 | in this example, if he selected a driver which is capable of doing so. | 122 | in this example, if he selected a driver which is capable of doing so. |
123 | */ | 123 | */ |
124 | int main() | 124 | int main() |
125 | { | 125 | { |
126 | // ask user for driver | 126 | // ask user for driver |
127 | video::E_DRIVER_TYPE driverType=driverChoiceConsole(); | 127 | video::E_DRIVER_TYPE driverType=driverChoiceConsole(); |
128 | if (driverType==video::EDT_COUNT) | 128 | if (driverType==video::EDT_COUNT) |
129 | return 1; | 129 | return 1; |
130 | 130 | ||
131 | // ask the user if we should use high level shaders for this example | 131 | // ask the user if we should use high level shaders for this example |
132 | if (driverType == video::EDT_DIRECT3D9 || | 132 | if (driverType == video::EDT_DIRECT3D9 || |
133 | driverType == video::EDT_OPENGL) | 133 | driverType == video::EDT_OPENGL) |
134 | { | 134 | { |
135 | char i; | 135 | char i; |
136 | printf("Please press 'y' if you want to use high level shaders.\n"); | 136 | printf("Please press 'y' if you want to use high level shaders.\n"); |
137 | std::cin >> i; | 137 | std::cin >> i; |
138 | if (i == 'y') | 138 | if (i == 'y') |
139 | { | 139 | { |
140 | UseHighLevelShaders = true; | 140 | UseHighLevelShaders = true; |
141 | printf("Please press 'y' if you want to use Cg shaders.\n"); | 141 | printf("Please press 'y' if you want to use Cg shaders.\n"); |
142 | std::cin >> i; | 142 | std::cin >> i; |
143 | if (i == 'y') | 143 | if (i == 'y') |
144 | UseCgShaders = true; | 144 | UseCgShaders = true; |
145 | } | 145 | } |
146 | } | 146 | } |
147 | 147 | ||
148 | // create device | 148 | // create device |
149 | device = createDevice(driverType, core::dimension2d<u32>(640, 480)); | 149 | device = createDevice(driverType, core::dimension2d<u32>(640, 480)); |
150 | 150 | ||
151 | if (device == 0) | 151 | if (device == 0) |
152 | return 1; // could not create selected driver. | 152 | return 1; // could not create selected driver. |
153 | 153 | ||
154 | video::IVideoDriver* driver = device->getVideoDriver(); | 154 | video::IVideoDriver* driver = device->getVideoDriver(); |
155 | scene::ISceneManager* smgr = device->getSceneManager(); | 155 | scene::ISceneManager* smgr = device->getSceneManager(); |
156 | gui::IGUIEnvironment* gui = device->getGUIEnvironment(); | 156 | gui::IGUIEnvironment* gui = device->getGUIEnvironment(); |
157 | 157 | ||
158 | // Make sure we don't try Cg without support for it | 158 | // Make sure we don't try Cg without support for it |
159 | if (UseCgShaders && !driver->queryFeature(video::EVDF_CG)) | 159 | if (UseCgShaders && !driver->queryFeature(video::EVDF_CG)) |
160 | { | 160 | { |
161 | printf("Warning: No Cg support, disabling.\n"); | 161 | printf("Warning: No Cg support, disabling.\n"); |
162 | UseCgShaders=false; | 162 | UseCgShaders=false; |
163 | } | 163 | } |
164 | 164 | ||
165 | /* | 165 | /* |
166 | Now for the more interesting parts. If we are using Direct3D, we want | 166 | Now for the more interesting parts. If we are using Direct3D, we want |
167 | to load vertex and pixel shader programs, if we have OpenGL, we want to | 167 | to load vertex and pixel shader programs, if we have OpenGL, we want to |
168 | use ARB fragment and vertex programs. I wrote the corresponding | 168 | use ARB fragment and vertex programs. I wrote the corresponding |
169 | programs down into the files d3d8.ps, d3d8.vs, d3d9.ps, d3d9.vs, | 169 | programs down into the files d3d8.ps, d3d8.vs, d3d9.ps, d3d9.vs, |
170 | opengl.ps and opengl.vs. We only need the right filenames now. This is | 170 | opengl.ps and opengl.vs. We only need the right filenames now. This is |
171 | done in the following switch. Note, that it is not necessary to write | 171 | done in the following switch. Note, that it is not necessary to write |
172 | the shaders into text files, like in this example. You can even write | 172 | the shaders into text files, like in this example. You can even write |
173 | the shaders directly as strings into the cpp source file, and use later | 173 | the shaders directly as strings into the cpp source file, and use later |
174 | addShaderMaterial() instead of addShaderMaterialFromFiles(). | 174 | addShaderMaterial() instead of addShaderMaterialFromFiles(). |
175 | */ | 175 | */ |
176 | 176 | ||
177 | io::path vsFileName; // filename for the vertex shader | 177 | io::path vsFileName; // filename for the vertex shader |
178 | io::path psFileName; // filename for the pixel shader | 178 | io::path psFileName; // filename for the pixel shader |
179 | 179 | ||
180 | switch(driverType) | 180 | switch(driverType) |
181 | { | 181 | { |
182 | case video::EDT_DIRECT3D8: | 182 | case video::EDT_DIRECT3D8: |
183 | psFileName = "../../media/d3d8.psh"; | 183 | psFileName = "../../media/d3d8.psh"; |
184 | vsFileName = "../../media/d3d8.vsh"; | 184 | vsFileName = "../../media/d3d8.vsh"; |
185 | break; | 185 | break; |
186 | case video::EDT_DIRECT3D9: | 186 | case video::EDT_DIRECT3D9: |
187 | if (UseHighLevelShaders) | 187 | if (UseHighLevelShaders) |
188 | { | 188 | { |
189 | // Cg can also handle this syntax | 189 | // Cg can also handle this syntax |
190 | psFileName = "../../media/d3d9.hlsl"; | 190 | psFileName = "../../media/d3d9.hlsl"; |
191 | vsFileName = psFileName; // both shaders are in the same file | 191 | vsFileName = psFileName; // both shaders are in the same file |
192 | } | 192 | } |
193 | else | 193 | else |
194 | { | 194 | { |
195 | psFileName = "../../media/d3d9.psh"; | 195 | psFileName = "../../media/d3d9.psh"; |
196 | vsFileName = "../../media/d3d9.vsh"; | 196 | vsFileName = "../../media/d3d9.vsh"; |
197 | } | 197 | } |
198 | break; | 198 | break; |
199 | 199 | ||
200 | case video::EDT_OPENGL: | 200 | case video::EDT_OPENGL: |
201 | if (UseHighLevelShaders) | 201 | if (UseHighLevelShaders) |
202 | { | 202 | { |
203 | if (!UseCgShaders) | 203 | if (!UseCgShaders) |
204 | { | 204 | { |
205 | psFileName = "../../media/opengl.frag"; | 205 | psFileName = "../../media/opengl.frag"; |
206 | vsFileName = "../../media/opengl.vert"; | 206 | vsFileName = "../../media/opengl.vert"; |
207 | } | 207 | } |
208 | else | 208 | else |
209 | { | 209 | { |
210 | // Use HLSL syntax for Cg | 210 | // Use HLSL syntax for Cg |
211 | psFileName = "../../media/d3d9.hlsl"; | 211 | psFileName = "../../media/d3d9.hlsl"; |
212 | vsFileName = psFileName; // both shaders are in the same file | 212 | vsFileName = psFileName; // both shaders are in the same file |
213 | } | 213 | } |
214 | } | 214 | } |
215 | else | 215 | else |
216 | { | 216 | { |
217 | psFileName = "../../media/opengl.psh"; | 217 | psFileName = "../../media/opengl.psh"; |
218 | vsFileName = "../../media/opengl.vsh"; | 218 | vsFileName = "../../media/opengl.vsh"; |
219 | } | 219 | } |
220 | break; | 220 | break; |
221 | } | 221 | } |
222 | 222 | ||
223 | /* | 223 | /* |
224 | In addition, we check if the hardware and the selected renderer is | 224 | In addition, we check if the hardware and the selected renderer is |
225 | capable of executing the shaders we want. If not, we simply set the | 225 | capable of executing the shaders we want. If not, we simply set the |
226 | filename string to 0. This is not necessary, but useful in this | 226 | filename string to 0. This is not necessary, but useful in this |
227 | example: For example, if the hardware is able to execute vertex shaders | 227 | example: For example, if the hardware is able to execute vertex shaders |
228 | but not pixel shaders, we create a new material which only uses the | 228 | but not pixel shaders, we create a new material which only uses the |
229 | vertex shader, and no pixel shader. Otherwise, if we would tell the | 229 | vertex shader, and no pixel shader. Otherwise, if we would tell the |
230 | engine to create this material and the engine sees that the hardware | 230 | engine to create this material and the engine sees that the hardware |
231 | wouldn't be able to fulfill the request completely, it would not | 231 | wouldn't be able to fulfill the request completely, it would not |
232 | create any new material at all. So in this example you would see at | 232 | create any new material at all. So in this example you would see at |
233 | least the vertex shader in action, without the pixel shader. | 233 | least the vertex shader in action, without the pixel shader. |
234 | */ | 234 | */ |
235 | 235 | ||
236 | if (!driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) && | 236 | if (!driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) && |
237 | !driver->queryFeature(video::EVDF_ARB_FRAGMENT_PROGRAM_1)) | 237 | !driver->queryFeature(video::EVDF_ARB_FRAGMENT_PROGRAM_1)) |
238 | { | 238 | { |
239 | device->getLogger()->log("WARNING: Pixel shaders disabled "\ | 239 | device->getLogger()->log("WARNING: Pixel shaders disabled "\ |
240 | "because of missing driver/hardware support."); | 240 | "because of missing driver/hardware support."); |
241 | psFileName = ""; | 241 | psFileName = ""; |
242 | } | 242 | } |
243 | 243 | ||
244 | if (!driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1) && | 244 | if (!driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1) && |
245 | !driver->queryFeature(video::EVDF_ARB_VERTEX_PROGRAM_1)) | 245 | !driver->queryFeature(video::EVDF_ARB_VERTEX_PROGRAM_1)) |
246 | { | 246 | { |
247 | device->getLogger()->log("WARNING: Vertex shaders disabled "\ | 247 | device->getLogger()->log("WARNING: Vertex shaders disabled "\ |
248 | "because of missing driver/hardware support."); | 248 | "because of missing driver/hardware support."); |
249 | vsFileName = ""; | 249 | vsFileName = ""; |
250 | } | 250 | } |
251 | 251 | ||
252 | /* | 252 | /* |
253 | Now lets create the new materials. As you maybe know from previous | 253 | Now lets create the new materials. As you maybe know from previous |
254 | examples, a material type in the Irrlicht engine is set by simply | 254 | examples, a material type in the Irrlicht engine is set by simply |
255 | changing the MaterialType value in the SMaterial struct. And this value | 255 | changing the MaterialType value in the SMaterial struct. And this value |
256 | is just a simple 32 bit value, like video::EMT_SOLID. So we only need | 256 | is just a simple 32 bit value, like video::EMT_SOLID. So we only need |
257 | the engine to create a new value for us which we can set there. To do | 257 | the engine to create a new value for us which we can set there. To do |
258 | this, we get a pointer to the IGPUProgrammingServices and call | 258 | this, we get a pointer to the IGPUProgrammingServices and call |
259 | addShaderMaterialFromFiles(), which returns such a new 32 bit value. | 259 | addShaderMaterialFromFiles(), which returns such a new 32 bit value. |
260 | That's all. | 260 | That's all. |
261 | 261 | ||
262 | The parameters to this method are the following: First, the names of | 262 | The parameters to this method are the following: First, the names of |
263 | the files containing the code of the vertex and the pixel shader. If | 263 | the files containing the code of the vertex and the pixel shader. If |
264 | you would use addShaderMaterial() instead, you would not need file | 264 | you would use addShaderMaterial() instead, you would not need file |
265 | names, then you could write the code of the shader directly as string. | 265 | names, then you could write the code of the shader directly as string. |
266 | The following parameter is a pointer to the IShaderConstantSetCallBack | 266 | The following parameter is a pointer to the IShaderConstantSetCallBack |
267 | class we wrote at the beginning of this tutorial. If you don't want to | 267 | class we wrote at the beginning of this tutorial. If you don't want to |
268 | set constants, set this to 0. The last parameter tells the engine which | 268 | set constants, set this to 0. The last parameter tells the engine which |
269 | material it should use as base material. | 269 | material it should use as base material. |
270 | 270 | ||
271 | To demonstrate this, we create two materials with a different base | 271 | To demonstrate this, we create two materials with a different base |
272 | material, one with EMT_SOLID and one with EMT_TRANSPARENT_ADD_COLOR. | 272 | material, one with EMT_SOLID and one with EMT_TRANSPARENT_ADD_COLOR. |
273 | */ | 273 | */ |
274 | 274 | ||
275 | // create materials | 275 | // create materials |
276 | 276 | ||
277 | video::IGPUProgrammingServices* gpu = driver->getGPUProgrammingServices(); | 277 | video::IGPUProgrammingServices* gpu = driver->getGPUProgrammingServices(); |
278 | s32 newMaterialType1 = 0; | 278 | s32 newMaterialType1 = 0; |
279 | s32 newMaterialType2 = 0; | 279 | s32 newMaterialType2 = 0; |
280 | 280 | ||
281 | if (gpu) | 281 | if (gpu) |
282 | { | 282 | { |
283 | MyShaderCallBack* mc = new MyShaderCallBack(); | 283 | MyShaderCallBack* mc = new MyShaderCallBack(); |
284 | 284 | ||
285 | // create the shaders depending on if the user wanted high level | 285 | // create the shaders depending on if the user wanted high level |
286 | // or low level shaders: | 286 | // or low level shaders: |
287 | 287 | ||
288 | if (UseHighLevelShaders) | 288 | if (UseHighLevelShaders) |
289 | { | 289 | { |
290 | // Choose the desired shader type. Default is the native | 290 | // Choose the desired shader type. Default is the native |
291 | // shader type for the driver, for Cg pass the special | 291 | // shader type for the driver, for Cg pass the special |
292 | // enum value EGSL_CG | 292 | // enum value EGSL_CG |
293 | const video::E_GPU_SHADING_LANGUAGE shadingLanguage = | 293 | const video::E_GPU_SHADING_LANGUAGE shadingLanguage = |
294 | UseCgShaders ? video::EGSL_CG:video::EGSL_DEFAULT; | 294 | UseCgShaders ? video::EGSL_CG:video::EGSL_DEFAULT; |
295 | 295 | ||
296 | // create material from high level shaders (hlsl, glsl or cg) | 296 | // create material from high level shaders (hlsl, glsl or cg) |
297 | 297 | ||
298 | newMaterialType1 = gpu->addHighLevelShaderMaterialFromFiles( | 298 | newMaterialType1 = gpu->addHighLevelShaderMaterialFromFiles( |
299 | vsFileName, "vertexMain", video::EVST_VS_1_1, | 299 | vsFileName, "vertexMain", video::EVST_VS_1_1, |
300 | psFileName, "pixelMain", video::EPST_PS_1_1, | 300 | psFileName, "pixelMain", video::EPST_PS_1_1, |
301 | mc, video::EMT_SOLID, 0, shadingLanguage); | 301 | mc, video::EMT_SOLID, 0, shadingLanguage); |
302 | 302 | ||
303 | newMaterialType2 = gpu->addHighLevelShaderMaterialFromFiles( | 303 | newMaterialType2 = gpu->addHighLevelShaderMaterialFromFiles( |
304 | vsFileName, "vertexMain", video::EVST_VS_1_1, | 304 | vsFileName, "vertexMain", video::EVST_VS_1_1, |
305 | psFileName, "pixelMain", video::EPST_PS_1_1, | 305 | psFileName, "pixelMain", video::EPST_PS_1_1, |
306 | mc, video::EMT_TRANSPARENT_ADD_COLOR, 0 , shadingLanguage); | 306 | mc, video::EMT_TRANSPARENT_ADD_COLOR, 0 , shadingLanguage); |
307 | } | 307 | } |
308 | else | 308 | else |
309 | { | 309 | { |
310 | // create material from low level shaders (asm or arb_asm) | 310 | // create material from low level shaders (asm or arb_asm) |
311 | 311 | ||
312 | newMaterialType1 = gpu->addShaderMaterialFromFiles(vsFileName, | 312 | newMaterialType1 = gpu->addShaderMaterialFromFiles(vsFileName, |
313 | psFileName, mc, video::EMT_SOLID); | 313 | psFileName, mc, video::EMT_SOLID); |
314 | 314 | ||
315 | newMaterialType2 = gpu->addShaderMaterialFromFiles(vsFileName, | 315 | newMaterialType2 = gpu->addShaderMaterialFromFiles(vsFileName, |
316 | psFileName, mc, video::EMT_TRANSPARENT_ADD_COLOR); | 316 | psFileName, mc, video::EMT_TRANSPARENT_ADD_COLOR); |
317 | } | 317 | } |
318 | 318 | ||
319 | mc->drop(); | 319 | mc->drop(); |
320 | } | 320 | } |
321 | 321 | ||
322 | /* | 322 | /* |
323 | Now it's time for testing the materials. We create a test cube and set | 323 | Now it's time for testing the materials. We create a test cube and set |
324 | the material we created. In addition, we add a text scene node to the | 324 | the material we created. In addition, we add a text scene node to the |
325 | cube and a rotation animator to make it look more interesting and | 325 | cube and a rotation animator to make it look more interesting and |
326 | important. | 326 | important. |
327 | */ | 327 | */ |
328 | 328 | ||
329 | // create test scene node 1, with the new created material type 1 | 329 | // create test scene node 1, with the new created material type 1 |
330 | 330 | ||
331 | scene::ISceneNode* node = smgr->addCubeSceneNode(50); | 331 | scene::ISceneNode* node = smgr->addCubeSceneNode(50); |
332 | node->setPosition(core::vector3df(0,0,0)); | 332 | node->setPosition(core::vector3df(0,0,0)); |
333 | node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); | 333 | node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); |
334 | node->setMaterialFlag(video::EMF_LIGHTING, false); | 334 | node->setMaterialFlag(video::EMF_LIGHTING, false); |
335 | node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType1); | 335 | node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType1); |
336 | 336 | ||
337 | smgr->addTextSceneNode(gui->getBuiltInFont(), | 337 | smgr->addTextSceneNode(gui->getBuiltInFont(), |
338 | L"PS & VS & EMT_SOLID", | 338 | L"PS & VS & EMT_SOLID", |
339 | video::SColor(255,255,255,255), node); | 339 | video::SColor(255,255,255,255), node); |
340 | 340 | ||
341 | scene::ISceneNodeAnimator* anim = smgr->createRotationAnimator( | 341 | scene::ISceneNodeAnimator* anim = smgr->createRotationAnimator( |
342 | core::vector3df(0,0.3f,0)); | 342 | core::vector3df(0,0.3f,0)); |
343 | node->addAnimator(anim); | 343 | node->addAnimator(anim); |
344 | anim->drop(); | 344 | anim->drop(); |
345 | 345 | ||
346 | /* | 346 | /* |
347 | Same for the second cube, but with the second material we created. | 347 | Same for the second cube, but with the second material we created. |
348 | */ | 348 | */ |
349 | 349 | ||
350 | // create test scene node 2, with the new created material type 2 | 350 | // create test scene node 2, with the new created material type 2 |
351 | 351 | ||
352 | node = smgr->addCubeSceneNode(50); | 352 | node = smgr->addCubeSceneNode(50); |
353 | node->setPosition(core::vector3df(0,-10,50)); | 353 | node->setPosition(core::vector3df(0,-10,50)); |
354 | node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); | 354 | node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); |
355 | node->setMaterialFlag(video::EMF_LIGHTING, false); | 355 | node->setMaterialFlag(video::EMF_LIGHTING, false); |
356 | node->setMaterialFlag(video::EMF_BLEND_OPERATION, true); | 356 | node->setMaterialFlag(video::EMF_BLEND_OPERATION, true); |
357 | node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType2); | 357 | node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType2); |
358 | 358 | ||
359 | smgr->addTextSceneNode(gui->getBuiltInFont(), | 359 | smgr->addTextSceneNode(gui->getBuiltInFont(), |
360 | L"PS & VS & EMT_TRANSPARENT", | 360 | L"PS & VS & EMT_TRANSPARENT", |
361 | video::SColor(255,255,255,255), node); | 361 | video::SColor(255,255,255,255), node); |
362 | 362 | ||
363 | anim = smgr->createRotationAnimator(core::vector3df(0,0.3f,0)); | 363 | anim = smgr->createRotationAnimator(core::vector3df(0,0.3f,0)); |
364 | node->addAnimator(anim); | 364 | node->addAnimator(anim); |
365 | anim->drop(); | 365 | anim->drop(); |
366 | 366 | ||
367 | /* | 367 | /* |
368 | Then we add a third cube without a shader on it, to be able to compare | 368 | Then we add a third cube without a shader on it, to be able to compare |
369 | the cubes. | 369 | the cubes. |
370 | */ | 370 | */ |
371 | 371 | ||
372 | // add a scene node with no shader | 372 | // add a scene node with no shader |
373 | 373 | ||
374 | node = smgr->addCubeSceneNode(50); | 374 | node = smgr->addCubeSceneNode(50); |
375 | node->setPosition(core::vector3df(0,50,25)); | 375 | node->setPosition(core::vector3df(0,50,25)); |
376 | node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); | 376 | node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); |
377 | node->setMaterialFlag(video::EMF_LIGHTING, false); | 377 | node->setMaterialFlag(video::EMF_LIGHTING, false); |
378 | smgr->addTextSceneNode(gui->getBuiltInFont(), L"NO SHADER", | 378 | smgr->addTextSceneNode(gui->getBuiltInFont(), L"NO SHADER", |
379 | video::SColor(255,255,255,255), node); | 379 | video::SColor(255,255,255,255), node); |
380 | 380 | ||
381 | /* | 381 | /* |
382 | And last, we add a skybox and a user controlled camera to the scene. | 382 | And last, we add a skybox and a user controlled camera to the scene. |
383 | For the skybox textures, we disable mipmap generation, because we don't | 383 | For the skybox textures, we disable mipmap generation, because we don't |
384 | need mipmaps on it. | 384 | need mipmaps on it. |
385 | */ | 385 | */ |
386 | 386 | ||
387 | // add a nice skybox | 387 | // add a nice skybox |
388 | 388 | ||
389 | driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); | 389 | driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); |
390 | 390 | ||
391 | smgr->addSkyBoxSceneNode( | 391 | smgr->addSkyBoxSceneNode( |
392 | driver->getTexture("../../media/irrlicht2_up.jpg"), | 392 | driver->getTexture("../../media/irrlicht2_up.jpg"), |
393 | driver->getTexture("../../media/irrlicht2_dn.jpg"), | 393 | driver->getTexture("../../media/irrlicht2_dn.jpg"), |
394 | driver->getTexture("../../media/irrlicht2_lf.jpg"), | 394 | driver->getTexture("../../media/irrlicht2_lf.jpg"), |
395 | driver->getTexture("../../media/irrlicht2_rt.jpg"), | 395 | driver->getTexture("../../media/irrlicht2_rt.jpg"), |
396 | driver->getTexture("../../media/irrlicht2_ft.jpg"), | 396 | driver->getTexture("../../media/irrlicht2_ft.jpg"), |
397 | driver->getTexture("../../media/irrlicht2_bk.jpg")); | 397 | driver->getTexture("../../media/irrlicht2_bk.jpg")); |
398 | 398 | ||
399 | driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true); | 399 | driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true); |
400 | 400 | ||
401 | // add a camera and disable the mouse cursor | 401 | // add a camera and disable the mouse cursor |
402 | 402 | ||
403 | scene::ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS(); | 403 | scene::ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS(); |
404 | cam->setPosition(core::vector3df(-100,50,100)); | 404 | cam->setPosition(core::vector3df(-100,50,100)); |
405 | cam->setTarget(core::vector3df(0,0,0)); | 405 | cam->setTarget(core::vector3df(0,0,0)); |
406 | device->getCursorControl()->setVisible(false); | 406 | device->getCursorControl()->setVisible(false); |
407 | 407 | ||
408 | /* | 408 | /* |
409 | Now draw everything. That's all. | 409 | Now draw everything. That's all. |
410 | */ | 410 | */ |
411 | 411 | ||
412 | int lastFPS = -1; | 412 | int lastFPS = -1; |
413 | 413 | ||
414 | while(device->run()) | 414 | while(device->run()) |
415 | if (device->isWindowActive()) | 415 | if (device->isWindowActive()) |
416 | { | 416 | { |
417 | driver->beginScene(true, true, video::SColor(255,0,0,0)); | 417 | driver->beginScene(true, true, video::SColor(255,0,0,0)); |
418 | smgr->drawAll(); | 418 | smgr->drawAll(); |
419 | driver->endScene(); | 419 | driver->endScene(); |
420 | 420 | ||
421 | int fps = driver->getFPS(); | 421 | int fps = driver->getFPS(); |
422 | 422 | ||
423 | if (lastFPS != fps) | 423 | if (lastFPS != fps) |
424 | { | 424 | { |
425 | core::stringw str = L"Irrlicht Engine - Vertex and pixel shader example ["; | 425 | core::stringw str = L"Irrlicht Engine - Vertex and pixel shader example ["; |
426 | str += driver->getName(); | 426 | str += driver->getName(); |
427 | str += "] FPS:"; | 427 | str += "] FPS:"; |
428 | str += fps; | 428 | str += fps; |
429 | 429 | ||
430 | device->setWindowCaption(str.c_str()); | 430 | device->setWindowCaption(str.c_str()); |
431 | lastFPS = fps; | 431 | lastFPS = fps; |
432 | } | 432 | } |
433 | } | 433 | } |
434 | 434 | ||
435 | device->drop(); | 435 | device->drop(); |
436 | 436 | ||
437 | return 0; | 437 | return 0; |
438 | } | 438 | } |
439 | 439 | ||
440 | /* | 440 | /* |
441 | Compile and run this, and I hope you have fun with your new little shader | 441 | Compile and run this, and I hope you have fun with your new little shader |
442 | writing tool :). | 442 | writing tool :). |
443 | **/ | 443 | **/ |
diff --git a/libraries/irrlicht-1.8/examples/10.Shaders/tutorial.html b/libraries/irrlicht-1.8/examples/10.Shaders/tutorial.html index 05c4f08..21dafb7 100644 --- a/libraries/irrlicht-1.8/examples/10.Shaders/tutorial.html +++ b/libraries/irrlicht-1.8/examples/10.Shaders/tutorial.html | |||
@@ -1,566 +1,566 @@ | |||
1 | <html> | 1 | <html> |
2 | <head> | 2 | <head> |
3 | <title>Irrlicht Engine Tutorial</title> | 3 | <title>Irrlicht Engine Tutorial</title> |
4 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | 4 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
5 | </head> | 5 | </head> |
6 | 6 | ||
7 | <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> | 7 | <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> |
8 | <br> | 8 | <br> |
9 | <table width="95%" border="0" cellspacing="0" cellpadding="2" align="center"> | 9 | <table width="95%" border="0" cellspacing="0" cellpadding="2" align="center"> |
10 | <tr> | 10 | <tr> |
11 | <td bgcolor="#666699" width="10"><b><a href="http://irrlicht.sourceforge.net" target="_blank"><img src="../../media/irrlichtlogo.jpg" width="88" height="31" border="0"></a></b></td> | 11 | <td bgcolor="#666699" width="10"><b><a href="http://irrlicht.sourceforge.net" target="_blank"><img src="../../media/irrlichtlogo.jpg" width="88" height="31" border="0"></a></b></td> |
12 | <td bgcolor="#666699" width="100%"> | 12 | <td bgcolor="#666699" width="100%"> |
13 | <div align="center"> | 13 | <div align="center"> |
14 | <div align="left"><b><font color="#FFFFFF">Tutorial 10. Shaders</font></b></div> | 14 | <div align="left"><b><font color="#FFFFFF">Tutorial 10. Shaders</font></b></div> |
15 | </div> | 15 | </div> |
16 | </td> | 16 | </td> |
17 | </tr> | 17 | </tr> |
18 | <tr bgcolor="#eeeeff"> | 18 | <tr bgcolor="#eeeeff"> |
19 | <td height="90" colspan="2"> | 19 | <td height="90" colspan="2"> |
20 | <div align="left"> | 20 | <div align="left"> |
21 | <p> This tutorial shows how to use shaders for D3D8, D3D9 and OpenGL with | 21 | <p> This tutorial shows how to use shaders for D3D8, D3D9 and OpenGL with |
22 | the engine and how to create new material types with them. It also shows | 22 | the engine and how to create new material types with them. It also shows |
23 | how to disable the generation of mipmaps at texture loading, and how | 23 | how to disable the generation of mipmaps at texture loading, and how |
24 | to use text scene nodes.</p> | 24 | to use text scene nodes.</p> |
25 | <p>This tutorial does not explain how shaders work. I would recommend | 25 | <p>This tutorial does not explain how shaders work. I would recommend |
26 | to read the D3D or OpenGL documentation, to search a tutorial, or to | 26 | to read the D3D or OpenGL documentation, to search a tutorial, or to |
27 | read a book about this.</p> | 27 | read a book about this.</p> |
28 | <p>The program which is described here will look like this:</p> | 28 | <p>The program which is described here will look like this:</p> |
29 | <p align="center"><img src="../../media/010shot.jpg" width="260" height="203"><br> | 29 | <p align="center"><img src="../../media/010shot.jpg" width="260" height="203"><br> |
30 | </p> | 30 | </p> |
31 | </div> | 31 | </div> |
32 | </td> | 32 | </td> |
33 | </tr> | 33 | </tr> |
34 | </table> | 34 | </table> |
35 | <br> | 35 | <br> |
36 | <table width="95%" border="0" cellspacing="0" cellpadding="2" align="center"> | 36 | <table width="95%" border="0" cellspacing="0" cellpadding="2" align="center"> |
37 | <tr> | 37 | <tr> |
38 | <td bgcolor="#666699"> <b><font color="#FFFFFF">Lets start!</font></b></td> | 38 | <td bgcolor="#666699"> <b><font color="#FFFFFF">Lets start!</font></b></td> |
39 | </tr> | 39 | </tr> |
40 | <tr> | 40 | <tr> |
41 | <td height="90" bgcolor="#eeeeff" valign="top"> <div align="left"> | 41 | <td height="90" bgcolor="#eeeeff" valign="top"> <div align="left"> |
42 | <div align="left"> | 42 | <div align="left"> |
43 | <p>At first, we need to include all headers and do the stuff we always | 43 | <p>At first, we need to include all headers and do the stuff we always |
44 | do, like in nearly all other tutorials:</p> | 44 | do, like in nearly all other tutorials:</p> |
45 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 45 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
46 | <tr> | 46 | <tr> |
47 | <td> <pre>#include <irrlicht.h><br>#include <iostream><br><br>using namespace irr;<br><br>#pragma comment(lib, "Irrlicht.lib")<br></pre></td> | 47 | <td> <pre>#include <irrlicht.h><br>#include <iostream><br><br>using namespace irr;<br><br>#pragma comment(lib, "Irrlicht.lib")<br></pre></td> |
48 | </tr> | 48 | </tr> |
49 | </table> | 49 | </table> |
50 | <p>Because we want to use some interesting shaders in this tutorials, | 50 | <p>Because we want to use some interesting shaders in this tutorials, |
51 | we need to set some data for them to make them able to compute nice | 51 | we need to set some data for them to make them able to compute nice |
52 | colors. In this example, we'll use a simple vertex shader which will | 52 | colors. In this example, we'll use a simple vertex shader which will |
53 | calculate the color of the vertex based on the position of the camera. | 53 | calculate the color of the vertex based on the position of the camera. |
54 | For this, the shader needs the following data: The inverted world | 54 | For this, the shader needs the following data: The inverted world |
55 | matrix for transforming the normal, the clip matrix for transforming | 55 | matrix for transforming the normal, the clip matrix for transforming |
56 | the position, the camera position and the world position of the object | 56 | the position, the camera position and the world position of the object |
57 | for the calculation of the angle of light, and the color of the light. | 57 | for the calculation of the angle of light, and the color of the light. |
58 | To be able to tell the shader all this data every frame, we have to | 58 | To be able to tell the shader all this data every frame, we have to |
59 | derive a class from the IShaderConstantSetCallBack interface and override | 59 | derive a class from the IShaderConstantSetCallBack interface and override |
60 | its only method, namely OnSetConstants(). This method will be called | 60 | its only method, namely OnSetConstants(). This method will be called |
61 | every time the material is set. <br> | 61 | every time the material is set. <br> |
62 | The method setVertexShaderConstant() of the IMaterialRendererServices | 62 | The method setVertexShaderConstant() of the IMaterialRendererServices |
63 | interface is used to set the data the shader needs. If the user chose | 63 | interface is used to set the data the shader needs. If the user chose |
64 | to use a High Level shader language like HLSL instead of Assembler | 64 | to use a High Level shader language like HLSL instead of Assembler |
65 | in this example, you have to set the variable name as parameter instead | 65 | in this example, you have to set the variable name as parameter instead |
66 | of the register index.</p> | 66 | of the register index.</p> |
67 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 67 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
68 | <tr> | 68 | <tr> |
69 | <td> <pre>IrrlichtDevice* device = 0;<br>bool UseHighLevelShaders = false;<br><br>class MyShaderCallBack : public video::IShaderConstantSetCallBack<br>{<br>public: | 69 | <td> <pre>IrrlichtDevice* device = 0;<br>bool UseHighLevelShaders = false;<br><br>class MyShaderCallBack : public video::IShaderConstantSetCallBack<br>{<br>public: |
70 | <br> virtual void OnSetConstants(video::IMaterialRendererServices* services, s32 userData)<br> {<br> video::IVideoDriver* driver = services->getVideoDriver();<br><br> <font color="#006600">// set inverted world matrix<br> // if we are using highlevel shaders (the user can select this when<br> // starting the program), we must set the constants by name.</font><br> core::matrix4 invWorld = driver->getTransform(video::ETS_WORLD);<br> invWorld.makeInverse();<br><br> if (UseHighLevelShaders)<br> services->setVertexShaderConstant("mInvWorld", &invWorld.M[0], 16);<br> else<br> services->setVertexShaderConstant(&invWorld.M[0], 0, 4);<br><font color="#006600"><br> // set clip matrix<br></font> core::matrix4 worldViewProj;<br> worldViewProj = driver->getTransform(video::ETS_PROJECTION); <br> worldViewProj *= driver->getTransform(video::ETS_VIEW);<br> worldViewProj *= driver->getTransform(video::ETS_WORLD);<br><br> if (UseHighLevelShaders)<br> services->setVertexShaderConstant("mWorldViewProj", &worldViewProj.M[0], 16);<br> else<br> services->setVertexShaderConstant(&worldViewProj.M[0], 4, 4);<br> <br><font color="#006600"> </font><font color="#006600">// set camera position<br></font> core::vector3df pos = device->getSceneManager()-><br> getActiveCamera()->getAbsolutePosition();<br><br> if (UseHighLevelShaders)<br> services->setVertexShaderConstant("mLightPos", reinterpret_cast<f32*>(&pos), 3);<br> else<br> services->setVertexShaderConstant(reinterpret_cast<f32*>(&pos), 8, 1);<br><br><font color="#006600"> </font><font color="#006600">// set light color <br></font> video::SColorf col(0.0f,1.0f,1.0f,0.0f);<br><br> if (UseHighLevelShaders)<br> services->setVertexShaderConstant("mLightColor", reinterpret_cast<f32*>(&col), 4);<br> else<br> services->setVertexShaderConstant(reinterpret_cast<f32*>(&col), 9, 1);<br><br><font color="#006600"> </font><font color="#006600">// set transposed world matrix<br></font> core::matrix4 world = driver->getTransform(video::ETS_WORLD);<br> world = world.getTransposed();<br><br> if (UseHighLevelShaders)<br> services->setVertexShaderConstant("mTransWorld", &world.M[0], 16);<br> else<br> services->setVertexShaderConstant(&world.M[0], 10, 4);<br> }<br>};</pre></td> | 70 | <br> virtual void OnSetConstants(video::IMaterialRendererServices* services, s32 userData)<br> {<br> video::IVideoDriver* driver = services->getVideoDriver();<br><br> <font color="#006600">// set inverted world matrix<br> // if we are using highlevel shaders (the user can select this when<br> // starting the program), we must set the constants by name.</font><br> core::matrix4 invWorld = driver->getTransform(video::ETS_WORLD);<br> invWorld.makeInverse();<br><br> if (UseHighLevelShaders)<br> services->setVertexShaderConstant("mInvWorld", &invWorld.M[0], 16);<br> else<br> services->setVertexShaderConstant(&invWorld.M[0], 0, 4);<br><font color="#006600"><br> // set clip matrix<br></font> core::matrix4 worldViewProj;<br> worldViewProj = driver->getTransform(video::ETS_PROJECTION); <br> worldViewProj *= driver->getTransform(video::ETS_VIEW);<br> worldViewProj *= driver->getTransform(video::ETS_WORLD);<br><br> if (UseHighLevelShaders)<br> services->setVertexShaderConstant("mWorldViewProj", &worldViewProj.M[0], 16);<br> else<br> services->setVertexShaderConstant(&worldViewProj.M[0], 4, 4);<br> <br><font color="#006600"> </font><font color="#006600">// set camera position<br></font> core::vector3df pos = device->getSceneManager()-><br> getActiveCamera()->getAbsolutePosition();<br><br> if (UseHighLevelShaders)<br> services->setVertexShaderConstant("mLightPos", reinterpret_cast<f32*>(&pos), 3);<br> else<br> services->setVertexShaderConstant(reinterpret_cast<f32*>(&pos), 8, 1);<br><br><font color="#006600"> </font><font color="#006600">// set light color <br></font> video::SColorf col(0.0f,1.0f,1.0f,0.0f);<br><br> if (UseHighLevelShaders)<br> services->setVertexShaderConstant("mLightColor", reinterpret_cast<f32*>(&col), 4);<br> else<br> services->setVertexShaderConstant(reinterpret_cast<f32*>(&col), 9, 1);<br><br><font color="#006600"> </font><font color="#006600">// set transposed world matrix<br></font> core::matrix4 world = driver->getTransform(video::ETS_WORLD);<br> world = world.getTransposed();<br><br> if (UseHighLevelShaders)<br> services->setVertexShaderConstant("mTransWorld", &world.M[0], 16);<br> else<br> services->setVertexShaderConstant(&world.M[0], 10, 4);<br> }<br>};</pre></td> |
71 | </tr> | 71 | </tr> |
72 | </table> | 72 | </table> |
73 | <p> The next few lines start up the engine. Just like in most other | 73 | <p> The next few lines start up the engine. Just like in most other |
74 | tutorials before. But in addition, we ask the user if he wants this | 74 | tutorials before. But in addition, we ask the user if he wants this |
75 | example to use high level shaders if he selected a driver which is | 75 | example to use high level shaders if he selected a driver which is |
76 | capable of doing so.</p> | 76 | capable of doing so.</p> |
77 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 77 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
78 | <tr> | 78 | <tr> |
79 | <td> <pre>int main()<br>{<br><font color="#006600"> // let user select driver type</font><br><br> video::E_DRIVER_TYPE driverType = video::EDT_DIRECTX9;<br><br> printf("Please select the driver you want for this example:\n"\<br> " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\<br> " (d) Software Renderer\n (e) Apfelbaum Software Renderer\n"\<br> " (f) NullDevice\n (otherKey) exit\n\n");<br><br> char i;<br> std::cin >> i;<br><br> switch(i)<br> {<br> case 'a': driverType = video::EDT_DIRECT3D9;break;<br> case 'b': driverType = video::EDT_DIRECT3D8;break;<br> case 'c': driverType = video::EDT_OPENGL; break;<br> case 'd': driverType = video::EDT_SOFTWARE; break;<br> case 'e': driverType = video::EDT_BURNINGSVIDEO;break;<br> case 'f': driverType = video::EDT_NULL; break;<br> default: return 1;<br> } <br><br><font color="#006600"> </font> <font color="#006600">// ask the user if we should use high level shaders for this example<br> </font> if (driverType == video::EDT_DIRECT3D9 ||<br> driverType == video::EDT_OPENGL) | 79 | <td> <pre>int main()<br>{<br><font color="#006600"> // let user select driver type</font><br><br> video::E_DRIVER_TYPE driverType = video::EDT_DIRECTX9;<br><br> printf("Please select the driver you want for this example:\n"\<br> " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\<br> " (d) Software Renderer\n (e) Apfelbaum Software Renderer\n"\<br> " (f) NullDevice\n (otherKey) exit\n\n");<br><br> char i;<br> std::cin >> i;<br><br> switch(i)<br> {<br> case 'a': driverType = video::EDT_DIRECT3D9;break;<br> case 'b': driverType = video::EDT_DIRECT3D8;break;<br> case 'c': driverType = video::EDT_OPENGL; break;<br> case 'd': driverType = video::EDT_SOFTWARE; break;<br> case 'e': driverType = video::EDT_BURNINGSVIDEO;break;<br> case 'f': driverType = video::EDT_NULL; break;<br> default: return 1;<br> } <br><br><font color="#006600"> </font> <font color="#006600">// ask the user if we should use high level shaders for this example<br> </font> if (driverType == video::EDT_DIRECT3D9 ||<br> driverType == video::EDT_OPENGL) |
80 | {<br> printf("<font color="#CC0000">Please press 'y' if you want to use high level shaders.\n</font>");<br> std::cin >> i;<br> if (i == 'y')<br> UseHighLevelShaders = true;<br> }<br><br><font color="#006600"> // create devic</font>e<br><br> device = createDevice(driverType, core::dimension2d<s32>(640, 480));<br><br> if (device == 0)<br> {<br> printf(<font color="#CC0000">"\nWas not able to create driver.\n"\<br> "Please restart and select another driver.\n"</font>);<br> getch();<br> return 1;<br> } <br><br> video::IVideoDriver* driver = device->getVideoDriver();<br> scene::ISceneManager* smgr = device->getSceneManager();<br> gui::IGUIEnvironment* gui = device->getGUIEnvironment();</pre></td> | 80 | {<br> printf("<font color="#CC0000">Please press 'y' if you want to use high level shaders.\n</font>");<br> std::cin >> i;<br> if (i == 'y')<br> UseHighLevelShaders = true;<br> }<br><br><font color="#006600"> // create devic</font>e<br><br> device = createDevice(driverType, core::dimension2d<s32>(640, 480));<br><br> if (device == 0)<br> {<br> printf(<font color="#CC0000">"\nWas not able to create driver.\n"\<br> "Please restart and select another driver.\n"</font>);<br> getch();<br> return 1;<br> } <br><br> video::IVideoDriver* driver = device->getVideoDriver();<br> scene::ISceneManager* smgr = device->getSceneManager();<br> gui::IGUIEnvironment* gui = device->getGUIEnvironment();</pre></td> |
81 | </tr> | 81 | </tr> |
82 | </table> | 82 | </table> |
83 | <p> Now for the more interesting parts. If we are using Direct3D, we | 83 | <p> Now for the more interesting parts. If we are using Direct3D, we |
84 | want to load vertex and pixel shader programs, if we have<br> | 84 | want to load vertex and pixel shader programs, if we have<br> |
85 | OpenGL, we want to use ARB fragment and vertex programs. I wrote the | 85 | OpenGL, we want to use ARB fragment and vertex programs. I wrote the |
86 | corresponding programs down into the files d3d8.ps, d3d8.vs, d3d9.ps, | 86 | corresponding programs down into the files d3d8.ps, d3d8.vs, d3d9.ps, |
87 | d3d9.vs, opengl.ps and opengl.vs. We only need the right filenames | 87 | d3d9.vs, opengl.ps and opengl.vs. We only need the right filenames |
88 | now. This is done in the following switch. Note, that it is not necessary | 88 | now. This is done in the following switch. Note, that it is not necessary |
89 | to write the shaders into text files, like in this example. You can | 89 | to write the shaders into text files, like in this example. You can |
90 | even write the shaders directly as strings into the cpp source file, | 90 | even write the shaders directly as strings into the cpp source file, |
91 | and use later addShaderMaterial() instead of addShaderMaterialFromFiles().</p> | 91 | and use later addShaderMaterial() instead of addShaderMaterialFromFiles().</p> |
92 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 92 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
93 | <tr> | 93 | <tr> |
94 | <td> <pre> c8* vsFileName = 0<font color="#006600">; // filename for the vertex shader</font><br> c8* psFileName = 0<font color="#006600">; // filename for the pixel shader</font><br><br> switch(driverType)<br> {<br> case video::EDT_DIRECT3D8:<br> psFileName = "../../media/d3d8.psh";<br> vsFileName = "../../media/d3d8.vsh";<br> break;<br> case video::EDT_DIRECT3D9:<br> if (UseHighLevelShaders)<br> {<br> psFileName = "../../media/d3d9.hlsl";<br> vsFileName = psFileName; <font color="#006600">// both shaders are in the same file</font><br> }<br> else<br> {<br> psFileName = "../../media/d3d9.psh";<br> vsFileName = "../../media/d3d9.vsh";<br> }<br> break;<br> case video::EDT_OPENGL:<br> if (UseHighLevelShaders)<br> {<br> psFileName = "../../media/opengl.frag";<br> vsFileName = "../../media/opengl.vert";<br> }<br> else<br> {<br> psFileName = "../../media/opengl.psh";<br> vsFileName = "../../media/opengl.vsh";<br> }<br> break;<br> }<br></pre> | 94 | <td> <pre> c8* vsFileName = 0<font color="#006600">; // filename for the vertex shader</font><br> c8* psFileName = 0<font color="#006600">; // filename for the pixel shader</font><br><br> switch(driverType)<br> {<br> case video::EDT_DIRECT3D8:<br> psFileName = "../../media/d3d8.psh";<br> vsFileName = "../../media/d3d8.vsh";<br> break;<br> case video::EDT_DIRECT3D9:<br> if (UseHighLevelShaders)<br> {<br> psFileName = "../../media/d3d9.hlsl";<br> vsFileName = psFileName; <font color="#006600">// both shaders are in the same file</font><br> }<br> else<br> {<br> psFileName = "../../media/d3d9.psh";<br> vsFileName = "../../media/d3d9.vsh";<br> }<br> break;<br> case video::EDT_OPENGL:<br> if (UseHighLevelShaders)<br> {<br> psFileName = "../../media/opengl.frag";<br> vsFileName = "../../media/opengl.vert";<br> }<br> else<br> {<br> psFileName = "../../media/opengl.psh";<br> vsFileName = "../../media/opengl.vsh";<br> }<br> break;<br> }<br></pre> |
95 | </td> | 95 | </td> |
96 | </tr> | 96 | </tr> |
97 | </table> | 97 | </table> |
98 | <p> In addition, we check if the hardware and the selected renderer | 98 | <p> In addition, we check if the hardware and the selected renderer |
99 | is capable of executing the shaders we want. If not, we simply set | 99 | is capable of executing the shaders we want. If not, we simply set |
100 | the filename string to 0. This is not necessary, but useful in this | 100 | the filename string to 0. This is not necessary, but useful in this |
101 | example: For example, if the hardware is able to execute vertex shaders | 101 | example: For example, if the hardware is able to execute vertex shaders |
102 | but not pixel shaders, we create a new material which only uses the | 102 | but not pixel shaders, we create a new material which only uses the |
103 | vertex shader, and no pixel shader. Otherwise, if we would tell the | 103 | vertex shader, and no pixel shader. Otherwise, if we would tell the |
104 | engine to create this material and the engine sees that the hardware | 104 | engine to create this material and the engine sees that the hardware |
105 | wouldn't be able to fullfill the request completely,<br> | 105 | wouldn't be able to fullfill the request completely,<br> |
106 | it would not create any new material at all. So in this example you | 106 | it would not create any new material at all. So in this example you |
107 | would see at least the vertex shader in action, without the pixel | 107 | would see at least the vertex shader in action, without the pixel |
108 | shader.</p> | 108 | shader.</p> |
109 | </div> | 109 | </div> |
110 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 110 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
111 | <tr> | 111 | <tr> |
112 | <td> <pre> if (!driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) &&<br> !driver->queryFeature(video::EVDF_ARB_FRAGMENT_PROGRAM_1))<br> {<br> device->getLogger()->log("WARNING: Pixel shaders disabled "\<br> "because of missing driver/hardware support.");<br> psFileName = 0;<br> }<br> <br> if (!driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1) &&<br> !driver->queryFeature(video::EVDF_ARB_VERTEX_PROGRAM_1))<br> {<br> device->getLogger()->log("WARNING: Vertex shaders disabled "\<br> "because of missing driver/hardware support.");<br> vsFileName = 0;<br> }</pre></td> | 112 | <td> <pre> if (!driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) &&<br> !driver->queryFeature(video::EVDF_ARB_FRAGMENT_PROGRAM_1))<br> {<br> device->getLogger()->log("WARNING: Pixel shaders disabled "\<br> "because of missing driver/hardware support.");<br> psFileName = 0;<br> }<br> <br> if (!driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1) &&<br> !driver->queryFeature(video::EVDF_ARB_VERTEX_PROGRAM_1))<br> {<br> device->getLogger()->log("WARNING: Vertex shaders disabled "\<br> "because of missing driver/hardware support.");<br> vsFileName = 0;<br> }</pre></td> |
113 | </tr> | 113 | </tr> |
114 | </table> | 114 | </table> |
115 | <p> Now lets create the new materials.<br> | 115 | <p> Now lets create the new materials.<br> |
116 | As you maybe know from previous examples, a material type in the Irrlicht | 116 | As you maybe know from previous examples, a material type in the Irrlicht |
117 | engine is set by simply changing the MaterialType value in the SMaterial | 117 | engine is set by simply changing the MaterialType value in the SMaterial |
118 | struct. And this value is just a simple 32 bit value, like video::EMT_SOLID. | 118 | struct. And this value is just a simple 32 bit value, like video::EMT_SOLID. |
119 | So we only need the engine to create a new value for us which we can | 119 | So we only need the engine to create a new value for us which we can |
120 | set there. To do this, we get a pointer to the IGPUProgrammingServices | 120 | set there. To do this, we get a pointer to the IGPUProgrammingServices |
121 | and call addShaderMaterialFromFiles(), which returns such a new 32 bit | 121 | and call addShaderMaterialFromFiles(), which returns such a new 32 bit |
122 | value. That's all.<br> | 122 | value. That's all.<br> |
123 | The parameters to this method are the following: First, the names of | 123 | The parameters to this method are the following: First, the names of |
124 | the files containing the code of the vertex and the pixel shader.<br> | 124 | the files containing the code of the vertex and the pixel shader.<br> |
125 | If you would use addShaderMaterial() instead, you would not need file | 125 | If you would use addShaderMaterial() instead, you would not need file |
126 | names, then you could write the code of the shader directly as string. | 126 | names, then you could write the code of the shader directly as string. |
127 | The following parameter is a pointer to the IShaderConstantSetCallBack | 127 | The following parameter is a pointer to the IShaderConstantSetCallBack |
128 | class we wrote at the beginning of this tutorial. If you don't want | 128 | class we wrote at the beginning of this tutorial. If you don't want |
129 | to set constants, set this to 0. The last paramter tells the engine | 129 | to set constants, set this to 0. The last paramter tells the engine |
130 | which material it should use as base material. <br> | 130 | which material it should use as base material. <br> |
131 | To demonstrate this, we create two materials with a different base material, | 131 | To demonstrate this, we create two materials with a different base material, |
132 | one with EMT_SOLID and one with EMT_TRANSPARENT_ADD_COLOR.</p> | 132 | one with EMT_SOLID and one with EMT_TRANSPARENT_ADD_COLOR.</p> |
133 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 133 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
134 | <tr> | 134 | <tr> |
135 | <td><pre> <font color="#006600">// create materials</font><br><br> video::IGPUProgrammingServices* gpu = driver->getGPUProgrammingServices();<br><br> s32 newMaterialType1 = 0;<br> s32 newMaterialType2 = 0;<br><br> if (gpu)<br> {<br> MyShaderCallBack* mc = new MyShaderCallBack();<br> <font color="#006600"> | 135 | <td><pre> <font color="#006600">// create materials</font><br><br> video::IGPUProgrammingServices* gpu = driver->getGPUProgrammingServices();<br><br> s32 newMaterialType1 = 0;<br> s32 newMaterialType2 = 0;<br><br> if (gpu)<br> {<br> MyShaderCallBack* mc = new MyShaderCallBack();<br> <font color="#006600"> |
136 | // create the shaders depending on if the user wanted high level<br> // or low level shaders:</font><br><br> if (UseHighLevelShaders)<br> {<br><font color="#006600"> // create material from high level shaders (hlsl or glsl)<br><br></font> newMaterialType1 = gpu->addHighLevelShaderMaterialFromFiles(<br> vsFileName, "vertexMain", video::EVST_VS_1_1,<br> psFileName, "pixelMain", video::EPST_PS_1_1,<br> mc, video::EMT_SOLID);<br><br> newMaterialType2 = gpu->addHighLevelShaderMaterialFromFiles(<br> vsFileName, "vertexMain", video::EVST_VS_1_1,<br> psFileName, "pixelMain", video::EPST_PS_1_1,<br> mc, video::EMT_TRANSPARENT_ADD_COLOR);<br> }<br> else<br> {<br><font color="#009900"> // create material from low level shaders (asm or arb_asm)<br></font><br> newMaterialType1 = gpu->addShaderMaterialFromFiles(vsFileName,<br> psFileName, mc, video::EMT_SOLID);<br><br> newMaterialType2 = gpu->addShaderMaterialFromFiles(vsFileName,<br> psFileName, mc, video::EMT_TRANSPARENT_ADD_COLOR);<br> }<br><br> mc->drop();<br> }<br></pre></td> | 136 | // create the shaders depending on if the user wanted high level<br> // or low level shaders:</font><br><br> if (UseHighLevelShaders)<br> {<br><font color="#006600"> // create material from high level shaders (hlsl or glsl)<br><br></font> newMaterialType1 = gpu->addHighLevelShaderMaterialFromFiles(<br> vsFileName, "vertexMain", video::EVST_VS_1_1,<br> psFileName, "pixelMain", video::EPST_PS_1_1,<br> mc, video::EMT_SOLID);<br><br> newMaterialType2 = gpu->addHighLevelShaderMaterialFromFiles(<br> vsFileName, "vertexMain", video::EVST_VS_1_1,<br> psFileName, "pixelMain", video::EPST_PS_1_1,<br> mc, video::EMT_TRANSPARENT_ADD_COLOR);<br> }<br> else<br> {<br><font color="#009900"> // create material from low level shaders (asm or arb_asm)<br></font><br> newMaterialType1 = gpu->addShaderMaterialFromFiles(vsFileName,<br> psFileName, mc, video::EMT_SOLID);<br><br> newMaterialType2 = gpu->addShaderMaterialFromFiles(vsFileName,<br> psFileName, mc, video::EMT_TRANSPARENT_ADD_COLOR);<br> }<br><br> mc->drop();<br> }<br></pre></td> |
137 | </tr> | 137 | </tr> |
138 | </table> | 138 | </table> |
139 | <p> Now its time for testing out the materials. We create a test cube | 139 | <p> Now its time for testing out the materials. We create a test cube |
140 | and set the material we created. In addition, we add a text scene node | 140 | and set the material we created. In addition, we add a text scene node |
141 | to the cube and a rotatation animator, to make it look more interesting | 141 | to the cube and a rotatation animator, to make it look more interesting |
142 | and important. </p> | 142 | and important. </p> |
143 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 143 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
144 | <tr> | 144 | <tr> |
145 | <td><pre><font color="#006600"> | 145 | <td><pre><font color="#006600"> |
146 | // create test scene node 1, with the new created material type 1</font> | 146 | // create test scene node 1, with the new created material type 1</font> |
147 | 147 | ||
148 | scene::ISceneNode* node = smgr->addCubeSceneNode(50); | 148 | scene::ISceneNode* node = smgr->addCubeSceneNode(50); |
149 | node->setPosition(core::vector3df(0,0,0)); | 149 | node->setPosition(core::vector3df(0,0,0)); |
150 | node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); | 150 | node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); |
151 | node->setMaterialFlag(video::EMF_LIGHTING, false); | 151 | node->setMaterialFlag(video::EMF_LIGHTING, false); |
152 | node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType1); | 152 | node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType1); |
153 | 153 | ||
154 | smgr->addTextSceneNode(gui->getBuiltInFont(), | 154 | smgr->addTextSceneNode(gui->getBuiltInFont(), |
155 | L"PS & VS & EMT_SOLID", | 155 | L"PS & VS & EMT_SOLID", |
156 | video::SColor(255,255,255,255), node); | 156 | video::SColor(255,255,255,255), node); |
157 | 157 | ||
158 | scene::ISceneNodeAnimator* anim = smgr->createRotationAnimator( | 158 | scene::ISceneNodeAnimator* anim = smgr->createRotationAnimator( |
159 | core::vector3df(0,0.3f,0)); | 159 | core::vector3df(0,0.3f,0)); |
160 | node->addAnimator(anim); | 160 | node->addAnimator(anim); |
161 | anim->drop();</pre></td> | 161 | anim->drop();</pre></td> |
162 | </tr> | 162 | </tr> |
163 | </table> | 163 | </table> |
164 | <p> Same for the second cube, but with the second material we created.</p> | 164 | <p> Same for the second cube, but with the second material we created.</p> |
165 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 165 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
166 | <tr> | 166 | <tr> |
167 | <td><pre> <font color="#006600">// create test scene node 2, with the new created material type 2</font> | 167 | <td><pre> <font color="#006600">// create test scene node 2, with the new created material type 2</font> |
168 | 168 | ||
169 | node = smgr->addCubeSceneNode(50); | 169 | node = smgr->addCubeSceneNode(50); |
170 | node->setPosition(core::vector3df(0,-10,50)); | 170 | node->setPosition(core::vector3df(0,-10,50)); |
171 | node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); | 171 | node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); |
172 | node->setMaterialFlag(video::EMF_LIGHTING, false); | 172 | node->setMaterialFlag(video::EMF_LIGHTING, false); |
173 | node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType2); | 173 | node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType2); |
174 | 174 | ||
175 | smgr->addTextSceneNode(gui->getBuiltInFont(), | 175 | smgr->addTextSceneNode(gui->getBuiltInFont(), |
176 | L"PS & VS & EMT_TRANSPARENT", | 176 | L"PS & VS & EMT_TRANSPARENT", |
177 | video::SColor(255,255,255,255), node); | 177 | video::SColor(255,255,255,255), node); |
178 | 178 | ||
179 | anim = smgr->createRotationAnimator(core::vector3df(0,0.3f,0)); | 179 | anim = smgr->createRotationAnimator(core::vector3df(0,0.3f,0)); |
180 | node->addAnimator(anim); | 180 | node->addAnimator(anim); |
181 | anim->drop();</pre></td> | 181 | anim->drop();</pre></td> |
182 | </tr> | 182 | </tr> |
183 | </table> | 183 | </table> |
184 | <br> | 184 | <br> |
185 | Then we add a third cube without a shader on it, to be able to compare | 185 | Then we add a third cube without a shader on it, to be able to compare |
186 | the cubes.<br> | 186 | the cubes.<br> |
187 | <br> | 187 | <br> |
188 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 188 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
189 | <tr> | 189 | <tr> |
190 | <td><pre> <font color="#006600">// add a scene node with no shader </font> | 190 | <td><pre> <font color="#006600">// add a scene node with no shader </font> |
191 | 191 | ||
192 | node = smgr->addCubeSceneNode(50); | 192 | node = smgr->addCubeSceneNode(50); |
193 | node->setPosition(core::vector3df(0,50,25)); | 193 | node->setPosition(core::vector3df(0,50,25)); |
194 | node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); | 194 | node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); |
195 | node->setMaterialFlag(video::EMF_LIGHTING, false); | 195 | node->setMaterialFlag(video::EMF_LIGHTING, false); |
196 | smgr->addTextSceneNode(gui->getBuiltInFont(), L"NO SHADER", | 196 | smgr->addTextSceneNode(gui->getBuiltInFont(), L"NO SHADER", |
197 | video::SColor(255,255,255,255), node); | 197 | video::SColor(255,255,255,255), node); |
198 | </pre></td> | 198 | </pre></td> |
199 | </tr> | 199 | </tr> |
200 | </table> | 200 | </table> |
201 | <br> | 201 | <br> |
202 | And last, we add a skybox and a user controlled camera to the scene. For | 202 | And last, we add a skybox and a user controlled camera to the scene. For |
203 | the skybox textures, we disable mipmap generation, because we don't need | 203 | the skybox textures, we disable mipmap generation, because we don't need |
204 | mipmaps on it.<br> | 204 | mipmaps on it.<br> |
205 | <br> | 205 | <br> |
206 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 206 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
207 | <tr> | 207 | <tr> |
208 | <td><pre> <font color="#006600">// add a nice skybox</font><br><br> driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);<br><br> smgr->addSkyBoxSceneNode(<br> driver->getTexture("../../media/irrlicht2_up.jpg"),<br> driver->getTexture("../../media/irrlicht2_dn.jpg"),<br> driver->getTexture("../../media/irrlicht2_lf.jpg"),<br> driver->getTexture("../../media/irrlicht2_rt.jpg"),<br> driver->getTexture("../../media/irrlicht2_ft.jpg"),<br> driver->getTexture("../../media/irrlicht2_bk.jpg"));<br><br> driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true);<br><br><font color="#006600"> // add a camera and disable the mouse curso</font>r<br><br> scene::ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS(0, 100.0f, 100.0f);<br> cam->setPosition(core::vector3df(-100,50,100));<br> cam->setTarget(core::vector3df(0,0,0));<br> device->getCursorControl()->setVisible(false);</pre></td> | 208 | <td><pre> <font color="#006600">// add a nice skybox</font><br><br> driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);<br><br> smgr->addSkyBoxSceneNode(<br> driver->getTexture("../../media/irrlicht2_up.jpg"),<br> driver->getTexture("../../media/irrlicht2_dn.jpg"),<br> driver->getTexture("../../media/irrlicht2_lf.jpg"),<br> driver->getTexture("../../media/irrlicht2_rt.jpg"),<br> driver->getTexture("../../media/irrlicht2_ft.jpg"),<br> driver->getTexture("../../media/irrlicht2_bk.jpg"));<br><br> driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true);<br><br><font color="#006600"> // add a camera and disable the mouse curso</font>r<br><br> scene::ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS(0, 100.0f, 100.0f);<br> cam->setPosition(core::vector3df(-100,50,100));<br> cam->setTarget(core::vector3df(0,0,0));<br> device->getCursorControl()->setVisible(false);</pre></td> |
209 | </tr> | 209 | </tr> |
210 | </table> | 210 | </table> |
211 | <br> | 211 | <br> |
212 | Now draw everything. That's all.<br> | 212 | Now draw everything. That's all.<br> |
213 | <br> | 213 | <br> |
214 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 214 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
215 | <tr> | 215 | <tr> |
216 | <td><pre> int lastFPS = -1;<br><br> while(device->run())<br> if (device->isWindowActive())<br> {<br> driver->beginScene(true, true, video::SColor(255,0,0,0));<br> smgr->drawAll();<br> driver->endScene();<br><br> int fps = driver->getFPS();<br><br> if (lastFPS != fps)<br> {<br> core::stringw str = L"Irrlicht Engine - Vertex and pixel shader example [";<br> str += driver->getName();<br> str += "] FPS:";<br> str += fps;<br> device->setWindowCaption(str.c_str());<br> lastFPS = fps;<br> }<br> }<br><br> device->drop();<br> <br> return 0;<br></pre></td> | 216 | <td><pre> int lastFPS = -1;<br><br> while(device->run())<br> if (device->isWindowActive())<br> {<br> driver->beginScene(true, true, video::SColor(255,0,0,0));<br> smgr->drawAll();<br> driver->endScene();<br><br> int fps = driver->getFPS();<br><br> if (lastFPS != fps)<br> {<br> core::stringw str = L"Irrlicht Engine - Vertex and pixel shader example [";<br> str += driver->getName();<br> str += "] FPS:";<br> str += fps;<br> device->setWindowCaption(str.c_str());<br> lastFPS = fps;<br> }<br> }<br><br> device->drop();<br> <br> return 0;<br></pre></td> |
217 | </tr> | 217 | </tr> |
218 | </table> | 218 | </table> |
219 | <br> | 219 | <br> |
220 | Compile and run this, and I hope you have fun with your new little shader | 220 | Compile and run this, and I hope you have fun with your new little shader |
221 | writing tool :).<br> | 221 | writing tool :).<br> |
222 | </div> | 222 | </div> |
223 | </td> | 223 | </td> |
224 | </tr> | 224 | </tr> |
225 | </table> | 225 | </table> |
226 | <br> | 226 | <br> |
227 | <table width="95%" border="0" cellspacing="0" cellpadding="2" align="center"> | 227 | <table width="95%" border="0" cellspacing="0" cellpadding="2" align="center"> |
228 | <tr> | 228 | <tr> |
229 | <td bgcolor="#666699"> <b><font color="#FFFFFF">Shader files</font></b></td> | 229 | <td bgcolor="#666699"> <b><font color="#FFFFFF">Shader files</font></b></td> |
230 | </tr> | 230 | </tr> |
231 | <tr> | 231 | <tr> |
232 | <td height="90" bgcolor="#eeeeff" valign="top"> <div align="left"> | 232 | <td height="90" bgcolor="#eeeeff" valign="top"> <div align="left"> |
233 | <div align="left"> | 233 | <div align="left"> |
234 | <p>The files containing the shaders can be found in the media directory | 234 | <p>The files containing the shaders can be found in the media directory |
235 | of the SDK. However, they look like this:</p> | 235 | of the SDK. However, they look like this:</p> |
236 | <table width="95%" border="0" cellspacing="4" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 236 | <table width="95%" border="0" cellspacing="4" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
237 | <tr> | 237 | <tr> |
238 | <td><strong>D3D9.HLSL</strong></td> | 238 | <td><strong>D3D9.HLSL</strong></td> |
239 | </tr> | 239 | </tr> |
240 | <tr> | 240 | <tr> |
241 | <td> | 241 | <td> |
242 | <pre> | 242 | <pre> |
243 | // part of the Irrlicht Engine Shader example. | 243 | // part of the Irrlicht Engine Shader example. |
244 | // These simple Direct3D9 pixel and vertex shaders will be loaded by the shaders | 244 | // These simple Direct3D9 pixel and vertex shaders will be loaded by the shaders |
245 | // example. Please note that these example shaders don't do anything really useful. | 245 | // example. Please note that these example shaders don't do anything really useful. |
246 | // They only demonstrate that shaders can be used in Irrlicht. | 246 | // They only demonstrate that shaders can be used in Irrlicht. |
247 | 247 | ||
248 | //----------------------------------------------------------------------------- | 248 | //----------------------------------------------------------------------------- |
249 | // Global variables | 249 | // Global variables |
250 | //----------------------------------------------------------------------------- | 250 | //----------------------------------------------------------------------------- |
251 | float4x4 mWorldViewProj; // World * View * Projection transformation | 251 | float4x4 mWorldViewProj; // World * View * Projection transformation |
252 | float4x4 mInvWorld; // Inverted world matrix | 252 | float4x4 mInvWorld; // Inverted world matrix |
253 | float4x4 mTransWorld; // Transposed world matrix | 253 | float4x4 mTransWorld; // Transposed world matrix |
254 | float3 mLightPos; // Light position | 254 | float3 mLightPos; // Light position |
255 | float4 mLightColor; // Light color | 255 | float4 mLightColor; // Light color |
256 | 256 | ||
257 | 257 | ||
258 | // Vertex shader output structure | 258 | // Vertex shader output structure |
259 | struct VS_OUTPUT | 259 | struct VS_OUTPUT |
260 | { | 260 | { |
261 | float4 Position : POSITION; // vertex position | 261 | float4 Position : POSITION; // vertex position |
262 | float4 Diffuse : COLOR0; // vertex diffuse color | 262 | float4 Diffuse : COLOR0; // vertex diffuse color |
263 | float2 TexCoord : TEXCOORD0; // tex coords | 263 | float2 TexCoord : TEXCOORD0; // tex coords |
264 | }; | 264 | }; |
265 | 265 | ||
266 | 266 | ||
267 | VS_OUTPUT vertexMain( in float4 vPosition : POSITION, | 267 | VS_OUTPUT vertexMain( in float4 vPosition : POSITION, |
268 | in float3 vNormal : NORMAL, | 268 | in float3 vNormal : NORMAL, |
269 | float2 texCoord : TEXCOORD0 ) | 269 | float2 texCoord : TEXCOORD0 ) |
270 | { | 270 | { |
271 | VS_OUTPUT Output; | 271 | VS_OUTPUT Output; |
272 | 272 | ||
273 | // transform position to clip space | 273 | // transform position to clip space |
274 | Output.Position = mul(vPosition, mWorldViewProj); | 274 | Output.Position = mul(vPosition, mWorldViewProj); |
275 | 275 | ||
276 | // transform normal | 276 | // transform normal |
277 | float3 normal = mul(vNormal, mInvWorld); | 277 | float3 normal = mul(vNormal, mInvWorld); |
278 | 278 | ||
279 | // renormalize normal | 279 | // renormalize normal |
280 | normal = normalize(normal); | 280 | normal = normalize(normal); |
281 | 281 | ||
282 | // position in world coodinates | 282 | // position in world coodinates |
283 | float3 worldpos = mul(mTransWorld, vPosition); | 283 | float3 worldpos = mul(mTransWorld, vPosition); |
284 | 284 | ||
285 | // calculate light vector, vtxpos - lightpos | 285 | // calculate light vector, vtxpos - lightpos |
286 | float3 lightVector = worldpos - mLightPos; | 286 | float3 lightVector = worldpos - mLightPos; |
287 | 287 | ||
288 | // normalize light vector | 288 | // normalize light vector |
289 | lightVector = normalize(lightVector); | 289 | lightVector = normalize(lightVector); |
290 | 290 | ||
291 | // calculate light color | 291 | // calculate light color |
292 | float3 tmp = dot(-lightVector, normal); | 292 | float3 tmp = dot(-lightVector, normal); |
293 | tmp = lit(tmp.x, tmp.y, 1.0); | 293 | tmp = lit(tmp.x, tmp.y, 1.0); |
294 | 294 | ||
295 | tmp = mLightColor * tmp.y; | 295 | tmp = mLightColor * tmp.y; |
296 | Output.Diffuse = float4(tmp.x, tmp.y, tmp.z, 0); | 296 | Output.Diffuse = float4(tmp.x, tmp.y, tmp.z, 0); |
297 | Output.TexCoord = texCoord; | 297 | Output.TexCoord = texCoord; |
298 | 298 | ||
299 | return Output; | 299 | return Output; |
300 | } | 300 | } |
301 | 301 | ||
302 | 302 | ||
303 | 303 | ||
304 | // Pixel shader output structure | 304 | // Pixel shader output structure |
305 | struct PS_OUTPUT | 305 | struct PS_OUTPUT |
306 | { | 306 | { |
307 | float4 RGBColor : COLOR0; // Pixel color | 307 | float4 RGBColor : COLOR0; // Pixel color |
308 | }; | 308 | }; |
309 | 309 | ||
310 | 310 | ||
311 | sampler2D tex0; | 311 | sampler2D tex0; |
312 | 312 | ||
313 | PS_OUTPUT pixelMain( float2 TexCoord : TEXCOORD0, | 313 | PS_OUTPUT pixelMain( float2 TexCoord : TEXCOORD0, |
314 | float4 Position : POSITION, | 314 | float4 Position : POSITION, |
315 | float4 Diffuse : COLOR0 ) | 315 | float4 Diffuse : COLOR0 ) |
316 | { | 316 | { |
317 | PS_OUTPUT Output; | 317 | PS_OUTPUT Output; |
318 | 318 | ||
319 | float4 col = tex2D( tex0, TexCoord ); // sample color map | 319 | float4 col = tex2D( tex0, TexCoord ); // sample color map |
320 | 320 | ||
321 | // multiply with diffuse and do other senseless operations | 321 | // multiply with diffuse and do other senseless operations |
322 | Output.RGBColor = Diffuse * col; | 322 | Output.RGBColor = Diffuse * col; |
323 | Output.RGBColor *= 4.0; | 323 | Output.RGBColor *= 4.0; |
324 | 324 | ||
325 | return Output; | 325 | return Output; |
326 | }</pre></td> | 326 | }</pre></td> |
327 | </tr> | 327 | </tr> |
328 | </table> | 328 | </table> |
329 | <br> | 329 | <br> |
330 | <table width="95%" border="0" cellspacing="4" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 330 | <table width="95%" border="0" cellspacing="4" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
331 | <tr> | 331 | <tr> |
332 | <td><strong>D3D9.VSH</strong></td> | 332 | <td><strong>D3D9.VSH</strong></td> |
333 | </tr> | 333 | </tr> |
334 | <tr> | 334 | <tr> |
335 | <td> <pre> | 335 | <td> <pre> |
336 | ; part of the Irrlicht Engine Shader example. | 336 | ; part of the Irrlicht Engine Shader example. |
337 | ; This Direct3D9 vertex shader will be loaded by the engine. | 337 | ; This Direct3D9 vertex shader will be loaded by the engine. |
338 | ; Please note that these example shaders don't do anything really useful. | 338 | ; Please note that these example shaders don't do anything really useful. |
339 | ; They only demonstrate that shaders can be used in Irrlicht.<br> | 339 | ; They only demonstrate that shaders can be used in Irrlicht.<br> |
340 | vs.1.1 | 340 | vs.1.1 |
341 | 341 | ||
342 | dcl_position v0; ; declare position | 342 | dcl_position v0; ; declare position |
343 | dcl_normal v1; ; declare normal | 343 | dcl_normal v1; ; declare normal |
344 | dcl_color v2; ; declare color | 344 | dcl_color v2; ; declare color |
345 | dcl_texcoord0 v3; ; declare texture coordinate<br> | 345 | dcl_texcoord0 v3; ; declare texture coordinate<br> |
346 | ; transpose and transform position to clip space | 346 | ; transpose and transform position to clip space |
347 | mul r0, v0.x, c4 | 347 | mul r0, v0.x, c4 |
348 | mad r0, v0.y, c5, r0 | 348 | mad r0, v0.y, c5, r0 |
349 | mad r0, v0.z, c6, r0 | 349 | mad r0, v0.z, c6, r0 |
350 | add oPos, c7, r0 | 350 | add oPos, c7, r0 |
351 | 351 | ||
352 | ; transform normal | 352 | ; transform normal |
353 | dp3 r1.x, v1, c0 | 353 | dp3 r1.x, v1, c0 |
354 | dp3 r1.y, v1, c1 | 354 | dp3 r1.y, v1, c1 |
355 | dp3 r1.z, v1, c2 | 355 | dp3 r1.z, v1, c2 |
356 | 356 | ||
357 | ; renormalize normal | 357 | ; renormalize normal |
358 | dp3 r1.w, r1, r1 | 358 | dp3 r1.w, r1, r1 |
359 | rsq r1.w, r1.w | 359 | rsq r1.w, r1.w |
360 | mul r1, r1, r1.w | 360 | mul r1, r1, r1.w |
361 | 361 | ||
362 | ; calculate light vector | 362 | ; calculate light vector |
363 | m4x4 r6, v0, c10 ; vertex into world position | 363 | m4x4 r6, v0, c10 ; vertex into world position |
364 | add r2, c8, -r6 ; vtxpos - lightpos | 364 | add r2, c8, -r6 ; vtxpos - lightpos |
365 | 365 | ||
366 | ; normalize light vector | 366 | ; normalize light vector |
367 | dp3 r2.w, r2, r2 | 367 | dp3 r2.w, r2, r2 |
368 | rsq r2.w, r2.w | 368 | rsq r2.w, r2.w |
369 | mul r2, r2, r2.w | 369 | mul r2, r2, r2.w |
370 | 370 | ||
371 | ; calculate light color | 371 | ; calculate light color |
372 | dp3 r3, r1, r2 ; dp3 with negative light vector | 372 | dp3 r3, r1, r2 ; dp3 with negative light vector |
373 | lit r5, r3 ; clamp to zero if r3 < 0, r5 has diffuce component in r5.y | 373 | lit r5, r3 ; clamp to zero if r3 < 0, r5 has diffuce component in r5.y |
374 | mul oD0, r5.y, c9 ; ouput diffuse color | 374 | mul oD0, r5.y, c9 ; ouput diffuse color |
375 | mov oT0, v3 ; store texture coordinates </pre> </td> | 375 | mov oT0, v3 ; store texture coordinates </pre> </td> |
376 | </tr> | 376 | </tr> |
377 | </table> | 377 | </table> |
378 | <br> | 378 | <br> |
379 | <table width="95%" border="0" cellspacing="4" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 379 | <table width="95%" border="0" cellspacing="4" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
380 | <tr> | 380 | <tr> |
381 | <td><strong>D3D9.PSH</strong></td> | 381 | <td><strong>D3D9.PSH</strong></td> |
382 | </tr> | 382 | </tr> |
383 | <tr> | 383 | <tr> |
384 | <td> <pre> | 384 | <td> <pre> |
385 | ; part of the Irrlicht Engine Shader example. | 385 | ; part of the Irrlicht Engine Shader example. |
386 | ; This simple Direct3D9 pixel shader will be loaded by the engine. | 386 | ; This simple Direct3D9 pixel shader will be loaded by the engine. |
387 | ; Please note that these example shaders don't do anything really useful. | 387 | ; Please note that these example shaders don't do anything really useful. |
388 | ; They only demonstrate that shaders can be used in Irrlicht.<br> | 388 | ; They only demonstrate that shaders can be used in Irrlicht.<br> |
389 | ps.1.1 | 389 | ps.1.1 |
390 | 390 | ||
391 | tex t0 ; sample color map | 391 | tex t0 ; sample color map |
392 | add r0, v0, v0 ; mulitply with color | 392 | add r0, v0, v0 ; mulitply with color |
393 | mul t0, t0, r0 ; mulitply with color | 393 | mul t0, t0, r0 ; mulitply with color |
394 | add r0, t0, t0 ; make it brighter and store result | 394 | add r0, t0, t0 ; make it brighter and store result |
395 | </pre> </td> | 395 | </pre> </td> |
396 | </tr> | 396 | </tr> |
397 | </table> | 397 | </table> |
398 | <br> | 398 | <br> |
399 | <table width="95%" border="0" cellspacing="4" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 399 | <table width="95%" border="0" cellspacing="4" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
400 | <tr> | 400 | <tr> |
401 | <td><strong>D3D8.VSH</strong></td> | 401 | <td><strong>D3D8.VSH</strong></td> |
402 | </tr> | 402 | </tr> |
403 | <tr> | 403 | <tr> |
404 | <td> <pre> | 404 | <td> <pre> |
405 | ; part of the Irrlicht Engine Shader example. | 405 | ; part of the Irrlicht Engine Shader example. |
406 | ; This Direct3D9 vertex shader will be loaded by the engine. | 406 | ; This Direct3D9 vertex shader will be loaded by the engine. |
407 | ; Please note that these example shaders don't do anything really useful. | 407 | ; Please note that these example shaders don't do anything really useful. |
408 | ; They only demonstrate that shaders can be used in Irrlicht.<br> | 408 | ; They only demonstrate that shaders can be used in Irrlicht.<br> |
409 | vs.1.1 | 409 | vs.1.1 |
410 | 410 | ||
411 | ; transpose and transform position to clip space | 411 | ; transpose and transform position to clip space |
412 | mul r0, v0.x, c4 | 412 | mul r0, v0.x, c4 |
413 | mad r0, v0.y, c5, r0 | 413 | mad r0, v0.y, c5, r0 |
414 | mad r0, v0.z, c6, r0 | 414 | mad r0, v0.z, c6, r0 |
415 | add oPos, c7, r0 | 415 | add oPos, c7, r0 |
416 | 416 | ||
417 | ; transform normal | 417 | ; transform normal |
418 | dp3 r1.x, v1, c0 | 418 | dp3 r1.x, v1, c0 |
419 | dp3 r1.y, v1, c1 | 419 | dp3 r1.y, v1, c1 |
420 | dp3 r1.z, v1, c2 | 420 | dp3 r1.z, v1, c2 |
421 | 421 | ||
422 | ; renormalize normal | 422 | ; renormalize normal |
423 | dp3 r1.w, r1, r1 | 423 | dp3 r1.w, r1, r1 |
424 | rsq r1.w, r1.w | 424 | rsq r1.w, r1.w |
425 | mul r1, r1, r1.w | 425 | mul r1, r1, r1.w |
426 | 426 | ||
427 | ; calculate light vector | 427 | ; calculate light vector |
428 | m4x4 r6, v0, c10 ; vertex into world position | 428 | m4x4 r6, v0, c10 ; vertex into world position |
429 | add r2, c8, -r6 ; vtxpos - lightpos | 429 | add r2, c8, -r6 ; vtxpos - lightpos |
430 | 430 | ||
431 | ; normalize light vector | 431 | ; normalize light vector |
432 | dp3 r2.w, r2, r2 | 432 | dp3 r2.w, r2, r2 |
433 | rsq r2.w, r2.w | 433 | rsq r2.w, r2.w |
434 | mul r2, r2, r2.w | 434 | mul r2, r2, r2.w |
435 | 435 | ||
436 | ; calculate light color | 436 | ; calculate light color |
437 | dp3 r3, r1, r2 ; dp3 with negative light vector | 437 | dp3 r3, r1, r2 ; dp3 with negative light vector |
438 | lit r5, r3 ; clamp to zero if r3 < 0, r5 has diffuce component in r5.y | 438 | lit r5, r3 ; clamp to zero if r3 < 0, r5 has diffuce component in r5.y |
439 | mul oD0, r5.y, c9 ; ouput diffuse color | 439 | mul oD0, r5.y, c9 ; ouput diffuse color |
440 | mov oT0, v3 ; store texture coordinates </pre> </td> | 440 | mov oT0, v3 ; store texture coordinates </pre> </td> |
441 | </tr> | 441 | </tr> |
442 | </table> | 442 | </table> |
443 | <br> | 443 | <br> |
444 | <table width="95%" border="0" cellspacing="4" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 444 | <table width="95%" border="0" cellspacing="4" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
445 | <tr> | 445 | <tr> |
446 | <td><strong>D3D8.PSH</strong></td> | 446 | <td><strong>D3D8.PSH</strong></td> |
447 | </tr> | 447 | </tr> |
448 | <tr> | 448 | <tr> |
449 | <td> <pre> | 449 | <td> <pre> |
450 | ; part of the Irrlicht Engine Shader example. | 450 | ; part of the Irrlicht Engine Shader example. |
451 | ; This simple Direct3D9 pixel shader will be loaded by the engine. | 451 | ; This simple Direct3D9 pixel shader will be loaded by the engine. |
452 | ; Please note that these example shaders don't do anything really useful. | 452 | ; Please note that these example shaders don't do anything really useful. |
453 | ; They only demonstrate that shaders can be used in Irrlicht.<br> | 453 | ; They only demonstrate that shaders can be used in Irrlicht.<br> |
454 | ps.1.1 | 454 | ps.1.1 |
455 | 455 | ||
456 | tex t0 ; sample color map | 456 | tex t0 ; sample color map |
457 | mul_x2 t0, t0, v0 ; mulitply with color | 457 | mul_x2 t0, t0, v0 ; mulitply with color |
458 | add r0, t0, t0 ; make it brighter and store result </pre> </td> | 458 | add r0, t0, t0 ; make it brighter and store result </pre> </td> |
459 | </tr> | 459 | </tr> |
460 | </table> | 460 | </table> |
461 | <br> | 461 | <br> |
462 | <table width="95%" border="0" cellspacing="4" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 462 | <table width="95%" border="0" cellspacing="4" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
463 | <tr> | 463 | <tr> |
464 | <td><strong>OPENGL.VSH</strong></td> | 464 | <td><strong>OPENGL.VSH</strong></td> |
465 | </tr> | 465 | </tr> |
466 | <tr> | 466 | <tr> |
467 | <td> <pre> | 467 | <td> <pre> |
468 | !!ARBvp1.0 | 468 | !!ARBvp1.0 |
469 | # part of the Irrlicht Engine Shader example. | 469 | # part of the Irrlicht Engine Shader example. |
470 | # Please note that these example shaders don't do anything really useful. | 470 | # Please note that these example shaders don't do anything really useful. |
471 | # They only demonstrate that shaders can be used in Irrlicht.<br> | 471 | # They only demonstrate that shaders can be used in Irrlicht.<br> |
472 | #input | 472 | #input |
473 | ATTRIB InPos = vertex.position; | 473 | ATTRIB InPos = vertex.position; |
474 | ATTRIB InColor = vertex.color; | 474 | ATTRIB InColor = vertex.color; |
475 | ATTRIB InNormal = vertex.normal; | 475 | ATTRIB InNormal = vertex.normal; |
476 | ATTRIB InTexCoord = vertex.texcoord; | 476 | ATTRIB InTexCoord = vertex.texcoord; |
477 | 477 | ||
478 | #output | 478 | #output |
479 | OUTPUT OutPos = result.position; | 479 | OUTPUT OutPos = result.position; |
480 | OUTPUT OutColor = result.color; | 480 | OUTPUT OutColor = result.color; |
481 | OUTPUT OutTexCoord = result.texcoord; | 481 | OUTPUT OutTexCoord = result.texcoord; |
482 | 482 | ||
483 | PARAM MVP[4] = { state.matrix.mvp }; # modelViewProjection matrix. | 483 | PARAM MVP[4] = { state.matrix.mvp }; # modelViewProjection matrix. |
484 | TEMP Temp; | 484 | TEMP Temp; |
485 | TEMP TempColor; | 485 | TEMP TempColor; |
486 | TEMP TempNormal; | 486 | TEMP TempNormal; |
487 | TEMP TempPos; | 487 | TEMP TempPos; |
488 | 488 | ||
489 | #transform position to clip space | 489 | #transform position to clip space |
490 | DP4 Temp.x, MVP[0], InPos; | 490 | DP4 Temp.x, MVP[0], InPos; |
491 | DP4 Temp.y, MVP[1], InPos; | 491 | DP4 Temp.y, MVP[1], InPos; |
492 | DP4 Temp.z, MVP[2], InPos; | 492 | DP4 Temp.z, MVP[2], InPos; |
493 | DP4 Temp.w, MVP[3], InPos; | 493 | DP4 Temp.w, MVP[3], InPos; |
494 | 494 | ||
495 | #transform normal | 495 | #transform normal |
496 | DP3 TempNormal.x, InNormal.x, program.local[0]; | 496 | DP3 TempNormal.x, InNormal.x, program.local[0]; |
497 | DP3 TempNormal.y, InNormal.y, program.local[1]; | 497 | DP3 TempNormal.y, InNormal.y, program.local[1]; |
498 | DP3 TempNormal.z, InNormal.z, program.local[2]; | 498 | DP3 TempNormal.z, InNormal.z, program.local[2]; |
499 | 499 | ||
500 | #renormalize normal | 500 | #renormalize normal |
501 | DP3 TempNormal.w, TempNormal, TempNormal; | 501 | DP3 TempNormal.w, TempNormal, TempNormal; |
502 | RSQ TempNormal.w, TempNormal.w; | 502 | RSQ TempNormal.w, TempNormal.w; |
503 | MUL TempNormal, TempNormal, TempNormal.w; | 503 | MUL TempNormal, TempNormal, TempNormal.w; |
504 | 504 | ||
505 | # calculate light vector | 505 | # calculate light vector |
506 | DP4 TempPos.x, InPos, program.local[10]; # vertex into world position | 506 | DP4 TempPos.x, InPos, program.local[10]; # vertex into world position |
507 | DP4 TempPos.y, InPos, program.local[11]; | 507 | DP4 TempPos.y, InPos, program.local[11]; |
508 | DP4 TempPos.z, InPos, program.local[12]; | 508 | DP4 TempPos.z, InPos, program.local[12]; |
509 | DP4 TempPos.w, InPos, program.local[13]; | 509 | DP4 TempPos.w, InPos, program.local[13]; |
510 | 510 | ||
511 | ADD TempPos, program.local[8], -TempPos; # vtxpos - lightpos | 511 | ADD TempPos, program.local[8], -TempPos; # vtxpos - lightpos |
512 | 512 | ||
513 | # normalize light vector | 513 | # normalize light vector |
514 | DP3 TempPos.w, TempPos, TempPos; | 514 | DP3 TempPos.w, TempPos, TempPos; |
515 | RSQ TempPos.w, TempPos.w; | 515 | RSQ TempPos.w, TempPos.w; |
516 | MUL TempPos, TempPos, TempPos.w; | 516 | MUL TempPos, TempPos, TempPos.w; |
517 | 517 | ||
518 | # calculate light color | 518 | # calculate light color |
519 | DP3 TempColor, TempNormal, TempPos; # dp3 with negative light vector | 519 | DP3 TempColor, TempNormal, TempPos; # dp3 with negative light vector |
520 | LIT OutColor, TempColor; # clamp to zero if r3 < 0, r5 has diffuce component in r5.y | 520 | LIT OutColor, TempColor; # clamp to zero if r3 < 0, r5 has diffuce component in r5.y |
521 | MUL OutColor, TempColor.y, program.local[9]; # ouput diffuse color | 521 | MUL OutColor, TempColor.y, program.local[9]; # ouput diffuse color |
522 | MOV OutColor.w, 1.0; # we want alpha to be always 1 | 522 | MOV OutColor.w, 1.0; # we want alpha to be always 1 |
523 | MOV OutTexCoord, InTexCoord; # store texture coordinate | 523 | MOV OutTexCoord, InTexCoord; # store texture coordinate |
524 | MOV OutPos, Temp; | 524 | MOV OutPos, Temp; |
525 | 525 | ||
526 | END</pre> </td> | 526 | END</pre> </td> |
527 | </tr> | 527 | </tr> |
528 | </table> | 528 | </table> |
529 | <br> | 529 | <br> |
530 | <table width="95%" border="0" cellspacing="4" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 530 | <table width="95%" border="0" cellspacing="4" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
531 | <tr> | 531 | <tr> |
532 | <td><strong>OPENGL.PSH</strong></td> | 532 | <td><strong>OPENGL.PSH</strong></td> |
533 | </tr> | 533 | </tr> |
534 | <tr> | 534 | <tr> |
535 | <td> <pre> | 535 | <td> <pre> |
536 | !!ARBfp1.0 | 536 | !!ARBfp1.0 |
537 | # part of the Irrlicht Engine Shader example. | 537 | # part of the Irrlicht Engine Shader example. |
538 | # Please note that these example shaders don't do anything really useful. | 538 | # Please note that these example shaders don't do anything really useful. |
539 | # They only demonstrate that shaders can be used in Irrlicht.<br> | 539 | # They only demonstrate that shaders can be used in Irrlicht.<br> |
540 | #Input | 540 | #Input |
541 | ATTRIB inTexCoord = fragment.texcoord; # texture coordinates | 541 | ATTRIB inTexCoord = fragment.texcoord; # texture coordinates |
542 | ATTRIB inColor = fragment.color.primary; # interpolated diffuse color | 542 | ATTRIB inColor = fragment.color.primary; # interpolated diffuse color |
543 | 543 | ||
544 | #Output | 544 | #Output |
545 | OUTPUT outColor = result.color; | 545 | OUTPUT outColor = result.color; |
546 | 546 | ||
547 | TEMP texelColor; | 547 | TEMP texelColor; |
548 | TEMP tmp; | 548 | TEMP tmp; |
549 | TXP texelColor, inTexCoord, texture, 2D; | 549 | TXP texelColor, inTexCoord, texture, 2D; |
550 | 550 | ||
551 | ADD tmp, inColor, inColor; # mulitply with color | 551 | ADD tmp, inColor, inColor; # mulitply with color |
552 | MUL texelColor, texelColor, tmp; # mulitply with color | 552 | MUL texelColor, texelColor, tmp; # mulitply with color |
553 | ADD outColor, texelColor, texelColor; # make it brighter and store result | 553 | ADD outColor, texelColor, texelColor; # make it brighter and store result |
554 | 554 | ||
555 | END </pre> </td> | 555 | END </pre> </td> |
556 | </tr> | 556 | </tr> |
557 | </table> | 557 | </table> |
558 | <p> </p> | 558 | <p> </p> |
559 | </div> | 559 | </div> |
560 | </div></td> | 560 | </div></td> |
561 | </tr> | 561 | </tr> |
562 | </table> | 562 | </table> |
563 | <p> </p> | 563 | <p> </p> |
564 | <p> </p> | 564 | <p> </p> |
565 | </body> | 565 | </body> |
566 | </html> | 566 | </html> |