Compare commits
93 Commits
Cel-Shadin
...
2b1e64ffbd
Author | SHA1 | Date | |
---|---|---|---|
2b1e64ffbd | |||
96aa41f649 | |||
00e6749d01 | |||
5a3a4f73a8 | |||
c442a87883 | |||
e681943aa8 | |||
e68f1d5dd0 | |||
8e6b7409d9 | |||
7dbd735416 | |||
6014c9034c | |||
bf6131af55 | |||
41519f7154 | |||
74151de6f7 | |||
f8503e5a2a | |||
c15cb2956d | |||
96b0d0e72d | |||
f1c13a3c8c | |||
e34b44996a | |||
0e45e0688c | |||
9c6db5c76d | |||
3ea5c92028 | |||
4d23c481d4 | |||
d8bda97819 | |||
ede5080c10 | |||
1ea77c909f | |||
73727ab45a | |||
e991d069fe | |||
648fc887d6 | |||
63482923bb | |||
987ad6784e | |||
f2a8bb6b5b | |||
606aaa76e9 | |||
3930c5eff7 | |||
eea7b4c067 | |||
6583f74a5f | |||
7eb6ed72e6 | |||
8b9e860c00 | |||
5e68105fe1 | |||
af01f223c1 | |||
118e967412 | |||
452e84aa16 | |||
151ea9b191 | |||
0d5e26266b | |||
425224a96c | |||
d8851cc679 | |||
c355509870 | |||
51b29f77aa | |||
d8552d3f91 | |||
261df5e257 | |||
172db0b96d | |||
296e04692a | |||
fec593205b | |||
161166837f | |||
a88ed06198 | |||
cb3f10b7d5 | |||
4ae55e73b2 | |||
15217a5df8 | |||
06efdf6f6c | |||
b029018552 | |||
39fa32603f | |||
c707e49561 | |||
58cafd7682 | |||
c5de18a9b3 | |||
f337e58dcc | |||
![]() |
af98e5edc7 | ||
01a9c940f0 | |||
ab0355ed97 | |||
915c0cdd7f | |||
bce659e55d | |||
79f266b479 | |||
b4804c2df2 | |||
7d2b962420 | |||
d7965fec64 | |||
7f84ab39a1 | |||
975edf0e62 | |||
b3af9f4ce7 | |||
8f20397130 | |||
3aafec5bf8 | |||
79558eed4f | |||
3e3620d925 | |||
c9ece7b9b9 | |||
97e4a62f20 | |||
64ae50814f | |||
9f3b4c4f1a | |||
0ce02071bb | |||
48624a2135 | |||
fa2544d596 | |||
68e460c5df | |||
bbbea117c3 | |||
c4b4ef83e3 | |||
6e6db2cf87 | |||
b45707c620 | |||
e20a2aa365 |
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
enginecustom/assets/Model/OBJ/*.obj filter=lfs diff=lfs merge=lfs -text
|
||||
enginecustom/assets/Model/OBJ/*.mtl filter=lfs diff=lfs merge=lfs -text
|
8
.gitignore
vendored
@@ -9,14 +9,6 @@
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Don't ignore 3d model in OBJ
|
||||
!enginecustom/monke.obj
|
||||
!enginecustom/isosphere.obj
|
||||
!enginecustom/cone.obj
|
||||
!enginecustom/vaisseau.obj
|
||||
!enginecustom/86.obj
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
|
1
.idea/.idea.KhaoticEngineReborn/.idea/.name
generated
Normal file
@@ -0,0 +1 @@
|
||||
KhaoticEngineReborn
|
6
.idea/.idea.KhaoticEngineReborn/.idea/AndroidProjectSystem.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AndroidProjectSystem">
|
||||
<option name="providerId" value="RiderAndroidProjectSystem" />
|
||||
</component>
|
||||
</project>
|
14
.idea/.idea.KhaoticEngineReborn/.idea/discord.xml
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="PROJECT_FILES" />
|
||||
<option name="description" value="" />
|
||||
<option name="applicationTheme" value="default" />
|
||||
<option name="iconsTheme" value="default" />
|
||||
<option name="button1Title" value="" />
|
||||
<option name="button1Url" value="" />
|
||||
<option name="button2Title" value="" />
|
||||
<option name="button2Url" value="" />
|
||||
<option name="customApplicationId" value="" />
|
||||
</component>
|
||||
</project>
|
8
.idea/.idea.KhaoticEngineReborn/.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/enginecustom/src/src/system/applicationclass.cpp" charset="windows-1252" />
|
||||
<file url="file://$PROJECT_DIR$/enginecustom/src/src/system/imguiManager.cpp" charset="windows-1252" />
|
||||
<file url="PROJECT" charset="windows-1252" />
|
||||
</component>
|
||||
</project>
|
6
.idea/.idea.KhaoticEngineReborn/.idea/git_toolbox_blame.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GitToolBoxBlameSettings">
|
||||
<option name="version" value="2" />
|
||||
</component>
|
||||
</project>
|
15
.idea/.idea.KhaoticEngineReborn/.idea/git_toolbox_prj.xml
generated
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GitToolBoxProjectSettings">
|
||||
<option name="commitMessageIssueKeyValidationOverride">
|
||||
<BoolValueOverride>
|
||||
<option name="enabled" value="true" />
|
||||
</BoolValueOverride>
|
||||
</option>
|
||||
<option name="commitMessageValidationEnabledOverride">
|
||||
<BoolValueOverride>
|
||||
<option name="enabled" value="true" />
|
||||
</BoolValueOverride>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
8
.idea/.idea.KhaoticEngineReborn/.idea/indexLayout.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
6
.idea/.idea.KhaoticEngineReborn/.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="ReassignedToPlainText" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
</profile>
|
||||
</component>
|
12
.idea/.idea.KhaoticEngineReborn/.idea/material_theme_project_new.xml
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MaterialThemeProjectNewConfig">
|
||||
<option name="metadata">
|
||||
<MTProjectMetadataState>
|
||||
<option name="migrated" value="true" />
|
||||
<option name="pristineConfig" value="false" />
|
||||
<option name="userId" value="4025287c:194ad69ad19:-7ff7" />
|
||||
</MTProjectMetadataState>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
8
.idea/.idea.KhaoticEngineReborn/.idea/projectSettingsUpdater.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RiderProjectSettingsUpdater">
|
||||
<option name="singleClickDiffPreview" value="1" />
|
||||
<option name="unhandledExceptionsIgnoreList" value="1" />
|
||||
<option name="vcsConfiguration" value="3" />
|
||||
</component>
|
||||
</project>
|
6
.idea/.idea.KhaoticEngineReborn/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
280
.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml
generated
Normal file
@@ -0,0 +1,280 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e81d6e08-efc7-40a0-909d-ec4943d948e9" name="Changes" comment="" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="DpaMonitoringSettings">
|
||||
<option name="firstShow" value="false" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="HighlightingSettingsPerFile">
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="cidr-memory-view://6" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/enginecustom/include/Vulkan/Include/vulkan/vulkan_core.h" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/enginecustom/src/src/shader/CelShadingShader.cpp" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/../../IDE_VS/VC/Tools/MSVC/14.38.33130/include/type_traits" root0="SKIP_HIGHLIGHTING" />
|
||||
</component>
|
||||
<component name="MetaFilesCheckinStateConfiguration" checkMetaFiles="true" />
|
||||
<component name="ProblemsViewState">
|
||||
<option name="selectedTabId" value="CurrentFile" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"associatedIndex": 6
|
||||
}</component>
|
||||
<component name="ProjectId" id="2sGIWDeT5ixyzDQ0he4A3RFpG9W" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||
"C++ Project.enginecustom.executor": "Run",
|
||||
"C/C++ Project.enginecustom.executor": "Run",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||
"git-widget-placeholder": "main",
|
||||
"ignore.virus.scanning.warn.message": "true",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"settings.editor.selected.configurable": "preferences.build.unityPlugin",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
<component name="RunManager" selected="C/C++ Project.enginecustom">
|
||||
<configuration name="KhaoticDemo" type="CppProject" factoryName="C++ Project">
|
||||
<configuration_1 setup="1">
|
||||
<option name="CONFIGURATION" value="Debug" />
|
||||
<option name="PLATFORM" value="x64" />
|
||||
<option name="CURRENT_LAUNCH_PROFILE" value="Local" />
|
||||
<option name="EXE_PATH" value="$(LocalDebuggerCommand)" />
|
||||
<option name="PROGRAM_PARAMETERS" value="$(LocalDebuggerCommandArguments)" />
|
||||
<option name="WORKING_DIRECTORY" value="$(LocalDebuggerWorkingDirectory)" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||
<option name="TERMINAL_INTERACTION_BEHAVIOR" value="AUTO_DETECT" />
|
||||
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/KhaoticDemo/KhaoticDemo.vcxproj" />
|
||||
</configuration_1>
|
||||
<option name="DEFAULT_PROJECT_PATH" value="$PROJECT_DIR$/KhaoticDemo/KhaoticDemo.vcxproj" />
|
||||
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/KhaoticDemo/KhaoticDemo.vcxproj" />
|
||||
<option name="AUTO_SELECT_PRIORITY" value="0" />
|
||||
<method v="2">
|
||||
<option name="Build" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="enginecustom" type="CppProject" factoryName="C++ Project">
|
||||
<configuration_1 setup="1">
|
||||
<option name="CONFIGURATION" value="Debug" />
|
||||
<option name="PLATFORM" value="x64" />
|
||||
<option name="CURRENT_LAUNCH_PROFILE" value="Local" />
|
||||
<option name="EXE_PATH" value="$(LocalDebuggerCommand)" />
|
||||
<option name="PROGRAM_PARAMETERS" value="$(LocalDebuggerCommandArguments)" />
|
||||
<option name="WORKING_DIRECTORY" value="$(LocalDebuggerWorkingDirectory)" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||
<option name="TERMINAL_INTERACTION_BEHAVIOR" value="AUTO_DETECT" />
|
||||
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/enginecustom/enginecustom.vcxproj" />
|
||||
</configuration_1>
|
||||
<configuration_2 setup="1">
|
||||
<option name="CONFIGURATION" value="Release" />
|
||||
<option name="PLATFORM" value="x64" />
|
||||
<option name="CURRENT_LAUNCH_PROFILE" value="Local" />
|
||||
<option name="EXE_PATH" value="$(TargetPath)" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$(ProjectDir)" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||
<option name="TERMINAL_INTERACTION_BEHAVIOR" value="AUTO_DETECT" />
|
||||
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/enginecustom/enginecustom.vcxproj" />
|
||||
</configuration_2>
|
||||
<option name="DEFAULT_PROJECT_PATH" value="$PROJECT_DIR$/enginecustom/enginecustom.vcxproj" />
|
||||
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/enginecustom/enginecustom.vcxproj" />
|
||||
<option name="AUTO_SELECT_PRIORITY" value="0" />
|
||||
<method v="2">
|
||||
<option name="Build" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="e81d6e08-efc7-40a0-909d-ec4943d948e9" name="Changes" comment="" />
|
||||
<created>1738075515913</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1738075515913</updated>
|
||||
<workItem from="1738075517746" duration="553000" />
|
||||
<workItem from="1738076088229" duration="80000" />
|
||||
<workItem from="1738076192788" duration="19000" />
|
||||
<workItem from="1738076222547" duration="6131000" />
|
||||
<workItem from="1738171504772" duration="876000" />
|
||||
<workItem from="1738172392786" duration="67000" />
|
||||
<workItem from="1738173151768" duration="2361000" />
|
||||
<workItem from="1738175535254" duration="279000" />
|
||||
<workItem from="1738178991872" duration="2736000" />
|
||||
<workItem from="1738244577624" duration="3000" />
|
||||
<workItem from="1738321399968" duration="689000" />
|
||||
<workItem from="1738358054789" duration="9000" />
|
||||
<workItem from="1738358091089" duration="6675000" />
|
||||
<workItem from="1738364887298" duration="2275000" />
|
||||
<workItem from="1738515031789" duration="14018000" />
|
||||
<workItem from="1741705445392" duration="138000" />
|
||||
<workItem from="1741706018301" duration="5499000" />
|
||||
<workItem from="1742198713923" duration="31000" />
|
||||
<workItem from="1742198792655" duration="4618000" />
|
||||
<workItem from="1742203643675" duration="600000" />
|
||||
<workItem from="1742206836574" duration="258000" />
|
||||
<workItem from="1742207107802" duration="5340000" />
|
||||
<workItem from="1742228751298" duration="38000" />
|
||||
<workItem from="1742228870107" duration="1198000" />
|
||||
<workItem from="1742314944369" duration="79000" />
|
||||
<workItem from="1742318452773" duration="2258000" />
|
||||
<workItem from="1742331065936" duration="3030000" />
|
||||
<workItem from="1742371397157" duration="13355000" />
|
||||
<workItem from="1742425863119" duration="231000" />
|
||||
<workItem from="1742474596806" duration="67000" />
|
||||
<workItem from="1742474683111" duration="689000" />
|
||||
<workItem from="1742574318953" duration="552000" />
|
||||
<workItem from="1742581210996" duration="681000" />
|
||||
<workItem from="1742651501885" duration="47000" />
|
||||
<workItem from="1742664377329" duration="746000" />
|
||||
<workItem from="1742665243312" duration="310000" />
|
||||
<workItem from="1742667326806" duration="95000" />
|
||||
<workItem from="1743185728805" duration="15000" />
|
||||
<workItem from="1743185754182" duration="815000" />
|
||||
<workItem from="1743355100472" duration="708000" />
|
||||
<workItem from="1743355837694" duration="1514000" />
|
||||
<workItem from="1743370106270" duration="901000" />
|
||||
<workItem from="1743505399891" duration="2361000" />
|
||||
<workItem from="1746106963725" duration="5888000" />
|
||||
<workItem from="1746112904421" duration="75000" />
|
||||
<workItem from="1746113092234" duration="1477000" />
|
||||
<workItem from="1746117455914" duration="5976000" />
|
||||
<workItem from="1746126812110" duration="180000" />
|
||||
<workItem from="1746188920194" duration="1870000" />
|
||||
<workItem from="1746274246641" duration="89000" />
|
||||
<workItem from="1746274352144" duration="8039000" />
|
||||
<workItem from="1746444660572" duration="7742000" />
|
||||
<workItem from="1746456965664" duration="13000" />
|
||||
<workItem from="1746469494034" duration="799000" />
|
||||
<workItem from="1746526901276" duration="2023000" />
|
||||
<workItem from="1746536290167" duration="1908000" />
|
||||
<workItem from="1746538260893" duration="5781000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="Minor update - viewport window tweak">
|
||||
<option name="closed" value="true" />
|
||||
<created>1738175474520</created>
|
||||
<option name="number" value="00001" />
|
||||
<option name="presentableId" value="LOCAL-00001" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1738175474520</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00002" summary="Patch update - add menu button">
|
||||
<option name="closed" value="true" />
|
||||
<created>1738181617050</created>
|
||||
<option name="number" value="00002" />
|
||||
<option name="presentableId" value="LOCAL-00002" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1738181617050</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="3" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="UnityCheckinConfiguration" checkUnsavedScenes="true" />
|
||||
<component name="UnityProjectConfiguration" hasMinimizedUI="false" />
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
<option name="TAB_STATES">
|
||||
<map>
|
||||
<entry key="MAIN">
|
||||
<value>
|
||||
<State />
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
|
||||
<MESSAGE value="Minor update - viewport window tweak" />
|
||||
<MESSAGE value="Patch update - add menu button" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Patch update - add menu button" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
<breakpoints>
|
||||
<breakpoint enabled="true" type="DotNet_Exception_Breakpoints">
|
||||
<properties exception="System.OperationCanceledException" breakIfHandledByOtherCode="false" displayValue="System.OperationCanceledException" />
|
||||
<option name="timeStamp" value="1" />
|
||||
</breakpoint>
|
||||
<breakpoint enabled="true" type="DotNet_Exception_Breakpoints">
|
||||
<properties exception="System.Threading.Tasks.TaskCanceledException" breakIfHandledByOtherCode="false" displayValue="System.Threading.Tasks.TaskCanceledException" />
|
||||
<option name="timeStamp" value="2" />
|
||||
</breakpoint>
|
||||
<breakpoint enabled="true" type="DotNet_Exception_Breakpoints">
|
||||
<properties exception="System.Threading.ThreadAbortException" breakIfHandledByOtherCode="false" displayValue="System.Threading.ThreadAbortException" />
|
||||
<option name="timeStamp" value="3" />
|
||||
</breakpoint>
|
||||
</breakpoints>
|
||||
</breakpoint-manager>
|
||||
<watches-manager>
|
||||
<configuration name="CppProject">
|
||||
<watch expression="((class ModelClass &) (*(*(*this).m_Application).m_object[0]))" />
|
||||
</configuration>
|
||||
</watches-manager>
|
||||
</component>
|
||||
<component name="XSLT-Support.FileAssociations.UIState">
|
||||
<expand />
|
||||
<select />
|
||||
</component>
|
||||
</project>
|
25
README.md
@@ -35,11 +35,32 @@ This **DirectX11** based engine uses **ImGui** with an abstraction layer to enab
|
||||
|
||||
**SHADER** :
|
||||
|
||||
- Cel Shading
|
||||
+ Sunlight shader
|
||||
+ Cel Shading
|
||||
+ Skysphere
|
||||
|
||||
**Interface Graphique** :
|
||||
|
||||
- Shader Manager
|
||||
+ Console link to the Logger object
|
||||
+ Shader Manager
|
||||
+ Engine Settings
|
||||
+ Sunlight Settings
|
||||
|
||||
**Save And Load of a Scene** :
|
||||
|
||||
+ Save All Custom object
|
||||
+ Save All Custom Texture for Custom Object
|
||||
|
||||
**Texture File** :
|
||||
|
||||
+ All the format supported by Windows Imaging Component (WIC)
|
||||
|
||||
**Optimization** :
|
||||
|
||||
- Shader rendering
|
||||
- Frustum culling
|
||||
- Object rendering
|
||||
- Terrain Instancing
|
||||
|
||||
## Demo :
|
||||
|
||||
|
18
enginecustom/.vscode/c_cpp_properties.json
vendored
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "windows-gcc-x64",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"compilerPath": "gcc",
|
||||
"cStandard": "${default}",
|
||||
"cppStandard": "${default}",
|
||||
"intelliSenseMode": "windows-gcc-x64",
|
||||
"compilerArgs": [
|
||||
""
|
||||
]
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
724122
enginecustom/86.obj
@@ -1,68 +0,0 @@
|
||||
#ifndef _CELSHADINGSHADER_H_
|
||||
#define _CELSHADINGSHADER_H_
|
||||
|
||||
//////////////
|
||||
// INCLUDES //
|
||||
//////////////
|
||||
#include "Logger.h"
|
||||
#include <d3d11.h>
|
||||
#include <d3dcompiler.h>
|
||||
#include <directxmath.h>
|
||||
#include <fstream>
|
||||
using namespace DirectX;
|
||||
using namespace std;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Class name: CelShadingShader
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
class CelShadingShader
|
||||
{
|
||||
private:
|
||||
struct MatrixBufferType
|
||||
{
|
||||
XMMATRIX world;
|
||||
XMMATRIX view;
|
||||
XMMATRIX projection;
|
||||
};
|
||||
|
||||
struct LightBufferType
|
||||
{
|
||||
XMFLOAT4 diffuseColor;
|
||||
XMFLOAT3 lightDirection;
|
||||
float padding; // Padding to ensure the structure is a multiple of 16 bytes.
|
||||
XMFLOAT3 lightPosition; // Add light position
|
||||
float padding2; // Padding to ensure the structure is a multiple of 16 bytes.
|
||||
float constantAttenuation;
|
||||
float linearAttenuation;
|
||||
float quadraticAttenuation;
|
||||
float padding3; // Padding to ensure the structure is a multiple of 16 bytes.
|
||||
};
|
||||
|
||||
|
||||
public:
|
||||
CelShadingShader();
|
||||
CelShadingShader(const CelShadingShader&);
|
||||
~CelShadingShader();
|
||||
|
||||
bool Initialize(ID3D11Device*, HWND);
|
||||
void Shutdown();
|
||||
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT3, XMFLOAT4, XMFLOAT3);
|
||||
|
||||
private:
|
||||
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
|
||||
void ShutdownShader();
|
||||
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
|
||||
|
||||
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT3, XMFLOAT4, XMFLOAT3);
|
||||
void RenderShader(ID3D11DeviceContext*, int);
|
||||
|
||||
private:
|
||||
ID3D11VertexShader* m_vertexShader;
|
||||
ID3D11PixelShader* m_pixelShader;
|
||||
ID3D11InputLayout* m_layout;
|
||||
ID3D11Buffer* m_matrixBuffer;
|
||||
ID3D11SamplerState* m_sampleState;
|
||||
ID3D11Buffer* m_lightBuffer;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,84 +0,0 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Filename: light.ps
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/////////////
|
||||
// DEFINES //
|
||||
/////////////
|
||||
#define NUM_LIGHTS 4
|
||||
|
||||
/////////////
|
||||
// GLOBALS //
|
||||
/////////////
|
||||
Texture2D shaderTexture : register(t0);
|
||||
SamplerState SampleType : register(s0);
|
||||
cbuffer LightBuffer
|
||||
{
|
||||
float4 ambientColor;
|
||||
float3 lightDirection;
|
||||
float padding;
|
||||
float specularPower;
|
||||
float4 specularColor;
|
||||
};
|
||||
|
||||
cbuffer LightColorBuffer
|
||||
{
|
||||
float4 diffuseColor[NUM_LIGHTS];
|
||||
};
|
||||
|
||||
|
||||
//////////////
|
||||
// TYPEDEFS //
|
||||
//////////////
|
||||
struct PixelInputType
|
||||
{
|
||||
float4 position : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float3 normal : NORMAL;
|
||||
float3 lightPos[NUM_LIGHTS] : TEXCOORD1;
|
||||
};
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Pixel Shader
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
float4 LightPixelShader(PixelInputType input) : SV_TARGET
|
||||
{
|
||||
float4 textureColor;
|
||||
float3 lightDir;
|
||||
float4 color;
|
||||
float3 reflection;
|
||||
float4 specular;
|
||||
float lightIntensity[NUM_LIGHTS];
|
||||
float4 colorArray[NUM_LIGHTS];
|
||||
float4 colorSum;
|
||||
int i;
|
||||
|
||||
// Sample the pixel color from the texture using the sampler at this texture coordinate location.
|
||||
textureColor = shaderTexture.Sample(SampleType, input.tex);
|
||||
|
||||
for(i=0; i<NUM_LIGHTS; i++)
|
||||
{
|
||||
// Calculate the different amounts of light on this pixel based on the positions of the lights.
|
||||
lightIntensity[i] = saturate(dot(input.normal, input.lightPos[i]));
|
||||
|
||||
// Determine the diffuse color amount of each of the four lights.
|
||||
colorArray[i] = diffuseColor[i] * lightIntensity[i];
|
||||
}
|
||||
|
||||
// Initialize the sum of colors.
|
||||
colorSum = float4(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
// Add all of the light colors up.
|
||||
for(i=0; i<NUM_LIGHTS; i++)
|
||||
{
|
||||
colorSum.r += colorArray[i].r;
|
||||
colorSum.g += colorArray[i].g;
|
||||
colorSum.b += colorArray[i].b;
|
||||
}
|
||||
|
||||
// Multiply the texture pixel by the combination of all four light colors to get the final result.
|
||||
color = saturate(colorSum) * textureColor;
|
||||
|
||||
return color;
|
||||
}
|
@@ -1,91 +0,0 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Filename: lightclass.cpp
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#include "lightclass.h"
|
||||
|
||||
|
||||
LightClass::LightClass()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
LightClass::LightClass(const LightClass& other)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
LightClass::~LightClass()
|
||||
{
|
||||
}
|
||||
|
||||
void LightClass::SetAmbientColor(float red, float green, float blue, float alpha)
|
||||
{
|
||||
m_ambientColor = XMFLOAT4(red, green, blue, alpha);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void LightClass::SetDiffuseColor(float red, float green, float blue, float alpha)
|
||||
{
|
||||
m_diffuseColor = XMFLOAT4(red, green, blue, alpha);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void LightClass::SetDirection(float x, float y, float z)
|
||||
{
|
||||
m_direction = XMFLOAT3(x, y, z);
|
||||
return;
|
||||
}
|
||||
|
||||
void LightClass::SetSpecularColor(float red, float green, float blue, float alpha)
|
||||
{
|
||||
m_specularColor = XMFLOAT4(red, green, blue, alpha);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void LightClass::SetSpecularPower(float power)
|
||||
{
|
||||
m_specularPower = power;
|
||||
return;
|
||||
}
|
||||
|
||||
void LightClass::SetPosition(float x, float y, float z)
|
||||
{
|
||||
m_position = XMFLOAT4(x, y, z, 1.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
XMFLOAT4 LightClass::GetAmbientColor()
|
||||
{
|
||||
return m_ambientColor;
|
||||
}
|
||||
|
||||
|
||||
XMFLOAT4 LightClass::GetDiffuseColor()
|
||||
{
|
||||
return m_diffuseColor;
|
||||
}
|
||||
|
||||
XMFLOAT3 LightClass::GetDirection()
|
||||
{
|
||||
return m_direction;
|
||||
}
|
||||
|
||||
XMFLOAT4 LightClass::GetSpecularColor()
|
||||
{
|
||||
return m_specularColor;
|
||||
}
|
||||
|
||||
|
||||
float LightClass::GetSpecularPower()
|
||||
{
|
||||
return m_specularPower;
|
||||
}
|
||||
|
||||
XMFLOAT4 LightClass::GetPosition()
|
||||
{
|
||||
return m_position;
|
||||
}
|
@@ -1,49 +0,0 @@
|
||||
#pragma once
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Filename: lightclass.h
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef _LIGHTCLASS_H_
|
||||
#define _LIGHTCLASS_H_
|
||||
|
||||
|
||||
//////////////
|
||||
// INCLUDES //
|
||||
//////////////
|
||||
#include <directxmath.h>
|
||||
using namespace DirectX;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Class name: LightClass
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
class LightClass
|
||||
{
|
||||
public:
|
||||
LightClass();
|
||||
LightClass(const LightClass&);
|
||||
~LightClass();
|
||||
|
||||
void SetAmbientColor(float, float, float, float);
|
||||
void SetDiffuseColor(float, float, float, float);
|
||||
void SetDirection(float, float, float);
|
||||
void SetSpecularColor(float, float, float, float);
|
||||
void SetSpecularPower(float);
|
||||
void SetPosition(float, float, float);
|
||||
|
||||
XMFLOAT4 GetAmbientColor();
|
||||
XMFLOAT4 GetDiffuseColor();
|
||||
XMFLOAT3 GetDirection();
|
||||
XMFLOAT4 GetSpecularColor();
|
||||
float GetSpecularPower();
|
||||
XMFLOAT4 GetPosition();
|
||||
|
||||
private:
|
||||
XMFLOAT4 m_ambientColor;
|
||||
XMFLOAT4 m_diffuseColor;
|
||||
XMFLOAT3 m_direction;
|
||||
XMFLOAT4 m_specularColor;
|
||||
float m_specularPower;
|
||||
XMFLOAT4 m_position;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,92 +0,0 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Filename: lightshaderclass.h
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef _LIGHTSHADERCLASS_H_
|
||||
#define _LIGHTSHADERCLASS_H_
|
||||
|
||||
|
||||
/////////////
|
||||
// GLOBALS //
|
||||
/////////////
|
||||
const int NUM_LIGHTS = 4;
|
||||
//////////////
|
||||
// INCLUDES //
|
||||
//////////////
|
||||
#include "Logger.h"
|
||||
#include <d3d11.h>
|
||||
#include <d3dcompiler.h>
|
||||
#include <directxmath.h>
|
||||
#include <fstream>
|
||||
using namespace DirectX;
|
||||
using namespace std;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Class name: LightShaderClass
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
class LightShaderClass
|
||||
{
|
||||
private:
|
||||
struct MatrixBufferType
|
||||
{
|
||||
XMMATRIX world;
|
||||
XMMATRIX view;
|
||||
XMMATRIX projection;
|
||||
};
|
||||
|
||||
struct CameraBufferType
|
||||
{
|
||||
XMFLOAT3 cameraPosition;
|
||||
float padding;
|
||||
};
|
||||
|
||||
struct LightBufferType
|
||||
{
|
||||
XMFLOAT4 ambientColor;
|
||||
XMFLOAT4 diffuseColor;
|
||||
XMFLOAT3 lightDirection;
|
||||
float padding; // Added extra padding so structure is a multiple of 16 for CreateBuffer function requirements.
|
||||
float specularPower;
|
||||
XMFLOAT4 specularColor;
|
||||
};
|
||||
|
||||
struct LightColorBufferType
|
||||
{
|
||||
XMFLOAT4 diffuseColor[NUM_LIGHTS];
|
||||
};
|
||||
|
||||
struct LightPositionBufferType
|
||||
{
|
||||
XMFLOAT4 lightPosition[NUM_LIGHTS];
|
||||
};
|
||||
|
||||
public:
|
||||
LightShaderClass();
|
||||
LightShaderClass(const LightShaderClass&);
|
||||
~LightShaderClass();
|
||||
|
||||
bool Initialize(ID3D11Device*, HWND);
|
||||
void Shutdown();
|
||||
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4[], XMFLOAT4[], XMFLOAT4[]);
|
||||
|
||||
private:
|
||||
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
|
||||
void ShutdownShader();
|
||||
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
|
||||
|
||||
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4[], XMFLOAT4[], XMFLOAT4[]);
|
||||
void RenderShader(ID3D11DeviceContext*, int);
|
||||
|
||||
private:
|
||||
ID3D11VertexShader* m_vertexShader;
|
||||
ID3D11PixelShader* m_pixelShader;
|
||||
ID3D11InputLayout* m_layout;
|
||||
ID3D11SamplerState* m_sampleState;
|
||||
ID3D11Buffer* m_matrixBuffer;
|
||||
ID3D11Buffer* m_cameraBuffer;
|
||||
ID3D11Buffer* m_lightBuffer;
|
||||
ID3D11Buffer* m_lightColorBuffer;
|
||||
ID3D11Buffer* m_lightPositionBuffer;
|
||||
};
|
||||
|
||||
#endif
|
8
enginecustom/TODO.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
- Scene Manager :
|
||||
|
||||
TODO : Save and Load Scene
|
||||
|
||||
- ImguiManager :
|
||||
|
||||
TODO : Add Save and Load Scene Button in the bar menu
|
||||
TODO : Add a preview of the game in a new window
|
Before Width: | Height: | Size: 1.0 MiB |
BIN
enginecustom/assets/Model/OBJ/86.obj
(Stored with Git LFS)
Normal file
BIN
enginecustom/assets/Model/OBJ/cone.obj
(Stored with Git LFS)
Normal file
BIN
enginecustom/assets/Model/OBJ/invertcube.obj
(Stored with Git LFS)
Normal file
BIN
enginecustom/assets/Model/OBJ/isosphere.obj
(Stored with Git LFS)
Normal file
BIN
enginecustom/assets/Model/OBJ/monke.obj
(Stored with Git LFS)
Normal file
BIN
enginecustom/assets/Model/OBJ/plane.obj
(Stored with Git LFS)
Normal file
BIN
enginecustom/assets/Model/OBJ/skysphere.obj
(Stored with Git LFS)
Normal file
BIN
enginecustom/assets/Model/OBJ/vaisseau.obj
(Stored with Git LFS)
Normal file
BIN
enginecustom/assets/Model/OBJ/vaisseautri.mtl
(Stored with Git LFS)
Normal file
BIN
enginecustom/assets/Model/OBJ/vaisseautri.obj
(Stored with Git LFS)
Normal file
24
enginecustom/assets/Model/imgui.ini
Normal file
@@ -0,0 +1,24 @@
|
||||
[Window][Debug##Default]
|
||||
Pos=60,60
|
||||
Size=400,400
|
||||
|
||||
[Window][Khaotic Engine]
|
||||
Pos=1120,51
|
||||
Size=392,273
|
||||
|
||||
[Window][Objects]
|
||||
Pos=930,39
|
||||
Size=457,294
|
||||
|
||||
[Window][Terrain]
|
||||
Pos=60,60
|
||||
Size=342,82
|
||||
|
||||
[Window][Light]
|
||||
Pos=1551,17
|
||||
Size=358,535
|
||||
|
||||
[Window][Shader Manager]
|
||||
Pos=30,255
|
||||
Size=172,284
|
||||
|
91
enginecustom/assets/Skybox/imgui.ini
Normal file
@@ -0,0 +1,91 @@
|
||||
[Window][Debug##Default]
|
||||
Pos=60,60
|
||||
Size=400,400
|
||||
Collapsed=0
|
||||
|
||||
[Window][Khaotic Engine]
|
||||
Pos=1180,27
|
||||
Size=396,826
|
||||
Collapsed=0
|
||||
DockId=0x00000005,0
|
||||
|
||||
[Window][Objects]
|
||||
Pos=8,442
|
||||
Size=290,411
|
||||
Collapsed=0
|
||||
DockId=0x0000000A,0
|
||||
|
||||
[Window][Terrain]
|
||||
Pos=8,27
|
||||
Size=290,413
|
||||
Collapsed=0
|
||||
DockId=0x00000009,0
|
||||
|
||||
[Window][Light]
|
||||
Pos=8,27
|
||||
Size=330,487
|
||||
Collapsed=0
|
||||
DockId=0x00000004,1
|
||||
|
||||
[Window][Shader Manager]
|
||||
Pos=8,27
|
||||
Size=330,487
|
||||
Collapsed=0
|
||||
DockId=0x00000004,2
|
||||
|
||||
[Window][Engine Settings]
|
||||
Pos=1180,27
|
||||
Size=396,826
|
||||
Collapsed=0
|
||||
DockId=0x00000005,1
|
||||
|
||||
[Window][DockSpace Demo]
|
||||
Size=1584,861
|
||||
Collapsed=0
|
||||
|
||||
[Window][Render Window]
|
||||
Pos=300,27
|
||||
Size=878,826
|
||||
Collapsed=0
|
||||
DockId=0x00000002,0
|
||||
|
||||
[Window][DockSpace]
|
||||
Pos=0,0
|
||||
Size=1584,861
|
||||
Collapsed=0
|
||||
|
||||
[Window][Add Object]
|
||||
Pos=1188,0
|
||||
Size=396,430
|
||||
Collapsed=0
|
||||
|
||||
[Window][Log]
|
||||
Pos=8,518
|
||||
Size=1568,335
|
||||
Collapsed=0
|
||||
DockId=0x0000000C,0
|
||||
|
||||
[Window][Log Window]
|
||||
Pos=8,627
|
||||
Size=1568,226
|
||||
Collapsed=0
|
||||
DockId=0x0000000E,0
|
||||
|
||||
[Docking][Data]
|
||||
DockSpace ID=0xC0DFADC4 Pos=8,27 Size=1568,826 Split=X
|
||||
DockNode ID=0x00000001 Parent=0xC0DFADC4 SizeRef=330,1094 Split=Y Selected=0x393905AB
|
||||
DockNode ID=0x00000004 Parent=0x00000001 SizeRef=330,487 Selected=0x393905AB
|
||||
DockNode ID=0x00000006 Parent=0x00000001 SizeRef=330,485 Selected=0x031DC75C
|
||||
DockNode ID=0x00000003 Parent=0xC0DFADC4 SizeRef=1700,1094 CentralNode=1
|
||||
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=8,27 Size=1568,826 Split=Y
|
||||
DockNode ID=0x0000000D Parent=0xCCBD8CF7 SizeRef=1568,598 Split=Y
|
||||
DockNode ID=0x0000000B Parent=0x0000000D SizeRef=1568,637 Split=X
|
||||
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=290,826 Split=Y Selected=0x393905AB
|
||||
DockNode ID=0x00000009 Parent=0x00000007 SizeRef=395,413 Selected=0x393905AB
|
||||
DockNode ID=0x0000000A Parent=0x00000007 SizeRef=395,411 Selected=0x031DC75C
|
||||
DockNode ID=0x00000008 Parent=0x0000000B SizeRef=1276,826 Split=X
|
||||
DockNode ID=0x00000002 Parent=0x00000008 SizeRef=878,826 CentralNode=1 Selected=0x9204953B
|
||||
DockNode ID=0x00000005 Parent=0x00000008 SizeRef=396,826 Selected=0x9F035453
|
||||
DockNode ID=0x0000000C Parent=0x0000000D SizeRef=1568,335 Selected=0x139FDA3F
|
||||
DockNode ID=0x0000000E Parent=0xCCBD8CF7 SizeRef=1568,226 Selected=0xAB74BEE9
|
||||
|
BIN
enginecustom/assets/Skybox/skybox.png
Normal file
After Width: | Height: | Size: 11 MiB |
BIN
enginecustom/assets/Skybox/skybox_back.png
Normal file
After Width: | Height: | Size: 331 KiB |
BIN
enginecustom/assets/Skybox/skybox_bottom.png
Normal file
After Width: | Height: | Size: 273 KiB |
BIN
enginecustom/assets/Skybox/skybox_front.png
Normal file
After Width: | Height: | Size: 493 KiB |
BIN
enginecustom/assets/Skybox/skybox_left.png
Normal file
After Width: | Height: | Size: 510 KiB |
BIN
enginecustom/assets/Skybox/skybox_right.png
Normal file
After Width: | Height: | Size: 498 KiB |
BIN
enginecustom/assets/Skybox/skybox_top.png
Normal file
After Width: | Height: | Size: 422 KiB |
BIN
enginecustom/assets/Texture/Bricks2K.png
Normal file
After Width: | Height: | Size: 7.5 MiB |
BIN
enginecustom/assets/Texture/BricksGLOSS2K.png
Normal file
After Width: | Height: | Size: 2.1 MiB |
BIN
enginecustom/assets/Texture/BricksNRM2K.png
Normal file
After Width: | Height: | Size: 8.4 MiB |
BIN
enginecustom/assets/Texture/EmptyTexture.png
Normal file
After Width: | Height: | Size: 81 KiB |
BIN
enginecustom/assets/Texture/alpha01.png
Normal file
After Width: | Height: | Size: 128 KiB |
BIN
enginecustom/assets/Texture/dirt01.png
Normal file
After Width: | Height: | Size: 588 KiB |
BIN
enginecustom/assets/Texture/font01.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
enginecustom/assets/Texture/ground01.png
Normal file
After Width: | Height: | Size: 2.6 MiB |
89
enginecustom/assets/Texture/imgui.ini
Normal file
@@ -0,0 +1,89 @@
|
||||
[Window][Debug##Default]
|
||||
Pos=60,60
|
||||
Size=400,400
|
||||
Collapsed=0
|
||||
|
||||
[Window][Khaotic Engine]
|
||||
Pos=1233,27
|
||||
Size=343,826
|
||||
Collapsed=0
|
||||
DockId=0x00000005,0
|
||||
|
||||
[Window][Objects]
|
||||
Pos=8,27
|
||||
Size=289,826
|
||||
Collapsed=0
|
||||
DockId=0x00000009,0
|
||||
|
||||
[Window][Terrain]
|
||||
Pos=8,27
|
||||
Size=250,826
|
||||
Collapsed=0
|
||||
DockId=0x00000007,0
|
||||
|
||||
[Window][Light]
|
||||
Pos=8,27
|
||||
Size=290,866
|
||||
Collapsed=0
|
||||
DockId=0x00000007,1
|
||||
|
||||
[Window][Shader Manager]
|
||||
Pos=8,27
|
||||
Size=330,487
|
||||
Collapsed=0
|
||||
DockId=0x00000001,2
|
||||
|
||||
[Window][Engine Settings]
|
||||
Pos=8,27
|
||||
Size=289,826
|
||||
Collapsed=0
|
||||
DockId=0x00000009,0
|
||||
|
||||
[Window][DockSpace Demo]
|
||||
Size=1584,861
|
||||
Collapsed=0
|
||||
|
||||
[Window][Render Window]
|
||||
Pos=8,27
|
||||
Size=1559,974
|
||||
Collapsed=0
|
||||
DockId=0x00000009,0
|
||||
|
||||
[Window][DockSpace]
|
||||
Pos=0,0
|
||||
Size=1584,861
|
||||
Collapsed=0
|
||||
|
||||
[Window][Add Object]
|
||||
Pos=1188,0
|
||||
Size=396,430
|
||||
Collapsed=0
|
||||
|
||||
[Window][Log]
|
||||
Pos=8,518
|
||||
Size=1568,335
|
||||
Collapsed=0
|
||||
DockId=0x0000000C,0
|
||||
|
||||
[Window][Log Window]
|
||||
Pos=8,627
|
||||
Size=1568,226
|
||||
Collapsed=0
|
||||
DockId=0x00000006,0
|
||||
|
||||
[Docking][Data]
|
||||
DockSpace ID=0xC0DFADC4 Pos=8,27 Size=1568,826 Split=X
|
||||
DockNode ID=0x00000001 Parent=0xC0DFADC4 SizeRef=330,1094 Selected=0x393905AB
|
||||
DockNode ID=0x00000003 Parent=0xC0DFADC4 SizeRef=1700,1094 CentralNode=1
|
||||
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=8,27 Size=1568,826 Split=Y
|
||||
DockNode ID=0x00000004 Parent=0xCCBD8CF7 SizeRef=1568,598 Split=X
|
||||
DockNode ID=0x00000009 Parent=0x00000004 SizeRef=289,974 Selected=0x031DC75C
|
||||
DockNode ID=0x0000000D Parent=0x00000004 SizeRef=1613,974 Split=X
|
||||
DockNode ID=0x00000002 Parent=0x0000000D SizeRef=1268,826 Split=Y
|
||||
DockNode ID=0x0000000B Parent=0x00000002 SizeRef=1568,637 Split=X
|
||||
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=250,826 Selected=0x393905AB
|
||||
DockNode ID=0x00000008 Parent=0x0000000B SizeRef=971,826 CentralNode=1 Selected=0x031DC75C
|
||||
DockNode ID=0x0000000C Parent=0x00000002 SizeRef=1568,335 Selected=0x139FDA3F
|
||||
DockNode ID=0x00000005 Parent=0x0000000D SizeRef=343,826 Selected=0x9F035453
|
||||
DockNode ID=0x00000006 Parent=0xCCBD8CF7 SizeRef=1568,226 Selected=0xAB74BEE9
|
||||
|
BIN
enginecustom/assets/Texture/light01.png
Normal file
After Width: | Height: | Size: 164 KiB |
BIN
enginecustom/assets/Texture/marble01.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
enginecustom/assets/Texture/moss01.png
Normal file
After Width: | Height: | Size: 2.9 MiB |
BIN
enginecustom/assets/Texture/normal01.png
Normal file
After Width: | Height: | Size: 599 KiB |
BIN
enginecustom/assets/Texture/spec02.png
Normal file
After Width: | Height: | Size: 148 KiB |
BIN
enginecustom/assets/Texture/sprite01.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
enginecustom/assets/Texture/sprite02.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
enginecustom/assets/Texture/sprite03.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
enginecustom/assets/Texture/sprite04.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
enginecustom/assets/Texture/stone01.png
Normal file
After Width: | Height: | Size: 917 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
BIN
enginecustom/assets/Texture/wall.png
Normal file
After Width: | Height: | Size: 934 KiB |
BIN
enginecustom/assets/Texture/wall01.png
Normal file
After Width: | Height: | Size: 1.8 MiB |
BIN
enginecustom/assets/Texture/water01.png
Normal file
After Width: | Height: | Size: 161 KiB |
1
enginecustom/assets/empty.ker
Normal file
@@ -0,0 +1 @@
|
||||
0 isosphere 0 10 0 1 1 1 F:\Github_Repo\khaotic-engine-Reborn\enginecustom\assets\Model\OBJ\isosphere.obj
|
89
enginecustom/assets/imgui.ini
Normal file
@@ -0,0 +1,89 @@
|
||||
[Window][Debug##Default]
|
||||
Pos=60,60
|
||||
Size=400,400
|
||||
Collapsed=0
|
||||
|
||||
[Window][Khaotic Engine]
|
||||
Pos=1233,27
|
||||
Size=343,826
|
||||
Collapsed=0
|
||||
DockId=0x00000005,0
|
||||
|
||||
[Window][Objects]
|
||||
Pos=8,27
|
||||
Size=289,413
|
||||
Collapsed=0
|
||||
DockId=0x00000007,0
|
||||
|
||||
[Window][Terrain]
|
||||
Pos=8,442
|
||||
Size=289,411
|
||||
Collapsed=0
|
||||
DockId=0x00000008,0
|
||||
|
||||
[Window][Light]
|
||||
Pos=8,27
|
||||
Size=290,866
|
||||
Collapsed=0
|
||||
DockId=0x00000004,1
|
||||
|
||||
[Window][Shader Manager]
|
||||
Pos=8,27
|
||||
Size=330,487
|
||||
Collapsed=0
|
||||
DockId=0x00000001,2
|
||||
|
||||
[Window][Engine Settings]
|
||||
Pos=1233,27
|
||||
Size=343,826
|
||||
Collapsed=0
|
||||
DockId=0x00000005,1
|
||||
|
||||
[Window][DockSpace Demo]
|
||||
Size=1584,861
|
||||
Collapsed=0
|
||||
|
||||
[Window][Render Window]
|
||||
Pos=8,27
|
||||
Size=1559,974
|
||||
Collapsed=0
|
||||
DockId=0x00000007,0
|
||||
|
||||
[Window][DockSpace]
|
||||
Pos=0,0
|
||||
Size=1584,861
|
||||
Collapsed=0
|
||||
|
||||
[Window][Add Object]
|
||||
Pos=1188,0
|
||||
Size=396,430
|
||||
Collapsed=0
|
||||
|
||||
[Window][Log]
|
||||
Pos=8,518
|
||||
Size=1568,335
|
||||
Collapsed=0
|
||||
DockId=0x0000000C,0
|
||||
|
||||
[Window][Log Window]
|
||||
Pos=299,627
|
||||
Size=932,226
|
||||
Collapsed=0
|
||||
DockId=0x00000006,0
|
||||
|
||||
[Docking][Data]
|
||||
DockSpace ID=0xC0DFADC4 Pos=8,27 Size=1568,826 Split=X
|
||||
DockNode ID=0x00000001 Parent=0xC0DFADC4 SizeRef=330,1094 Selected=0x393905AB
|
||||
DockNode ID=0x00000003 Parent=0xC0DFADC4 SizeRef=1700,1094 CentralNode=1
|
||||
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=8,27 Size=1568,826 Split=X
|
||||
DockNode ID=0x00000009 Parent=0xCCBD8CF7 SizeRef=289,974 Split=Y Selected=0x031DC75C
|
||||
DockNode ID=0x00000007 Parent=0x00000009 SizeRef=289,299 Selected=0x031DC75C
|
||||
DockNode ID=0x00000008 Parent=0x00000009 SizeRef=289,297 Selected=0x393905AB
|
||||
DockNode ID=0x0000000D Parent=0xCCBD8CF7 SizeRef=1613,974 Split=X
|
||||
DockNode ID=0x00000002 Parent=0x0000000D SizeRef=1268,826 Split=Y
|
||||
DockNode ID=0x0000000B Parent=0x00000002 SizeRef=1568,637 Split=Y
|
||||
DockNode ID=0x00000004 Parent=0x0000000B SizeRef=932,598 CentralNode=1
|
||||
DockNode ID=0x00000006 Parent=0x0000000B SizeRef=932,226 Selected=0xAB74BEE9
|
||||
DockNode ID=0x0000000C Parent=0x00000002 SizeRef=1568,335 Selected=0x139FDA3F
|
||||
DockNode ID=0x00000005 Parent=0x0000000D SizeRef=343,826 Selected=0x0B098C4B
|
||||
|
0
enginecustom/assets/scene.ker
Normal file
@@ -1,89 +0,0 @@
|
||||
cbuffer LightBuffer
|
||||
{
|
||||
float4 diffuseColor;
|
||||
float3 lightDirection;
|
||||
float padding; // Padding to ensure the structure is a multiple of 16 bytes.
|
||||
float3 lightPosition; // Add light position
|
||||
float padding2; // Padding to ensure the structure is a multiple of 16 bytes.
|
||||
float constantAttenuation;
|
||||
float linearAttenuation;
|
||||
float quadraticAttenuation;
|
||||
float padding3; // Padding to ensure the structure is a multiple of 16 bytes.
|
||||
};
|
||||
|
||||
Texture2D shaderTexture;
|
||||
SamplerState SampleType;
|
||||
|
||||
struct PixelInputType
|
||||
{
|
||||
float4 position : SV_POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float2 tex : TEXCOORD0;
|
||||
float3 worldPos : TEXCOORD1; // Add world position
|
||||
};
|
||||
|
||||
float4 CelShadingPixelShader(PixelInputType input) : SV_TARGET
|
||||
{
|
||||
float4 textureColor;
|
||||
float lightIntensity;
|
||||
float4 finalColor;
|
||||
|
||||
// Sample the pixel color from the texture.
|
||||
textureColor = shaderTexture.Sample(SampleType, input.tex);
|
||||
|
||||
float3 normal = normalize(input.normal);
|
||||
|
||||
// Calculate the light vector from the light position to the world position
|
||||
float3 lightVector = normalize(lightPosition - input.worldPos);
|
||||
|
||||
// Calculate the light intensity based on the light direction.
|
||||
float directionalLightIntensity = saturate(dot(normal, normalize(lightDirection)));
|
||||
|
||||
// Calculate the light intensity based on the light position.
|
||||
float positionalLightIntensity = saturate(dot(normal, lightVector));
|
||||
|
||||
// Combine the directional and positional light intensities.
|
||||
lightIntensity = max(directionalLightIntensity, positionalLightIntensity);
|
||||
|
||||
// Calculate the distance from the light to the fragment.
|
||||
float distance = length(lightPosition - input.worldPos);
|
||||
|
||||
// Apply an attenuation factor based on the distance.
|
||||
float attenuation = 1.0f / (constantAttenuation + linearAttenuation * distance + quadraticAttenuation * distance * distance);
|
||||
|
||||
// Combine the light intensity with the attenuation factor.
|
||||
lightIntensity *= attenuation;
|
||||
|
||||
// Apply a step function to create the cel shading effect.
|
||||
if (lightIntensity > 0.75f)
|
||||
{
|
||||
lightIntensity = 1.0f; // Brightest level
|
||||
}
|
||||
else if (lightIntensity > 0.5f)
|
||||
{
|
||||
lightIntensity = 0.7f; // Mid-bright level
|
||||
}
|
||||
else if (lightIntensity > 0.25f)
|
||||
{
|
||||
lightIntensity = 0.4f; // Mid-dark level
|
||||
}
|
||||
else
|
||||
{
|
||||
lightIntensity = 0.1f; // Darkest level
|
||||
}
|
||||
|
||||
// Simple shadow calculation: if the fragment is behind the light source, it is in shadow.
|
||||
float3 toLight = normalize(lightPosition - input.worldPos);
|
||||
float shadow = saturate(dot(normal, toLight));
|
||||
if (shadow < 0.1f)
|
||||
{
|
||||
lightIntensity *= 0.5f; // Darken the fragment if it is in shadow
|
||||
}
|
||||
|
||||
// Calculate the final color by combining the texture color with the light intensity and diffuse color.
|
||||
finalColor = textureColor * diffuseColor * lightIntensity;
|
||||
|
||||
//return finalColor;
|
||||
|
||||
return float4(normal * 0.5f + 0.5f, 1.0f);
|
||||
}
|
@@ -1,45 +0,0 @@
|
||||
cbuffer MatrixBuffer
|
||||
{
|
||||
matrix worldMatrix;
|
||||
matrix viewMatrix;
|
||||
matrix projectionMatrix;
|
||||
};
|
||||
|
||||
struct VertexInputType
|
||||
{
|
||||
float4 position : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float2 tex : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct PixelInputType
|
||||
{
|
||||
float4 position : SV_POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float2 tex : TEXCOORD0;
|
||||
float3 worldPos : TEXCOORD1; // Add world position
|
||||
};
|
||||
|
||||
PixelInputType CelShadingVertexShader(VertexInputType input)
|
||||
{
|
||||
PixelInputType output;
|
||||
|
||||
// Change the position vector to be 4 units for proper matrix calculations.
|
||||
input.position.w = 1.0f;
|
||||
|
||||
// Calculate the position of the vertex against the world, view, and projection matrices.
|
||||
float4 worldPosition = mul(input.position, worldMatrix);
|
||||
output.position = mul(worldPosition, viewMatrix);
|
||||
output.position = mul(output.position, projectionMatrix);
|
||||
|
||||
// Pass the normal to the pixel shader
|
||||
output.normal = normalize(mul((float3x3) worldMatrix, input.normal));
|
||||
|
||||
// Pass the world position to the pixel shader
|
||||
output.worldPos = worldPosition.xyz;
|
||||
|
||||
// Store the texture coordinates for the pixel shader.
|
||||
output.tex = input.tex;
|
||||
|
||||
return output;
|
||||
}
|
@@ -1,328 +0,0 @@
|
||||
# Blender 4.0.1
|
||||
# www.blender.org
|
||||
o Cone
|
||||
v 0.000000 -1.000000 -1.000000
|
||||
v 0.098017 -1.000000 -0.995185
|
||||
v 0.195090 -1.000000 -0.980785
|
||||
v 0.290285 -1.000000 -0.956940
|
||||
v 0.382683 -1.000000 -0.923880
|
||||
v 0.471397 -1.000000 -0.881921
|
||||
v 0.555570 -1.000000 -0.831470
|
||||
v 0.634393 -1.000000 -0.773010
|
||||
v 0.707107 -1.000000 -0.707107
|
||||
v 0.773010 -1.000000 -0.634393
|
||||
v 0.831470 -1.000000 -0.555570
|
||||
v 0.881921 -1.000000 -0.471397
|
||||
v 0.923880 -1.000000 -0.382683
|
||||
v 0.956940 -1.000000 -0.290285
|
||||
v 0.980785 -1.000000 -0.195090
|
||||
v 0.995185 -1.000000 -0.098017
|
||||
v 1.000000 -1.000000 0.000000
|
||||
v 0.995185 -1.000000 0.098017
|
||||
v 0.980785 -1.000000 0.195090
|
||||
v 0.956940 -1.000000 0.290285
|
||||
v 0.923880 -1.000000 0.382683
|
||||
v 0.881921 -1.000000 0.471397
|
||||
v 0.831470 -1.000000 0.555570
|
||||
v 0.773010 -1.000000 0.634393
|
||||
v 0.707107 -1.000000 0.707107
|
||||
v 0.634393 -1.000000 0.773010
|
||||
v 0.555570 -1.000000 0.831470
|
||||
v 0.471397 -1.000000 0.881921
|
||||
v 0.382683 -1.000000 0.923880
|
||||
v 0.290285 -1.000000 0.956940
|
||||
v 0.195090 -1.000000 0.980785
|
||||
v 0.098017 -1.000000 0.995185
|
||||
v 0.000000 -1.000000 1.000000
|
||||
v -0.098017 -1.000000 0.995185
|
||||
v -0.195090 -1.000000 0.980785
|
||||
v -0.290285 -1.000000 0.956940
|
||||
v -0.382683 -1.000000 0.923880
|
||||
v -0.471397 -1.000000 0.881921
|
||||
v -0.555570 -1.000000 0.831470
|
||||
v -0.634393 -1.000000 0.773010
|
||||
v -0.707107 -1.000000 0.707107
|
||||
v -0.773010 -1.000000 0.634393
|
||||
v -0.831470 -1.000000 0.555570
|
||||
v -0.881921 -1.000000 0.471397
|
||||
v -0.923880 -1.000000 0.382683
|
||||
v -0.956940 -1.000000 0.290285
|
||||
v -0.980785 -1.000000 0.195090
|
||||
v -0.995185 -1.000000 0.098017
|
||||
v -1.000000 -1.000000 0.000000
|
||||
v -0.995185 -1.000000 -0.098017
|
||||
v -0.980785 -1.000000 -0.195090
|
||||
v -0.956940 -1.000000 -0.290285
|
||||
v -0.923880 -1.000000 -0.382683
|
||||
v -0.881921 -1.000000 -0.471397
|
||||
v -0.831470 -1.000000 -0.555570
|
||||
v -0.773010 -1.000000 -0.634393
|
||||
v -0.707107 -1.000000 -0.707107
|
||||
v -0.634393 -1.000000 -0.773010
|
||||
v -0.555570 -1.000000 -0.831470
|
||||
v -0.471397 -1.000000 -0.881921
|
||||
v -0.382683 -1.000000 -0.923880
|
||||
v -0.290285 -1.000000 -0.956940
|
||||
v -0.195090 -1.000000 -0.980785
|
||||
v -0.098017 -1.000000 -0.995185
|
||||
v 0.000000 1.000000 0.000000
|
||||
vn 0.0439 0.4468 -0.8936
|
||||
vn 0.1313 0.4468 -0.8850
|
||||
vn 0.2174 0.4468 -0.8678
|
||||
vn 0.3014 0.4468 -0.8423
|
||||
vn 0.3825 0.4468 -0.8087
|
||||
vn 0.4599 0.4468 -0.7674
|
||||
vn 0.5329 0.4468 -0.7186
|
||||
vn 0.6008 0.4468 -0.6629
|
||||
vn 0.6629 0.4468 -0.6008
|
||||
vn 0.7186 0.4468 -0.5329
|
||||
vn 0.7674 0.4468 -0.4599
|
||||
vn 0.8087 0.4468 -0.3825
|
||||
vn 0.8423 0.4468 -0.3014
|
||||
vn 0.8678 0.4468 -0.2174
|
||||
vn 0.8850 0.4468 -0.1313
|
||||
vn 0.8936 0.4468 -0.0439
|
||||
vn 0.8936 0.4468 0.0439
|
||||
vn 0.8850 0.4468 0.1313
|
||||
vn 0.8678 0.4468 0.2174
|
||||
vn 0.8423 0.4468 0.3014
|
||||
vn 0.8087 0.4468 0.3825
|
||||
vn 0.7674 0.4468 0.4599
|
||||
vn 0.7186 0.4468 0.5329
|
||||
vn 0.6629 0.4468 0.6008
|
||||
vn 0.6008 0.4468 0.6629
|
||||
vn 0.5329 0.4468 0.7186
|
||||
vn 0.4599 0.4468 0.7674
|
||||
vn 0.3825 0.4468 0.8087
|
||||
vn 0.3014 0.4468 0.8423
|
||||
vn 0.2174 0.4468 0.8678
|
||||
vn 0.1313 0.4468 0.8850
|
||||
vn 0.0439 0.4468 0.8936
|
||||
vn -0.0439 0.4468 0.8936
|
||||
vn -0.1313 0.4468 0.8850
|
||||
vn -0.2174 0.4468 0.8678
|
||||
vn -0.3014 0.4468 0.8423
|
||||
vn -0.3825 0.4468 0.8087
|
||||
vn -0.4599 0.4468 0.7674
|
||||
vn -0.5329 0.4468 0.7186
|
||||
vn -0.6008 0.4468 0.6629
|
||||
vn -0.6629 0.4468 0.6008
|
||||
vn -0.7186 0.4468 0.5329
|
||||
vn -0.7674 0.4468 0.4599
|
||||
vn -0.8087 0.4468 0.3825
|
||||
vn -0.8423 0.4468 0.3014
|
||||
vn -0.8678 0.4468 0.2174
|
||||
vn -0.8850 0.4468 0.1313
|
||||
vn -0.8936 0.4468 0.0439
|
||||
vn -0.8936 0.4468 -0.0439
|
||||
vn -0.8850 0.4468 -0.1313
|
||||
vn -0.8678 0.4468 -0.2174
|
||||
vn -0.8423 0.4468 -0.3014
|
||||
vn -0.8087 0.4468 -0.3825
|
||||
vn -0.7674 0.4468 -0.4599
|
||||
vn -0.7186 0.4468 -0.5329
|
||||
vn -0.6629 0.4468 -0.6008
|
||||
vn -0.6008 0.4468 -0.6629
|
||||
vn -0.5329 0.4468 -0.7186
|
||||
vn -0.4599 0.4468 -0.7674
|
||||
vn -0.3825 0.4468 -0.8087
|
||||
vn -0.3014 0.4468 -0.8423
|
||||
vn -0.2174 0.4468 -0.8678
|
||||
vn -0.0000 -1.0000 -0.0000
|
||||
vn -0.1313 0.4468 -0.8850
|
||||
vn -0.0439 0.4468 -0.8936
|
||||
vt 0.250000 0.490000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.273524 0.488844
|
||||
vt 0.296822 0.485388
|
||||
vt 0.319668 0.479666
|
||||
vt 0.341844 0.471731
|
||||
vt 0.363135 0.461661
|
||||
vt 0.383337 0.449553
|
||||
vt 0.402254 0.435522
|
||||
vt 0.419706 0.419706
|
||||
vt 0.435522 0.402254
|
||||
vt 0.449553 0.383337
|
||||
vt 0.461661 0.363135
|
||||
vt 0.471731 0.341844
|
||||
vt 0.479666 0.319668
|
||||
vt 0.485388 0.296822
|
||||
vt 0.488844 0.273524
|
||||
vt 0.490000 0.250000
|
||||
vt 0.488844 0.226476
|
||||
vt 0.485388 0.203178
|
||||
vt 0.479666 0.180332
|
||||
vt 0.471731 0.158156
|
||||
vt 0.461661 0.136865
|
||||
vt 0.449553 0.116663
|
||||
vt 0.435522 0.097746
|
||||
vt 0.419706 0.080294
|
||||
vt 0.402254 0.064478
|
||||
vt 0.383337 0.050447
|
||||
vt 0.363135 0.038339
|
||||
vt 0.341844 0.028269
|
||||
vt 0.319668 0.020334
|
||||
vt 0.296822 0.014612
|
||||
vt 0.273524 0.011156
|
||||
vt 0.250000 0.010000
|
||||
vt 0.226476 0.011156
|
||||
vt 0.203178 0.014612
|
||||
vt 0.180332 0.020334
|
||||
vt 0.158156 0.028269
|
||||
vt 0.136865 0.038339
|
||||
vt 0.116663 0.050447
|
||||
vt 0.097746 0.064478
|
||||
vt 0.080294 0.080294
|
||||
vt 0.064478 0.097746
|
||||
vt 0.050447 0.116663
|
||||
vt 0.038339 0.136865
|
||||
vt 0.028269 0.158156
|
||||
vt 0.020334 0.180332
|
||||
vt 0.014612 0.203178
|
||||
vt 0.011156 0.226476
|
||||
vt 0.010000 0.250000
|
||||
vt 0.011156 0.273524
|
||||
vt 0.014612 0.296822
|
||||
vt 0.020334 0.319668
|
||||
vt 0.028269 0.341844
|
||||
vt 0.038339 0.363135
|
||||
vt 0.050447 0.383337
|
||||
vt 0.064478 0.402254
|
||||
vt 0.080294 0.419706
|
||||
vt 0.097746 0.435522
|
||||
vt 0.116663 0.449553
|
||||
vt 0.136865 0.461661
|
||||
vt 0.158156 0.471731
|
||||
vt 0.180332 0.479666
|
||||
vt 0.203178 0.485388
|
||||
vt 0.750000 0.490000
|
||||
vt 0.773524 0.488844
|
||||
vt 0.796822 0.485388
|
||||
vt 0.819668 0.479666
|
||||
vt 0.841844 0.471731
|
||||
vt 0.863135 0.461661
|
||||
vt 0.883337 0.449553
|
||||
vt 0.902254 0.435522
|
||||
vt 0.919706 0.419706
|
||||
vt 0.935522 0.402254
|
||||
vt 0.949553 0.383337
|
||||
vt 0.961661 0.363135
|
||||
vt 0.971731 0.341844
|
||||
vt 0.979666 0.319668
|
||||
vt 0.985388 0.296822
|
||||
vt 0.988844 0.273524
|
||||
vt 0.990000 0.250000
|
||||
vt 0.988844 0.226476
|
||||
vt 0.985388 0.203178
|
||||
vt 0.979666 0.180332
|
||||
vt 0.971731 0.158156
|
||||
vt 0.961661 0.136865
|
||||
vt 0.949553 0.116663
|
||||
vt 0.935522 0.097746
|
||||
vt 0.919706 0.080294
|
||||
vt 0.902254 0.064478
|
||||
vt 0.883337 0.050447
|
||||
vt 0.863135 0.038339
|
||||
vt 0.841844 0.028269
|
||||
vt 0.819668 0.020334
|
||||
vt 0.796822 0.014612
|
||||
vt 0.773524 0.011156
|
||||
vt 0.750000 0.010000
|
||||
vt 0.726476 0.011156
|
||||
vt 0.703178 0.014612
|
||||
vt 0.680332 0.020334
|
||||
vt 0.658156 0.028269
|
||||
vt 0.636865 0.038339
|
||||
vt 0.616663 0.050447
|
||||
vt 0.597746 0.064478
|
||||
vt 0.580294 0.080294
|
||||
vt 0.564478 0.097746
|
||||
vt 0.550447 0.116663
|
||||
vt 0.538339 0.136865
|
||||
vt 0.528269 0.158156
|
||||
vt 0.520334 0.180332
|
||||
vt 0.514612 0.203178
|
||||
vt 0.511156 0.226476
|
||||
vt 0.510000 0.250000
|
||||
vt 0.511156 0.273524
|
||||
vt 0.514612 0.296822
|
||||
vt 0.520334 0.319668
|
||||
vt 0.528269 0.341844
|
||||
vt 0.538339 0.363135
|
||||
vt 0.550447 0.383337
|
||||
vt 0.564478 0.402254
|
||||
vt 0.580294 0.419706
|
||||
vt 0.597746 0.435522
|
||||
vt 0.616663 0.449553
|
||||
vt 0.636865 0.461661
|
||||
vt 0.658156 0.471731
|
||||
vt 0.680332 0.479666
|
||||
vt 0.703178 0.485388
|
||||
vt 0.726476 0.488844
|
||||
vt 0.226476 0.488844
|
||||
s 0
|
||||
f 1/1/1 65/2/1 2/3/1
|
||||
f 2/3/2 65/2/2 3/4/2
|
||||
f 3/4/3 65/2/3 4/5/3
|
||||
f 4/5/4 65/2/4 5/6/4
|
||||
f 5/6/5 65/2/5 6/7/5
|
||||
f 6/7/6 65/2/6 7/8/6
|
||||
f 7/8/7 65/2/7 8/9/7
|
||||
f 8/9/8 65/2/8 9/10/8
|
||||
f 9/10/9 65/2/9 10/11/9
|
||||
f 10/11/10 65/2/10 11/12/10
|
||||
f 11/12/11 65/2/11 12/13/11
|
||||
f 12/13/12 65/2/12 13/14/12
|
||||
f 13/14/13 65/2/13 14/15/13
|
||||
f 14/15/14 65/2/14 15/16/14
|
||||
f 15/16/15 65/2/15 16/17/15
|
||||
f 16/17/16 65/2/16 17/18/16
|
||||
f 17/18/17 65/2/17 18/19/17
|
||||
f 18/19/18 65/2/18 19/20/18
|
||||
f 19/20/19 65/2/19 20/21/19
|
||||
f 20/21/20 65/2/20 21/22/20
|
||||
f 21/22/21 65/2/21 22/23/21
|
||||
f 22/23/22 65/2/22 23/24/22
|
||||
f 23/24/23 65/2/23 24/25/23
|
||||
f 24/25/24 65/2/24 25/26/24
|
||||
f 25/26/25 65/2/25 26/27/25
|
||||
f 26/27/26 65/2/26 27/28/26
|
||||
f 27/28/27 65/2/27 28/29/27
|
||||
f 28/29/28 65/2/28 29/30/28
|
||||
f 29/30/29 65/2/29 30/31/29
|
||||
f 30/31/30 65/2/30 31/32/30
|
||||
f 31/32/31 65/2/31 32/33/31
|
||||
f 32/33/32 65/2/32 33/34/32
|
||||
f 33/34/33 65/2/33 34/35/33
|
||||
f 34/35/34 65/2/34 35/36/34
|
||||
f 35/36/35 65/2/35 36/37/35
|
||||
f 36/37/36 65/2/36 37/38/36
|
||||
f 37/38/37 65/2/37 38/39/37
|
||||
f 38/39/38 65/2/38 39/40/38
|
||||
f 39/40/39 65/2/39 40/41/39
|
||||
f 40/41/40 65/2/40 41/42/40
|
||||
f 41/42/41 65/2/41 42/43/41
|
||||
f 42/43/42 65/2/42 43/44/42
|
||||
f 43/44/43 65/2/43 44/45/43
|
||||
f 44/45/44 65/2/44 45/46/44
|
||||
f 45/46/45 65/2/45 46/47/45
|
||||
f 46/47/46 65/2/46 47/48/46
|
||||
f 47/48/47 65/2/47 48/49/47
|
||||
f 48/49/48 65/2/48 49/50/48
|
||||
f 49/50/49 65/2/49 50/51/49
|
||||
f 50/51/50 65/2/50 51/52/50
|
||||
f 51/52/51 65/2/51 52/53/51
|
||||
f 52/53/52 65/2/52 53/54/52
|
||||
f 53/54/53 65/2/53 54/55/53
|
||||
f 54/55/54 65/2/54 55/56/54
|
||||
f 55/56/55 65/2/55 56/57/55
|
||||
f 56/57/56 65/2/56 57/58/56
|
||||
f 57/58/57 65/2/57 58/59/57
|
||||
f 58/59/58 65/2/58 59/60/58
|
||||
f 59/60/59 65/2/59 60/61/59
|
||||
f 60/61/60 65/2/60 61/62/60
|
||||
f 61/62/61 65/2/61 62/63/61
|
||||
f 62/63/62 65/2/62 63/64/62
|
||||
f 1/65/63 2/66/63 3/67/63 4/68/63 5/69/63 6/70/63 7/71/63 8/72/63 9/73/63 10/74/63 11/75/63 12/76/63 13/77/63 14/78/63 15/79/63 16/80/63 17/81/63 18/82/63 19/83/63 20/84/63 21/85/63 22/86/63 23/87/63 24/88/63 25/89/63 26/90/63 27/91/63 28/92/63 29/93/63 30/94/63 31/95/63 32/96/63 33/97/63 34/98/63 35/99/63 36/100/63 37/101/63 38/102/63 39/103/63 40/104/63 41/105/63 42/106/63 43/107/63 44/108/63 45/109/63 46/110/63 47/111/63 48/112/63 49/113/63 50/114/63 51/115/63 52/116/63 53/117/63 54/118/63 55/119/63 56/120/63 57/121/63 58/122/63 59/123/63 60/124/63 61/125/63 62/126/63 63/127/63 64/128/63
|
||||
f 63/64/64 65/2/64 64/129/64
|
||||
f 64/129/65 65/2/65 1/1/65
|
1
enginecustom/demo.ker
Normal file
@@ -0,0 +1 @@
|
||||
1 isosphere 0 10 0 0 -0 0 1 1 1 F:\Github_Repo\khaotic-engine-Reborn\x64\Debug\Content/Assets/Kobject/isosphere.obj SUNLIGHT 1 Unknown 1 0 2 F:\Github_Repo\khaotic-engine-Reborn\enginecustom\assets\Texture\stone01.png F:\Github_Repo\khaotic-engine-Reborn\enginecustom\assets\Texture\dirt01.png 1 assets/Texture/BricksNRM2K.png 1 assets/Texture/BricksGLOSS2K.png 1 F:\Github_Repo\khaotic-engine-Reborn\enginecustom\assets\Texture\alpha01.png
|
Before Width: | Height: | Size: 1.0 MiB |
@@ -19,62 +19,63 @@
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="alphamapshaderclass.cpp" />
|
||||
<ClCompile Include="applicationclass.cpp" />
|
||||
<ClCompile Include="bitmapclass.cpp" />
|
||||
<ClCompile Include="Cameraclass.cpp" />
|
||||
<ClCompile Include="CelShadingShader.cpp" />
|
||||
<ClCompile Include="Colorshaderclass.cpp" />
|
||||
<ClCompile Include="d3dclass.cpp" />
|
||||
<ClCompile Include="imguiManager.cpp" />
|
||||
<ClCompile Include="include\backends\imgui_impl_dx11.cpp" />
|
||||
<ClCompile Include="include\backends\imgui_impl_win32.cpp" />
|
||||
<ClCompile Include="include\imgui.cpp" />
|
||||
<ClCompile Include="include\imgui_demo.cpp" />
|
||||
<ClCompile Include="include\imgui_draw.cpp" />
|
||||
<ClCompile Include="include\imgui_tables.cpp" />
|
||||
<ClCompile Include="include\imgui_widgets.cpp" />
|
||||
<ClCompile Include="displayplaneclass.cpp" />
|
||||
<ClCompile Include="fontclass.cpp" />
|
||||
<ClCompile Include="fontshaderclass.cpp" />
|
||||
<ClCompile Include="fpsclass.cpp" />
|
||||
<ClCompile Include="frustumclass.cpp" />
|
||||
<ClCompile Include="inputclass.cpp" />
|
||||
<ClCompile Include="Lightclass.cpp" />
|
||||
<ClCompile Include="lightmapshaderclass.cpp" />
|
||||
<ClCompile Include="Lightshaderclass.cpp" />
|
||||
<ClCompile Include="Main.cpp" />
|
||||
<ClCompile Include="modelclass.cpp" />
|
||||
<ClCompile Include="object.cpp" />
|
||||
<ClCompile Include="modellistclass.cpp" />
|
||||
<ClCompile Include="Multitextureshaderclass.cpp" />
|
||||
<ClCompile Include="normalmapshaderclass.cpp" />
|
||||
<ClCompile Include="refractionshaderclass.cpp" />
|
||||
<ClCompile Include="shadermanagerclass.cpp" />
|
||||
<ClCompile Include="physics.cpp" />
|
||||
<ClCompile Include="positionclass.cpp" />
|
||||
<ClCompile Include="reflectionshaderclass.cpp" />
|
||||
<ClCompile Include="rendertextureclass.cpp" />
|
||||
<ClCompile Include="specmapshaderclass.cpp" />
|
||||
<ClCompile Include="Spriteclass.cpp" />
|
||||
<ClCompile Include="Systemclass.cpp" />
|
||||
<ClCompile Include="textclass.cpp" />
|
||||
<ClCompile Include="textureclass.cpp" />
|
||||
<ClCompile Include="textureshaderclass.cpp" />
|
||||
<ClCompile Include="Timerclass.cpp" />
|
||||
<ClCompile Include="translateshaderclass.cpp" />
|
||||
<ClCompile Include="transparentshaderclass.cpp" />
|
||||
<ClCompile Include="watershaderclass.cpp" />
|
||||
<ClCompile Include="include\Src\DDSTextureLoader.cpp" />
|
||||
<ClCompile Include="include\Src\DirectXHelpers.cpp" />
|
||||
<ClCompile Include="include\Src\pch.cpp" />
|
||||
<ClCompile Include="include\Src\SimpleMath.cpp" />
|
||||
<ClCompile Include="include\Src\WICTextureLoader.cpp" />
|
||||
<ClCompile Include="src\src\shader\alphamapshaderclass.cpp" />
|
||||
<ClCompile Include="src\src\shader\CelShadingShader.cpp" />
|
||||
<ClCompile Include="src\src\shader\Colorshaderclass.cpp" />
|
||||
<ClCompile Include="src\src\shader\fontshaderclass.cpp" />
|
||||
<ClCompile Include="src\src\shader\lightmapshaderclass.cpp" />
|
||||
<ClCompile Include="src\src\shader\lightshaderclass.cpp" />
|
||||
<ClCompile Include="src\src\shader\Multitextureshaderclass.cpp" />
|
||||
<ClCompile Include="src\src\shader\normalmapshaderclass.cpp" />
|
||||
<ClCompile Include="src\src\shader\reflectionshaderclass.cpp" />
|
||||
<ClCompile Include="src\src\shader\refractionshaderclass.cpp" />
|
||||
<ClCompile Include="src\src\shader\shadermanagerclass.cpp" />
|
||||
<ClCompile Include="src\src\shader\SkyboxShaderClass.cpp" />
|
||||
<ClCompile Include="src\src\shader\specmapshaderclass.cpp" />
|
||||
<ClCompile Include="src\src\shader\sunlightshaderclass.cpp" />
|
||||
<ClCompile Include="src\src\shader\textureshaderclass.cpp" />
|
||||
<ClCompile Include="src\src\shader\translateshaderclass.cpp" />
|
||||
<ClCompile Include="src\src\shader\transparentshaderclass.cpp" />
|
||||
<ClCompile Include="src\src\shader\watershaderclass.cpp" />
|
||||
<ClCompile Include="src\src\system\applicationclass.cpp" />
|
||||
<ClCompile Include="src\src\system\bitmapclass.cpp" />
|
||||
<ClCompile Include="src\src\system\Cameraclass.cpp" />
|
||||
<ClCompile Include="src\src\system\d3dclass.cpp" />
|
||||
<ClCompile Include="src\src\system\displayplaneclass.cpp" />
|
||||
<ClCompile Include="src\src\system\fontclass.cpp" />
|
||||
<ClCompile Include="src\src\system\fpsclass.cpp" />
|
||||
<ClCompile Include="src\src\system\frustum.cpp" />
|
||||
<ClCompile Include="src\src\system\frustumclass.cpp" />
|
||||
<ClCompile Include="src\src\system\imguiManager.cpp" />
|
||||
<ClCompile Include="src\src\system\inputclass.cpp" />
|
||||
<ClCompile Include="src\src\system\lightclass.cpp" />
|
||||
<ClCompile Include="src\src\system\Main.cpp" />
|
||||
<ClCompile Include="src\src\system\modelclass.cpp" />
|
||||
<ClCompile Include="src\src\system\Modellistclass.cpp" />
|
||||
<ClCompile Include="src\src\system\object.cpp" />
|
||||
<ClCompile Include="src\src\system\physics.cpp" />
|
||||
<ClCompile Include="src\src\system\Positionclass.cpp" />
|
||||
<ClCompile Include="src\src\system\rendertextureclass.cpp" />
|
||||
<ClCompile Include="src\src\system\Skybox.cpp" />
|
||||
<ClCompile Include="src\src\system\Spriteclass.cpp" />
|
||||
<ClCompile Include="src\src\system\Systemclass.cpp" />
|
||||
<ClCompile Include="src\src\system\textclass.cpp" />
|
||||
<ClCompile Include="src\src\system\textureclass.cpp" />
|
||||
<ClCompile Include="src\src\system\Timerclass.cpp" />
|
||||
<ClCompile Include="src\src\system\vulkan.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="alphamapshaderclass.h" />
|
||||
<ClInclude Include="applicationclass.h" />
|
||||
<ClInclude Include="bitmapclass.h" />
|
||||
<ClInclude Include="Cameraclass.h" />
|
||||
<ClInclude Include="CelShadingShader.h" />
|
||||
<ClInclude Include="Colorshaderclass.h" />
|
||||
<ClInclude Include="d3dclass.h" />
|
||||
<ClInclude Include="imguiManager.h" />
|
||||
<ClInclude Include="include\backends\imgui_impl_dx11.h" />
|
||||
<ClInclude Include="include\backends\imgui_impl_win32.h" />
|
||||
<ClInclude Include="include\imconfig.h" />
|
||||
@@ -83,196 +84,271 @@
|
||||
<ClInclude Include="include\imstb_rectpack.h" />
|
||||
<ClInclude Include="include\imstb_textedit.h" />
|
||||
<ClInclude Include="include\imstb_truetype.h" />
|
||||
<ClInclude Include="displayplaneclass.h" />
|
||||
<ClInclude Include="fontclass.h" />
|
||||
<ClInclude Include="fontshaderclass.h" />
|
||||
<ClInclude Include="fpsclass.h" />
|
||||
<ClInclude Include="frustumclass.h" />
|
||||
<ClInclude Include="inputclass.h" />
|
||||
<ClInclude Include="lightclass.h" />
|
||||
<ClInclude Include="lightmapshaderclass.h" />
|
||||
<ClInclude Include="lightshaderclass.h" />
|
||||
<ClInclude Include="Logger.h" />
|
||||
<ClInclude Include="modelclass.h" />
|
||||
<ClInclude Include="object.h" />
|
||||
<ClInclude Include="modellistclass.h" />
|
||||
<ClInclude Include="Multitextureshaderclass.h" />
|
||||
<ClInclude Include="normalmapshaderclass.h" />
|
||||
<ClInclude Include="refractionshaderclass.h" />
|
||||
<ClInclude Include="shadermanagerclass.h" />
|
||||
<ClInclude Include="physics.h" />
|
||||
<ClInclude Include="positionclass.h" />
|
||||
<ClInclude Include="reflectionshaderclass.h" />
|
||||
<ClInclude Include="rendertextureclass.h" />
|
||||
<ClInclude Include="resources.h" />
|
||||
<ClInclude Include="specmapshaderclass.h" />
|
||||
<ClInclude Include="Spriteclass.h" />
|
||||
<ClInclude Include="systemclass.h" />
|
||||
<ClInclude Include="textclass.h" />
|
||||
<ClInclude Include="textureclass.h" />
|
||||
<ClInclude Include="textureshaderclass.h" />
|
||||
<ClInclude Include="Timerclass.h" />
|
||||
<ClInclude Include="translateshaderclass.h" />
|
||||
<ClInclude Include="transparentshaderclass.h" />
|
||||
<ClInclude Include="watershaderclass.h" />
|
||||
<ClInclude Include="include\Src\CMO.h" />
|
||||
<ClInclude Include="include\Src\DDS.h" />
|
||||
<ClInclude Include="include\Src\LoaderHelpers.h" />
|
||||
<ClInclude Include="include\Src\pch.h" />
|
||||
<ClInclude Include="include\Src\PlatformHelpers.h" />
|
||||
<ClInclude Include="src\inc\shader\alphamapshaderclass.h" />
|
||||
<ClInclude Include="src\inc\shader\CelShadingShader.h" />
|
||||
<ClInclude Include="src\inc\shader\Colorshaderclass.h" />
|
||||
<ClInclude Include="src\inc\shader\fontshaderclass.h" />
|
||||
<ClInclude Include="src\inc\shader\lightmapshaderclass.h" />
|
||||
<ClInclude Include="src\inc\shader\lightshaderclass.h" />
|
||||
<ClInclude Include="src\inc\shader\lightshaderwaterclass.h" />
|
||||
<ClInclude Include="src\inc\shader\Multitextureshaderclass.h" />
|
||||
<ClInclude Include="src\inc\shader\normalmapshaderclass.h" />
|
||||
<ClInclude Include="src\inc\shader\reflectionshaderclass.h" />
|
||||
<ClInclude Include="src\inc\shader\refractionshaderclass.h" />
|
||||
<ClInclude Include="src\inc\shader\shadermanagerclass.h" />
|
||||
<ClInclude Include="src\inc\shader\SkyboxShaderClass.h" />
|
||||
<ClInclude Include="src\inc\shader\specmapshaderclass.h" />
|
||||
<ClInclude Include="src\inc\shader\sunlightshaderclass.h" />
|
||||
<ClInclude Include="src\inc\shader\textureshaderclass.h" />
|
||||
<ClInclude Include="src\inc\shader\translateshaderclass.h" />
|
||||
<ClInclude Include="src\inc\shader\transparentshaderclass.h" />
|
||||
<ClInclude Include="src\inc\shader\watershaderclass.h" />
|
||||
<ClInclude Include="src\inc\system\applicationclass.h" />
|
||||
<ClInclude Include="src\inc\system\bitmapclass.h" />
|
||||
<ClInclude Include="src\inc\system\Cameraclass.h" />
|
||||
<ClInclude Include="src\inc\system\d3dclass.h" />
|
||||
<ClInclude Include="src\inc\system\displayplaneclass.h" />
|
||||
<ClInclude Include="src\inc\system\fontclass.h" />
|
||||
<ClInclude Include="src\inc\system\fpsclass.h" />
|
||||
<ClInclude Include="src\inc\system\frustum.h" />
|
||||
<ClInclude Include="src\inc\system\frustumclass.h" />
|
||||
<ClInclude Include="src\inc\system\imguiManager.h" />
|
||||
<ClInclude Include="src\inc\system\inputclass.h" />
|
||||
<ClInclude Include="src\inc\system\lightclass.h" />
|
||||
<ClInclude Include="src\inc\system\Logger.h" />
|
||||
<ClInclude Include="src\inc\system\modelclass.h" />
|
||||
<ClInclude Include="src\inc\system\Modellistclass.h" />
|
||||
<ClInclude Include="src\inc\system\object.h" />
|
||||
<ClInclude Include="src\inc\system\physics.h" />
|
||||
<ClInclude Include="src\inc\system\Positionclass.h" />
|
||||
<ClInclude Include="src\inc\system\rendertextureclass.h" />
|
||||
<ClInclude Include="src\inc\system\sceneManager.h" />
|
||||
<ClInclude Include="src\inc\system\Skybox.h" />
|
||||
<ClInclude Include="src\inc\system\Spriteclass.h" />
|
||||
<ClInclude Include="src\inc\system\systemclass.h" />
|
||||
<ClInclude Include="src\inc\system\textclass.h" />
|
||||
<ClInclude Include="src\inc\system\textureclass.h" />
|
||||
<ClInclude Include="src\inc\system\Timerclass.h" />
|
||||
<ClInclude Include="src\inc\system\vulkan.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="alphamap.ps">
|
||||
<CopyFileToFolders Include="src\hlsl\alphamap.ps">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\alphamap.vs">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\celshading.ps">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\celshading.vs">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\Color.ps">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\Color.vs">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\font.ps">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\font.vs">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\light.ps">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\light.vs">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\lightmap.ps">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\lightmap.vs">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\Multitexture.ps">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\Multitexture.vs">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\normalmap.ps">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\normalmap.vs">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\reflection.ps">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\reflection.vs">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\refraction.ps">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\refraction.vs">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="src\hlsl\skybox.ps">
|
||||
<DestinationFolders>F:\Github_Repo\khaotic-engine-Reborn\x64\Debug\\src\hlsl</DestinationFolders>
|
||||
<DestinationFileName>%(Filename)%(Extension)</DestinationFileName>
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="alphamap.vs">
|
||||
<CopyFileToFolders Include="src\hlsl\skybox.vs">
|
||||
<DestinationFolders>F:\Github_Repo\khaotic-engine-Reborn\x64\Debug\\src\hlsl</DestinationFolders>
|
||||
<DestinationFileName>%(Filename)%(Extension)</DestinationFileName>
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="font.ps">
|
||||
<CopyFileToFolders Include="src\hlsl\specmap.ps">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="font.vs">
|
||||
<CopyFileToFolders Include="src\hlsl\specmap.vs">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="light.ps">
|
||||
<CopyFileToFolders Include="src\hlsl\sunlight.ps">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="light.vs">
|
||||
<CopyFileToFolders Include="src\hlsl\sunlight.vs">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="lightmap.ps">
|
||||
<CopyFileToFolders Include="src\hlsl\texture.ps">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="lightmap.vs">
|
||||
<CopyFileToFolders Include="src\hlsl\texture.vs">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="Multitexture.ps">
|
||||
<CopyFileToFolders Include="src\hlsl\translate.ps">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="Multitexture.vs">
|
||||
<CopyFileToFolders Include="src\hlsl\translate.vs">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="normalmap.ps">
|
||||
<CopyFileToFolders Include="src\hlsl\transparent.ps">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="normalmap.vs">
|
||||
<CopyFileToFolders Include="src\hlsl\transparent.vs">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="..\KhaoticDemo\water.ps">
|
||||
<CopyFileToFolders Include="src\hlsl\water.ps">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="celshading.ps">
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="celshading.vs">
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<None Include="packages.config" />
|
||||
<CopyFileToFolders Include="reflection.ps">
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="reflection.vs">
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="specmap.ps">
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="specmap.vs">
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="texture.ps">
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="texture.vs">
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="transparent.ps">
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="transparent.vs">
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="refraction.ps">
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="refraction.vs">
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="water.vs">
|
||||
<CopyFileToFolders Include="src\hlsl\water.vs">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="Color.ps">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType>
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="Color.vs">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Vertex</ShaderType>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Vertex</ShaderType>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Vertex</ShaderType>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Vertex</ShaderType>
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="alpha01.tga" />
|
||||
<Image Include="dirt01.tga" />
|
||||
<CopyFileToFolders Include="font01.tga" />
|
||||
<CopyFileToFolders Include="assets\Texture\Bricks2K.png">
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="assets\Texture\BricksGLOSS2K.png">
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="assets\Texture\BricksNRM2K.png">
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="assets\Skybox\skybox.png">
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Skybox</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Skybox</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
<Image Include="KhaoticIcon.ico" />
|
||||
<CopyFileToFolders Include="light01.tga" />
|
||||
<CopyFileToFolders Include="moss01.tga" />
|
||||
<CopyFileToFolders Include="normal01.tga" />
|
||||
<CopyFileToFolders Include="marble01.tga" />
|
||||
<Image Include="papier.tga" />
|
||||
<CopyFileToFolders Include="spec02.tga" />
|
||||
<CopyFileToFolders Include="sprite01.tga" />
|
||||
<CopyFileToFolders Include="sprite02.tga" />
|
||||
<CopyFileToFolders Include="sprite03.tga" />
|
||||
<CopyFileToFolders Include="sprite04.tga" />
|
||||
<CopyFileToFolders Include="stone01.tga" />
|
||||
<CopyFileToFolders Include="wall.tga" />
|
||||
<CopyFileToFolders Include="water01.tga" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="cube.txt" />
|
||||
<CopyFileToFolders Include="font01.txt" />
|
||||
<CopyFileToFolders Include="plane.txt" />
|
||||
<CopyFileToFolders Include="bath.txt" />
|
||||
<Text Include="chunk.txt" />
|
||||
<Text Include="sphere.txt" />
|
||||
<CopyFileToFolders Include="sprite_data_01.txt" />
|
||||
<Text Include="square.txt" />
|
||||
<CopyFileToFolders Include="water.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="translate.ps">
|
||||
<SubType>Designer</SubType>
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="translate.vs">
|
||||
<SubType>Designer</SubType>
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="resources.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="cone.obj">
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="isosphere.obj">
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="monke.obj">
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="vaisseau.obj">
|
||||
<FileType>Document</FileType>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="sprite_data_01.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="86.obj">
|
||||
<Content Include="TODO.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="assets\Model\OBJ\skysphere.obj">
|
||||
<FileType>Document</FileType>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
|
||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
|
||||
</CopyFileToFolders>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
@@ -280,6 +356,7 @@
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{92cf56c4-76bb-40d4-8fe5-36c15f5f127a}</ProjectGuid>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>KhaoticCore</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
@@ -360,12 +437,13 @@
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)enginecustom\include\backends;$(SolutionDir)enginecustom\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)enginecustom\include\backends;$(SolutionDir)enginecustom\include\Inc;$(SolutionDir)enginecustom\include;$(SolutionDir)enginecustom\src\inc\shader;$(SolutionDir)enginecustom\src\inc\system;$(SolutionDir)enginecustom\include\Vulkan\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)enginecustom\include\Vulkan\Lib;$(SolutionDir)enginecustom\include\GLFW\lib-vc2022;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -377,13 +455,14 @@
|
||||
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)enginecustom\include\backends;$(SolutionDir)enginecustom\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)enginecustom\include\backends;$(SolutionDir)enginecustom\include\Inc;$(SolutionDir)enginecustom\include;$(SolutionDir)enginecustom\src\inc\shader;$(SolutionDir)enginecustom\src\inc\system;$(SolutionDir)enginecustom\include\Vulkan\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)enginecustom\include\Vulkan\Lib;$(SolutionDir)enginecustom\include\GLFW\lib-vc2022;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
@@ -31,35 +31,41 @@
|
||||
<Filter Include="Assets">
|
||||
<UniqueIdentifier>{2978535b-193d-4876-83be-1c3c4470db62}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Fichiers sources\DirectX Tool Kit">
|
||||
<UniqueIdentifier>{3bfbc604-3b39-4e49-bee2-b942fc5dce8c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Fichiers d%27en-tête\DirectX Tool Kit">
|
||||
<UniqueIdentifier>{d710c862-b37d-4ad5-aa92-2456f9745881}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Assets\Texture">
|
||||
<UniqueIdentifier>{4873a73d-d11c-4d40-b847-b6d7fef4b23d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Assets\Model">
|
||||
<UniqueIdentifier>{3f3824c5-8a66-4f02-9845-1a9538336592}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Assets\Model\OBJ">
|
||||
<UniqueIdentifier>{22651df1-90a4-4a19-8b97-5147b27d975a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Assets\Model\TXT">
|
||||
<UniqueIdentifier>{f67d85e0-106e-47a1-bb9c-a5ea9111509a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Fichiers d%27en-tête\Shader">
|
||||
<UniqueIdentifier>{e087647e-a306-4246-9320-bab0830bb634}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Fichiers sources\Shader">
|
||||
<UniqueIdentifier>{3c669b93-a9fd-4b74-813f-f9780413f76b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Fichiers sources\System">
|
||||
<UniqueIdentifier>{b2659b1e-695d-488e-9a1c-341691d312bc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Assets\Skybox">
|
||||
<UniqueIdentifier>{4bfa47c6-e23c-4cae-a7af-3fc870a448e4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Fichiers d%27en-tête\System">
|
||||
<UniqueIdentifier>{567548ae-97a4-413e-8d44-86d6e8252487}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Main.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Systemclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="inputclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="applicationclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="d3dclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Colorshaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="modelclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Cameraclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="include\imgui_demo.cpp">
|
||||
<Filter>Fichiers sources\ImGui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="include\backends\imgui_impl_dx11.cpp">
|
||||
<Filter>Fichiers sources\ImGui</Filter>
|
||||
</ClCompile>
|
||||
@@ -78,125 +84,155 @@
|
||||
<ClCompile Include="include\imgui_widgets.cpp">
|
||||
<Filter>Fichiers sources\ImGui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="imguiManager.cpp">
|
||||
<ClCompile Include="include\Src\DDSTextureLoader.cpp">
|
||||
<Filter>Fichiers sources\DirectX Tool Kit</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="include\Src\DirectXHelpers.cpp">
|
||||
<Filter>Fichiers sources\DirectX Tool Kit</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="include\Src\pch.cpp">
|
||||
<Filter>Fichiers sources\DirectX Tool Kit</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="include\Src\SimpleMath.cpp">
|
||||
<Filter>Fichiers sources\DirectX Tool Kit</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="include\Src\WICTextureLoader.cpp">
|
||||
<Filter>Fichiers sources\DirectX Tool Kit</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\alphamapshaderclass.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\CelShadingShader.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\Colorshaderclass.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\lightmapshaderclass.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\lightshaderclass.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\Multitextureshaderclass.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\normalmapshaderclass.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\reflectionshaderclass.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\refractionshaderclass.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\shadermanagerclass.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\specmapshaderclass.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\sunlightshaderclass.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\textureshaderclass.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\translateshaderclass.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\transparentshaderclass.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\watershaderclass.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\applicationclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\bitmapclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\Cameraclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\d3dclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\displayplaneclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\fontclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\fpsclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\frustum.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\frustumclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\imguiManager.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\inputclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\lightclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\Main.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\modelclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\Modellistclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\object.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\physics.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\Positionclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\rendertextureclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\Spriteclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\Systemclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\textclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\textureclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\Timerclass.cpp">
|
||||
<Filter>Fichiers sources\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\shader\fontshaderclass.cpp">
|
||||
<Filter>Fichiers sources\Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\src\system\vulkan.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="lightclass.cpp">
|
||||
<ClCompile Include="src\src\shader\SkyboxShaderClass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="lightshaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="object.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="textureclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bitmapclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="fontclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="fontshaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="fpsclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Spriteclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Multitextureshaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="textclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="textureshaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Timerclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="fpsclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="alphamapshaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="specmapshaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="frustumclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="modellistclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="positionclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="displayplaneclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rendertextureclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="translateshaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="reflectionshaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="shadermanagerclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="transparentshaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="lightmapshaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="watershaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="refractionshaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="physics.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="normalmapshaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CelShadingShader.cpp">
|
||||
<ClCompile Include="src\src\system\Skybox.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="systemclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="inputclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="applicationclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="d3dclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Colorshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="modelclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Cameraclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\imconfig.h">
|
||||
<Filter>Fichiers d%27en-tête\ImGui</Filter>
|
||||
</ClInclude>
|
||||
@@ -221,304 +257,240 @@
|
||||
<ClInclude Include="include\backends\imgui_impl_win32.h">
|
||||
<Filter>Fichiers d%27en-tête\ImGui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="imguiManager.h">
|
||||
<ClInclude Include="include\Src\CMO.h">
|
||||
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Src\DDS.h">
|
||||
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Src\LoaderHelpers.h">
|
||||
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Src\pch.h">
|
||||
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Src\PlatformHelpers.h">
|
||||
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\alphamapshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\CelShadingShader.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\Colorshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\fontshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\lightmapshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\lightshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\lightshaderwaterclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\Multitextureshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\normalmapshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\reflectionshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\refractionshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\shadermanagerclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\specmapshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\sunlightshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\textureshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\translateshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\transparentshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\shader\watershaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\applicationclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\bitmapclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\Cameraclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\d3dclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\displayplaneclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\fontclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\fpsclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\frustum.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\frustumclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\imguiManager.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\inputclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\lightclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\Logger.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\modelclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\Modellistclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\object.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\physics.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\Positionclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\rendertextureclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\Spriteclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\systemclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\textclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\textureclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\Timerclass.h">
|
||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\inc\system\sceneManager.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="lightshaderclass.h">
|
||||
<ClInclude Include="src\inc\system\vulkan.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="object.h">
|
||||
<ClInclude Include="src\inc\shader\SkyboxShaderClass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="textureclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bitmapclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="fontclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="fontshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="fpsclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="lightclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Multitextureshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Spriteclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="textclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="textureshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Timerclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="fpsclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="lightmapshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="alphamapshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="normalmapshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="specmapshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="frustumclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="modellistclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="positionclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="displayplaneclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rendertextureclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="translateshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="reflectionshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resources.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="shadermanagerclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="transparentshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Logger.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="watershaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="refractionshaderclass.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="physics.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CelShadingShader.h">
|
||||
<ClInclude Include="src\inc\system\Skybox.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="papier.tga">
|
||||
<Filter>assets</Filter>
|
||||
</Image>
|
||||
<Image Include="dirt01.tga">
|
||||
<Filter>assets</Filter>
|
||||
</Image>
|
||||
<Image Include="KhaoticIcon.ico">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="sphere.txt">
|
||||
<Filter>Assets</Filter>
|
||||
</Text>
|
||||
<Text Include="square.txt">
|
||||
<Filter>assets</Filter>
|
||||
</Text>
|
||||
<Text Include="chunk.txt">
|
||||
<Filter>Assets</Filter>
|
||||
</Text>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="resources.rc">
|
||||
<Filter>Fichiers de ressources</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="font.vs">
|
||||
<Filter>Fonts</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="font.ps">
|
||||
<Filter>Fonts</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="Color.vs">
|
||||
<Filter>shader</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="light.ps">
|
||||
<Filter>shader</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="font01.txt">
|
||||
<Filter>Fonts</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="font01.tga">
|
||||
<Filter>fonts</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="stone01.tga">
|
||||
<Filter>assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="cube.txt">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="plane.txt">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="alpha01.tga">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="light01.tga">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="moss01.tga">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="normal01.tga">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="spec02.tga">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="sprite01.tga">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="sprite02.tga">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="sprite_data_01.txt">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="sprite01.tga">
|
||||
<Filter>Assets\Texture</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="sprite02.tga">
|
||||
<Filter>Assets\Texture</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="sprite03.tga">
|
||||
<Filter>Assets</Filter>
|
||||
<Filter>Assets\Texture</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="sprite04.tga">
|
||||
<Filter>Assets</Filter>
|
||||
<Filter>Assets\Texture</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="Color.ps">
|
||||
<Filter>shader</Filter>
|
||||
<CopyFileToFolders Include="src\hlsl\alphamap.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\alphamap.vs" />
|
||||
<CopyFileToFolders Include="src\hlsl\celshading.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\celshading.vs" />
|
||||
<CopyFileToFolders Include="src\hlsl\Color.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\Color.vs" />
|
||||
<CopyFileToFolders Include="src\hlsl\font.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\font.vs" />
|
||||
<CopyFileToFolders Include="src\hlsl\light.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\light.vs" />
|
||||
<CopyFileToFolders Include="src\hlsl\lightmap.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\lightmap.vs" />
|
||||
<CopyFileToFolders Include="src\hlsl\Multitexture.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\Multitexture.vs" />
|
||||
<CopyFileToFolders Include="src\hlsl\normalmap.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\normalmap.vs" />
|
||||
<CopyFileToFolders Include="src\hlsl\reflection.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\reflection.vs" />
|
||||
<CopyFileToFolders Include="src\hlsl\refraction.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\refraction.vs" />
|
||||
<CopyFileToFolders Include="src\hlsl\specmap.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\specmap.vs" />
|
||||
<CopyFileToFolders Include="src\hlsl\sunlight.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\sunlight.vs" />
|
||||
<CopyFileToFolders Include="src\hlsl\texture.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\texture.vs" />
|
||||
<CopyFileToFolders Include="src\hlsl\translate.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\translate.vs" />
|
||||
<CopyFileToFolders Include="src\hlsl\transparent.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\transparent.vs" />
|
||||
<CopyFileToFolders Include="src\hlsl\water.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\water.vs" />
|
||||
<CopyFileToFolders Include="src\hlsl\skybox.ps" />
|
||||
<CopyFileToFolders Include="src\hlsl\skybox.vs" />
|
||||
<CopyFileToFolders Include="assets\Model\OBJ\skysphere.obj">
|
||||
<Filter>Assets\Model\OBJ</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="light.vs">
|
||||
<Filter>shader</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="lightmap.ps">
|
||||
<Filter>shader</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="lightmap.vs">
|
||||
<Filter>shader</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="reflection.ps">
|
||||
<Filter>shader</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="reflection.vs">
|
||||
<Filter>shader</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="translate.ps">
|
||||
<Filter>shader</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="translate.vs">
|
||||
<Filter>shader</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="transparent.ps">
|
||||
<Filter>shader</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="transparent.vs">
|
||||
<Filter>shader</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="Multitexture.ps">
|
||||
<CopyFileToFolders Include="assets\Texture\BricksNRM2K.png">
|
||||
<Filter>Texture</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="Multitexture.vs">
|
||||
<CopyFileToFolders Include="assets\Texture\BricksGLOSS2K.png">
|
||||
<Filter>Texture</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="normalmap.ps">
|
||||
<CopyFileToFolders Include="assets\Texture\Bricks2K.png">
|
||||
<Filter>Texture</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="normalmap.vs">
|
||||
<Filter>Texture</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="specmap.ps">
|
||||
<Filter>Texture</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="specmap.vs">
|
||||
<Filter>Texture</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="texture.ps">
|
||||
<Filter>Texture</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="texture.vs">
|
||||
<Filter>Texture</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="alphamap.vs">
|
||||
<Filter>Texture</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="alphamap.ps">
|
||||
<Filter>Texture</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="refraction.ps">
|
||||
<Filter>shader</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="refraction.vs">
|
||||
<Filter>shader</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="..\KhaoticDemo\water.ps">
|
||||
<Filter>shader</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="water.vs">
|
||||
<Filter>shader</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="wall.tga">
|
||||
<Filter>assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="water01.tga">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="bath.txt">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="marble01.tga">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="water.txt">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="isosphere.obj">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="cone.obj">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="monke.obj">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="vaisseau.obj">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="86.obj">
|
||||
<Filter>Assets</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="celshading.vs">
|
||||
<Filter>shader</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="celshading.ps">
|
||||
<Filter>shader</Filter>
|
||||
<CopyFileToFolders Include="assets\Skybox\skybox.png">
|
||||
<Filter>Assets\Skybox</Filter>
|
||||
</CopyFileToFolders>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -1,24 +1,89 @@
|
||||
[Window][Debug##Default]
|
||||
Pos=60,60
|
||||
Size=400,400
|
||||
Collapsed=0
|
||||
|
||||
[Window][Khaotic Engine]
|
||||
Pos=506,44
|
||||
Size=339,252
|
||||
|
||||
[Window][Terrain]
|
||||
Pos=185,62
|
||||
Size=320,75
|
||||
|
||||
[Window][Light]
|
||||
Pos=1111,62
|
||||
Size=354,190
|
||||
|
||||
[Window][Shader Manager]
|
||||
Pos=39,177
|
||||
Size=165,54
|
||||
Pos=1233,27
|
||||
Size=343,826
|
||||
Collapsed=0
|
||||
DockId=0x00000005,0
|
||||
|
||||
[Window][Objects]
|
||||
Pos=1450,122
|
||||
Size=388,116
|
||||
Pos=8,27
|
||||
Size=289,826
|
||||
Collapsed=0
|
||||
DockId=0x00000009,0
|
||||
|
||||
[Window][Terrain]
|
||||
Pos=8,27
|
||||
Size=250,826
|
||||
Collapsed=0
|
||||
DockId=0x00000007,0
|
||||
|
||||
[Window][Light]
|
||||
Pos=8,27
|
||||
Size=290,866
|
||||
Collapsed=0
|
||||
DockId=0x00000007,1
|
||||
|
||||
[Window][Shader Manager]
|
||||
Pos=8,27
|
||||
Size=330,487
|
||||
Collapsed=0
|
||||
DockId=0x00000001,2
|
||||
|
||||
[Window][Engine Settings]
|
||||
Pos=8,27
|
||||
Size=289,826
|
||||
Collapsed=0
|
||||
DockId=0x00000009,0
|
||||
|
||||
[Window][DockSpace Demo]
|
||||
Size=1584,861
|
||||
Collapsed=0
|
||||
|
||||
[Window][Render Window]
|
||||
Pos=8,27
|
||||
Size=1559,974
|
||||
Collapsed=0
|
||||
DockId=0x00000009,0
|
||||
|
||||
[Window][DockSpace]
|
||||
Pos=0,0
|
||||
Size=1584,861
|
||||
Collapsed=0
|
||||
|
||||
[Window][Add Object]
|
||||
Pos=1188,0
|
||||
Size=396,430
|
||||
Collapsed=0
|
||||
|
||||
[Window][Log]
|
||||
Pos=8,518
|
||||
Size=1568,335
|
||||
Collapsed=0
|
||||
DockId=0x0000000C,0
|
||||
|
||||
[Window][Log Window]
|
||||
Pos=8,37
|
||||
Size=16,19
|
||||
Collapsed=0
|
||||
DockId=0x00000006,0
|
||||
|
||||
[Docking][Data]
|
||||
DockSpace ID=0xC0DFADC4 Pos=8,27 Size=1568,826 Split=X
|
||||
DockNode ID=0x00000001 Parent=0xC0DFADC4 SizeRef=330,1094 Selected=0x393905AB
|
||||
DockNode ID=0x00000003 Parent=0xC0DFADC4 SizeRef=1700,1094 CentralNode=1
|
||||
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=8,27 Size=1568,826 Split=Y
|
||||
DockNode ID=0x00000004 Parent=0xCCBD8CF7 SizeRef=1568,598 Split=X
|
||||
DockNode ID=0x00000009 Parent=0x00000004 SizeRef=289,974 Selected=0x031DC75C
|
||||
DockNode ID=0x0000000D Parent=0x00000004 SizeRef=1613,974 Split=X
|
||||
DockNode ID=0x00000002 Parent=0x0000000D SizeRef=1268,826 Split=Y
|
||||
DockNode ID=0x0000000B Parent=0x00000002 SizeRef=1568,637 Split=X
|
||||
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=250,826 Selected=0x393905AB
|
||||
DockNode ID=0x00000008 Parent=0x0000000B SizeRef=971,826 CentralNode=1 Selected=0x031DC75C
|
||||
DockNode ID=0x0000000C Parent=0x00000002 SizeRef=1568,335 Selected=0x139FDA3F
|
||||
DockNode ID=0x00000005 Parent=0x0000000D SizeRef=343,826 Selected=0x9F035453
|
||||
DockNode ID=0x00000006 Parent=0xCCBD8CF7 SizeRef=1568,226 Selected=0xAB74BEE9
|
||||
|
||||
|
@@ -1,381 +0,0 @@
|
||||
#include "imguiManager.h"
|
||||
#include "applicationclass.h"
|
||||
#include <string>
|
||||
|
||||
imguiManager::imguiManager()
|
||||
{
|
||||
io = nullptr;
|
||||
}
|
||||
|
||||
imguiManager::~imguiManager()
|
||||
{
|
||||
}
|
||||
|
||||
bool imguiManager::Initialize(HWND hwnd, ID3D11Device* device, ID3D11DeviceContext* deviceContext)
|
||||
{
|
||||
Logger::Get().Log("Initializing imgui", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
||||
|
||||
m_device = device;
|
||||
m_deviceContext = deviceContext;
|
||||
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
io = &ImGui::GetIO();
|
||||
|
||||
ImGui_ImplWin32_Init(hwnd);
|
||||
ImGui_ImplDX11_Init(m_device, m_deviceContext);
|
||||
ImGui::StyleColorsDark();
|
||||
|
||||
Logger::Get().Log("imgui initialized", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void imguiManager::Shutdown()
|
||||
{
|
||||
Logger::Get().Log("Shutting down imgui", __FILE__, __LINE__, Logger::LogLevel::Shutdown);
|
||||
ImGui_ImplDX11_Shutdown();
|
||||
ImGui_ImplWin32_Shutdown();
|
||||
ImGui::DestroyContext();
|
||||
Logger::Get().Log("imgui shutdown", __FILE__, __LINE__, Logger::LogLevel::Shutdown);
|
||||
}
|
||||
|
||||
void imguiManager::Render()
|
||||
{
|
||||
ImGui::Render();
|
||||
ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData());
|
||||
}
|
||||
|
||||
void imguiManager::NewFrame()
|
||||
{
|
||||
ImGui_ImplDX11_NewFrame();
|
||||
ImGui_ImplWin32_NewFrame();
|
||||
ImGui::NewFrame();
|
||||
}
|
||||
|
||||
void imguiManager::WidgetSpeedSlider(float* speed)
|
||||
{
|
||||
ImGui::SliderFloat("Speed", speed, 0.0f, 100.0f);
|
||||
}
|
||||
|
||||
void imguiManager::WidgetButton()
|
||||
{
|
||||
static int counter = 0;
|
||||
|
||||
if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
|
||||
counter++;
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("counter = %d", counter);
|
||||
}
|
||||
|
||||
void imguiManager::WidgetFPS()
|
||||
{
|
||||
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io->Framerate, io->Framerate);
|
||||
}
|
||||
|
||||
void imguiManager::WidgetAddObject(ApplicationClass* app)
|
||||
{
|
||||
if (ImGui::CollapsingHeader("Objects"))
|
||||
{
|
||||
if (ImGui::Button("Add Cube"))
|
||||
{
|
||||
app->AddCube();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Import Object"))
|
||||
{
|
||||
// Open file dialog
|
||||
OPENFILENAME ofn;
|
||||
WCHAR szFile[260];
|
||||
ZeroMemory(&ofn, sizeof(ofn));
|
||||
ofn.lStructSize = sizeof(ofn);
|
||||
ofn.hwndOwner = NULL;
|
||||
ofn.lpstrFile = szFile;
|
||||
ofn.lpstrFile[0] = '\0';
|
||||
ofn.nMaxFile = sizeof(szFile);
|
||||
ofn.lpstrFilter = L"TXT\0*.txt\0KOBJ\0*.kobj\0*OBJ\0*.obj";
|
||||
ofn.nFilterIndex = 1;
|
||||
ofn.lpstrFileTitle = NULL;
|
||||
ofn.nMaxFileTitle = 0;
|
||||
ofn.lpstrInitialDir = NULL;
|
||||
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
|
||||
|
||||
if (GetOpenFileName(&ofn))
|
||||
{
|
||||
app->AddKobject(ofn.lpstrFile);
|
||||
}
|
||||
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("Number of cubes: %d", app->GetCubeCount());
|
||||
}
|
||||
}
|
||||
|
||||
void imguiManager::WidgetShaderWindow(ApplicationClass* app)
|
||||
{
|
||||
ImGui::Begin("Shader Manager");
|
||||
|
||||
// Checkbox for toggling cel shading globally in the application class by calling the SetCelShading function in the application class when the checkbox state changes
|
||||
ImGui::Checkbox("Enable Cel Shading", &m_EnableCelShading);
|
||||
app->SetCelShading(m_EnableCelShading);
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
void imguiManager::WidgetObjectWindow(ApplicationClass* app)
|
||||
{
|
||||
ImGui::Begin("Objects", &showObjectWindow);
|
||||
int index = 0;
|
||||
for (auto& object : app->GetKobjects())
|
||||
{
|
||||
std::string headerName = object->GetName() + " " + std::to_string(index);
|
||||
if (ImGui::CollapsingHeader(headerName.c_str()))
|
||||
{
|
||||
|
||||
XMVECTOR position = object->GetPosition();
|
||||
XMVECTOR rotation = object->GetRotation();
|
||||
XMVECTOR scale = object->GetScale();
|
||||
|
||||
float pos[3] = { XMVectorGetX(position), XMVectorGetY(position), XMVectorGetZ(position) };
|
||||
std::string posLabel = "Position##" + std::to_string(index);
|
||||
if (ImGui::DragFloat3(posLabel.c_str(), pos))
|
||||
{
|
||||
object->SetPosition(XMVectorSet(pos[0], pos[1], pos[2], 0.0f));
|
||||
}
|
||||
|
||||
float rot[3] = { XMVectorGetX(rotation), XMVectorGetY(rotation), XMVectorGetZ(rotation) };
|
||||
std::string rotLabel = "Rotation##" + std::to_string(index);
|
||||
if (ImGui::DragFloat3(rotLabel.c_str(), rot))
|
||||
{
|
||||
object->SetRotation(XMVectorSet(rot[0], rot[1], rot[2], 0.0f));
|
||||
}
|
||||
|
||||
float scl[3] = { XMVectorGetX(scale), XMVectorGetY(scale), XMVectorGetZ(scale) };
|
||||
std::string sclLabel = "Scale##" + std::to_string(index);
|
||||
if (ImGui::DragFloat3(sclLabel.c_str(), scl))
|
||||
{
|
||||
object->SetScale(XMVectorSet(scl[0], scl[1], scl[2], 0.0f));
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
// Texture
|
||||
// add all texture category names to a vector
|
||||
std::vector<std::string> textureCategories = { "Diffuse", "Normal", "Specular", "Alpha", "Light", "Change Me" };
|
||||
|
||||
|
||||
for (int count = 0; count < 6; count++)
|
||||
{
|
||||
std::string textureLabel = "Texture##" + std::to_string(index);
|
||||
ID3D11ShaderResourceView* texture = object->GetTexture(count);
|
||||
if (texture != nullptr)
|
||||
{
|
||||
// Set the cursor position
|
||||
ImGui::SetCursorPosX(count * (64 + 20) + 10); // 64 is the width of the image, 10 is the spacing
|
||||
|
||||
// Display the texture name
|
||||
std::string textureName = textureCategories[count];
|
||||
ImGui::Text(textureName.c_str());
|
||||
|
||||
if(count < 5)
|
||||
{
|
||||
ImGui::SameLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Display all images
|
||||
for (int count = 0; count < 6; count++)
|
||||
{
|
||||
std::string textureLabel = "Texture##" + std::to_string(index);
|
||||
ID3D11ShaderResourceView* texture = object->GetTexture(count);
|
||||
if (texture != nullptr)
|
||||
{
|
||||
// Set the cursor position
|
||||
ImGui::SetCursorPosX(count * (64 + 20) + 10); // 64 is the width of the image, 10 is the spacing
|
||||
|
||||
if (ImGui::ImageButton((ImTextureID)texture, ImVec2(64, 64)))
|
||||
{
|
||||
// Open file dialog
|
||||
OPENFILENAME ofn;
|
||||
WCHAR szFile[260];
|
||||
ZeroMemory(&ofn, sizeof(ofn));
|
||||
ofn.lStructSize = sizeof(ofn);
|
||||
ofn.hwndOwner = NULL;
|
||||
ofn.lpstrFile = szFile;
|
||||
ofn.lpstrFile[0] = '\0';
|
||||
ofn.nMaxFile = sizeof(szFile);
|
||||
ofn.lpstrFilter = L"Texture\0*.tga\0";
|
||||
ofn.nFilterIndex = 1;
|
||||
ofn.lpstrFileTitle = NULL;
|
||||
ofn.nMaxFileTitle = 0;
|
||||
ofn.lpstrInitialDir = NULL;
|
||||
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
|
||||
|
||||
if (GetOpenFileName(&ofn))
|
||||
{
|
||||
// Load the selected texture
|
||||
object->ChangeTexture(m_device, m_deviceContext, ofn.lpstrFile, index);
|
||||
}
|
||||
}
|
||||
|
||||
if (ImGui::IsItemHovered())
|
||||
{
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Image((ImTextureID)texture, ImVec2(256, 256));
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
// If this is not the last texture, put the next button on the same line
|
||||
if (count < 5)
|
||||
{
|
||||
ImGui::SameLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
// Delete button
|
||||
std::string deleteLabel = "Delete##" + std::to_string(index);
|
||||
if (ImGui::Button(deleteLabel.c_str()))
|
||||
{
|
||||
app->DeleteKobject(index);
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
// Demo spinning
|
||||
std::string demoLabel = "Demo spinning##" + std::to_string(index);
|
||||
ImGui::Checkbox(demoLabel.c_str(), &object->m_demoSpinning);
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
void imguiManager::WidgetTerrainWindow(ApplicationClass* app)
|
||||
{
|
||||
ImGui::Begin("Terrain", &showTerrainWindow);
|
||||
|
||||
ImGui::Text("Number of terrain cubes: %d", app->GetTerrainCubeCount());
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::Button("Generate Terrain"))
|
||||
{
|
||||
app->GenerateTerrain();
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
if (ImGui::Button("Delete All Terrain Cubes"))
|
||||
{
|
||||
app->DeleteTerrain();
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
bool imguiManager::ImGuiWidgetRenderer(ApplicationClass* app)
|
||||
{
|
||||
// Start the Dear ImGui frame
|
||||
NewFrame();
|
||||
|
||||
//ImGui Widget
|
||||
ImGui::Begin("Khaotic Engine", NULL);
|
||||
|
||||
float speed = app->GetSpeed();
|
||||
WidgetSpeedSlider(&speed);
|
||||
app->SetSpeed(speed);
|
||||
WidgetButton();
|
||||
WidgetFPS();
|
||||
WidgetAddObject(app);
|
||||
ImGui::Separator();
|
||||
|
||||
// Add buttons for opening windows
|
||||
if (ImGui::Button("Open Object Window"))
|
||||
{
|
||||
showObjectWindow = true;
|
||||
}
|
||||
|
||||
if (ImGui::Button("Open Terrain Window"))
|
||||
{
|
||||
showTerrainWindow = true;
|
||||
}
|
||||
|
||||
if (ImGui::Button("Open Light Window"))
|
||||
{
|
||||
showLightWindow = true;
|
||||
}
|
||||
|
||||
if (ImGui::Button("Open Shader Window"))
|
||||
{
|
||||
showShaderWindow = true;
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
|
||||
// Show windows if their corresponding variables are true
|
||||
if (showObjectWindow)
|
||||
{
|
||||
WidgetObjectWindow(app);
|
||||
}
|
||||
|
||||
if (showTerrainWindow)
|
||||
{
|
||||
WidgetTerrainWindow(app);
|
||||
}
|
||||
|
||||
if (showLightWindow)
|
||||
{
|
||||
WidgetLightWindow(app);
|
||||
}
|
||||
|
||||
if (showShaderWindow)
|
||||
{
|
||||
WidgetShaderWindow(app);
|
||||
}
|
||||
|
||||
//render imgui
|
||||
Render();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void imguiManager::WidgetLightWindow(ApplicationClass* app)
|
||||
{
|
||||
ImGui::Begin("Light", &showLightWindow);
|
||||
int index = 0;
|
||||
|
||||
for(auto& light : app->GetLights())
|
||||
{
|
||||
std::string headerName = "Light " + std::to_string(index);
|
||||
if (ImGui::CollapsingHeader(headerName.c_str()))
|
||||
{
|
||||
XMVECTOR position = app->GetLightPosition(index);
|
||||
XMVECTOR color = app->GetLightColor(index);
|
||||
float pos[3] = { XMVectorGetX(position), XMVectorGetY(position), XMVectorGetZ(position) };
|
||||
float col[3] = { XMVectorGetX(color), XMVectorGetY(color), XMVectorGetZ(color) };
|
||||
|
||||
std::string posLabel = "Position##" + std::to_string(index);
|
||||
std::string colLabel = "Color##" + std::to_string(index);
|
||||
|
||||
if (ImGui::DragFloat3(posLabel.c_str(), pos))
|
||||
{
|
||||
app->SetLightPosition(index, XMVectorSet(pos[0], pos[1], pos[2], 0.0f));
|
||||
}
|
||||
|
||||
if (ImGui::ColorEdit3(colLabel.c_str(), col))
|
||||
{
|
||||
app->SetLightColor(index, XMVectorSet(col[0], col[1], col[2], 0.0f));
|
||||
}
|
||||
|
||||
}
|
||||
index++;
|
||||
};
|
||||
|
||||
ImGui::End();
|
||||
}
|
@@ -1,56 +0,0 @@
|
||||
#pragma once
|
||||
#ifndef _IMGUI_MANAGER_H_
|
||||
#define _IMGUI_MANAGER_H_
|
||||
|
||||
#include "Logger.h"
|
||||
|
||||
#include <imgui.h>
|
||||
#include <imgui_impl_dx11.h>
|
||||
#include <imgui_impl_win32.h>
|
||||
#include <windows.h>
|
||||
|
||||
class ApplicationClass;
|
||||
|
||||
class imguiManager
|
||||
{
|
||||
public:
|
||||
imguiManager();
|
||||
~imguiManager();
|
||||
|
||||
bool Initialize(HWND hwnd, ID3D11Device* device, ID3D11DeviceContext* deviceContext);
|
||||
void Shutdown();
|
||||
void Render();
|
||||
void NewFrame();
|
||||
|
||||
// Widgets
|
||||
void WidgetSpeedSlider(float* speed);
|
||||
void WidgetButton();
|
||||
void WidgetFPS();
|
||||
void WidgetAddObject(ApplicationClass* app);
|
||||
|
||||
void WidgetObjectWindow(ApplicationClass* app);
|
||||
void WidgetTerrainWindow(ApplicationClass* app);
|
||||
void WidgetLightWindow(ApplicationClass* app);
|
||||
void WidgetShaderWindow(ApplicationClass* app);
|
||||
|
||||
bool ImGuiWidgetRenderer(ApplicationClass* app);
|
||||
|
||||
// Shader toggles
|
||||
|
||||
bool m_EnableCelShading;
|
||||
|
||||
private :
|
||||
bool showObjectWindow = false;
|
||||
bool showTerrainWindow = false;
|
||||
bool showLightWindow = false;
|
||||
bool showShaderWindow = false;
|
||||
|
||||
private:
|
||||
ImGuiIO* io;
|
||||
|
||||
ID3D11Device* m_device;
|
||||
ID3D11DeviceContext* m_deviceContext;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
6547
enginecustom/include/GLFW/include/GLFW/glfw3.h
Normal file
663
enginecustom/include/GLFW/include/GLFW/glfw3native.h
Normal file
@@ -0,0 +1,663 @@
|
||||
/*************************************************************************
|
||||
* GLFW 3.4 - www.glfw.org
|
||||
* A library for OpenGL, window and input
|
||||
*------------------------------------------------------------------------
|
||||
* Copyright (c) 2002-2006 Marcus Geelnard
|
||||
* Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
* arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose,
|
||||
* including commercial applications, and to alter it and redistribute it
|
||||
* freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you must not
|
||||
* claim that you wrote the original software. If you use this software
|
||||
* in a product, an acknowledgment in the product documentation would
|
||||
* be appreciated but is not required.
|
||||
*
|
||||
* 2. Altered source versions must be plainly marked as such, and must not
|
||||
* be misrepresented as being the original software.
|
||||
*
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*
|
||||
*************************************************************************/
|
||||
|
||||
#ifndef _glfw3_native_h_
|
||||
#define _glfw3_native_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* Doxygen documentation
|
||||
*************************************************************************/
|
||||
|
||||
/*! @file glfw3native.h
|
||||
* @brief The header of the native access functions.
|
||||
*
|
||||
* This is the header file of the native access functions. See @ref native for
|
||||
* more information.
|
||||
*/
|
||||
/*! @defgroup native Native access
|
||||
* @brief Functions related to accessing native handles.
|
||||
*
|
||||
* **By using the native access functions you assert that you know what you're
|
||||
* doing and how to fix problems caused by using them. If you don't, you
|
||||
* shouldn't be using them.**
|
||||
*
|
||||
* Before the inclusion of @ref glfw3native.h, you may define zero or more
|
||||
* window system API macro and zero or more context creation API macros.
|
||||
*
|
||||
* The chosen backends must match those the library was compiled for. Failure
|
||||
* to do this will cause a link-time error.
|
||||
*
|
||||
* The available window API macros are:
|
||||
* * `GLFW_EXPOSE_NATIVE_WIN32`
|
||||
* * `GLFW_EXPOSE_NATIVE_COCOA`
|
||||
* * `GLFW_EXPOSE_NATIVE_X11`
|
||||
* * `GLFW_EXPOSE_NATIVE_WAYLAND`
|
||||
*
|
||||
* The available context API macros are:
|
||||
* * `GLFW_EXPOSE_NATIVE_WGL`
|
||||
* * `GLFW_EXPOSE_NATIVE_NSGL`
|
||||
* * `GLFW_EXPOSE_NATIVE_GLX`
|
||||
* * `GLFW_EXPOSE_NATIVE_EGL`
|
||||
* * `GLFW_EXPOSE_NATIVE_OSMESA`
|
||||
*
|
||||
* These macros select which of the native access functions that are declared
|
||||
* and which platform-specific headers to include. It is then up your (by
|
||||
* definition platform-specific) code to handle which of these should be
|
||||
* defined.
|
||||
*
|
||||
* If you do not want the platform-specific headers to be included, define
|
||||
* `GLFW_NATIVE_INCLUDE_NONE` before including the @ref glfw3native.h header.
|
||||
*
|
||||
* @code
|
||||
* #define GLFW_EXPOSE_NATIVE_WIN32
|
||||
* #define GLFW_EXPOSE_NATIVE_WGL
|
||||
* #define GLFW_NATIVE_INCLUDE_NONE
|
||||
* #include <GLFW/glfw3native.h>
|
||||
* @endcode
|
||||
*/
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* System headers and types
|
||||
*************************************************************************/
|
||||
|
||||
#if !defined(GLFW_NATIVE_INCLUDE_NONE)
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_WIN32) || defined(GLFW_EXPOSE_NATIVE_WGL)
|
||||
/* This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
|
||||
* example to allow applications to correctly declare a GL_KHR_debug callback)
|
||||
* but windows.h assumes no one will define APIENTRY before it does
|
||||
*/
|
||||
#if defined(GLFW_APIENTRY_DEFINED)
|
||||
#undef APIENTRY
|
||||
#undef GLFW_APIENTRY_DEFINED
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL)
|
||||
#if defined(__OBJC__)
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#else
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#include <objc/objc.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX)
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
|
||||
#include <wayland-client.h>
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_WGL)
|
||||
/* WGL is declared by windows.h */
|
||||
#endif
|
||||
#if defined(GLFW_EXPOSE_NATIVE_NSGL)
|
||||
/* NSGL is declared by Cocoa.h */
|
||||
#endif
|
||||
#if defined(GLFW_EXPOSE_NATIVE_GLX)
|
||||
/* This is a workaround for the fact that glfw3.h defines GLAPIENTRY because by
|
||||
* default it also acts as an OpenGL header
|
||||
* However, glx.h will include gl.h, which will define it unconditionally
|
||||
*/
|
||||
#if defined(GLFW_GLAPIENTRY_DEFINED)
|
||||
#undef GLAPIENTRY
|
||||
#undef GLFW_GLAPIENTRY_DEFINED
|
||||
#endif
|
||||
#include <GL/glx.h>
|
||||
#endif
|
||||
#if defined(GLFW_EXPOSE_NATIVE_EGL)
|
||||
#include <EGL/egl.h>
|
||||
#endif
|
||||
#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
|
||||
/* This is a workaround for the fact that glfw3.h defines GLAPIENTRY because by
|
||||
* default it also acts as an OpenGL header
|
||||
* However, osmesa.h will include gl.h, which will define it unconditionally
|
||||
*/
|
||||
#if defined(GLFW_GLAPIENTRY_DEFINED)
|
||||
#undef GLAPIENTRY
|
||||
#undef GLFW_GLAPIENTRY_DEFINED
|
||||
#endif
|
||||
#include <GL/osmesa.h>
|
||||
#endif
|
||||
|
||||
#endif /*GLFW_NATIVE_INCLUDE_NONE*/
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* Functions
|
||||
*************************************************************************/
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_WIN32)
|
||||
/*! @brief Returns the adapter device name of the specified monitor.
|
||||
*
|
||||
* @return The UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`)
|
||||
* of the specified monitor, or `NULL` if an [error](@ref error_handling)
|
||||
* occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.1.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the display device name of the specified monitor.
|
||||
*
|
||||
* @return The UTF-8 encoded display device name (for example
|
||||
* `\\.\DISPLAY1\Monitor0`) of the specified monitor, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.1.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the `HWND` of the specified window.
|
||||
*
|
||||
* @return The `HWND` of the specified window, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE.
|
||||
*
|
||||
* @remark The `HDC` associated with the window can be queried with the
|
||||
* [GetDC](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc)
|
||||
* function.
|
||||
* @code
|
||||
* HDC dc = GetDC(glfwGetWin32Window(window));
|
||||
* @endcode
|
||||
* This DC is private and does not need to be released.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_WGL)
|
||||
/*! @brief Returns the `HGLRC` of the specified window.
|
||||
*
|
||||
* @return The `HGLRC` of the specified window, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE and @ref GLFW_NO_WINDOW_CONTEXT.
|
||||
*
|
||||
* @remark The `HDC` associated with the window can be queried with the
|
||||
* [GetDC](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc)
|
||||
* function.
|
||||
* @code
|
||||
* HDC dc = GetDC(glfwGetWin32Window(window));
|
||||
* @endcode
|
||||
* This DC is private and does not need to be released.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_COCOA)
|
||||
/*! @brief Returns the `CGDirectDisplayID` of the specified monitor.
|
||||
*
|
||||
* @return The `CGDirectDisplayID` of the specified monitor, or
|
||||
* `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.1.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the `NSWindow` of the specified window.
|
||||
*
|
||||
* @return The `NSWindow` of the specified window, or `nil` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window);
|
||||
|
||||
/*! @brief Returns the `NSView` of the specified window.
|
||||
*
|
||||
* @return The `NSView` of the specified window, or `nil` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.4.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI id glfwGetCocoaView(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_NSGL)
|
||||
/*! @brief Returns the `NSOpenGLContext` of the specified window.
|
||||
*
|
||||
* @return The `NSOpenGLContext` of the specified window, or `nil` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE and @ref GLFW_NO_WINDOW_CONTEXT.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI id glfwGetNSGLContext(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_X11)
|
||||
/*! @brief Returns the `Display` used by GLFW.
|
||||
*
|
||||
* @return The `Display` used by GLFW, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI Display* glfwGetX11Display(void);
|
||||
|
||||
/*! @brief Returns the `RRCrtc` of the specified monitor.
|
||||
*
|
||||
* @return The `RRCrtc` of the specified monitor, or `None` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.1.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the `RROutput` of the specified monitor.
|
||||
*
|
||||
* @return The `RROutput` of the specified monitor, or `None` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.1.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the `Window` of the specified window.
|
||||
*
|
||||
* @return The `Window` of the specified window, or `None` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI Window glfwGetX11Window(GLFWwindow* window);
|
||||
|
||||
/*! @brief Sets the current primary selection to the specified string.
|
||||
*
|
||||
* @param[in] string A UTF-8 encoded string.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.
|
||||
*
|
||||
* @pointer_lifetime The specified string is copied before this function
|
||||
* returns.
|
||||
*
|
||||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
* @sa @ref clipboard
|
||||
* @sa glfwGetX11SelectionString
|
||||
* @sa glfwSetClipboardString
|
||||
*
|
||||
* @since Added in version 3.3.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI void glfwSetX11SelectionString(const char* string);
|
||||
|
||||
/*! @brief Returns the contents of the current primary selection as a string.
|
||||
*
|
||||
* If the selection is empty or if its contents cannot be converted, `NULL`
|
||||
* is returned and a @ref GLFW_FORMAT_UNAVAILABLE error is generated.
|
||||
*
|
||||
* @return The contents of the selection as a UTF-8 encoded string, or `NULL`
|
||||
* if an [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.
|
||||
*
|
||||
* @pointer_lifetime The returned string is allocated and freed by GLFW. You
|
||||
* should not free it yourself. It is valid until the next call to @ref
|
||||
* glfwGetX11SelectionString or @ref glfwSetX11SelectionString, or until the
|
||||
* library is terminated.
|
||||
*
|
||||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
* @sa @ref clipboard
|
||||
* @sa glfwSetX11SelectionString
|
||||
* @sa glfwGetClipboardString
|
||||
*
|
||||
* @since Added in version 3.3.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI const char* glfwGetX11SelectionString(void);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_GLX)
|
||||
/*! @brief Returns the `GLXContext` of the specified window.
|
||||
*
|
||||
* @return The `GLXContext` of the specified window, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||
* GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
|
||||
|
||||
/*! @brief Returns the `GLXWindow` of the specified window.
|
||||
*
|
||||
* @return The `GLXWindow` of the specified window, or `None` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||
* GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.2.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
|
||||
/*! @brief Returns the `struct wl_display*` used by GLFW.
|
||||
*
|
||||
* @return The `struct wl_display*` used by GLFW, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.2.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI struct wl_display* glfwGetWaylandDisplay(void);
|
||||
|
||||
/*! @brief Returns the `struct wl_output*` of the specified monitor.
|
||||
*
|
||||
* @return The `struct wl_output*` of the specified monitor, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.2.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the main `struct wl_surface*` of the specified window.
|
||||
*
|
||||
* @return The main `struct wl_surface*` of the specified window, or `NULL` if
|
||||
* an [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.2.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_EGL)
|
||||
/*! @brief Returns the `EGLDisplay` used by GLFW.
|
||||
*
|
||||
* @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @remark Because EGL is initialized on demand, this function will return
|
||||
* `EGL_NO_DISPLAY` until the first context has been created via EGL.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI EGLDisplay glfwGetEGLDisplay(void);
|
||||
|
||||
/*! @brief Returns the `EGLContext` of the specified window.
|
||||
*
|
||||
* @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_NO_WINDOW_CONTEXT.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window);
|
||||
|
||||
/*! @brief Returns the `EGLSurface` of the specified window.
|
||||
*
|
||||
* @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_NO_WINDOW_CONTEXT.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
|
||||
/*! @brief Retrieves the color buffer associated with the specified window.
|
||||
*
|
||||
* @param[in] window The window whose color buffer to retrieve.
|
||||
* @param[out] width Where to store the width of the color buffer, or `NULL`.
|
||||
* @param[out] height Where to store the height of the color buffer, or `NULL`.
|
||||
* @param[out] format Where to store the OSMesa pixel format of the color
|
||||
* buffer, or `NULL`.
|
||||
* @param[out] buffer Where to store the address of the color buffer, or
|
||||
* `NULL`.
|
||||
* @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_NO_WINDOW_CONTEXT.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.3.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* window, int* width, int* height, int* format, void** buffer);
|
||||
|
||||
/*! @brief Retrieves the depth buffer associated with the specified window.
|
||||
*
|
||||
* @param[in] window The window whose depth buffer to retrieve.
|
||||
* @param[out] width Where to store the width of the depth buffer, or `NULL`.
|
||||
* @param[out] height Where to store the height of the depth buffer, or `NULL`.
|
||||
* @param[out] bytesPerValue Where to store the number of bytes per depth
|
||||
* buffer element, or `NULL`.
|
||||
* @param[out] buffer Where to store the address of the depth buffer, or
|
||||
* `NULL`.
|
||||
* @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_NO_WINDOW_CONTEXT.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.3.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height, int* bytesPerValue, void** buffer);
|
||||
|
||||
/*! @brief Returns the `OSMesaContext` of the specified window.
|
||||
*
|
||||
* @return The `OSMesaContext` of the specified window, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_NO_WINDOW_CONTEXT.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.3.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _glfw3_native_h_ */
|
||||
|
832
enginecustom/include/Inc/Audio.h
Normal file
@@ -0,0 +1,832 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: Audio.h
|
||||
//
|
||||
// DirectXTK for Audio header
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248929
|
||||
// http://go.microsoft.com/fwlink/?LinkID=615561
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <objbase.h>
|
||||
#include <mmreg.h>
|
||||
#include <Audioclient.h>
|
||||
|
||||
#if (defined(_XBOX_ONE) && defined(_TITLE)) || defined(_GAMING_XBOX)
|
||||
#include <xma2defs.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment(lib,"acphal.lib")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef XAUDIO2_HELPER_FUNCTIONS
|
||||
#define XAUDIO2_HELPER_FUNCTIONS
|
||||
#endif
|
||||
|
||||
#if defined(USING_XAUDIO2_REDIST) || (_WIN32_WINNT >= 0x0A00 /*_WIN32_WINNT_WIN10*/) || defined(_XBOX_ONE)
|
||||
#define USING_XAUDIO2_9
|
||||
#elif (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#define USING_XAUDIO2_8
|
||||
#elif (_WIN32_WINNT >= 0x0601 /*_WIN32_WINNT_WIN7*/)
|
||||
#error Windows 7 SP1 requires the XAudio2Redist NuGet package https://aka.ms/xaudio2redist
|
||||
#else
|
||||
#error DirectX Tool Kit for Audio not supported on this platform
|
||||
#endif
|
||||
|
||||
#include <xaudio2.h>
|
||||
#include <xaudio2fx.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4619 4616 5246)
|
||||
#endif
|
||||
#include <x3daudio.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#include <xapofx.h>
|
||||
|
||||
#if !defined(USING_XAUDIO2_REDIST) && defined(_MSC_VER)
|
||||
#if defined(USING_XAUDIO2_8) && defined(NTDDI_WIN10) && !defined(_M_IX86)
|
||||
// The xaudio2_8.lib in the Windows 10 SDK for x86 is incorrectly annotated as __cdecl instead of __stdcall, so avoid using it in this case.
|
||||
#pragma comment(lib,"xaudio2_8.lib")
|
||||
#else
|
||||
#pragma comment(lib,"xaudio2.lib")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <DirectXMath.h>
|
||||
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
class SoundEffectInstance;
|
||||
class SoundStreamInstance;
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
struct AudioStatistics
|
||||
{
|
||||
size_t playingOneShots; // Number of one-shot sounds currently playing
|
||||
size_t playingInstances; // Number of sound effect instances currently playing
|
||||
size_t allocatedInstances; // Number of SoundEffectInstance allocated
|
||||
size_t allocatedVoices; // Number of XAudio2 voices allocated (standard, 3D, one-shots, and idle one-shots)
|
||||
size_t allocatedVoices3d; // Number of XAudio2 voices allocated for 3D
|
||||
size_t allocatedVoicesOneShot; // Number of XAudio2 voices allocated for one-shot sounds
|
||||
size_t allocatedVoicesIdle; // Number of XAudio2 voices allocated for one-shot sounds but not currently in use
|
||||
size_t audioBytes; // Total wave data (in bytes) in SoundEffects and in-memory WaveBanks
|
||||
#if (defined(_XBOX_ONE) && defined(_TITLE)) || defined(_GAMING_XBOX)
|
||||
size_t xmaAudioBytes; // Total wave data (in bytes) in SoundEffects and in-memory WaveBanks allocated with ApuAlloc
|
||||
#endif
|
||||
size_t streamingBytes; // Total size of streaming buffers (in bytes) in streaming WaveBanks
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
class IVoiceNotify
|
||||
{
|
||||
public:
|
||||
virtual ~IVoiceNotify() = default;
|
||||
|
||||
IVoiceNotify(const IVoiceNotify&) = delete;
|
||||
IVoiceNotify& operator=(const IVoiceNotify&) = delete;
|
||||
|
||||
IVoiceNotify(IVoiceNotify&&) = default;
|
||||
IVoiceNotify& operator=(IVoiceNotify&&) = default;
|
||||
|
||||
virtual void __cdecl OnBufferEnd() = 0;
|
||||
// Notfication that a voice buffer has finished
|
||||
// Note this is called from XAudio2's worker thread, so it should perform very minimal and thread-safe operations
|
||||
|
||||
virtual void __cdecl OnCriticalError() = 0;
|
||||
// Notification that the audio engine encountered a critical error
|
||||
|
||||
virtual void __cdecl OnReset() = 0;
|
||||
// Notification of an audio engine reset
|
||||
|
||||
virtual void __cdecl OnUpdate() = 0;
|
||||
// Notification of an audio engine per-frame update (opt-in)
|
||||
|
||||
virtual void __cdecl OnDestroyEngine() noexcept = 0;
|
||||
// Notification that the audio engine is being destroyed
|
||||
|
||||
virtual void __cdecl OnTrim() = 0;
|
||||
// Notification of a request to trim the voice pool
|
||||
|
||||
virtual void __cdecl GatherStatistics(AudioStatistics& stats) const = 0;
|
||||
// Contribute to statistics request
|
||||
|
||||
virtual void __cdecl OnDestroyParent() noexcept = 0;
|
||||
// Optional notification used by some objects
|
||||
|
||||
protected:
|
||||
IVoiceNotify() = default;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
enum AUDIO_ENGINE_FLAGS : uint32_t
|
||||
{
|
||||
AudioEngine_Default = 0x0,
|
||||
|
||||
AudioEngine_EnvironmentalReverb = 0x1,
|
||||
AudioEngine_ReverbUseFilters = 0x2,
|
||||
AudioEngine_UseMasteringLimiter = 0x4,
|
||||
|
||||
AudioEngine_Debug = 0x10000,
|
||||
AudioEngine_ThrowOnNoAudioHW = 0x20000,
|
||||
AudioEngine_DisableVoiceReuse = 0x40000,
|
||||
};
|
||||
|
||||
enum SOUND_EFFECT_INSTANCE_FLAGS : uint32_t
|
||||
{
|
||||
SoundEffectInstance_Default = 0x0,
|
||||
|
||||
SoundEffectInstance_Use3D = 0x1,
|
||||
SoundEffectInstance_ReverbUseFilters = 0x2,
|
||||
SoundEffectInstance_NoSetPitch = 0x4,
|
||||
|
||||
SoundEffectInstance_UseRedirectLFE = 0x10000,
|
||||
};
|
||||
|
||||
enum AUDIO_ENGINE_REVERB : unsigned int
|
||||
{
|
||||
Reverb_Off,
|
||||
Reverb_Default,
|
||||
Reverb_Generic,
|
||||
Reverb_Forest,
|
||||
Reverb_PaddedCell,
|
||||
Reverb_Room,
|
||||
Reverb_Bathroom,
|
||||
Reverb_LivingRoom,
|
||||
Reverb_StoneRoom,
|
||||
Reverb_Auditorium,
|
||||
Reverb_ConcertHall,
|
||||
Reverb_Cave,
|
||||
Reverb_Arena,
|
||||
Reverb_Hangar,
|
||||
Reverb_CarpetedHallway,
|
||||
Reverb_Hallway,
|
||||
Reverb_StoneCorridor,
|
||||
Reverb_Alley,
|
||||
Reverb_City,
|
||||
Reverb_Mountains,
|
||||
Reverb_Quarry,
|
||||
Reverb_Plain,
|
||||
Reverb_ParkingLot,
|
||||
Reverb_SewerPipe,
|
||||
Reverb_Underwater,
|
||||
Reverb_SmallRoom,
|
||||
Reverb_MediumRoom,
|
||||
Reverb_LargeRoom,
|
||||
Reverb_MediumHall,
|
||||
Reverb_LargeHall,
|
||||
Reverb_Plate,
|
||||
Reverb_MAX
|
||||
};
|
||||
|
||||
enum SoundState
|
||||
{
|
||||
STOPPED = 0,
|
||||
PLAYING,
|
||||
PAUSED
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
class AudioEngine
|
||||
{
|
||||
public:
|
||||
explicit AudioEngine(
|
||||
AUDIO_ENGINE_FLAGS flags = AudioEngine_Default,
|
||||
_In_opt_ const WAVEFORMATEX* wfx = nullptr,
|
||||
_In_opt_z_ const wchar_t* deviceId = nullptr,
|
||||
AUDIO_STREAM_CATEGORY category = AudioCategory_GameEffects) noexcept(false);
|
||||
|
||||
AudioEngine(AudioEngine&&) noexcept;
|
||||
AudioEngine& operator= (AudioEngine&&) noexcept;
|
||||
|
||||
AudioEngine(AudioEngine const&) = delete;
|
||||
AudioEngine& operator= (AudioEngine const&) = delete;
|
||||
|
||||
virtual ~AudioEngine();
|
||||
|
||||
bool __cdecl Update();
|
||||
// Performs per-frame processing for the audio engine, returns false if in 'silent mode'
|
||||
|
||||
bool __cdecl Reset(_In_opt_ const WAVEFORMATEX* wfx = nullptr, _In_opt_z_ const wchar_t* deviceId = nullptr);
|
||||
// Reset audio engine from critical error/silent mode using a new device; can also 'migrate' the graph
|
||||
// Returns true if succesfully reset, false if in 'silent mode' due to no default device
|
||||
// Note: One shots are lost, all SoundEffectInstances are in the STOPPED state after successful reset
|
||||
|
||||
void __cdecl Suspend() noexcept;
|
||||
void __cdecl Resume();
|
||||
// Suspend/resumes audio processing (i.e. global pause/resume)
|
||||
|
||||
float __cdecl GetMasterVolume() const noexcept;
|
||||
void __cdecl SetMasterVolume(float volume);
|
||||
// Master volume property for all sounds
|
||||
|
||||
void __cdecl SetReverb(AUDIO_ENGINE_REVERB reverb);
|
||||
void __cdecl SetReverb(_In_opt_ const XAUDIO2FX_REVERB_PARAMETERS* native);
|
||||
// Sets environmental reverb for 3D positional audio (if active)
|
||||
|
||||
void __cdecl SetMasteringLimit(int release, int loudness);
|
||||
// Sets the mastering volume limiter properties (if active)
|
||||
|
||||
AudioStatistics __cdecl GetStatistics() const;
|
||||
// Gathers audio engine statistics
|
||||
|
||||
WAVEFORMATEXTENSIBLE __cdecl GetOutputFormat() const noexcept;
|
||||
// Returns the format of the audio output device associated with the mastering voice.
|
||||
|
||||
uint32_t __cdecl GetChannelMask() const noexcept;
|
||||
// Returns the output channel mask
|
||||
|
||||
int __cdecl GetOutputSampleRate() const noexcept;
|
||||
// Returns the sample rate going into the mastering voice
|
||||
|
||||
unsigned int __cdecl GetOutputChannels() const noexcept;
|
||||
// Returns the number of channels going into the mastering voice
|
||||
|
||||
bool __cdecl IsAudioDevicePresent() const noexcept;
|
||||
// Returns true if the audio graph is operating normally, false if in 'silent mode'
|
||||
|
||||
bool __cdecl IsCriticalError() const noexcept;
|
||||
// Returns true if the audio graph is halted due to a critical error (which also places the engine into 'silent mode')
|
||||
|
||||
// Voice pool management.
|
||||
void __cdecl SetDefaultSampleRate(int sampleRate);
|
||||
// Sample rate for voices in the reuse pool (defaults to 44100)
|
||||
|
||||
void __cdecl SetMaxVoicePool(size_t maxOneShots, size_t maxInstances);
|
||||
// Maximum number of voices to allocate for one-shots and instances
|
||||
// Note: one-shots over this limit are ignored; too many instance voices throws an exception
|
||||
|
||||
void __cdecl TrimVoicePool();
|
||||
// Releases any currently unused voices
|
||||
|
||||
// Internal-use functions
|
||||
void __cdecl AllocateVoice(_In_ const WAVEFORMATEX* wfx,
|
||||
SOUND_EFFECT_INSTANCE_FLAGS flags, bool oneshot, _Outptr_result_maybenull_ IXAudio2SourceVoice** voice);
|
||||
|
||||
void __cdecl DestroyVoice(_In_ IXAudio2SourceVoice* voice) noexcept;
|
||||
// Should only be called for instance voices, not one-shots
|
||||
|
||||
void __cdecl RegisterNotify(_In_ IVoiceNotify* notify, bool usesUpdate);
|
||||
void __cdecl UnregisterNotify(_In_ IVoiceNotify* notify, bool usesOneShots, bool usesUpdate);
|
||||
|
||||
// XAudio2 interface access
|
||||
IXAudio2* __cdecl GetInterface() const noexcept;
|
||||
IXAudio2MasteringVoice* __cdecl GetMasterVoice() const noexcept;
|
||||
IXAudio2SubmixVoice* __cdecl GetReverbVoice() const noexcept;
|
||||
X3DAUDIO_HANDLE& __cdecl Get3DHandle() const noexcept;
|
||||
|
||||
// Static functions
|
||||
struct RendererDetail
|
||||
{
|
||||
std::wstring deviceId;
|
||||
std::wstring description;
|
||||
};
|
||||
|
||||
static std::vector<RendererDetail> __cdecl GetRendererDetails();
|
||||
// Returns a list of valid audio endpoint devices
|
||||
|
||||
#if defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED)
|
||||
explicit AudioEngine(
|
||||
AUDIO_ENGINE_FLAGS flags = AudioEngine_Default,
|
||||
_In_opt_ const WAVEFORMATEX* wfx = nullptr,
|
||||
_In_opt_z_ const __wchar_t* deviceId = nullptr,
|
||||
AUDIO_STREAM_CATEGORY category = AudioCategory_GameEffects) noexcept(false);
|
||||
|
||||
bool __cdecl Reset(_In_opt_ const WAVEFORMATEX* wfx = nullptr, _In_opt_z_ const __wchar_t* deviceId = nullptr);
|
||||
#endif
|
||||
|
||||
private:
|
||||
// Private implementation.
|
||||
class Impl;
|
||||
std::unique_ptr<Impl> pImpl;
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
class WaveBank
|
||||
{
|
||||
public:
|
||||
WaveBank(_In_ AudioEngine* engine, _In_z_ const wchar_t* wbFileName);
|
||||
|
||||
WaveBank(WaveBank&&) noexcept;
|
||||
WaveBank& operator= (WaveBank&&) noexcept;
|
||||
|
||||
WaveBank(WaveBank const&) = delete;
|
||||
WaveBank& operator= (WaveBank const&) = delete;
|
||||
|
||||
virtual ~WaveBank();
|
||||
|
||||
void __cdecl Play(unsigned int index);
|
||||
void __cdecl Play(unsigned int index, float volume, float pitch, float pan);
|
||||
|
||||
void __cdecl Play(_In_z_ const char* name);
|
||||
void __cdecl Play(_In_z_ const char* name, float volume, float pitch, float pan);
|
||||
|
||||
std::unique_ptr<SoundEffectInstance> __cdecl CreateInstance(unsigned int index,
|
||||
SOUND_EFFECT_INSTANCE_FLAGS flags = SoundEffectInstance_Default);
|
||||
std::unique_ptr<SoundEffectInstance> __cdecl CreateInstance(_In_z_ const char* name,
|
||||
SOUND_EFFECT_INSTANCE_FLAGS flags = SoundEffectInstance_Default);
|
||||
|
||||
std::unique_ptr<SoundStreamInstance> __cdecl CreateStreamInstance(unsigned int index,
|
||||
SOUND_EFFECT_INSTANCE_FLAGS flags = SoundEffectInstance_Default);
|
||||
std::unique_ptr<SoundStreamInstance> __cdecl CreateStreamInstance(_In_z_ const char* name,
|
||||
SOUND_EFFECT_INSTANCE_FLAGS flags = SoundEffectInstance_Default);
|
||||
|
||||
bool __cdecl IsPrepared() const noexcept;
|
||||
bool __cdecl IsInUse() const noexcept;
|
||||
bool __cdecl IsStreamingBank() const noexcept;
|
||||
bool __cdecl IsAdvancedFormat() const noexcept;
|
||||
|
||||
size_t __cdecl GetSampleSizeInBytes(unsigned int index) const noexcept;
|
||||
// Returns size of wave audio data
|
||||
|
||||
size_t __cdecl GetSampleDuration(unsigned int index) const noexcept;
|
||||
// Returns the duration in samples
|
||||
|
||||
size_t __cdecl GetSampleDurationMS(unsigned int index) const noexcept;
|
||||
// Returns the duration in milliseconds
|
||||
|
||||
const WAVEFORMATEX* __cdecl GetFormat(unsigned int index, _Out_writes_bytes_(maxsize) WAVEFORMATEX* wfx, size_t maxsize) const noexcept;
|
||||
|
||||
int __cdecl Find(_In_z_ const char* name) const;
|
||||
|
||||
#ifdef USING_XAUDIO2_9
|
||||
bool __cdecl FillSubmitBuffer(unsigned int index, _Out_ XAUDIO2_BUFFER& buffer, _Out_ XAUDIO2_BUFFER_WMA& wmaBuffer) const;
|
||||
#else
|
||||
void __cdecl FillSubmitBuffer(unsigned int index, _Out_ XAUDIO2_BUFFER& buffer) const;
|
||||
#endif
|
||||
|
||||
void __cdecl UnregisterInstance(_In_ IVoiceNotify* instance);
|
||||
|
||||
HANDLE __cdecl GetAsyncHandle() const noexcept;
|
||||
|
||||
bool __cdecl GetPrivateData(unsigned int index, _Out_writes_bytes_(datasize) void* data, size_t datasize);
|
||||
|
||||
#if defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED)
|
||||
WaveBank(_In_ AudioEngine* engine, _In_z_ const __wchar_t* wbFileName);
|
||||
#endif
|
||||
|
||||
private:
|
||||
// Private implementation.
|
||||
class Impl;
|
||||
|
||||
std::unique_ptr<Impl> pImpl;
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
class SoundEffect
|
||||
{
|
||||
public:
|
||||
SoundEffect(_In_ AudioEngine* engine, _In_z_ const wchar_t* waveFileName);
|
||||
|
||||
SoundEffect(_In_ AudioEngine* engine, _Inout_ std::unique_ptr<uint8_t[]>& wavData,
|
||||
_In_ const WAVEFORMATEX* wfx, _In_reads_bytes_(audioBytes) const uint8_t* startAudio, size_t audioBytes);
|
||||
|
||||
SoundEffect(_In_ AudioEngine* engine, _Inout_ std::unique_ptr<uint8_t[]>& wavData,
|
||||
_In_ const WAVEFORMATEX* wfx, _In_reads_bytes_(audioBytes) const uint8_t* startAudio, size_t audioBytes,
|
||||
uint32_t loopStart, uint32_t loopLength);
|
||||
|
||||
#ifdef USING_XAUDIO2_9
|
||||
|
||||
SoundEffect(_In_ AudioEngine* engine, _Inout_ std::unique_ptr<uint8_t[]>& wavData,
|
||||
_In_ const WAVEFORMATEX* wfx, _In_reads_bytes_(audioBytes) const uint8_t* startAudio, size_t audioBytes,
|
||||
_In_reads_(seekCount) const uint32_t* seekTable, size_t seekCount);
|
||||
|
||||
#endif
|
||||
|
||||
SoundEffect(SoundEffect&&) noexcept;
|
||||
SoundEffect& operator= (SoundEffect&&) noexcept;
|
||||
|
||||
SoundEffect(SoundEffect const&) = delete;
|
||||
SoundEffect& operator= (SoundEffect const&) = delete;
|
||||
|
||||
virtual ~SoundEffect();
|
||||
|
||||
void __cdecl Play();
|
||||
void __cdecl Play(float volume, float pitch, float pan);
|
||||
|
||||
std::unique_ptr<SoundEffectInstance> __cdecl CreateInstance(SOUND_EFFECT_INSTANCE_FLAGS flags = SoundEffectInstance_Default);
|
||||
|
||||
bool __cdecl IsInUse() const noexcept;
|
||||
|
||||
size_t __cdecl GetSampleSizeInBytes() const noexcept;
|
||||
// Returns size of wave audio data
|
||||
|
||||
size_t __cdecl GetSampleDuration() const noexcept;
|
||||
// Returns the duration in samples
|
||||
|
||||
size_t __cdecl GetSampleDurationMS() const noexcept;
|
||||
// Returns the duration in milliseconds
|
||||
|
||||
const WAVEFORMATEX* __cdecl GetFormat() const noexcept;
|
||||
|
||||
#ifdef USING_XAUDIO2_9
|
||||
bool __cdecl FillSubmitBuffer(_Out_ XAUDIO2_BUFFER& buffer, _Out_ XAUDIO2_BUFFER_WMA& wmaBuffer) const;
|
||||
#else
|
||||
void __cdecl FillSubmitBuffer(_Out_ XAUDIO2_BUFFER& buffer) const;
|
||||
#endif
|
||||
|
||||
void __cdecl UnregisterInstance(_In_ IVoiceNotify* instance);
|
||||
|
||||
#if defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED)
|
||||
SoundEffect(_In_ AudioEngine* engine, _In_z_ const __wchar_t* waveFileName);
|
||||
#endif
|
||||
|
||||
private:
|
||||
// Private implementation.
|
||||
class Impl;
|
||||
|
||||
std::unique_ptr<Impl> pImpl;
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
struct AudioListener : public X3DAUDIO_LISTENER
|
||||
{
|
||||
X3DAUDIO_CONE ListenerCone;
|
||||
|
||||
AudioListener() noexcept :
|
||||
X3DAUDIO_LISTENER{},
|
||||
ListenerCone{}
|
||||
{
|
||||
OrientFront.z = -1.f;
|
||||
|
||||
OrientTop.y = 1.f;
|
||||
}
|
||||
|
||||
void XM_CALLCONV SetPosition(FXMVECTOR v) noexcept
|
||||
{
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&Position), v);
|
||||
}
|
||||
void __cdecl SetPosition(const XMFLOAT3& pos) noexcept
|
||||
{
|
||||
Position.x = pos.x;
|
||||
Position.y = pos.y;
|
||||
Position.z = pos.z;
|
||||
}
|
||||
|
||||
void XM_CALLCONV SetVelocity(FXMVECTOR v) noexcept
|
||||
{
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&Velocity), v);
|
||||
}
|
||||
void __cdecl SetVelocity(const XMFLOAT3& vel) noexcept
|
||||
{
|
||||
Velocity.x = vel.x;
|
||||
Velocity.y = vel.y;
|
||||
Velocity.z = vel.z;
|
||||
}
|
||||
|
||||
void XM_CALLCONV SetOrientation(FXMVECTOR forward, FXMVECTOR up) noexcept
|
||||
{
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientFront), forward);
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientTop), up);
|
||||
}
|
||||
void __cdecl SetOrientation(const XMFLOAT3& forward, const XMFLOAT3& up) noexcept
|
||||
{
|
||||
OrientFront.x = forward.x; OrientTop.x = up.x;
|
||||
OrientFront.y = forward.y; OrientTop.y = up.y;
|
||||
OrientFront.z = forward.z; OrientTop.z = up.z;
|
||||
}
|
||||
|
||||
void XM_CALLCONV SetOrientationFromQuaternion(FXMVECTOR quat) noexcept
|
||||
{
|
||||
const XMVECTOR forward = XMVector3Rotate(g_XMIdentityR2, quat);
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientFront), forward);
|
||||
|
||||
const XMVECTOR up = XMVector3Rotate(g_XMIdentityR1, quat);
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientTop), up);
|
||||
}
|
||||
|
||||
// Updates velocity and orientation by tracking changes in position over time.
|
||||
void XM_CALLCONV Update(FXMVECTOR newPos, XMVECTOR upDir, float dt) noexcept
|
||||
{
|
||||
if (dt > 0.f)
|
||||
{
|
||||
const XMVECTOR lastPos = XMLoadFloat3(reinterpret_cast<const XMFLOAT3*>(&Position));
|
||||
|
||||
XMVECTOR vDelta = XMVectorSubtract(newPos, lastPos);
|
||||
const XMVECTOR vt = XMVectorReplicate(dt);
|
||||
XMVECTOR v = XMVectorDivide(vDelta, vt);
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&Velocity), v);
|
||||
|
||||
vDelta = XMVector3Normalize(vDelta);
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientFront), vDelta);
|
||||
|
||||
v = XMVector3Cross(upDir, vDelta);
|
||||
v = XMVector3Normalize(v);
|
||||
|
||||
v = XMVector3Cross(vDelta, v);
|
||||
v = XMVector3Normalize(v);
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientTop), v);
|
||||
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&Position), newPos);
|
||||
}
|
||||
}
|
||||
|
||||
void __cdecl SetOmnidirectional() noexcept
|
||||
{
|
||||
pCone = nullptr;
|
||||
}
|
||||
|
||||
void __cdecl SetCone(const X3DAUDIO_CONE& listenerCone);
|
||||
|
||||
bool __cdecl IsValid() const;
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
struct AudioEmitter : public X3DAUDIO_EMITTER
|
||||
{
|
||||
X3DAUDIO_CONE EmitterCone;
|
||||
float EmitterAzimuths[XAUDIO2_MAX_AUDIO_CHANNELS];
|
||||
|
||||
AudioEmitter() noexcept :
|
||||
X3DAUDIO_EMITTER{},
|
||||
EmitterCone{},
|
||||
EmitterAzimuths{}
|
||||
{
|
||||
OrientFront.z = -1.f;
|
||||
|
||||
OrientTop.y =
|
||||
ChannelRadius =
|
||||
CurveDistanceScaler =
|
||||
DopplerScaler = 1.f;
|
||||
|
||||
ChannelCount = 1;
|
||||
pChannelAzimuths = EmitterAzimuths;
|
||||
|
||||
InnerRadiusAngle = X3DAUDIO_PI / 4.0f;
|
||||
}
|
||||
|
||||
void XM_CALLCONV SetPosition(FXMVECTOR v) noexcept
|
||||
{
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&Position), v);
|
||||
}
|
||||
void __cdecl SetPosition(const XMFLOAT3& pos) noexcept
|
||||
{
|
||||
Position.x = pos.x;
|
||||
Position.y = pos.y;
|
||||
Position.z = pos.z;
|
||||
}
|
||||
|
||||
void XM_CALLCONV SetVelocity(FXMVECTOR v) noexcept
|
||||
{
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&Velocity), v);
|
||||
}
|
||||
void __cdecl SetVelocity(const XMFLOAT3& vel) noexcept
|
||||
{
|
||||
Velocity.x = vel.x;
|
||||
Velocity.y = vel.y;
|
||||
Velocity.z = vel.z;
|
||||
}
|
||||
|
||||
void XM_CALLCONV SetOrientation(FXMVECTOR forward, FXMVECTOR up) noexcept
|
||||
{
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientFront), forward);
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientTop), up);
|
||||
}
|
||||
void __cdecl SetOrientation(const XMFLOAT3& forward, const XMFLOAT3& up) noexcept
|
||||
{
|
||||
OrientFront.x = forward.x; OrientTop.x = up.x;
|
||||
OrientFront.y = forward.y; OrientTop.y = up.y;
|
||||
OrientFront.z = forward.z; OrientTop.z = up.z;
|
||||
}
|
||||
|
||||
void XM_CALLCONV SetOrientationFromQuaternion(FXMVECTOR quat) noexcept
|
||||
{
|
||||
const XMVECTOR forward = XMVector3Rotate(g_XMIdentityR2, quat);
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientFront), forward);
|
||||
|
||||
const XMVECTOR up = XMVector3Rotate(g_XMIdentityR1, quat);
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientTop), up);
|
||||
}
|
||||
|
||||
// Updates velocity and orientation by tracking changes in position over time.
|
||||
void XM_CALLCONV Update(FXMVECTOR newPos, XMVECTOR upDir, float dt) noexcept
|
||||
{
|
||||
if (dt > 0.f)
|
||||
{
|
||||
const XMVECTOR lastPos = XMLoadFloat3(reinterpret_cast<const XMFLOAT3*>(&Position));
|
||||
|
||||
XMVECTOR vDelta = XMVectorSubtract(newPos, lastPos);
|
||||
const XMVECTOR vt = XMVectorReplicate(dt);
|
||||
XMVECTOR v = XMVectorDivide(vDelta, vt);
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&Velocity), v);
|
||||
|
||||
vDelta = XMVector3Normalize(vDelta);
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientFront), vDelta);
|
||||
|
||||
v = XMVector3Cross(upDir, vDelta);
|
||||
v = XMVector3Normalize(v);
|
||||
|
||||
v = XMVector3Cross(vDelta, v);
|
||||
v = XMVector3Normalize(v);
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientTop), v);
|
||||
|
||||
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&Position), newPos);
|
||||
}
|
||||
}
|
||||
|
||||
void __cdecl SetOmnidirectional() noexcept
|
||||
{
|
||||
pCone = nullptr;
|
||||
}
|
||||
|
||||
// Only used for single-channel emitters.
|
||||
void __cdecl SetCone(const X3DAUDIO_CONE& emitterCone);
|
||||
|
||||
// Set multi-channel emitter azimuths based on speaker configuration geometry.
|
||||
void __cdecl EnableDefaultMultiChannel(unsigned int channels, float radius = 1.f);
|
||||
|
||||
// Set default volume, LFE, LPF, and reverb curves.
|
||||
void __cdecl EnableDefaultCurves() noexcept;
|
||||
void __cdecl EnableLinearCurves() noexcept;
|
||||
|
||||
void __cdecl EnableInverseSquareCurves() noexcept
|
||||
{
|
||||
pVolumeCurve = nullptr;
|
||||
pLFECurve = nullptr;
|
||||
pLPFDirectCurve = nullptr;
|
||||
pLPFReverbCurve = nullptr;
|
||||
pReverbCurve = nullptr;
|
||||
}
|
||||
|
||||
bool __cdecl IsValid() const;
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
class SoundEffectInstance
|
||||
{
|
||||
public:
|
||||
SoundEffectInstance(SoundEffectInstance&&) noexcept;
|
||||
SoundEffectInstance& operator= (SoundEffectInstance&&) noexcept;
|
||||
|
||||
SoundEffectInstance(SoundEffectInstance const&) = delete;
|
||||
SoundEffectInstance& operator= (SoundEffectInstance const&) = delete;
|
||||
|
||||
virtual ~SoundEffectInstance();
|
||||
|
||||
void __cdecl Play(bool loop = false);
|
||||
void __cdecl Stop(bool immediate = true) noexcept;
|
||||
void __cdecl Pause() noexcept;
|
||||
void __cdecl Resume();
|
||||
|
||||
void __cdecl SetVolume(float volume);
|
||||
void __cdecl SetPitch(float pitch);
|
||||
void __cdecl SetPan(float pan);
|
||||
|
||||
void __cdecl Apply3D(const X3DAUDIO_LISTENER& listener, const X3DAUDIO_EMITTER& emitter, bool rhcoords = true);
|
||||
|
||||
bool __cdecl IsLooped() const noexcept;
|
||||
|
||||
SoundState __cdecl GetState() noexcept;
|
||||
|
||||
unsigned int __cdecl GetChannelCount() const noexcept;
|
||||
|
||||
IVoiceNotify* __cdecl GetVoiceNotify() const noexcept;
|
||||
|
||||
private:
|
||||
// Private implementation.
|
||||
class Impl;
|
||||
|
||||
std::unique_ptr<Impl> pImpl;
|
||||
|
||||
// Private constructors
|
||||
SoundEffectInstance(_In_ AudioEngine* engine, _In_ SoundEffect* effect, SOUND_EFFECT_INSTANCE_FLAGS flags);
|
||||
SoundEffectInstance(_In_ AudioEngine* engine, _In_ WaveBank* effect, unsigned int index, SOUND_EFFECT_INSTANCE_FLAGS flags);
|
||||
|
||||
friend std::unique_ptr<SoundEffectInstance> __cdecl SoundEffect::CreateInstance(SOUND_EFFECT_INSTANCE_FLAGS);
|
||||
friend std::unique_ptr<SoundEffectInstance> __cdecl WaveBank::CreateInstance(unsigned int, SOUND_EFFECT_INSTANCE_FLAGS);
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
class SoundStreamInstance
|
||||
{
|
||||
public:
|
||||
SoundStreamInstance(SoundStreamInstance&&) noexcept;
|
||||
SoundStreamInstance& operator= (SoundStreamInstance&&) noexcept;
|
||||
|
||||
SoundStreamInstance(SoundStreamInstance const&) = delete;
|
||||
SoundStreamInstance& operator= (SoundStreamInstance const&) = delete;
|
||||
|
||||
virtual ~SoundStreamInstance();
|
||||
|
||||
void __cdecl Play(bool loop = false);
|
||||
void __cdecl Stop(bool immediate = true) noexcept;
|
||||
void __cdecl Pause() noexcept;
|
||||
void __cdecl Resume();
|
||||
|
||||
void __cdecl SetVolume(float volume);
|
||||
void __cdecl SetPitch(float pitch);
|
||||
void __cdecl SetPan(float pan);
|
||||
|
||||
void __cdecl Apply3D(const X3DAUDIO_LISTENER& listener, const X3DAUDIO_EMITTER& emitter, bool rhcoords = true);
|
||||
|
||||
bool __cdecl IsLooped() const noexcept;
|
||||
|
||||
SoundState __cdecl GetState() noexcept;
|
||||
|
||||
unsigned int __cdecl GetChannelCount() const noexcept;
|
||||
|
||||
IVoiceNotify* __cdecl GetVoiceNotify() const noexcept;
|
||||
|
||||
private:
|
||||
// Private implementation.
|
||||
class Impl;
|
||||
|
||||
std::unique_ptr<Impl> pImpl;
|
||||
|
||||
// Private constructors
|
||||
SoundStreamInstance(_In_ AudioEngine* engine, _In_ WaveBank* effect, unsigned int index, SOUND_EFFECT_INSTANCE_FLAGS flags);
|
||||
|
||||
friend std::unique_ptr<SoundStreamInstance> __cdecl WaveBank::CreateStreamInstance(unsigned int, SOUND_EFFECT_INSTANCE_FLAGS);
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
class DynamicSoundEffectInstance
|
||||
{
|
||||
public:
|
||||
DynamicSoundEffectInstance(_In_ AudioEngine* engine,
|
||||
_In_ std::function<void __cdecl(DynamicSoundEffectInstance*)> bufferNeeded,
|
||||
int sampleRate, int channels, int sampleBits = 16,
|
||||
SOUND_EFFECT_INSTANCE_FLAGS flags = SoundEffectInstance_Default);
|
||||
|
||||
DynamicSoundEffectInstance(DynamicSoundEffectInstance&&) noexcept;
|
||||
DynamicSoundEffectInstance& operator= (DynamicSoundEffectInstance&&) noexcept;
|
||||
|
||||
DynamicSoundEffectInstance(DynamicSoundEffectInstance const&) = delete;
|
||||
DynamicSoundEffectInstance& operator= (DynamicSoundEffectInstance const&) = delete;
|
||||
|
||||
virtual ~DynamicSoundEffectInstance();
|
||||
|
||||
void __cdecl Play();
|
||||
void __cdecl Stop(bool immediate = true) noexcept;
|
||||
void __cdecl Pause() noexcept;
|
||||
void __cdecl Resume();
|
||||
|
||||
void __cdecl SetVolume(float volume);
|
||||
void __cdecl SetPitch(float pitch);
|
||||
void __cdecl SetPan(float pan);
|
||||
|
||||
void __cdecl Apply3D(const X3DAUDIO_LISTENER& listener, const X3DAUDIO_EMITTER& emitter, bool rhcoords = true);
|
||||
|
||||
void __cdecl SubmitBuffer(_In_reads_bytes_(audioBytes) const uint8_t* pAudioData, size_t audioBytes);
|
||||
void __cdecl SubmitBuffer(_In_reads_bytes_(audioBytes) const uint8_t* pAudioData, uint32_t offset, size_t audioBytes);
|
||||
|
||||
SoundState __cdecl GetState() noexcept;
|
||||
|
||||
size_t __cdecl GetSampleDuration(size_t bytes) const noexcept;
|
||||
// Returns duration in samples of a buffer of a given size
|
||||
|
||||
size_t __cdecl GetSampleDurationMS(size_t bytes) const noexcept;
|
||||
// Returns duration in milliseconds of a buffer of a given size
|
||||
|
||||
size_t __cdecl GetSampleSizeInBytes(uint64_t duration) const noexcept;
|
||||
// Returns size of a buffer for a duration given in milliseconds
|
||||
|
||||
int __cdecl GetPendingBufferCount() const noexcept;
|
||||
|
||||
const WAVEFORMATEX* __cdecl GetFormat() const noexcept;
|
||||
|
||||
unsigned int __cdecl GetChannelCount() const noexcept;
|
||||
|
||||
private:
|
||||
// Private implementation.
|
||||
class Impl;
|
||||
|
||||
std::unique_ptr<Impl> pImpl;
|
||||
};
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec"
|
||||
#endif
|
||||
|
||||
DEFINE_ENUM_FLAG_OPERATORS(AUDIO_ENGINE_FLAGS);
|
||||
DEFINE_ENUM_FLAG_OPERATORS(SOUND_EFFECT_INSTANCE_FLAGS);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
164
enginecustom/include/Inc/BufferHelpers.h
Normal file
@@ -0,0 +1,164 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: BufferHelpers.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248929
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#include <d3d11_x.h>
|
||||
#include "GraphicsMemory.h"
|
||||
#else
|
||||
#include <d3d11_1.h>
|
||||
#endif
|
||||
|
||||
#include <wrl\client.h>
|
||||
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
// Helpers for creating initialized Direct3D buffer resources.
|
||||
HRESULT __cdecl CreateStaticBuffer(_In_ ID3D11Device* device,
|
||||
_In_reads_bytes_(count* stride) const void* ptr,
|
||||
size_t count,
|
||||
size_t stride,
|
||||
unsigned int bindFlags,
|
||||
_COM_Outptr_ ID3D11Buffer** pBuffer) noexcept;
|
||||
|
||||
template<typename T>
|
||||
HRESULT CreateStaticBuffer(_In_ ID3D11Device* device,
|
||||
_In_reads_(count) T const* data,
|
||||
size_t count,
|
||||
unsigned int bindFlags,
|
||||
_COM_Outptr_ ID3D11Buffer** pBuffer) noexcept
|
||||
{
|
||||
return CreateStaticBuffer(device, data, count, sizeof(T), bindFlags, pBuffer);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
HRESULT CreateStaticBuffer(_In_ ID3D11Device* device,
|
||||
T const& data,
|
||||
unsigned int bindFlags,
|
||||
_COM_Outptr_ ID3D11Buffer** pBuffer) noexcept
|
||||
{
|
||||
return CreateStaticBuffer(device, data.data(), data.size(), sizeof(typename T::value_type), bindFlags, pBuffer);
|
||||
}
|
||||
|
||||
// Helpers for creating texture from memory arrays.
|
||||
HRESULT __cdecl CreateTextureFromMemory(_In_ ID3D11Device* device,
|
||||
size_t width,
|
||||
DXGI_FORMAT format,
|
||||
const D3D11_SUBRESOURCE_DATA& initData,
|
||||
_COM_Outptr_opt_ ID3D11Texture1D** texture,
|
||||
_COM_Outptr_opt_ ID3D11ShaderResourceView** textureView,
|
||||
unsigned int bindFlags = D3D11_BIND_SHADER_RESOURCE) noexcept;
|
||||
|
||||
HRESULT __cdecl CreateTextureFromMemory(_In_ ID3D11Device* device,
|
||||
size_t width, size_t height,
|
||||
DXGI_FORMAT format,
|
||||
const D3D11_SUBRESOURCE_DATA& initData,
|
||||
_COM_Outptr_opt_ ID3D11Texture2D** texture,
|
||||
_COM_Outptr_opt_ ID3D11ShaderResourceView** textureView,
|
||||
unsigned int bindFlags = D3D11_BIND_SHADER_RESOURCE) noexcept;
|
||||
|
||||
HRESULT __cdecl CreateTextureFromMemory(
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
_In_ ID3D11DeviceX* d3dDeviceX,
|
||||
_In_ ID3D11DeviceContextX* d3dContextX,
|
||||
#else
|
||||
_In_ ID3D11Device* device,
|
||||
_In_ ID3D11DeviceContext* d3dContext,
|
||||
#endif
|
||||
size_t width, size_t height,
|
||||
DXGI_FORMAT format,
|
||||
const D3D11_SUBRESOURCE_DATA& initData,
|
||||
_COM_Outptr_opt_ ID3D11Texture2D** texture,
|
||||
_COM_Outptr_opt_ ID3D11ShaderResourceView** textureView) noexcept;
|
||||
|
||||
HRESULT __cdecl CreateTextureFromMemory(_In_ ID3D11Device* device,
|
||||
size_t width, size_t height, size_t depth,
|
||||
DXGI_FORMAT format,
|
||||
const D3D11_SUBRESOURCE_DATA& initData,
|
||||
_COM_Outptr_opt_ ID3D11Texture3D** texture,
|
||||
_COM_Outptr_opt_ ID3D11ShaderResourceView** textureView,
|
||||
unsigned int bindFlags = D3D11_BIND_SHADER_RESOURCE) noexcept;
|
||||
|
||||
// Strongly typed wrapper around a Direct3D constant buffer.
|
||||
inline namespace DX11
|
||||
{
|
||||
namespace Private
|
||||
{
|
||||
// Base class, not to be used directly: clients should access this via the derived PrimitiveBatch<T>.
|
||||
class ConstantBufferBase
|
||||
{
|
||||
protected:
|
||||
void __cdecl CreateBuffer(_In_ ID3D11Device* device, size_t bytes, _Outptr_ ID3D11Buffer** pBuffer);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
class ConstantBuffer : public DX11::Private::ConstantBufferBase
|
||||
{
|
||||
public:
|
||||
// Constructor.
|
||||
ConstantBuffer() = default;
|
||||
explicit ConstantBuffer(_In_ ID3D11Device* device) noexcept(false)
|
||||
{
|
||||
CreateBuffer(device, sizeof(T), mConstantBuffer.GetAddressOf());
|
||||
}
|
||||
|
||||
ConstantBuffer(ConstantBuffer&&) = default;
|
||||
ConstantBuffer& operator= (ConstantBuffer&&) = default;
|
||||
|
||||
ConstantBuffer(ConstantBuffer const&) = delete;
|
||||
ConstantBuffer& operator= (ConstantBuffer const&) = delete;
|
||||
|
||||
void Create(_In_ ID3D11Device* device)
|
||||
{
|
||||
CreateBuffer(device, sizeof(T), mConstantBuffer.ReleaseAndGetAddressOf());
|
||||
}
|
||||
|
||||
// Writes new data into the constant buffer.
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
void __cdecl SetData(_In_ ID3D11DeviceContext* deviceContext, T const& value, void** grfxMemory)
|
||||
{
|
||||
assert(grfxMemory != nullptr);
|
||||
|
||||
void* ptr = GraphicsMemory::Get().Allocate(deviceContext, sizeof(T), 64);
|
||||
assert(ptr != nullptr);
|
||||
|
||||
*(T*)ptr = value;
|
||||
|
||||
*grfxMemory = ptr;
|
||||
}
|
||||
#else
|
||||
|
||||
void __cdecl SetData(_In_ ID3D11DeviceContext* deviceContext, T const& value) noexcept
|
||||
{
|
||||
assert(mConstantBuffer);
|
||||
|
||||
D3D11_MAPPED_SUBRESOURCE mappedResource;
|
||||
if (SUCCEEDED(deviceContext->Map(mConstantBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource)))
|
||||
{
|
||||
*static_cast<T*>(mappedResource.pData) = value;
|
||||
|
||||
deviceContext->Unmap(mConstantBuffer.Get(), 0);
|
||||
}
|
||||
}
|
||||
#endif // _XBOX_ONE && _TITLE
|
||||
|
||||
// Looks up the underlying D3D constant buffer.
|
||||
ID3D11Buffer* GetBuffer() const noexcept { return mConstantBuffer.Get(); }
|
||||
|
||||
private:
|
||||
Microsoft::WRL::ComPtr<ID3D11Buffer> mConstantBuffer;
|
||||
};
|
||||
}
|
72
enginecustom/include/Inc/CommonStates.h
Normal file
@@ -0,0 +1,72 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: CommonStates.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248929
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#include <d3d11_x.h>
|
||||
#else
|
||||
#include <d3d11_1.h>
|
||||
#endif
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
inline namespace DX11
|
||||
{
|
||||
class CommonStates
|
||||
{
|
||||
public:
|
||||
explicit CommonStates(_In_ ID3D11Device* device);
|
||||
|
||||
CommonStates(CommonStates&&) noexcept;
|
||||
CommonStates& operator= (CommonStates&&) noexcept;
|
||||
|
||||
CommonStates(CommonStates const&) = delete;
|
||||
CommonStates& operator= (CommonStates const&) = delete;
|
||||
|
||||
virtual ~CommonStates();
|
||||
|
||||
// Blend states.
|
||||
ID3D11BlendState* __cdecl Opaque() const;
|
||||
ID3D11BlendState* __cdecl AlphaBlend() const;
|
||||
ID3D11BlendState* __cdecl Additive() const;
|
||||
ID3D11BlendState* __cdecl NonPremultiplied() const;
|
||||
|
||||
// Depth stencil states.
|
||||
ID3D11DepthStencilState* __cdecl DepthNone() const;
|
||||
ID3D11DepthStencilState* __cdecl DepthDefault() const;
|
||||
ID3D11DepthStencilState* __cdecl DepthRead() const;
|
||||
ID3D11DepthStencilState* __cdecl DepthReverseZ() const;
|
||||
ID3D11DepthStencilState* __cdecl DepthReadReverseZ() const;
|
||||
|
||||
// Rasterizer states.
|
||||
ID3D11RasterizerState* __cdecl CullNone() const;
|
||||
ID3D11RasterizerState* __cdecl CullClockwise() const;
|
||||
ID3D11RasterizerState* __cdecl CullCounterClockwise() const;
|
||||
ID3D11RasterizerState* __cdecl Wireframe() const;
|
||||
|
||||
// Sampler states.
|
||||
ID3D11SamplerState* __cdecl PointWrap() const;
|
||||
ID3D11SamplerState* __cdecl PointClamp() const;
|
||||
ID3D11SamplerState* __cdecl LinearWrap() const;
|
||||
ID3D11SamplerState* __cdecl LinearClamp() const;
|
||||
ID3D11SamplerState* __cdecl AnisotropicWrap() const;
|
||||
ID3D11SamplerState* __cdecl AnisotropicClamp() const;
|
||||
|
||||
private:
|
||||
// Private implementation.
|
||||
class Impl;
|
||||
|
||||
std::shared_ptr<Impl> pImpl;
|
||||
};
|
||||
}
|
||||
}
|
182
enginecustom/include/Inc/DDSTextureLoader.h
Normal file
@@ -0,0 +1,182 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: DDSTextureLoader.h
|
||||
//
|
||||
// Functions for loading a DDS texture and creating a Direct3D runtime resource for it
|
||||
//
|
||||
// Note these functions are useful as a light-weight runtime loader for DDS files. For
|
||||
// a full-featured DDS file reader, writer, and texture processing pipeline see
|
||||
// the 'Texconv' sample and the 'DirectXTex' library.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248926
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248929
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#include <d3d11_x.h>
|
||||
#else
|
||||
#include <d3d11_1.h>
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
#ifndef DDS_ALPHA_MODE_DEFINED
|
||||
#define DDS_ALPHA_MODE_DEFINED
|
||||
enum DDS_ALPHA_MODE : uint32_t
|
||||
{
|
||||
DDS_ALPHA_MODE_UNKNOWN = 0,
|
||||
DDS_ALPHA_MODE_STRAIGHT = 1,
|
||||
DDS_ALPHA_MODE_PREMULTIPLIED = 2,
|
||||
DDS_ALPHA_MODE_OPAQUE = 3,
|
||||
DDS_ALPHA_MODE_CUSTOM = 4,
|
||||
};
|
||||
#endif
|
||||
|
||||
inline namespace DX11
|
||||
{
|
||||
enum DDS_LOADER_FLAGS : uint32_t
|
||||
{
|
||||
DDS_LOADER_DEFAULT = 0,
|
||||
DDS_LOADER_FORCE_SRGB = 0x1,
|
||||
DDS_LOADER_IGNORE_SRGB = 0x2,
|
||||
};
|
||||
}
|
||||
|
||||
// Standard version
|
||||
HRESULT __cdecl CreateDDSTextureFromMemory(
|
||||
_In_ ID3D11Device* d3dDevice,
|
||||
_In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,
|
||||
_In_ size_t ddsDataSize,
|
||||
_Outptr_opt_ ID3D11Resource** texture,
|
||||
_Outptr_opt_ ID3D11ShaderResourceView** textureView,
|
||||
_In_ size_t maxsize = 0,
|
||||
_Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr) noexcept;
|
||||
|
||||
HRESULT __cdecl CreateDDSTextureFromFile(
|
||||
_In_ ID3D11Device* d3dDevice,
|
||||
_In_z_ const wchar_t* szFileName,
|
||||
_Outptr_opt_ ID3D11Resource** texture,
|
||||
_Outptr_opt_ ID3D11ShaderResourceView** textureView,
|
||||
_In_ size_t maxsize = 0,
|
||||
_Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr) noexcept;
|
||||
|
||||
// Standard version with optional auto-gen mipmap support
|
||||
HRESULT __cdecl CreateDDSTextureFromMemory(
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
_In_ ID3D11DeviceX* d3dDevice,
|
||||
_In_opt_ ID3D11DeviceContextX* d3dContext,
|
||||
#else
|
||||
_In_ ID3D11Device* d3dDevice,
|
||||
_In_opt_ ID3D11DeviceContext* d3dContext,
|
||||
#endif
|
||||
_In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,
|
||||
_In_ size_t ddsDataSize,
|
||||
_Outptr_opt_ ID3D11Resource** texture,
|
||||
_Outptr_opt_ ID3D11ShaderResourceView** textureView,
|
||||
_In_ size_t maxsize = 0,
|
||||
_Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr) noexcept;
|
||||
|
||||
HRESULT __cdecl CreateDDSTextureFromFile(
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
_In_ ID3D11DeviceX* d3dDevice,
|
||||
_In_opt_ ID3D11DeviceContextX* d3dContext,
|
||||
#else
|
||||
_In_ ID3D11Device* d3dDevice,
|
||||
_In_opt_ ID3D11DeviceContext* d3dContext,
|
||||
#endif
|
||||
_In_z_ const wchar_t* szFileName,
|
||||
_Outptr_opt_ ID3D11Resource** texture,
|
||||
_Outptr_opt_ ID3D11ShaderResourceView** textureView,
|
||||
_In_ size_t maxsize = 0,
|
||||
_Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr) noexcept;
|
||||
|
||||
// Extended version
|
||||
HRESULT __cdecl CreateDDSTextureFromMemoryEx(
|
||||
_In_ ID3D11Device* d3dDevice,
|
||||
_In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,
|
||||
_In_ size_t ddsDataSize,
|
||||
_In_ size_t maxsize,
|
||||
_In_ D3D11_USAGE usage,
|
||||
_In_ unsigned int bindFlags,
|
||||
_In_ unsigned int cpuAccessFlags,
|
||||
_In_ unsigned int miscFlags,
|
||||
_In_ DDS_LOADER_FLAGS loadFlags,
|
||||
_Outptr_opt_ ID3D11Resource** texture,
|
||||
_Outptr_opt_ ID3D11ShaderResourceView** textureView,
|
||||
_Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr) noexcept;
|
||||
|
||||
HRESULT __cdecl CreateDDSTextureFromFileEx(
|
||||
_In_ ID3D11Device* d3dDevice,
|
||||
_In_z_ const wchar_t* szFileName,
|
||||
_In_ size_t maxsize,
|
||||
_In_ D3D11_USAGE usage,
|
||||
_In_ unsigned int bindFlags,
|
||||
_In_ unsigned int cpuAccessFlags,
|
||||
_In_ unsigned int miscFlags,
|
||||
_In_ DDS_LOADER_FLAGS loadFlags,
|
||||
_Outptr_opt_ ID3D11Resource** texture,
|
||||
_Outptr_opt_ ID3D11ShaderResourceView** textureView,
|
||||
_Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr) noexcept;
|
||||
|
||||
// Extended version with optional auto-gen mipmap support
|
||||
HRESULT __cdecl CreateDDSTextureFromMemoryEx(
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
_In_ ID3D11DeviceX* d3dDevice,
|
||||
_In_opt_ ID3D11DeviceContextX* d3dContext,
|
||||
#else
|
||||
_In_ ID3D11Device* d3dDevice,
|
||||
_In_opt_ ID3D11DeviceContext* d3dContext,
|
||||
#endif
|
||||
_In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,
|
||||
_In_ size_t ddsDataSize,
|
||||
_In_ size_t maxsize,
|
||||
_In_ D3D11_USAGE usage,
|
||||
_In_ unsigned int bindFlags,
|
||||
_In_ unsigned int cpuAccessFlags,
|
||||
_In_ unsigned int miscFlags,
|
||||
_In_ DDS_LOADER_FLAGS loadFlags,
|
||||
_Outptr_opt_ ID3D11Resource** texture,
|
||||
_Outptr_opt_ ID3D11ShaderResourceView** textureView,
|
||||
_Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr) noexcept;
|
||||
|
||||
HRESULT __cdecl CreateDDSTextureFromFileEx(
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
_In_ ID3D11DeviceX* d3dDevice,
|
||||
_In_opt_ ID3D11DeviceContextX* d3dContext,
|
||||
#else
|
||||
_In_ ID3D11Device* d3dDevice,
|
||||
_In_opt_ ID3D11DeviceContext* d3dContext,
|
||||
#endif
|
||||
_In_z_ const wchar_t* szFileName,
|
||||
_In_ size_t maxsize,
|
||||
_In_ D3D11_USAGE usage,
|
||||
_In_ unsigned int bindFlags,
|
||||
_In_ unsigned int cpuAccessFlags,
|
||||
_In_ unsigned int miscFlags,
|
||||
_In_ DDS_LOADER_FLAGS loadFlags,
|
||||
_Outptr_opt_ ID3D11Resource** texture,
|
||||
_Outptr_opt_ ID3D11ShaderResourceView** textureView,
|
||||
_Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr) noexcept;
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec"
|
||||
#endif
|
||||
|
||||
inline namespace DX11
|
||||
{
|
||||
DEFINE_ENUM_FLAG_OPERATORS(DDS_LOADER_FLAGS);
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
232
enginecustom/include/Inc/DirectXHelpers.h
Normal file
@@ -0,0 +1,232 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: DirectXHelpers.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248929
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#include <d3d11_x.h>
|
||||
#else
|
||||
#include <d3d11_1.h>
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
#if !defined(_XBOX_ONE) || !defined(_TITLE)
|
||||
#pragma comment(lib,"dxguid.lib")
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef IID_GRAPHICS_PPV_ARGS
|
||||
#define IID_GRAPHICS_PPV_ARGS(x) IID_PPV_ARGS(x)
|
||||
#endif
|
||||
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <exception>
|
||||
|
||||
//
|
||||
// The core Direct3D headers provide the following helper C++ classes
|
||||
// CD3D11_RECT
|
||||
// CD3D11_BOX
|
||||
// CD3D11_DEPTH_STENCIL_DESC
|
||||
// CD3D11_BLEND_DESC, CD3D11_BLEND_DESC1
|
||||
// CD3D11_RASTERIZER_DESC, CD3D11_RASTERIZER_DESC1
|
||||
// CD3D11_BUFFER_DESC
|
||||
// CD3D11_TEXTURE1D_DESC
|
||||
// CD3D11_TEXTURE2D_DESC
|
||||
// CD3D11_TEXTURE3D_DESC
|
||||
// CD3D11_SHADER_RESOURCE_VIEW_DESC
|
||||
// CD3D11_RENDER_TARGET_VIEW_DESC
|
||||
// CD3D11_VIEWPORT
|
||||
// CD3D11_DEPTH_STENCIL_VIEW_DESC
|
||||
// CD3D11_UNORDERED_ACCESS_VIEW_DESC
|
||||
// CD3D11_SAMPLER_DESC
|
||||
// CD3D11_QUERY_DESC
|
||||
// CD3D11_COUNTER_DESC
|
||||
//
|
||||
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
inline namespace DX11
|
||||
{
|
||||
class IEffect;
|
||||
}
|
||||
|
||||
// simliar to std::lock_guard for exception-safe Direct3D resource locking
|
||||
class MapGuard : public D3D11_MAPPED_SUBRESOURCE
|
||||
{
|
||||
public:
|
||||
MapGuard(_In_ ID3D11DeviceContext* context,
|
||||
_In_ ID3D11Resource *resource,
|
||||
_In_ unsigned int subresource,
|
||||
_In_ D3D11_MAP mapType,
|
||||
_In_ unsigned int mapFlags) noexcept(false)
|
||||
: mContext(context), mResource(resource), mSubresource(subresource)
|
||||
{
|
||||
HRESULT hr = mContext->Map(resource, subresource, mapType, mapFlags, this);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
throw std::exception();
|
||||
}
|
||||
}
|
||||
|
||||
MapGuard(MapGuard&&) = delete;
|
||||
MapGuard& operator= (MapGuard&&) = delete;
|
||||
|
||||
MapGuard(MapGuard const&) = delete;
|
||||
MapGuard& operator= (MapGuard const&) = delete;
|
||||
|
||||
~MapGuard()
|
||||
{
|
||||
mContext->Unmap(mResource, mSubresource);
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunknown-warning-option"
|
||||
#pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
|
||||
#endif
|
||||
|
||||
uint8_t* get() const noexcept
|
||||
{
|
||||
return static_cast<uint8_t*>(pData);
|
||||
}
|
||||
uint8_t* get(size_t slice) const noexcept
|
||||
{
|
||||
return static_cast<uint8_t*>(pData) + (slice * DepthPitch);
|
||||
}
|
||||
|
||||
uint8_t* scanline(size_t row) const noexcept
|
||||
{
|
||||
return static_cast<uint8_t*>(pData) + (row * RowPitch);
|
||||
}
|
||||
uint8_t* scanline(size_t slice, size_t row) const noexcept
|
||||
{
|
||||
return static_cast<uint8_t*>(pData) + (slice * DepthPitch) + (row * RowPitch);
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
void copy(_In_reads_(count) T const* data, size_t count) noexcept
|
||||
{
|
||||
memcpy(pData, data, count * sizeof(T));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void copy(T const& data) noexcept
|
||||
{
|
||||
memcpy(pData, data.data(), data.size() * sizeof(typename T::value_type));
|
||||
}
|
||||
|
||||
private:
|
||||
ID3D11DeviceContext* mContext;
|
||||
ID3D11Resource* mResource;
|
||||
unsigned int mSubresource;
|
||||
};
|
||||
|
||||
|
||||
// Helper sets a D3D resource name string (used by PIX and debug layer leak reporting).
|
||||
#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
template<UINT TNameLength>
|
||||
inline void SetDebugObjectName(_In_ ID3D11DeviceChild* resource, _In_z_ const char(&name)[TNameLength]) noexcept
|
||||
{
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
wchar_t wname[MAX_PATH];
|
||||
int result = MultiByteToWideChar(CP_UTF8, 0, name, TNameLength, wname, MAX_PATH);
|
||||
if (result > 0)
|
||||
{
|
||||
resource->SetName(wname);
|
||||
}
|
||||
#else
|
||||
resource->SetPrivateData(WKPDID_D3DDebugObjectName, TNameLength - 1, name);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
template<UINT TNameLength>
|
||||
inline void SetDebugObjectName(_In_ ID3D11DeviceChild*, _In_z_ const char(&)[TNameLength]) noexcept
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
template<UINT TNameLength>
|
||||
inline void SetDebugObjectName(_In_ ID3D11DeviceChild* resource, _In_z_ const wchar_t(&name)[TNameLength])
|
||||
{
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
resource->SetName(name);
|
||||
#else
|
||||
char aname[MAX_PATH];
|
||||
int result = WideCharToMultiByte(CP_UTF8, 0, name, TNameLength, aname, MAX_PATH, nullptr, nullptr);
|
||||
if (result > 0)
|
||||
{
|
||||
resource->SetPrivateData(WKPDID_D3DDebugObjectName, TNameLength - 1, aname);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
template<UINT TNameLength>
|
||||
inline void SetDebugObjectName(_In_ ID3D11DeviceChild*, _In_z_ const wchar_t(&)[TNameLength])
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
inline namespace DX11
|
||||
{
|
||||
// Helper to check for power-of-2
|
||||
template<typename T>
|
||||
constexpr bool IsPowerOf2(T x) noexcept { return ((x != 0) && !(x & (x - 1))); }
|
||||
|
||||
// Helpers for aligning values by a power of 2
|
||||
template<typename T>
|
||||
inline T AlignDown(T size, size_t alignment) noexcept
|
||||
{
|
||||
if (alignment > 0)
|
||||
{
|
||||
assert(((alignment - 1) & alignment) == 0);
|
||||
auto mask = static_cast<T>(alignment - 1);
|
||||
return size & ~mask;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline T AlignUp(T size, size_t alignment) noexcept
|
||||
{
|
||||
if (alignment > 0)
|
||||
{
|
||||
assert(((alignment - 1) & alignment) == 0);
|
||||
auto mask = static_cast<T>(alignment - 1);
|
||||
return (size + mask) & ~mask;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
}
|
||||
|
||||
// Helper for creating a Direct3D input layout to match a shader from an IEffect
|
||||
HRESULT __cdecl CreateInputLayoutFromEffect(_In_ ID3D11Device* device,
|
||||
_In_ IEffect* effect,
|
||||
_In_reads_(count) const D3D11_INPUT_ELEMENT_DESC* desc,
|
||||
size_t count,
|
||||
_COM_Outptr_ ID3D11InputLayout** pInputLayout) noexcept;
|
||||
|
||||
template<typename T>
|
||||
HRESULT CreateInputLayoutFromEffect(_In_ ID3D11Device* device,
|
||||
_In_ IEffect* effect,
|
||||
_COM_Outptr_ ID3D11InputLayout** pInputLayout) noexcept
|
||||
{
|
||||
return CreateInputLayoutFromEffect(device, effect, T::InputElements, T::InputElementCount, pInputLayout);
|
||||
}
|
||||
}
|