Compare commits
92 Commits
Cel-Shad-V
...
main
Author | SHA1 | Date | |
---|---|---|---|
ae3fc21ffc | |||
315d259acd | |||
2a1b474df0 | |||
d364517633 | |||
ce51c11b31 | |||
0e11ead55b | |||
1af71960c3 | |||
f20adee22f | |||
eb2cd17ec3 | |||
dbd27d1fe7 | |||
d6b7626446 | |||
f9d4523f09 | |||
24203060be | |||
8b77b189a8 | |||
e5ee8fdad3 | |||
3a2d19dff4 | |||
dbc7003569 | |||
c5bfa2e621 | |||
32b71ac97f | |||
5c3c6d944c | |||
8d32f51e8c | |||
644fc57762 | |||
f8bfb62e98 | |||
94fd900ce8 | |||
2744c809d3 | |||
b80f66fec3 | |||
8bcd3eed48 | |||
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 |
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
|
4
.gitignore
vendored
@ -9,10 +9,6 @@
|
|||||||
*.slo
|
*.slo
|
||||||
*.lo
|
*.lo
|
||||||
*.o
|
*.o
|
||||||
*.obj
|
|
||||||
|
|
||||||
# Don't ignore 3d model in OBJ
|
|
||||||
!enginecustom/assets/Model/OBJ/*.obj
|
|
||||||
|
|
||||||
# Precompiled Headers
|
# Precompiled Headers
|
||||||
*.gch
|
*.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/application_class.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>
|
7
.idea/.idea.KhaoticEngineReborn/.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="LanguageDetectionInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||||
|
<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>
|
285
.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml
generated
Normal file
@ -0,0 +1,285 @@
|
|||||||
|
<?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="">
|
||||||
|
<change beforePath="$PROJECT_DIR$/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/enginecustom/enginecustom.vcxproj" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/enginecustom.vcxproj" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/enginecustom/imgui.ini" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/imgui.ini" afterDir="false" />
|
||||||
|
</list>
|
||||||
|
<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="cidr-memory-view://4" root0="FORCE_HIGHLIGHTING" />
|
||||||
|
<setting file="file://C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um/d3d11.h" root0="SKIP_HIGHLIGHTING" />
|
||||||
|
<setting file="file://C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um/dinput.h" root0="SKIP_HIGHLIGHTING" />
|
||||||
|
<setting file="file://$PROJECT_DIR$/enginecustom/include/Inc/VertexTypes.h" root0="SKIP_HIGHLIGHTING" />
|
||||||
|
<setting file="file://$PROJECT_DIR$/enginecustom/include/Vulkan/Include/vulkan/vulkan_core.h" root0="SKIP_HIGHLIGHTING" />
|
||||||
|
<setting file="file://$PROJECT_DIR$/../../IDE_VS/VC/Tools/MSVC/14.38.33130/include/type_traits" root0="SKIP_HIGHLIGHTING" />
|
||||||
|
</component>
|
||||||
|
<component name="KubernetesApiPersistence">{}</component>
|
||||||
|
<component name="KubernetesApiProvider">{
|
||||||
|
"isMigrated": true
|
||||||
|
}</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="ProjectLevelVcsManager">
|
||||||
|
<ConfirmationsSetting value="2" id="Add" />
|
||||||
|
</component>
|
||||||
|
<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.KhaoticDemo.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.pluginManager",
|
||||||
|
"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" />
|
||||||
|
<workItem from="1746546014271" duration="1814000" />
|
||||||
|
<workItem from="1746619988287" duration="12282000" />
|
||||||
|
<workItem from="1746711806997" duration="6736000" />
|
||||||
|
<workItem from="1746719840054" duration="991000" />
|
||||||
|
<workItem from="1746795732153" duration="33000" />
|
||||||
|
<workItem from="1746795828588" duration="592000" />
|
||||||
|
<workItem from="1747049871967" duration="9350000" />
|
||||||
|
<workItem from="1747136509645" duration="3939000" />
|
||||||
|
<workItem from="1747258663152" duration="835000" />
|
||||||
|
<workItem from="1747826758888" duration="3587000" />
|
||||||
|
<workItem from="1747830379222" duration="7954000" />
|
||||||
|
<workItem from="1748254142068" duration="10499000" />
|
||||||
|
<workItem from="1748267553700" duration="654000" />
|
||||||
|
<workItem from="1748429087202" duration="7421000" />
|
||||||
|
<workItem from="1748521606678" duration="5300000" />
|
||||||
|
<workItem from="1748859894056" duration="1431000" />
|
||||||
|
<workItem from="1748861785837" duration="357000" />
|
||||||
|
<workItem from="1748865625274" duration="797000" />
|
||||||
|
<workItem from="1748869642637" duration="3049000" />
|
||||||
|
<workItem from="1748954607174" duration="14202000" />
|
||||||
|
<workItem from="1748969487337" duration="402000" />
|
||||||
|
</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>
|
@ -1,140 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<VCProjectVersion>17.0</VCProjectVersion>
|
|
||||||
<Keyword>Win32Proj</Keyword>
|
|
||||||
<ProjectGuid>{9e5ef415-5337-4eed-ae23-edc4b1fff455}</ProjectGuid>
|
|
||||||
<RootNamespace>KhaoticDemo</RootNamespace>
|
|
||||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="Shared">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\enginecustom\enginecustom.vcxproj">
|
|
||||||
<Project>{92cf56c4-76bb-40d4-8fe5-36c15f5f127a}</Project>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="main.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
@ -1,22 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="Fichiers sources">
|
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
|
||||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Fichiers d%27en-tête">
|
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
|
||||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Fichiers de ressources">
|
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="main.cpp">
|
|
||||||
<Filter>Fichiers sources</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
@ -1,4 +0,0 @@
|
|||||||
int main()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,72 +0,0 @@
|
|||||||
/////////////
|
|
||||||
// GLOBALS //
|
|
||||||
/////////////
|
|
||||||
SamplerState SampleType : register(s0);
|
|
||||||
|
|
||||||
Texture2D reflectionTexture : register(t0);
|
|
||||||
Texture2D refractionTexture : register(t1);
|
|
||||||
Texture2D normalTexture : register(t2);
|
|
||||||
|
|
||||||
cbuffer WaterBuffer
|
|
||||||
{
|
|
||||||
float waterTranslation;
|
|
||||||
float reflectRefractScale;
|
|
||||||
float2 padding;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
//////////////
|
|
||||||
// TYPEDEFS //
|
|
||||||
//////////////
|
|
||||||
struct PixelInputType
|
|
||||||
{
|
|
||||||
float4 position : SV_POSITION;
|
|
||||||
float2 tex : TEXCOORD0;
|
|
||||||
float4 reflectionPosition : TEXCOORD1;
|
|
||||||
float4 refractionPosition : TEXCOORD2;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Pixel Shader
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
float4 WaterPixelShader(PixelInputType input) : SV_TARGET
|
|
||||||
{
|
|
||||||
float2 reflectTexCoord;
|
|
||||||
float2 refractTexCoord;
|
|
||||||
float4 normalMap;
|
|
||||||
float3 normal;
|
|
||||||
float4 reflectionColor;
|
|
||||||
float4 refractionColor;
|
|
||||||
float4 color;
|
|
||||||
|
|
||||||
// Move the position the water normal is sampled from to simulate moving water.
|
|
||||||
input.tex.y += waterTranslation;
|
|
||||||
|
|
||||||
// Calculate the projected reflection texture coordinates.
|
|
||||||
reflectTexCoord.x = input.reflectionPosition.x / input.reflectionPosition.w / 2.0f + 0.5f;
|
|
||||||
reflectTexCoord.y = -input.reflectionPosition.y / input.reflectionPosition.w / 2.0f + 0.5f;
|
|
||||||
|
|
||||||
// Calculate the projected refraction texture coordinates.
|
|
||||||
refractTexCoord.x = input.refractionPosition.x / input.refractionPosition.w / 2.0f + 0.5f;
|
|
||||||
refractTexCoord.y = -input.refractionPosition.y / input.refractionPosition.w / 2.0f + 0.5f;
|
|
||||||
|
|
||||||
// Sample the normal from the normal map texture.
|
|
||||||
normalMap = normalTexture.Sample(SampleType, input.tex);
|
|
||||||
|
|
||||||
// Expand the range of the normal from (0,1) to (-1,+1).
|
|
||||||
normal = (normalMap.xyz * 2.0f) - 1.0f;
|
|
||||||
|
|
||||||
// Re-position the texture coordinate sampling position by the normal map value to simulate the rippling wave effect.
|
|
||||||
reflectTexCoord = reflectTexCoord + (normal.xy * reflectRefractScale);
|
|
||||||
refractTexCoord = refractTexCoord + (normal.xy * reflectRefractScale);
|
|
||||||
|
|
||||||
// Sample the texture pixels from the textures using the updated texture coordinates.
|
|
||||||
reflectionColor = reflectionTexture.Sample(SampleType, reflectTexCoord);
|
|
||||||
refractionColor = refractionTexture.Sample(SampleType, refractTexCoord);
|
|
||||||
|
|
||||||
// Combine the reflection and refraction results for the final color.
|
|
||||||
color = lerp(reflectionColor, refractionColor, 0.6f);
|
|
||||||
|
|
||||||
return color;
|
|
||||||
}
|
|
@ -3,9 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.9.34607.119
|
VisualStudioVersion = 17.9.34607.119
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "enginecustom", "enginecustom\enginecustom.vcxproj", "{92CF56C4-76BB-40D4-8FE5-36C15F5F127A}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KhaoticCore", "enginecustom\enginecustom.vcxproj", "{92CF56C4-76BB-40D4-8FE5-36C15F5F127A}"
|
||||||
EndProject
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KhaoticDemo", "KhaoticDemo\KhaoticDemo.vcxproj", "{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}"
|
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@ -23,14 +21,6 @@ Global
|
|||||||
{92CF56C4-76BB-40D4-8FE5-36C15F5F127A}.Release|x64.Build.0 = Release|x64
|
{92CF56C4-76BB-40D4-8FE5-36C15F5F127A}.Release|x64.Build.0 = Release|x64
|
||||||
{92CF56C4-76BB-40D4-8FE5-36C15F5F127A}.Release|x86.ActiveCfg = Release|Win32
|
{92CF56C4-76BB-40D4-8FE5-36C15F5F127A}.Release|x86.ActiveCfg = Release|Win32
|
||||||
{92CF56C4-76BB-40D4-8FE5-36C15F5F127A}.Release|x86.Build.0 = Release|Win32
|
{92CF56C4-76BB-40D4-8FE5-36C15F5F127A}.Release|x86.Build.0 = Release|Win32
|
||||||
{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}.Debug|x86.ActiveCfg = Debug|Win32
|
|
||||||
{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}.Debug|x86.Build.0 = Debug|Win32
|
|
||||||
{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}.Release|x64.Build.0 = Release|x64
|
|
||||||
{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}.Release|x86.ActiveCfg = Release|Win32
|
|
||||||
{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}.Release|x86.Build.0 = Release|Win32
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
33
README.md
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
Khaotic Engine Reborn reprend comme base le moteur Khaotic Engine pour lui ajouter plus de fonctionalité.
|
Khaotic Engine Reborn reprend comme base le moteur Khaotic Engine pour lui ajouter plus de fonctionalité.
|
||||||
|
|
||||||
Ce moteur est basé sur **DirectX11** utilise **ImGui** avec une couche d'abstraction pour permetre son usage avec d'autres API.
|
Ce moteur est basé sur **DirectX11** et utilise **ImGui** pour son interface graphique.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Khaotic Engine is a rendering engine made in **C++** by a small team with the aim of learning how to use rendering APIs (OpenGL, DirectX 11/12 and Vulkan).
|
Khaotic Engine is a rendering engine made in **C++** by a small team with the aim of learning how to use rendering APIs (OpenGL, DirectX 11/12 and Vulkan).
|
||||||
|
|
||||||
This **DirectX11** based engine uses **ImGui** with an abstraction layer to enable its use with other APIs.
|
This **DirectX11** based engine uses **ImGui** for the user interface.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@ -35,15 +35,36 @@ This **DirectX11** based engine uses **ImGui** with an abstraction layer to enab
|
|||||||
|
|
||||||
**SHADER** :
|
**SHADER** :
|
||||||
|
|
||||||
- Cel Shading
|
+ Sunlight shader
|
||||||
|
+ Cel Shading
|
||||||
|
+ Skysphere
|
||||||
|
|
||||||
**Interface Graphique** :
|
**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 :
|
## Demo :
|
||||||
|
|
||||||
[](https://www.youtube.com/watch?v=qCOCTyB_97c)
|
[](https://youtu.be/CbK1a0Ar94Q)
|
||||||
|
|
||||||
## Engine Build by :
|
## Engine Build by :
|
||||||
|
|
||||||
@ -56,7 +77,7 @@ This **DirectX11** based engine uses **ImGui** with an abstraction layer to enab
|
|||||||
- [@Harpie94](https://github.com/Harpie94)
|
- [@Harpie94](https://github.com/Harpie94)
|
||||||
- [@axelpicou](https://github.com/axelpicou)
|
- [@axelpicou](https://github.com/axelpicou)
|
||||||
- [@GolfOcean334](https://github.com/GolfOcean334)
|
- [@GolfOcean334](https://github.com/GolfOcean334)
|
||||||
- [@sutabasuto](https://github.com/sutabasuto)
|
- [@sutabasuto](https://github.com/sutabasuto)
|
||||||
|
|
||||||
|
|
||||||
**Moteur Reborn** :
|
**Moteur Reborn** :
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Filename: cameraclass.h
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
#ifndef _CAMERACLASS_H_
|
|
||||||
#define _CAMERACLASS_H_
|
|
||||||
|
|
||||||
|
|
||||||
//////////////
|
|
||||||
// INCLUDES //
|
|
||||||
//////////////
|
|
||||||
#include <directxmath.h>
|
|
||||||
using namespace DirectX;
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Class name: CameraClass
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
class CameraClass
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
CameraClass();
|
|
||||||
CameraClass(const CameraClass&);
|
|
||||||
~CameraClass();
|
|
||||||
|
|
||||||
void SetPosition(float, float, float);
|
|
||||||
void SetRotation(float, float, float);
|
|
||||||
|
|
||||||
XMFLOAT3 GetPosition();
|
|
||||||
XMFLOAT3 GetRotation();
|
|
||||||
|
|
||||||
|
|
||||||
void Render();
|
|
||||||
XMMATRIX GetViewMatrix(XMMATRIX& viewMatrix) const;
|
|
||||||
|
|
||||||
void RenderReflection(float);
|
|
||||||
void GetReflectionViewMatrix(XMMATRIX&) const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
float m_positionX, m_positionY, m_positionZ;
|
|
||||||
float m_rotationX, m_rotationY, m_rotationZ;
|
|
||||||
XMMATRIX m_viewMatrix;
|
|
||||||
XMMATRIX m_reflectionViewMatrix;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,410 +0,0 @@
|
|||||||
#include "CelShadingShader.h"
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
CelShadingShader::CelShadingShader()
|
|
||||||
{
|
|
||||||
m_vertexShader = 0;
|
|
||||||
m_pixelShader = 0;
|
|
||||||
m_layout = 0;
|
|
||||||
m_matrixBuffer = 0;
|
|
||||||
m_sampleState = 0;
|
|
||||||
m_lightBuffer = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
CelShadingShader::CelShadingShader(const CelShadingShader& other)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
CelShadingShader::~CelShadingShader()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CelShadingShader::Initialize(ID3D11Device* device, HWND hwnd)
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Initializing CelShadingShader", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
|
||||||
|
|
||||||
bool result;
|
|
||||||
wchar_t vsFilename[128];
|
|
||||||
wchar_t psFilename[128];
|
|
||||||
int error;
|
|
||||||
|
|
||||||
// Set the filename of the vertex shader.
|
|
||||||
error = wcscpy_s(vsFilename, 128, L"celshading.vs");
|
|
||||||
if (error != 0)
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to set the filename of the vertex shader", __FILE__, __LINE__);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the filename of the pixel shader.
|
|
||||||
error = wcscpy_s(psFilename, 128, L"celshading.ps");
|
|
||||||
if (error != 0)
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to set the filename of the pixel shader", __FILE__, __LINE__);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize the vertex and pixel shaders.
|
|
||||||
result = InitializeShader(device, hwnd, vsFilename, psFilename);
|
|
||||||
if (!result)
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to initialize the vertex and pixel shaders", __FILE__, __LINE__);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger::Get().Log("Successfully initialized CelShadingShader", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CelShadingShader::Shutdown()
|
|
||||||
{
|
|
||||||
// Shutdown the vertex and pixel shaders as well as the related objects.
|
|
||||||
ShutdownShader();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CelShadingShader::Render(ID3D11DeviceContext* deviceContext, int indexCount, XMMATRIX worldMatrix, XMMATRIX viewMatrix, XMMATRIX projectionMatrix,
|
|
||||||
ID3D11ShaderResourceView* texture, XMFLOAT3 lightDirection, XMFLOAT4 diffuseColor, XMFLOAT3 lightPosition)
|
|
||||||
{
|
|
||||||
bool result;
|
|
||||||
// Set the shader parameters that it will use for rendering.
|
|
||||||
result = SetShaderParameters(deviceContext, worldMatrix, viewMatrix, projectionMatrix, texture, lightDirection, diffuseColor, lightPosition);
|
|
||||||
if (!result)
|
|
||||||
{
|
|
||||||
Logger::Get().Log("CelShading Error", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Now render the prepared buffers with the shader.
|
|
||||||
RenderShader(deviceContext, indexCount);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CelShadingShader::InitializeShader(ID3D11Device* device, HWND hwnd, WCHAR* vsFilename, WCHAR* psFilename)
|
|
||||||
{
|
|
||||||
HRESULT result;
|
|
||||||
ID3D10Blob* errorMessage = nullptr;
|
|
||||||
ID3D10Blob* vertexShaderBuffer = nullptr;
|
|
||||||
ID3D10Blob* pixelShaderBuffer = nullptr;
|
|
||||||
D3D11_INPUT_ELEMENT_DESC polygonLayout[3];
|
|
||||||
unsigned int numElements;
|
|
||||||
D3D11_BUFFER_DESC matrixBufferDesc;
|
|
||||||
D3D11_SAMPLER_DESC samplerDesc;
|
|
||||||
D3D11_BUFFER_DESC lightBufferDesc;
|
|
||||||
|
|
||||||
// Compile the vertex shader code.
|
|
||||||
result = D3DCompileFromFile(vsFilename, nullptr, nullptr, "CelShadingVertexShader", "vs_5_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, &vertexShaderBuffer, &errorMessage);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
// If the shader failed to compile it should have written something to the error message.
|
|
||||||
if (errorMessage)
|
|
||||||
{
|
|
||||||
OutputShaderErrorMessage(errorMessage, hwnd, vsFilename);
|
|
||||||
}
|
|
||||||
// If there was nothing in the error message then it simply could not find the shader file itself.
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageBox(hwnd, vsFilename, L"Missing Shader File", MB_OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Compile the pixel shader code.
|
|
||||||
result = D3DCompileFromFile(psFilename, nullptr, nullptr, "CelShadingPixelShader", "ps_5_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, &pixelShaderBuffer, &errorMessage);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
// If the shader failed to compile it should have written something to the error message.
|
|
||||||
if (errorMessage)
|
|
||||||
{
|
|
||||||
OutputShaderErrorMessage(errorMessage, hwnd, psFilename);
|
|
||||||
}
|
|
||||||
// If there was nothing in the error message then it simply could not find the file itself.
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageBox(hwnd, psFilename, L"Missing Shader File", MB_OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create the vertex shader from the buffer.
|
|
||||||
result = device->CreateVertexShader(vertexShaderBuffer->GetBufferPointer(), vertexShaderBuffer->GetBufferSize(), nullptr, &m_vertexShader);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create the pixel shader from the buffer.
|
|
||||||
result = device->CreatePixelShader(pixelShaderBuffer->GetBufferPointer(), pixelShaderBuffer->GetBufferSize(), nullptr, &m_pixelShader);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create the vertex input layout description.
|
|
||||||
// This setup needs to match the VertexType structure in the ModelClass and in the shader.
|
|
||||||
polygonLayout[0].SemanticName = "POSITION";
|
|
||||||
polygonLayout[0].SemanticIndex = 0;
|
|
||||||
polygonLayout[0].Format = DXGI_FORMAT_R32G32B32A32_FLOAT;
|
|
||||||
polygonLayout[0].InputSlot = 0;
|
|
||||||
polygonLayout[0].AlignedByteOffset = 0;
|
|
||||||
polygonLayout[0].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
|
|
||||||
polygonLayout[0].InstanceDataStepRate = 0;
|
|
||||||
|
|
||||||
polygonLayout[1].SemanticName = "NORMAL";
|
|
||||||
polygonLayout[1].SemanticIndex = 0;
|
|
||||||
polygonLayout[1].Format = DXGI_FORMAT_R32G32B32_FLOAT;
|
|
||||||
polygonLayout[1].InputSlot = 0;
|
|
||||||
polygonLayout[1].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT;
|
|
||||||
polygonLayout[1].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
|
|
||||||
polygonLayout[1].InstanceDataStepRate = 0;
|
|
||||||
|
|
||||||
polygonLayout[2].SemanticName = "TEXCOORD";
|
|
||||||
polygonLayout[2].SemanticIndex = 0;
|
|
||||||
polygonLayout[2].Format = DXGI_FORMAT_R32G32_FLOAT;
|
|
||||||
polygonLayout[2].InputSlot = 0;
|
|
||||||
polygonLayout[2].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT;
|
|
||||||
polygonLayout[2].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
|
|
||||||
polygonLayout[2].InstanceDataStepRate = 0;
|
|
||||||
|
|
||||||
// Get a count of the elements in the layout.
|
|
||||||
numElements = sizeof(polygonLayout) / sizeof(polygonLayout[0]);
|
|
||||||
|
|
||||||
// Create the vertex input layout.
|
|
||||||
result = device->CreateInputLayout(polygonLayout, numElements, vertexShaderBuffer->GetBufferPointer(), vertexShaderBuffer->GetBufferSize(), &m_layout);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the vertex shader buffer and pixel shader buffer since they are no longer needed.
|
|
||||||
vertexShaderBuffer->Release();
|
|
||||||
vertexShaderBuffer = nullptr;
|
|
||||||
|
|
||||||
pixelShaderBuffer->Release();
|
|
||||||
pixelShaderBuffer = nullptr;
|
|
||||||
|
|
||||||
// Setup the description of the dynamic matrix constant buffer that is in the vertex shader.
|
|
||||||
matrixBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
|
|
||||||
matrixBufferDesc.ByteWidth = sizeof(MatrixBufferType);
|
|
||||||
matrixBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
|
|
||||||
matrixBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
|
||||||
matrixBufferDesc.MiscFlags = 0;
|
|
||||||
matrixBufferDesc.StructureByteStride = 0;
|
|
||||||
|
|
||||||
// Create the constant buffer pointer so we can access the vertex shader constant buffer from within this class.
|
|
||||||
result = device->CreateBuffer(&matrixBufferDesc, nullptr, &m_matrixBuffer);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a texture sampler state description.
|
|
||||||
samplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
|
|
||||||
samplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;
|
|
||||||
samplerDesc.AddressV = D3D11_TEXTURE_ADDRESS_WRAP;
|
|
||||||
samplerDesc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
|
|
||||||
samplerDesc.MipLODBias = 0.0f;
|
|
||||||
samplerDesc.MaxAnisotropy = 1;
|
|
||||||
samplerDesc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;
|
|
||||||
samplerDesc.BorderColor[0] = 0;
|
|
||||||
samplerDesc.BorderColor[1] = 0;
|
|
||||||
samplerDesc.BorderColor[2] = 0;
|
|
||||||
samplerDesc.BorderColor[3] = 0;
|
|
||||||
samplerDesc.MinLOD = 0;
|
|
||||||
samplerDesc.MaxLOD = D3D11_FLOAT32_MAX;
|
|
||||||
|
|
||||||
// Create the texture sampler state.
|
|
||||||
result = device->CreateSamplerState(&samplerDesc, &m_sampleState);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setup the description of the light dynamic constant buffer that is in the pixel shader.
|
|
||||||
lightBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
|
|
||||||
lightBufferDesc.ByteWidth = sizeof(LightBufferType);
|
|
||||||
lightBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
|
|
||||||
lightBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
|
||||||
lightBufferDesc.MiscFlags = 0;
|
|
||||||
lightBufferDesc.StructureByteStride = 0;
|
|
||||||
|
|
||||||
// Create the constant buffer pointer so we can access the pixel shader constant buffer from within this class.
|
|
||||||
result = device->CreateBuffer(&lightBufferDesc, nullptr, &m_lightBuffer);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CelShadingShader::ShutdownShader()
|
|
||||||
{
|
|
||||||
// Release the light constant buffer.
|
|
||||||
if (m_lightBuffer)
|
|
||||||
{
|
|
||||||
m_lightBuffer->Release();
|
|
||||||
m_lightBuffer = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the sampler state.
|
|
||||||
if (m_sampleState)
|
|
||||||
{
|
|
||||||
m_sampleState->Release();
|
|
||||||
m_sampleState = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the matrix constant buffer.
|
|
||||||
if (m_matrixBuffer)
|
|
||||||
{
|
|
||||||
m_matrixBuffer->Release();
|
|
||||||
m_matrixBuffer = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the layout.
|
|
||||||
if (m_layout)
|
|
||||||
{
|
|
||||||
m_layout->Release();
|
|
||||||
m_layout = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the pixel shader.
|
|
||||||
if (m_pixelShader)
|
|
||||||
{
|
|
||||||
m_pixelShader->Release();
|
|
||||||
m_pixelShader = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the vertex shader.
|
|
||||||
if (m_vertexShader)
|
|
||||||
{
|
|
||||||
m_vertexShader->Release();
|
|
||||||
m_vertexShader = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CelShadingShader::OutputShaderErrorMessage(ID3D10Blob* errorMessage, HWND hwnd, WCHAR* shaderFilename)
|
|
||||||
{
|
|
||||||
char* compileErrors;
|
|
||||||
unsigned long bufferSize, i;
|
|
||||||
std::ofstream fout;
|
|
||||||
|
|
||||||
// Get a pointer to the error message text buffer.
|
|
||||||
compileErrors = (char*)(errorMessage->GetBufferPointer());
|
|
||||||
|
|
||||||
// Get the length of the message.
|
|
||||||
bufferSize = errorMessage->GetBufferSize();
|
|
||||||
|
|
||||||
// Open a file to write the error message to.
|
|
||||||
fout.open("shader-error.txt");
|
|
||||||
|
|
||||||
// Write out the error message.
|
|
||||||
for (i = 0; i < bufferSize; i++)
|
|
||||||
{
|
|
||||||
fout << compileErrors[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close the file.
|
|
||||||
fout.close();
|
|
||||||
|
|
||||||
// Release the error message.
|
|
||||||
errorMessage->Release();
|
|
||||||
errorMessage = nullptr;
|
|
||||||
|
|
||||||
// Pop a message up on the screen to notify the user to check the text file for compile errors.
|
|
||||||
MessageBox(hwnd, L"Error compiling shader. Check shader-error.txt for message.", shaderFilename, MB_OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool CelShadingShader::SetShaderParameters(ID3D11DeviceContext* deviceContext, XMMATRIX worldMatrix, XMMATRIX viewMatrix, XMMATRIX projectionMatrix,
|
|
||||||
ID3D11ShaderResourceView* texture, XMFLOAT3 lightDirection, XMFLOAT4 diffuseColor, XMFLOAT3 lightPosition)
|
|
||||||
{
|
|
||||||
HRESULT result;
|
|
||||||
D3D11_MAPPED_SUBRESOURCE mappedResource;
|
|
||||||
MatrixBufferType* dataPtr;
|
|
||||||
LightBufferType* dataPtr2;
|
|
||||||
unsigned int bufferNumber;
|
|
||||||
|
|
||||||
// Transpose the matrices to prepare them for the shader.
|
|
||||||
worldMatrix = XMMatrixTranspose(worldMatrix);
|
|
||||||
viewMatrix = XMMatrixTranspose(viewMatrix);
|
|
||||||
projectionMatrix = XMMatrixTranspose(projectionMatrix);
|
|
||||||
|
|
||||||
// Lock the constant buffer so it can be written to.
|
|
||||||
result = deviceContext->Map(m_matrixBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get a pointer to the data in the constant buffer.
|
|
||||||
dataPtr = (MatrixBufferType*)mappedResource.pData;
|
|
||||||
|
|
||||||
// Copy the matrices into the constant buffer.
|
|
||||||
dataPtr->world = worldMatrix;
|
|
||||||
dataPtr->view = viewMatrix;
|
|
||||||
dataPtr->projection = projectionMatrix;
|
|
||||||
|
|
||||||
// Unlock the constant buffer.
|
|
||||||
deviceContext->Unmap(m_matrixBuffer, 0);
|
|
||||||
|
|
||||||
// Set the position of the constant buffer in the vertex shader.
|
|
||||||
bufferNumber = 0;
|
|
||||||
|
|
||||||
// Finally set the constant buffer in the vertex shader with the updated values.
|
|
||||||
deviceContext->VSSetConstantBuffers(bufferNumber, 1, &m_matrixBuffer);
|
|
||||||
|
|
||||||
// Lock the light constant buffer so it can be written to.
|
|
||||||
result = deviceContext->Map(m_lightBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get a pointer to the data in the constant buffer.
|
|
||||||
dataPtr2 = (LightBufferType*)mappedResource.pData;
|
|
||||||
|
|
||||||
// Copy the lighting variables into the constant buffer.
|
|
||||||
dataPtr2->diffuseColor = diffuseColor;
|
|
||||||
dataPtr2->lightDirection = lightDirection;
|
|
||||||
dataPtr2->lightPosition = lightPosition;
|
|
||||||
dataPtr2->constantAttenuation = 0.5f; // Set your attenuation values here
|
|
||||||
dataPtr2->linearAttenuation = 0.1f;
|
|
||||||
dataPtr2->quadraticAttenuation = 0.01f;
|
|
||||||
|
|
||||||
// Unlock the constant buffer.
|
|
||||||
deviceContext->Unmap(m_lightBuffer, 0);
|
|
||||||
|
|
||||||
// Set the position of the light constant buffer in the pixel shader.
|
|
||||||
bufferNumber = 0;
|
|
||||||
|
|
||||||
// Finally set the light constant buffer in the pixel shader with the updated values.
|
|
||||||
deviceContext->PSSetConstantBuffers(bufferNumber, 1, &m_lightBuffer);
|
|
||||||
|
|
||||||
// Set shader texture resource in the pixel shader.
|
|
||||||
deviceContext->PSSetShaderResources(0, 1, &texture);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void CelShadingShader::RenderShader(ID3D11DeviceContext* deviceContext, int indexCount)
|
|
||||||
{
|
|
||||||
// Set the vertex input layout.
|
|
||||||
deviceContext->IASetInputLayout(m_layout);
|
|
||||||
|
|
||||||
// Set the vertex and pixel shaders that will be used to render this triangle.
|
|
||||||
deviceContext->VSSetShader(m_vertexShader, nullptr, 0);
|
|
||||||
deviceContext->PSSetShader(m_pixelShader, nullptr, 0);
|
|
||||||
|
|
||||||
// Set the sampler state in the pixel shader.
|
|
||||||
deviceContext->PSSetSamplers(0, 1, &m_sampleState);
|
|
||||||
|
|
||||||
// Render the triangle.
|
|
||||||
deviceContext->DrawIndexed(indexCount, 0, 0);
|
|
||||||
}
|
|
@ -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
enginecustom/DemoScene_V10.1.2.ker
Normal file
@ -0,0 +1 @@
|
|||||||
|
1 isosphere 0 10 0 0 -0 0 1 1 1 Content/Assets/Kobject/isosphere.obj ALPHA_MAPPING 1 Unknown 1 0 2 assets/Texture/Bricks2K.png F:\Github_Repo\khaotic-engine-Reborn\enginecustom\assets\Texture\moss01.png 1 assets/Texture/BricksNRM2K.png 1 assets/Texture/BricksGLOSS2K.png 1 F:\Github_Repo\khaotic-engine-Reborn\enginecustom\assets\Texture\alpha01.png
|
1
enginecustom/DemoScene_V10.8.1.ker
Normal file
@ -0,0 +1 @@
|
|||||||
|
0 vaisseautri 0 50 0 0 -0 0 1 1 1 Content/Assets/Kobject/vaisseautri.obj CEL_SHADING 1 Unknown 1 0 1 F:\Github_Repo\khaotic-engine-Reborn\enginecustom\assets\Texture\marble01.png 1 assets/Texture/BricksNRM2K.png 1 assets/Texture/BricksGLOSS2K.png 0
|
@ -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,544 +0,0 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Filename: lightshaderclass.cpp
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
#include "lightshaderclass.h"
|
|
||||||
|
|
||||||
|
|
||||||
LightShaderClass::LightShaderClass()
|
|
||||||
{
|
|
||||||
m_vertexShader = 0;
|
|
||||||
m_pixelShader = 0;
|
|
||||||
m_layout = 0;
|
|
||||||
m_sampleState = 0;
|
|
||||||
m_matrixBuffer = 0;
|
|
||||||
m_cameraBuffer = 0;
|
|
||||||
m_lightBuffer = 0;
|
|
||||||
m_lightColorBuffer = 0;
|
|
||||||
m_lightPositionBuffer = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LightShaderClass::LightShaderClass(const LightShaderClass& other)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LightShaderClass::~LightShaderClass()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool LightShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Initializing LightShaderClass", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
|
||||||
|
|
||||||
wchar_t vsFilename[128];
|
|
||||||
wchar_t psFilename[128];
|
|
||||||
int error;
|
|
||||||
bool result;
|
|
||||||
|
|
||||||
// Set the filename of the vertex shader.
|
|
||||||
error = wcscpy_s(vsFilename, 128, L"light.vs");
|
|
||||||
if (error != 0)
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to copy string", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the filename of the pixel shader.
|
|
||||||
error = wcscpy_s(psFilename, 128, L"light.ps");
|
|
||||||
if (error != 0)
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to copy string", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// Initialize the vertex and pixel shaders.
|
|
||||||
result = InitializeShader(device, hwnd, vsFilename, psFilename);
|
|
||||||
if (!result)
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to initialize shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger::Get().Log("LightShaderClass initialized", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LightShaderClass::Shutdown()
|
|
||||||
{
|
|
||||||
// Shutdown the vertex and pixel shaders as well as the related objects.
|
|
||||||
ShutdownShader();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool LightShaderClass::Render(ID3D11DeviceContext* deviceContext, int indexCount, XMMATRIX worldMatrix, XMMATRIX viewMatrix, XMMATRIX projectionMatrix,
|
|
||||||
ID3D11ShaderResourceView* texture, XMFLOAT4 diffuseColor[], XMFLOAT4 lightPosition[], XMFLOAT4 ambientClor[])
|
|
||||||
{
|
|
||||||
bool result;
|
|
||||||
|
|
||||||
|
|
||||||
// Set the shader parameters that it will use for rendering.
|
|
||||||
result = SetShaderParameters(deviceContext, worldMatrix, viewMatrix, projectionMatrix, texture, diffuseColor, lightPosition, ambientClor);
|
|
||||||
if(!result)
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to set shader parameters", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Now render the prepared buffers with the shader.
|
|
||||||
RenderShader(deviceContext, indexCount);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool LightShaderClass::InitializeShader(ID3D11Device* device, HWND hwnd, WCHAR* vsFilename, WCHAR* psFilename)
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Initializing shader", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
|
||||||
|
|
||||||
HRESULT result;
|
|
||||||
ID3D10Blob* errorMessage;
|
|
||||||
ID3D10Blob* vertexShaderBuffer;
|
|
||||||
ID3D10Blob* pixelShaderBuffer;
|
|
||||||
D3D11_INPUT_ELEMENT_DESC polygonLayout[3];
|
|
||||||
unsigned int numElements;
|
|
||||||
D3D11_SAMPLER_DESC samplerDesc;
|
|
||||||
D3D11_BUFFER_DESC matrixBufferDesc;
|
|
||||||
D3D11_BUFFER_DESC cameraBufferDesc;
|
|
||||||
D3D11_BUFFER_DESC lightColorBufferDesc;
|
|
||||||
D3D11_BUFFER_DESC lightPositionBufferDesc;
|
|
||||||
|
|
||||||
|
|
||||||
// Initialize the pointers this function will use to null.
|
|
||||||
errorMessage = 0;
|
|
||||||
vertexShaderBuffer = 0;
|
|
||||||
pixelShaderBuffer = 0;
|
|
||||||
|
|
||||||
// Compile the vertex shader code.
|
|
||||||
result = D3DCompileFromFile(vsFilename, NULL, NULL, "LightVertexShader", "vs_5_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, &vertexShaderBuffer, &errorMessage);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
// If the shader failed to compile it should have writen something to the error message.
|
|
||||||
if (errorMessage)
|
|
||||||
{
|
|
||||||
OutputShaderErrorMessage(errorMessage, hwnd, vsFilename);
|
|
||||||
}
|
|
||||||
// If there was nothing in the error message then it simply could not find the shader file itself.
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to compile shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Compile the pixel shader code.
|
|
||||||
result = D3DCompileFromFile(psFilename, NULL, NULL, "LightPixelShader", "ps_5_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, &pixelShaderBuffer, &errorMessage);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
// If the shader failed to compile it should have writen something to the error message.
|
|
||||||
if (errorMessage)
|
|
||||||
{
|
|
||||||
OutputShaderErrorMessage(errorMessage, hwnd, psFilename);
|
|
||||||
}
|
|
||||||
// If there was nothing in the error message then it simply could not find the file itself.
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to compile shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create the vertex shader from the buffer.
|
|
||||||
result = device->CreateVertexShader(vertexShaderBuffer->GetBufferPointer(), vertexShaderBuffer->GetBufferSize(), NULL, &m_vertexShader);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to create vertex shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create the pixel shader from the buffer.
|
|
||||||
result = device->CreatePixelShader(pixelShaderBuffer->GetBufferPointer(), pixelShaderBuffer->GetBufferSize(), NULL, &m_pixelShader);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to create pixel shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create the vertex input layout description.
|
|
||||||
// This setup needs to match the VertexType stucture in the ModelClass and in the shader.
|
|
||||||
polygonLayout[0].SemanticName = "POSITION";
|
|
||||||
polygonLayout[0].SemanticIndex = 0;
|
|
||||||
polygonLayout[0].Format = DXGI_FORMAT_R32G32B32_FLOAT;
|
|
||||||
polygonLayout[0].InputSlot = 0;
|
|
||||||
polygonLayout[0].AlignedByteOffset = 0;
|
|
||||||
polygonLayout[0].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
|
|
||||||
polygonLayout[0].InstanceDataStepRate = 0;
|
|
||||||
|
|
||||||
polygonLayout[1].SemanticName = "TEXCOORD";
|
|
||||||
polygonLayout[1].SemanticIndex = 0;
|
|
||||||
polygonLayout[1].Format = DXGI_FORMAT_R32G32_FLOAT;
|
|
||||||
polygonLayout[1].InputSlot = 0;
|
|
||||||
polygonLayout[1].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT;
|
|
||||||
polygonLayout[1].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
|
|
||||||
polygonLayout[1].InstanceDataStepRate = 0;
|
|
||||||
|
|
||||||
polygonLayout[2].SemanticName = "NORMAL";
|
|
||||||
polygonLayout[2].SemanticIndex = 0;
|
|
||||||
polygonLayout[2].Format = DXGI_FORMAT_R32G32B32_FLOAT;
|
|
||||||
polygonLayout[2].InputSlot = 0;
|
|
||||||
polygonLayout[2].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT;
|
|
||||||
polygonLayout[2].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
|
|
||||||
polygonLayout[2].InstanceDataStepRate = 0;
|
|
||||||
|
|
||||||
// Get a count of the elements in the layout.
|
|
||||||
numElements = sizeof(polygonLayout) / sizeof(polygonLayout[0]);
|
|
||||||
|
|
||||||
// Create the vertex input layout.
|
|
||||||
result = device->CreateInputLayout(polygonLayout, numElements, vertexShaderBuffer->GetBufferPointer(), vertexShaderBuffer->GetBufferSize(),
|
|
||||||
&m_layout);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to create input layout", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the vertex shader buffer and pixel shader buffer since they are no longer needed.
|
|
||||||
vertexShaderBuffer->Release();
|
|
||||||
vertexShaderBuffer = 0;
|
|
||||||
|
|
||||||
pixelShaderBuffer->Release();
|
|
||||||
pixelShaderBuffer = 0;
|
|
||||||
|
|
||||||
// Create a texture sampler state description.
|
|
||||||
samplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
|
|
||||||
samplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;
|
|
||||||
samplerDesc.AddressV = D3D11_TEXTURE_ADDRESS_WRAP;
|
|
||||||
samplerDesc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
|
|
||||||
samplerDesc.MipLODBias = 0.0f;
|
|
||||||
samplerDesc.MaxAnisotropy = 1;
|
|
||||||
samplerDesc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;
|
|
||||||
samplerDesc.BorderColor[0] = 0;
|
|
||||||
samplerDesc.BorderColor[1] = 0;
|
|
||||||
samplerDesc.BorderColor[2] = 0;
|
|
||||||
samplerDesc.BorderColor[3] = 0;
|
|
||||||
samplerDesc.MinLOD = 0;
|
|
||||||
samplerDesc.MaxLOD = D3D11_FLOAT32_MAX;
|
|
||||||
|
|
||||||
// Create the texture sampler state.
|
|
||||||
result = device->CreateSamplerState(&samplerDesc, &m_sampleState);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to create sampler state", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setup the description of the dynamic matrix constant buffer that is in the vertex shader.
|
|
||||||
matrixBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
|
|
||||||
matrixBufferDesc.ByteWidth = sizeof(MatrixBufferType);
|
|
||||||
matrixBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
|
|
||||||
matrixBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
|
||||||
matrixBufferDesc.MiscFlags = 0;
|
|
||||||
matrixBufferDesc.StructureByteStride = 0;
|
|
||||||
|
|
||||||
// Create the constant buffer pointer so we can access the vertex shader constant buffer from within this class.
|
|
||||||
result = device->CreateBuffer(&matrixBufferDesc, NULL, &m_matrixBuffer);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to create matrix buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Setup the description of the camera dynamic constant buffer that is in the vertex shader.
|
|
||||||
cameraBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
|
|
||||||
cameraBufferDesc.ByteWidth = sizeof(CameraBufferType);
|
|
||||||
cameraBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
|
|
||||||
cameraBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
|
||||||
cameraBufferDesc.MiscFlags = 0;
|
|
||||||
cameraBufferDesc.StructureByteStride = 0;
|
|
||||||
|
|
||||||
// Create the camera constant buffer pointer so we can access the vertex shader constant buffer from within this class.
|
|
||||||
result = device->CreateBuffer(&cameraBufferDesc, NULL, &m_cameraBuffer);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to create camera buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setup the description of the dynamic constant buffer that is in the pixel shader.
|
|
||||||
lightColorBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
|
|
||||||
lightColorBufferDesc.ByteWidth = sizeof(LightColorBufferType);
|
|
||||||
lightColorBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
|
|
||||||
lightColorBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
|
||||||
lightColorBufferDesc.MiscFlags = 0;
|
|
||||||
lightColorBufferDesc.StructureByteStride = 0;
|
|
||||||
|
|
||||||
// Create the constant buffer pointer so we can access the pixel shader constant buffer from within this class.
|
|
||||||
result = device->CreateBuffer(&lightColorBufferDesc, NULL, &m_lightColorBuffer);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to create light color buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setup the description of the dynamic constant buffer that is in the vertex shader.
|
|
||||||
lightPositionBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
|
|
||||||
lightPositionBufferDesc.ByteWidth = sizeof(LightPositionBufferType);
|
|
||||||
lightPositionBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
|
|
||||||
lightPositionBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
|
||||||
lightPositionBufferDesc.MiscFlags = 0;
|
|
||||||
lightPositionBufferDesc.StructureByteStride = 0;
|
|
||||||
|
|
||||||
// Create the constant buffer pointer so we can access the vertex shader constant buffer from within this class.
|
|
||||||
result = device->CreateBuffer(&lightPositionBufferDesc, NULL, &m_lightPositionBuffer);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to create light position buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger::Get().Log("Shader initialized", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LightShaderClass::ShutdownShader()
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Shutting down LightShaderClass", __FILE__, __LINE__, Logger::LogLevel::Shutdown);
|
|
||||||
|
|
||||||
// Release the light constant buffers.
|
|
||||||
if (m_lightColorBuffer)
|
|
||||||
{
|
|
||||||
m_lightColorBuffer->Release();
|
|
||||||
m_lightColorBuffer = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_lightPositionBuffer)
|
|
||||||
{
|
|
||||||
m_lightPositionBuffer->Release();
|
|
||||||
m_lightPositionBuffer = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the light constant buffer.
|
|
||||||
if (m_lightBuffer)
|
|
||||||
{
|
|
||||||
m_lightBuffer->Release();
|
|
||||||
m_lightBuffer = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the camera constant buffer.
|
|
||||||
if (m_cameraBuffer)
|
|
||||||
{
|
|
||||||
m_cameraBuffer->Release();
|
|
||||||
m_cameraBuffer = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the matrix constant buffer.
|
|
||||||
if (m_matrixBuffer)
|
|
||||||
{
|
|
||||||
m_matrixBuffer->Release();
|
|
||||||
m_matrixBuffer = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the sampler state.
|
|
||||||
if (m_sampleState)
|
|
||||||
{
|
|
||||||
m_sampleState->Release();
|
|
||||||
m_sampleState = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the layout.
|
|
||||||
if (m_layout)
|
|
||||||
{
|
|
||||||
m_layout->Release();
|
|
||||||
m_layout = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the pixel shader.
|
|
||||||
if (m_pixelShader)
|
|
||||||
{
|
|
||||||
m_pixelShader->Release();
|
|
||||||
m_pixelShader = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the vertex shader.
|
|
||||||
if (m_vertexShader)
|
|
||||||
{
|
|
||||||
m_vertexShader->Release();
|
|
||||||
m_vertexShader = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger::Get().Log("LightShaderClass shut down", __FILE__, __LINE__, Logger::LogLevel::Shutdown);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LightShaderClass::OutputShaderErrorMessage(ID3D10Blob* errorMessage, HWND hwnd, WCHAR* shaderFilename)
|
|
||||||
{
|
|
||||||
char* compileErrors;
|
|
||||||
unsigned __int64 bufferSize, i;
|
|
||||||
ofstream fout;
|
|
||||||
|
|
||||||
|
|
||||||
// Get a pointer to the error message text buffer.
|
|
||||||
compileErrors = (char*)(errorMessage->GetBufferPointer());
|
|
||||||
|
|
||||||
// Get the length of the message.
|
|
||||||
bufferSize = errorMessage->GetBufferSize();
|
|
||||||
|
|
||||||
// Open a file to write the error message to.
|
|
||||||
fout.open("shader-error.txt");
|
|
||||||
|
|
||||||
// Write out the error message.
|
|
||||||
for (i = 0; i < bufferSize; i++)
|
|
||||||
{
|
|
||||||
fout << compileErrors[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close the file.
|
|
||||||
fout.close();
|
|
||||||
|
|
||||||
// Release the error message.
|
|
||||||
errorMessage->Release();
|
|
||||||
errorMessage = 0;
|
|
||||||
|
|
||||||
// Pop a message up on the screen to notify the user to check the text file for compile errors.
|
|
||||||
MessageBox(hwnd, L"Error compiling shader. Check shader-error.txt for message.", shaderFilename, MB_OK);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool LightShaderClass::SetShaderParameters(ID3D11DeviceContext* deviceContext, XMMATRIX worldMatrix, XMMATRIX viewMatrix, XMMATRIX projectionMatrix,
|
|
||||||
ID3D11ShaderResourceView* texture, XMFLOAT4 diffuseColor[], XMFLOAT4 lightPosition[], XMFLOAT4 ambientColor[])
|
|
||||||
{
|
|
||||||
HRESULT result;
|
|
||||||
D3D11_MAPPED_SUBRESOURCE mappedResource;
|
|
||||||
unsigned int bufferNumber;
|
|
||||||
MatrixBufferType* dataPtr;
|
|
||||||
LightPositionBufferType* dataPtr2;
|
|
||||||
LightColorBufferType* dataPtr3;
|
|
||||||
|
|
||||||
// Transpose the matrices to prepare them for the shader.
|
|
||||||
worldMatrix = XMMatrixTranspose(worldMatrix);
|
|
||||||
viewMatrix = XMMatrixTranspose(viewMatrix);
|
|
||||||
projectionMatrix = XMMatrixTranspose(projectionMatrix);
|
|
||||||
|
|
||||||
// Lock the constant buffer so it can be written to.
|
|
||||||
result = deviceContext->Map(m_matrixBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to map matrix buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get a pointer to the data in the constant buffer.
|
|
||||||
dataPtr = (MatrixBufferType*)mappedResource.pData;
|
|
||||||
|
|
||||||
// Copy the matrices into the constant buffer.
|
|
||||||
dataPtr->world = worldMatrix;
|
|
||||||
dataPtr->view = viewMatrix;
|
|
||||||
dataPtr->projection = projectionMatrix;
|
|
||||||
|
|
||||||
// Unlock the constant buffer.
|
|
||||||
deviceContext->Unmap(m_matrixBuffer, 0);
|
|
||||||
|
|
||||||
// Set the position of the constant buffer in the vertex shader.
|
|
||||||
bufferNumber = 0;
|
|
||||||
|
|
||||||
// Now set the constant buffer in the vertex shader with the updated values.
|
|
||||||
deviceContext->VSSetConstantBuffers(bufferNumber, 1, &m_matrixBuffer);
|
|
||||||
|
|
||||||
// Lock the camera constant buffer so it can be written to.
|
|
||||||
result = deviceContext->Map(m_cameraBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to map camera buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Lock the light position constant buffer so it can be written to.
|
|
||||||
result = deviceContext->Map(m_lightPositionBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to map light position buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get a pointer to the data in the constant buffer.
|
|
||||||
dataPtr2 = (LightPositionBufferType*)mappedResource.pData;
|
|
||||||
|
|
||||||
// Copy the light position variables into the constant buffer.
|
|
||||||
for (int i = 0; i < NUM_LIGHTS; i++)
|
|
||||||
{
|
|
||||||
dataPtr2->lightPosition[i] = lightPosition[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Unlock the constant buffer.
|
|
||||||
deviceContext->Unmap(m_lightPositionBuffer, 0);
|
|
||||||
|
|
||||||
// Set the position of the constant buffer in the vertex shader.
|
|
||||||
bufferNumber = 1;
|
|
||||||
|
|
||||||
// Finally set the constant buffer in the vertex shader with the updated values.
|
|
||||||
deviceContext->VSSetConstantBuffers(bufferNumber, 1, &m_lightPositionBuffer);
|
|
||||||
|
|
||||||
// Set shader texture resource in the pixel shader.
|
|
||||||
deviceContext->PSSetShaderResources(0, 1, &texture);
|
|
||||||
|
|
||||||
// Lock the light color constant buffer so it can be written to.
|
|
||||||
result = deviceContext->Map(m_lightColorBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
|
|
||||||
if (FAILED(result))
|
|
||||||
{
|
|
||||||
Logger::Get().Log("Failed to map light color buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get a pointer to the data in the constant buffer.
|
|
||||||
dataPtr3 = (LightColorBufferType*)mappedResource.pData;
|
|
||||||
|
|
||||||
// Copy the light color variables into the constant buffer.
|
|
||||||
for (int i = 0; i < NUM_LIGHTS; i++)
|
|
||||||
{
|
|
||||||
dataPtr3->diffuseColor[i] = diffuseColor[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Unlock the constant buffer.
|
|
||||||
deviceContext->Unmap(m_lightColorBuffer, 0);
|
|
||||||
|
|
||||||
// Set the position of the constant buffer in the pixel shader.
|
|
||||||
bufferNumber = 0;
|
|
||||||
|
|
||||||
// Finally set the constant buffer in the pixel shader with the updated values.
|
|
||||||
deviceContext->PSSetConstantBuffers(bufferNumber, 1, &m_lightColorBuffer);
|
|
||||||
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LightShaderClass::RenderShader(ID3D11DeviceContext* deviceContext, int indexCount)
|
|
||||||
{
|
|
||||||
// Set the vertex input layout.
|
|
||||||
deviceContext->IASetInputLayout(m_layout);
|
|
||||||
|
|
||||||
// Set the vertex and pixel shaders that will be used to render this triangle.
|
|
||||||
deviceContext->VSSetShader(m_vertexShader, NULL, 0);
|
|
||||||
deviceContext->PSSetShader(m_pixelShader, NULL, 0);
|
|
||||||
|
|
||||||
// Set the sampler state in the pixel shader.
|
|
||||||
deviceContext->PSSetSamplers(0, 1, &m_sampleState);
|
|
||||||
|
|
||||||
// Render the triangle.
|
|
||||||
deviceContext->DrawIndexed(indexCount, 0, 0);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
@ -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
|
|
@ -1,59 +0,0 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Filename: multitextureshaderclass.h
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
#ifndef _MULTITEXTURESHADERCLASS_H_
|
|
||||||
#define _MULTITEXTURESHADERCLASS_H_
|
|
||||||
|
|
||||||
|
|
||||||
//////////////
|
|
||||||
// INCLUDES //
|
|
||||||
//////////////
|
|
||||||
#include "Logger.h"
|
|
||||||
#include <d3d11.h>
|
|
||||||
#include <d3dcompiler.h>
|
|
||||||
#include <directxmath.h>
|
|
||||||
#include <fstream>
|
|
||||||
using namespace DirectX;
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Class name: MultiTextureShaderClass
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
class MultiTextureShaderClass
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
struct MatrixBufferType
|
|
||||||
{
|
|
||||||
XMMATRIX world;
|
|
||||||
XMMATRIX view;
|
|
||||||
XMMATRIX projection;
|
|
||||||
};
|
|
||||||
|
|
||||||
public:
|
|
||||||
MultiTextureShaderClass();
|
|
||||||
MultiTextureShaderClass(const MultiTextureShaderClass&);
|
|
||||||
~MultiTextureShaderClass();
|
|
||||||
|
|
||||||
bool Initialize(ID3D11Device*, HWND);
|
|
||||||
void Shutdown();
|
|
||||||
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
|
|
||||||
void ShutdownShader();
|
|
||||||
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
|
|
||||||
|
|
||||||
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
|
|
||||||
void RenderShader(ID3D11DeviceContext*, int);
|
|
||||||
|
|
||||||
private:
|
|
||||||
ID3D11VertexShader* m_vertexShader;
|
|
||||||
ID3D11PixelShader* m_pixelShader;
|
|
||||||
ID3D11InputLayout* m_layout;
|
|
||||||
ID3D11Buffer* m_matrixBuffer;
|
|
||||||
ID3D11SamplerState* m_sampleState;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#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
|
@ -1,55 +0,0 @@
|
|||||||
#ifndef _ALPHAMAPSHADERCLASS_H_
|
|
||||||
#define _ALPHAMAPSHADERCLASS_H_
|
|
||||||
|
|
||||||
|
|
||||||
//////////////
|
|
||||||
// INCLUDES //
|
|
||||||
//////////////
|
|
||||||
#include "Logger.h"
|
|
||||||
#include <d3d11.h>
|
|
||||||
#include <d3dcompiler.h>
|
|
||||||
#include <directxmath.h>
|
|
||||||
#include <fstream>
|
|
||||||
using namespace DirectX;
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Class name: AlphaMapShaderClass
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
class AlphaMapShaderClass
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
struct MatrixBufferType
|
|
||||||
{
|
|
||||||
XMMATRIX world;
|
|
||||||
XMMATRIX view;
|
|
||||||
XMMATRIX projection;
|
|
||||||
};
|
|
||||||
|
|
||||||
public:
|
|
||||||
AlphaMapShaderClass();
|
|
||||||
AlphaMapShaderClass(const AlphaMapShaderClass&);
|
|
||||||
~AlphaMapShaderClass();
|
|
||||||
|
|
||||||
bool Initialize(ID3D11Device*, HWND);
|
|
||||||
void Shutdown();
|
|
||||||
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
|
|
||||||
void ShutdownShader();
|
|
||||||
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
|
|
||||||
|
|
||||||
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
|
|
||||||
void RenderShader(ID3D11DeviceContext*, int);
|
|
||||||
|
|
||||||
private:
|
|
||||||
ID3D11VertexShader* m_vertexShader;
|
|
||||||
ID3D11PixelShader* m_pixelShader;
|
|
||||||
ID3D11InputLayout* m_layout;
|
|
||||||
ID3D11Buffer* m_matrixBuffer;
|
|
||||||
ID3D11SamplerState* m_sampleState;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,231 +0,0 @@
|
|||||||
#ifndef _APPLICATIONCLASS_H_
|
|
||||||
#define _APPLICATIONCLASS_H_
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////
|
|
||||||
// MY CLASS INCLUDES //
|
|
||||||
///////////////////////
|
|
||||||
#include "d3dclass.h"
|
|
||||||
#include "cameraclass.h"
|
|
||||||
#include "object.h"
|
|
||||||
#include "lightclass.h"
|
|
||||||
#include <vector>
|
|
||||||
#include <filesystem>
|
|
||||||
|
|
||||||
#include "bitmapclass.h"
|
|
||||||
#include "spriteclass.h"
|
|
||||||
#include "timerclass.h"
|
|
||||||
#include "fontshaderclass.h"
|
|
||||||
#include "fontclass.h"
|
|
||||||
#include "textclass.h"
|
|
||||||
#include "fpsclass.h"
|
|
||||||
#include "inputclass.h"
|
|
||||||
#include "shadermanagerclass.h"
|
|
||||||
#include "modellistclass.h"
|
|
||||||
#include "positionclass.h"
|
|
||||||
#include "frustumclass.h"
|
|
||||||
#include "rendertextureclass.h"
|
|
||||||
#include "displayplaneclass.h"
|
|
||||||
#include "translateshaderclass.h"
|
|
||||||
#include "reflectionshaderclass.h"
|
|
||||||
#include "physics.h"
|
|
||||||
#include "frustum.h"
|
|
||||||
|
|
||||||
#include <WICTextureLoader.h>
|
|
||||||
#include <comdef.h> // Pour _com_error
|
|
||||||
|
|
||||||
|
|
||||||
/////////////
|
|
||||||
// GLOBALS //
|
|
||||||
/////////////
|
|
||||||
const bool FULL_SCREEN = false;
|
|
||||||
const float SCREEN_DEPTH = 1000.0f;
|
|
||||||
const float SCREEN_NEAR = 0.3f;
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Class name: ApplicationClass
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
class ApplicationClass
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ApplicationClass();
|
|
||||||
ApplicationClass(const ApplicationClass&);
|
|
||||||
~ApplicationClass();
|
|
||||||
D3DClass* GetDirect3D();
|
|
||||||
|
|
||||||
bool Initialize(int, int, HWND);
|
|
||||||
void Shutdown();
|
|
||||||
bool Frame(InputClass*);
|
|
||||||
|
|
||||||
int GetScreenWidth() const;
|
|
||||||
void SetScreenWidth(int screenWidth);
|
|
||||||
int GetScreenHeight() const;
|
|
||||||
void SetScreenHeight(int screenHeight);
|
|
||||||
|
|
||||||
float GetSpeed() const { return m_speed; };
|
|
||||||
void SetSpeed(float speed) { this->m_speed = speed; };
|
|
||||||
|
|
||||||
void AddCube();
|
|
||||||
void DeleteKobject(int index);
|
|
||||||
size_t GetCubeCount() const { return m_cubes.size(); };
|
|
||||||
size_t GetTerrainCubeCount() const { return m_terrainChunk.size(); };
|
|
||||||
std::vector<Object*> GetCubes() const { return m_cubes; };
|
|
||||||
std::vector<Object*> GetTerrainCubes() const { return m_terrainChunk; };
|
|
||||||
std::vector<Object*> GetKobjects() const { return m_object; };
|
|
||||||
void AddKobject(WCHAR* filepath);
|
|
||||||
void SetPath(WCHAR* path) { m_path = path; };
|
|
||||||
void SetWFolder(std::filesystem::path WFolder) { m_WFolder = WFolder; };
|
|
||||||
|
|
||||||
void GenerateTerrain();
|
|
||||||
void DeleteTerrain();
|
|
||||||
|
|
||||||
XMVECTOR GetLightPosition(int index);
|
|
||||||
XMVECTOR GetLightColor(int index);
|
|
||||||
void SetLightPosition(int index, XMVECTOR color);
|
|
||||||
void SetLightColor(int index, XMVECTOR color);
|
|
||||||
void DeleteLight(int index);
|
|
||||||
void AddLight();
|
|
||||||
std::vector<LightClass*> GetLights() const { return m_Lights; };
|
|
||||||
bool GetShouldQuit() const { return m_ShouldQuit; };
|
|
||||||
void SetShouldQuit(bool shouldQuit) { m_ShouldQuit = shouldQuit; };
|
|
||||||
|
|
||||||
void SetCelShading(bool enable) { m_enableCelShading = enable; };
|
|
||||||
|
|
||||||
std::vector<ID3D11ShaderResourceView*> textures;
|
|
||||||
|
|
||||||
void SetVsync(bool vsync);
|
|
||||||
bool GetVsync() const { return VSYNC_ENABLED; };
|
|
||||||
|
|
||||||
HWND GetHwnd() const;
|
|
||||||
void SetHwnd(HWND hwnd);
|
|
||||||
|
|
||||||
bool IsWindowed() const;
|
|
||||||
void SetWindowed(bool windowed);
|
|
||||||
|
|
||||||
Physics* GetPhysics() const { return m_Physics; };
|
|
||||||
|
|
||||||
// ----------------------------------- //
|
|
||||||
// ------------- Frustum ------------- //
|
|
||||||
// ----------------------------------- //
|
|
||||||
|
|
||||||
Frustum GetFrustum() const { return m_FrustumCulling; };
|
|
||||||
void SetFrustum(Frustum frustum) { m_FrustumCulling = frustum; };
|
|
||||||
|
|
||||||
void ConstructFrustum();
|
|
||||||
int GetRenderCount() const { return m_renderCount; };
|
|
||||||
void SetRenderCount(int renderCount) { m_renderCount = renderCount; };
|
|
||||||
float GetFrustumTolerance() const { return m_FrustumCullingTolerance; };
|
|
||||||
void SetFrustumTolerance(float frustumTolerance) { m_FrustumCullingTolerance = frustumTolerance; };
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool Render(float, float, float, float, float);
|
|
||||||
bool RenderPhysics(float x, float y, float z);
|
|
||||||
bool UpdateMouseStrings(int, int, bool);
|
|
||||||
bool UpdateFps();
|
|
||||||
bool UpdateRenderCountString(int);
|
|
||||||
bool RenderSceneToTexture(float);
|
|
||||||
bool RenderRefractionToTexture();
|
|
||||||
bool RenderReflectionToTexture();
|
|
||||||
bool RenderPass(const std::vector<std::reference_wrapper<std::vector<Object*>>>& RenderQueues, XMFLOAT4* diffuse, XMFLOAT4* position, XMFLOAT4* ambient, XMMATRIX view, XMMATRIX projection);
|
|
||||||
|
|
||||||
|
|
||||||
private :
|
|
||||||
|
|
||||||
// ------------------------------------- //
|
|
||||||
// ------------- DIRECT3D -------------- //
|
|
||||||
// ------------------------------------- //
|
|
||||||
|
|
||||||
D3DClass* m_Direct3D;
|
|
||||||
IDXGISwapChain* m_swapChain;
|
|
||||||
ModelClass* m_Model,* m_GroundModel, * m_WallModel, * m_BathModel, * m_WaterModel;
|
|
||||||
ModelListClass* m_ModelList;
|
|
||||||
bool VSYNC_ENABLED = true;
|
|
||||||
|
|
||||||
HWND m_hwnd;
|
|
||||||
bool m_windowed;
|
|
||||||
|
|
||||||
// ------------------------------------- //
|
|
||||||
// ------------- RENDERING ------------- //
|
|
||||||
// ------------------------------------- //
|
|
||||||
|
|
||||||
XMMATRIX m_baseViewMatrix;
|
|
||||||
RenderTextureClass* m_RenderTexture, * m_RefractionTexture, * m_ReflectionTexture;
|
|
||||||
DisplayPlaneClass* m_DisplayPlane;
|
|
||||||
int m_screenWidth, m_screenHeight;
|
|
||||||
CameraClass* m_Camera;
|
|
||||||
PositionClass* m_Position;
|
|
||||||
|
|
||||||
// ------------------------------------ //
|
|
||||||
// ------------- OBJECTS -------------- //
|
|
||||||
// ------------------------------------ //
|
|
||||||
|
|
||||||
Object* m_SelectedObject;
|
|
||||||
std::vector<Object*> m_cubes;
|
|
||||||
std::vector<Object*> m_terrainChunk;
|
|
||||||
float m_speed = 0.1f; // speed for the demo spinning object
|
|
||||||
std::vector<Object*> m_object;
|
|
||||||
int m_ObjectId = 0;
|
|
||||||
std::vector<std::reference_wrapper<std::vector<Object*>>> m_RenderQueues;
|
|
||||||
|
|
||||||
// ----------------------------------- //
|
|
||||||
// ------------- LIGHTS -------------- //
|
|
||||||
// ----------------------------------- //
|
|
||||||
|
|
||||||
LightClass* m_Light;
|
|
||||||
std::vector<LightClass*> m_Lights;
|
|
||||||
int m_numLights;
|
|
||||||
|
|
||||||
XMFLOAT3 TrueLightPosition;
|
|
||||||
ModelClass* m_LightModel;
|
|
||||||
|
|
||||||
// ----------------------------------- //
|
|
||||||
// ------------- SHADERS ------------- //
|
|
||||||
// ----------------------------------- //
|
|
||||||
|
|
||||||
ShaderManagerClass* m_ShaderManager;
|
|
||||||
FontShaderClass* m_FontShader;
|
|
||||||
BitmapClass* m_Bitmap;
|
|
||||||
SpriteClass* m_Sprite;
|
|
||||||
|
|
||||||
bool m_enableCelShading;
|
|
||||||
|
|
||||||
// ----------------------------------- //
|
|
||||||
// ------------ VARIABLES ------------ //
|
|
||||||
// ----------------------------------- //
|
|
||||||
|
|
||||||
float m_waterHeight, m_waterTranslation;
|
|
||||||
wchar_t* m_path;
|
|
||||||
std::filesystem::path m_WFolder;
|
|
||||||
|
|
||||||
// ------------------------------------------------- //
|
|
||||||
// ------------- FPS AND INFO ON SCREEN ------------ //
|
|
||||||
// ------------------------------------------------- //
|
|
||||||
|
|
||||||
TimerClass* m_Timer;
|
|
||||||
TextClass* m_MouseStrings;
|
|
||||||
TextClass* m_RenderCountString;
|
|
||||||
FontClass* m_Font;
|
|
||||||
FpsClass* m_Fps;
|
|
||||||
TextClass* m_FpsString;
|
|
||||||
int m_previousFps;
|
|
||||||
|
|
||||||
// ------------------------------------------------- //
|
|
||||||
// ------------------- OTHER ----------------------- //
|
|
||||||
// ------------------------------------------------- //
|
|
||||||
|
|
||||||
bool m_ShouldQuit;
|
|
||||||
Physics* m_Physics;
|
|
||||||
float m_gravity;
|
|
||||||
XMVECTOR m_previousPosition;
|
|
||||||
|
|
||||||
// ------------------------------------------------- //
|
|
||||||
// ------------------- Frustum --------------------- //
|
|
||||||
// ------------------------------------------------- //
|
|
||||||
|
|
||||||
Frustum m_FrustumCulling;
|
|
||||||
int m_renderCount;
|
|
||||||
float m_FrustumCullingTolerance = 5.f;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
BIN
enginecustom/assets/Model/OBJ/cone.obj
(Stored with Git LFS)
BIN
enginecustom/assets/Model/OBJ/invertcube.obj
(Stored with Git LFS)
Normal file
BIN
enginecustom/assets/Model/OBJ/plane.obj
(Stored with Git LFS)
BIN
enginecustom/assets/Model/OBJ/skysphere.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
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 |
106
enginecustom/assets/Texture/imgui.ini
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
[Window][Debug##Default]
|
||||||
|
Pos=60,60
|
||||||
|
Size=400,400
|
||||||
|
Collapsed=0
|
||||||
|
|
||||||
|
[Window][Khaotic Engine]
|
||||||
|
Pos=1281,19
|
||||||
|
Size=303,842
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x0000000F,0
|
||||||
|
|
||||||
|
[Window][Objects]
|
||||||
|
Pos=0,19
|
||||||
|
Size=281,842
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000011,0
|
||||||
|
|
||||||
|
[Window][Terrain]
|
||||||
|
Pos=0,19
|
||||||
|
Size=280,842
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000007,0
|
||||||
|
|
||||||
|
[Window][Light]
|
||||||
|
Pos=0,19
|
||||||
|
Size=281,842
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000012,0
|
||||||
|
|
||||||
|
[Window][Shader Manager]
|
||||||
|
Pos=8,27
|
||||||
|
Size=330,487
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000001,2
|
||||||
|
|
||||||
|
[Window][Engine Settings]
|
||||||
|
Pos=1281,527
|
||||||
|
Size=303,334
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000010,0
|
||||||
|
|
||||||
|
[Window][DockSpace Demo]
|
||||||
|
Size=1584,861
|
||||||
|
Collapsed=0
|
||||||
|
|
||||||
|
[Window][Render Window]
|
||||||
|
Pos=8,27
|
||||||
|
Size=1559,974
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000011,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=0,636
|
||||||
|
Size=1279,225
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000006,0
|
||||||
|
|
||||||
|
[Window][Render Stats]
|
||||||
|
Pos=0,636
|
||||||
|
Size=1279,225
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000004,0
|
||||||
|
|
||||||
|
[Window][render Window]
|
||||||
|
Pos=16,718
|
||||||
|
Size=997,758
|
||||||
|
Collapsed=1
|
||||||
|
|
||||||
|
[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=0,19 Size=1584,842 Split=X
|
||||||
|
DockNode ID=0x00000002 Parent=0xCCBD8CF7 SizeRef=1743,826 Split=Y
|
||||||
|
DockNode ID=0x0000000A Parent=0x00000002 SizeRef=1568,599 Split=X
|
||||||
|
DockNode ID=0x00000009 Parent=0x0000000A SizeRef=281,974 Split=Y Selected=0x031DC75C
|
||||||
|
DockNode ID=0x00000011 Parent=0x00000009 SizeRef=281,441 Selected=0x031DC75C
|
||||||
|
DockNode ID=0x00000012 Parent=0x00000009 SizeRef=281,440 Selected=0x321620B2
|
||||||
|
DockNode ID=0x0000000D Parent=0x0000000A SizeRef=1460,974 Split=Y
|
||||||
|
DockNode ID=0x0000000B Parent=0x0000000D SizeRef=1568,637 Split=X Selected=0x321620B2
|
||||||
|
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=280,883 Selected=0x393905AB
|
||||||
|
DockNode ID=0x00000008 Parent=0x0000000B SizeRef=1178,883 CentralNode=1 Selected=0x4FC83240
|
||||||
|
DockNode ID=0x0000000C Parent=0x0000000D SizeRef=1568,335 Selected=0x139FDA3F
|
||||||
|
DockNode ID=0x0000000E Parent=0x00000002 SizeRef=1568,225 Split=X Selected=0xD99DEA49
|
||||||
|
DockNode ID=0x00000004 Parent=0x0000000E SizeRef=871,225 Selected=0xD99DEA49
|
||||||
|
DockNode ID=0x00000006 Parent=0x0000000E SizeRef=870,225 Selected=0xAB74BEE9
|
||||||
|
DockNode ID=0x00000005 Parent=0xCCBD8CF7 SizeRef=303,826 Split=Y Selected=0x9F035453
|
||||||
|
DockNode ID=0x0000000F Parent=0x00000005 SizeRef=303,667 Selected=0x9F035453
|
||||||
|
DockNode ID=0x00000010 Parent=0x00000005 SizeRef=303,441 Selected=0x0B098C4B
|
||||||
|
|
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,59 +0,0 @@
|
|||||||
#ifndef _BITMAPCLASS_H_
|
|
||||||
#define _BITMAPCLASS_H_
|
|
||||||
|
|
||||||
|
|
||||||
//////////////
|
|
||||||
// INCLUDES //
|
|
||||||
//////////////
|
|
||||||
#include <directxmath.h>
|
|
||||||
using namespace DirectX;
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////
|
|
||||||
// MY CLASS INCLUDES //
|
|
||||||
///////////////////////
|
|
||||||
#include "textureclass.h"
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Class name: BitmapClass
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
class BitmapClass
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
struct VertexType
|
|
||||||
{
|
|
||||||
XMFLOAT3 position;
|
|
||||||
XMFLOAT2 texture;
|
|
||||||
};
|
|
||||||
|
|
||||||
public:
|
|
||||||
BitmapClass();
|
|
||||||
BitmapClass(const BitmapClass&);
|
|
||||||
~BitmapClass();
|
|
||||||
|
|
||||||
bool Initialize(ID3D11Device*, ID3D11DeviceContext*, int, int, char*, int, int);
|
|
||||||
void Shutdown();
|
|
||||||
bool Render(ID3D11DeviceContext*);
|
|
||||||
|
|
||||||
int GetIndexCount();
|
|
||||||
ID3D11ShaderResourceView* GetTexture();
|
|
||||||
|
|
||||||
void SetRenderLocation(int, int);
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool InitializeBuffers(ID3D11Device*);
|
|
||||||
void ShutdownBuffers();
|
|
||||||
bool UpdateBuffers(ID3D11DeviceContext*);
|
|
||||||
void RenderBuffers(ID3D11DeviceContext*);
|
|
||||||
|
|
||||||
bool LoadTexture(ID3D11Device*, ID3D11DeviceContext*, char*);
|
|
||||||
void ReleaseTexture();
|
|
||||||
private:
|
|
||||||
ID3D11Buffer* m_vertexBuffer, * m_indexBuffer;
|
|
||||||
int m_vertexCount, m_indexCount, m_screenWidth, m_screenHeight, m_bitmapWidth, m_bitmapHeight, m_renderX, m_renderY, m_prevPosX, m_prevPosY;
|
|
||||||
TextureClass* m_Texture;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,87 +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;
|
|
||||||
}
|
|
@ -1,90 +0,0 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Filename: d3dclass.h
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
#ifndef _D3DCLASS_H_
|
|
||||||
#define _D3DCLASS_H_
|
|
||||||
|
|
||||||
|
|
||||||
/////////////
|
|
||||||
// LINKING //
|
|
||||||
/////////////
|
|
||||||
#pragma comment(lib, "d3d11.lib")
|
|
||||||
#pragma comment(lib, "dxgi.lib")
|
|
||||||
#pragma comment(lib, "d3dcompiler.lib")
|
|
||||||
|
|
||||||
|
|
||||||
//////////////
|
|
||||||
// INCLUDES //
|
|
||||||
//////////////
|
|
||||||
#include "imguiManager.h"
|
|
||||||
#include "d3d11.h"
|
|
||||||
#include "fontshaderclass.h"
|
|
||||||
#include "fontclass.h"
|
|
||||||
#include "textclass.h"
|
|
||||||
|
|
||||||
using namespace DirectX;
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Class name: D3DClass
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
class D3DClass
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
D3DClass();
|
|
||||||
D3DClass(const D3DClass&);
|
|
||||||
~D3DClass();
|
|
||||||
|
|
||||||
bool Initialize(int, int, bool, HWND, bool, float, float);
|
|
||||||
void Shutdown();
|
|
||||||
|
|
||||||
void BeginScene(float, float, float, float);
|
|
||||||
void EndScene();
|
|
||||||
|
|
||||||
ID3D11Device* GetDevice();
|
|
||||||
ID3D11DeviceContext* GetDeviceContext();
|
|
||||||
//XMMATRIX GetProjectionMatrix(XMMATRIX& projectionMatrix);
|
|
||||||
IDXGISwapChain* m_swapChain;
|
|
||||||
IDXGISwapChain* GetSwapChain();
|
|
||||||
void ResizeSwapChain(int, int);
|
|
||||||
void SetVsync(bool vsync);
|
|
||||||
|
|
||||||
|
|
||||||
XMMATRIX GetProjectionMatrix() const { return m_projectionMatrix; };
|
|
||||||
XMMATRIX GetWorldMatrix() const { return m_worldMatrix;};
|
|
||||||
XMMATRIX GetOrthoMatrix() const { return m_orthoMatrix; };
|
|
||||||
|
|
||||||
void GetVideoCardInfo(char*, int&);
|
|
||||||
|
|
||||||
void SetBackBufferRenderTarget();
|
|
||||||
void ResetViewport();
|
|
||||||
|
|
||||||
void ReleaseResources();
|
|
||||||
void ResetResources(int newWidth, int newHeight);
|
|
||||||
|
|
||||||
void TurnZBufferOn();
|
|
||||||
void TurnZBufferOff();
|
|
||||||
|
|
||||||
void EnableAlphaBlending();
|
|
||||||
void DisableAlphaBlending();
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool m_vsync_enabled;
|
|
||||||
int m_videoCardMemory;
|
|
||||||
char m_videoCardDescription[128];
|
|
||||||
ID3D11Device* m_device;
|
|
||||||
ID3D11DeviceContext* m_deviceContext;
|
|
||||||
ID3D11RenderTargetView* m_renderTargetView;
|
|
||||||
ID3D11Texture2D* m_depthStencilBuffer;
|
|
||||||
ID3D11DepthStencilState* m_depthStencilState;
|
|
||||||
ID3D11DepthStencilView* m_depthStencilView;
|
|
||||||
ID3D11RasterizerState* m_rasterState;
|
|
||||||
XMMATRIX m_projectionMatrix;
|
|
||||||
XMMATRIX m_worldMatrix;
|
|
||||||
XMMATRIX m_orthoMatrix;
|
|
||||||
D3D11_VIEWPORT m_viewport;
|
|
||||||
ID3D11DepthStencilState* m_depthDisabledStencilState;
|
|
||||||
ID3D11BlendState* m_alphaEnableBlendingState;
|
|
||||||
ID3D11BlendState* m_alphaDisableBlendingState;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
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\ground01.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
|
@ -19,69 +19,68 @@
|
|||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<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="frustum.cpp" />
|
|
||||||
<ClCompile Include="imguiManager.cpp" />
|
|
||||||
<ClCompile Include="include\backends\imgui_impl_dx11.cpp" />
|
<ClCompile Include="include\backends\imgui_impl_dx11.cpp" />
|
||||||
<ClCompile Include="include\backends\imgui_impl_win32.cpp" />
|
<ClCompile Include="include\backends\imgui_impl_win32.cpp" />
|
||||||
<ClCompile Include="include\imgui.cpp" />
|
<ClCompile Include="include\imgui.cpp" />
|
||||||
<ClCompile Include="include\imgui_demo.cpp" />
|
|
||||||
<ClCompile Include="include\imgui_draw.cpp" />
|
<ClCompile Include="include\imgui_draw.cpp" />
|
||||||
<ClCompile Include="include\imgui_tables.cpp" />
|
<ClCompile Include="include\imgui_tables.cpp" />
|
||||||
<ClCompile Include="include\imgui_widgets.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="include\Src\DDSTextureLoader.cpp" />
|
<ClCompile Include="include\Src\DDSTextureLoader.cpp" />
|
||||||
<ClCompile Include="include\Src\DirectXHelpers.cpp" />
|
<ClCompile Include="include\Src\DirectXHelpers.cpp" />
|
||||||
<ClCompile Include="include\Src\pch.cpp" />
|
<ClCompile Include="include\Src\pch.cpp" />
|
||||||
<ClCompile Include="include\Src\SimpleMath.cpp" />
|
<ClCompile Include="include\Src\SimpleMath.cpp" />
|
||||||
<ClCompile Include="include\Src\WICTextureLoader.cpp" />
|
<ClCompile Include="include\Src\WICTextureLoader.cpp" />
|
||||||
<ClCompile Include="inputclass.cpp" />
|
<ClCompile Include="src\src\shader\alpha_map_shader_class.cpp" />
|
||||||
<ClCompile Include="Lightclass.cpp" />
|
<ClCompile Include="src\src\shader\celshade_class.cpp" />
|
||||||
<ClCompile Include="lightmapshaderclass.cpp" />
|
<ClCompile Include="src\src\shader\color_shader_class.cpp" />
|
||||||
<ClCompile Include="Lightshaderclass.cpp" />
|
<ClCompile Include="src\src\shader\depth_shader_class.cpp" />
|
||||||
<ClCompile Include="Main.cpp" />
|
<ClCompile Include="src\src\shader\font_shader_class.cpp" />
|
||||||
<ClCompile Include="modelclass.cpp" />
|
<ClCompile Include="src\src\shader\light_map_shader_class.cpp" />
|
||||||
<ClCompile Include="object.cpp" />
|
<ClCompile Include="src\src\shader\light_shader_class.cpp" />
|
||||||
<ClCompile Include="modellistclass.cpp" />
|
<ClCompile Include="src\src\shader\master_shader.cpp" />
|
||||||
<ClCompile Include="Multitextureshaderclass.cpp" />
|
<ClCompile Include="src\src\shader\multi_texture_shader_class.cpp" />
|
||||||
<ClCompile Include="normalmapshaderclass.cpp" />
|
<ClCompile Include="src\src\shader\normal_map_shader_class.cpp" />
|
||||||
<ClCompile Include="refractionshaderclass.cpp" />
|
<ClCompile Include="src\src\shader\reflection_shader_class.cpp" />
|
||||||
<ClCompile Include="shadermanagerclass.cpp" />
|
<ClCompile Include="src\src\shader\refraction_shader_class.cpp" />
|
||||||
<ClCompile Include="physics.cpp" />
|
<ClCompile Include="src\src\shader\shader_manager_class.cpp" />
|
||||||
<ClCompile Include="positionclass.cpp" />
|
<ClCompile Include="src\src\shader\skybox_shader_class.cpp" />
|
||||||
<ClCompile Include="reflectionshaderclass.cpp" />
|
<ClCompile Include="src\src\shader\spec_map_shader_class.cpp" />
|
||||||
<ClCompile Include="rendertextureclass.cpp" />
|
<ClCompile Include="src\src\shader\sunlight_shader_class.cpp" />
|
||||||
<ClCompile Include="specmapshaderclass.cpp" />
|
<ClCompile Include="src\src\shader\texture_shader_class.cpp" />
|
||||||
<ClCompile Include="Spriteclass.cpp" />
|
<ClCompile Include="src\src\shader\translate_shader_class.cpp" />
|
||||||
<ClCompile Include="Systemclass.cpp" />
|
<ClCompile Include="src\src\shader\transparent_shader_class.cpp" />
|
||||||
<ClCompile Include="textclass.cpp" />
|
<ClCompile Include="src\src\shader\water_shader_class.cpp" />
|
||||||
<ClCompile Include="textureclass.cpp" />
|
<ClCompile Include="src\src\system\application_class.cpp" />
|
||||||
<ClCompile Include="textureshaderclass.cpp" />
|
<ClCompile Include="src\src\system\bitmap_class.cpp" />
|
||||||
<ClCompile Include="Timerclass.cpp" />
|
<ClCompile Include="src\src\system\camera_class.cpp" />
|
||||||
<ClCompile Include="translateshaderclass.cpp" />
|
<ClCompile Include="src\src\system\d_3d_class.cpp" />
|
||||||
<ClCompile Include="transparentshaderclass.cpp" />
|
<ClCompile Include="src\src\system\display_plane_class.cpp" />
|
||||||
<ClCompile Include="watershaderclass.cpp" />
|
<ClCompile Include="src\src\system\font_class.cpp" />
|
||||||
|
<ClCompile Include="src\src\system\fps_class.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\input_class.cpp" />
|
||||||
|
<ClCompile Include="src\src\system\light_class.cpp" />
|
||||||
|
<ClCompile Include="src\src\system\Main.cpp" />
|
||||||
|
<ClCompile Include="src\src\system\model_class.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\position_class.cpp" />
|
||||||
|
<ClCompile Include="src\src\system\render_texture_class.cpp" />
|
||||||
|
<ClCompile Include="src\src\system\scene_manager.cpp" />
|
||||||
|
<ClCompile Include="src\src\system\shadow_map.cpp" />
|
||||||
|
<ClCompile Include="src\src\system\Skybox.cpp" />
|
||||||
|
<ClCompile Include="src\src\system\sprite_class.cpp" />
|
||||||
|
<ClCompile Include="src\src\system\stats.cpp" />
|
||||||
|
<ClCompile Include="src\src\system\system_class.cpp" />
|
||||||
|
<ClCompile Include="src\src\system\text_class.cpp" />
|
||||||
|
<ClCompile Include="src\src\system\texture_class.cpp" />
|
||||||
|
<ClCompile Include="src\src\system\timer_class.cpp" />
|
||||||
|
<ClCompile Include="src\src\system\vulkan.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<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="frustum.h" />
|
|
||||||
<ClInclude Include="imguiManager.h" />
|
|
||||||
<ClInclude Include="include\backends\imgui_impl_dx11.h" />
|
<ClInclude Include="include\backends\imgui_impl_dx11.h" />
|
||||||
<ClInclude Include="include\backends\imgui_impl_win32.h" />
|
<ClInclude Include="include\backends\imgui_impl_win32.h" />
|
||||||
<ClInclude Include="include\imconfig.h" />
|
<ClInclude Include="include\imconfig.h" />
|
||||||
@ -90,225 +89,346 @@
|
|||||||
<ClInclude Include="include\imstb_rectpack.h" />
|
<ClInclude Include="include\imstb_rectpack.h" />
|
||||||
<ClInclude Include="include\imstb_textedit.h" />
|
<ClInclude Include="include\imstb_textedit.h" />
|
||||||
<ClInclude Include="include\imstb_truetype.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="include\Src\CMO.h" />
|
<ClInclude Include="include\Src\CMO.h" />
|
||||||
<ClInclude Include="include\Src\DDS.h" />
|
<ClInclude Include="include\Src\DDS.h" />
|
||||||
<ClInclude Include="include\Src\LoaderHelpers.h" />
|
<ClInclude Include="include\Src\LoaderHelpers.h" />
|
||||||
<ClInclude Include="include\Src\pch.h" />
|
<ClInclude Include="include\Src\pch.h" />
|
||||||
<ClInclude Include="include\Src\PlatformHelpers.h" />
|
<ClInclude Include="include\Src\PlatformHelpers.h" />
|
||||||
<ClInclude Include="inputclass.h" />
|
<ClInclude Include="src\inc\shader\alpha_map_shader_class.h" />
|
||||||
<ClInclude Include="lightclass.h" />
|
<ClInclude Include="src\inc\shader\celshade_class.h" />
|
||||||
<ClInclude Include="lightmapshaderclass.h" />
|
<ClInclude Include="src\inc\shader\color_shader_class.h" />
|
||||||
<ClInclude Include="lightshaderclass.h" />
|
<ClInclude Include="src\inc\shader\depth_shader_class.h" />
|
||||||
<ClInclude Include="Logger.h" />
|
<ClInclude Include="src\inc\shader\font_shader_class.h" />
|
||||||
<ClInclude Include="modelclass.h" />
|
<ClInclude Include="src\inc\shader\light_map_shader_class.h" />
|
||||||
<ClInclude Include="object.h" />
|
<ClInclude Include="src\inc\shader\light_shader_class.h" />
|
||||||
<ClInclude Include="modellistclass.h" />
|
<ClInclude Include="src\inc\shader\master_shader.h" />
|
||||||
<ClInclude Include="Multitextureshaderclass.h" />
|
<ClInclude Include="src\inc\shader\multi_texture_shader_class.h" />
|
||||||
<ClInclude Include="normalmapshaderclass.h" />
|
<ClInclude Include="src\inc\shader\normal_map_shader_class.h" />
|
||||||
<ClInclude Include="refractionshaderclass.h" />
|
<ClInclude Include="src\inc\shader\reflection_shader_class.h" />
|
||||||
<ClInclude Include="shadermanagerclass.h" />
|
<ClInclude Include="src\inc\shader\refraction_shader_class.h" />
|
||||||
<ClInclude Include="physics.h" />
|
<ClInclude Include="src\inc\shader\shader_manager_class.h" />
|
||||||
<ClInclude Include="positionclass.h" />
|
<ClInclude Include="src\inc\shader\skybox_shader_class.h" />
|
||||||
<ClInclude Include="reflectionshaderclass.h" />
|
<ClInclude Include="src\inc\shader\spec_map_shader_class.h" />
|
||||||
<ClInclude Include="rendertextureclass.h" />
|
<ClInclude Include="src\inc\shader\sunlight_shader_class.h" />
|
||||||
<ClInclude Include="resources.h" />
|
<ClInclude Include="src\inc\shader\texture_shader_class.h" />
|
||||||
<ClInclude Include="specmapshaderclass.h" />
|
<ClInclude Include="src\inc\shader\translate_shader_class.h" />
|
||||||
<ClInclude Include="Spriteclass.h" />
|
<ClInclude Include="src\inc\shader\transparent_shader_class.h" />
|
||||||
<ClInclude Include="systemclass.h" />
|
<ClInclude Include="src\inc\shader\water_shader_class.h" />
|
||||||
<ClInclude Include="textclass.h" />
|
<ClInclude Include="src\inc\system\application_class.h" />
|
||||||
<ClInclude Include="textureclass.h" />
|
<ClInclude Include="src\inc\system\bitmap_class.h" />
|
||||||
<ClInclude Include="textureshaderclass.h" />
|
<ClInclude Include="src\inc\system\camera_class.h" />
|
||||||
<ClInclude Include="Timerclass.h" />
|
<ClInclude Include="src\inc\system\d_3d_class.h" />
|
||||||
<ClInclude Include="translateshaderclass.h" />
|
<ClInclude Include="src\inc\system\display_plane_class.h" />
|
||||||
<ClInclude Include="transparentshaderclass.h" />
|
<ClInclude Include="src\inc\system\font_class.h" />
|
||||||
<ClInclude Include="watershaderclass.h" />
|
<ClInclude Include="src\inc\system\fps_class.h" />
|
||||||
|
<ClInclude Include="src\inc\system\fps_limiter.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\input_class.h" />
|
||||||
|
<ClInclude Include="src\inc\system\light_class.h" />
|
||||||
|
<ClInclude Include="src\inc\system\Logger.h" />
|
||||||
|
<ClInclude Include="src\inc\system\model_class.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\position_class.h" />
|
||||||
|
<ClInclude Include="src\inc\system\render_texture_class.h" />
|
||||||
|
<ClInclude Include="src\inc\system\sceneManager.h" />
|
||||||
|
<ClInclude Include="src\inc\system\scene_manager.h" />
|
||||||
|
<ClInclude Include="src\inc\system\shadow_map.h" />
|
||||||
|
<ClInclude Include="src\inc\system\Skybox.h" />
|
||||||
|
<ClInclude Include="src\inc\system\sprite_class.h" />
|
||||||
|
<ClInclude Include="src\inc\system\stats.h" />
|
||||||
|
<ClInclude Include="src\inc\system\system_class.h" />
|
||||||
|
<ClInclude Include="src\inc\system\text_class.h" />
|
||||||
|
<ClInclude Include="src\inc\system\texture_class.h" />
|
||||||
|
<ClInclude Include="src\inc\system\timer_class.h" />
|
||||||
|
<ClInclude Include="src\inc\system\vulkan.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<CopyFileToFolders Include="alphamap.ps">
|
<CopyFileToFolders Include="src\hlsl\alphamap.ps">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="alphamap.vs">
|
<CopyFileToFolders Include="src\hlsl\alphamap.vs">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="font.ps">
|
<CopyFileToFolders Include="src\hlsl\celshading.ps">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="font.vs">
|
<CopyFileToFolders Include="src\hlsl\celshading.vs">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="light.ps">
|
<CopyFileToFolders Include="src\hlsl\Color.ps">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="light.vs">
|
<CopyFileToFolders Include="src\hlsl\Color.vs">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="lightmap.ps">
|
<CopyFileToFolders Include="src\hlsl\depth.ps">
|
||||||
|
<DestinationFolders>F:\Github_Repo\khaotic-engine-Reborn\x64\Debug\\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFileName>%(Filename)%(Extension)</DestinationFileName>
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="lightmap.vs">
|
<CopyFileToFolders Include="src\hlsl\depth.vs">
|
||||||
|
<DestinationFolders>F:\Github_Repo\khaotic-engine-Reborn\x64\Debug\\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFileName>%(Filename)%(Extension)</DestinationFileName>
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="Multitexture.ps">
|
<CopyFileToFolders Include="src\hlsl\font.ps">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="Multitexture.vs">
|
<CopyFileToFolders Include="src\hlsl\font.vs">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="normalmap.ps">
|
<CopyFileToFolders Include="src\hlsl\light.ps">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="normalmap.vs">
|
<CopyFileToFolders Include="src\hlsl\light.vs">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="..\KhaoticDemo\water.ps">
|
<CopyFileToFolders Include="src\hlsl\lightmap.ps">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="celshading.ps">
|
<CopyFileToFolders Include="src\hlsl\lightmap.vs">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="celshading.vs">
|
<CopyFileToFolders Include="src\hlsl\Multitexture.ps">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<None Include="packages.config" />
|
<CopyFileToFolders Include="src\hlsl\Multitexture.vs">
|
||||||
<CopyFileToFolders Include="reflection.ps">
|
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="reflection.vs">
|
<CopyFileToFolders Include="src\hlsl\normalmap.ps">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="specmap.ps">
|
<CopyFileToFolders Include="src\hlsl\normalmap.vs">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="specmap.vs">
|
<CopyFileToFolders Include="src\hlsl\reflection.ps">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="texture.ps">
|
<CopyFileToFolders Include="src\hlsl\reflection.vs">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="texture.vs">
|
<CopyFileToFolders Include="src\hlsl\refraction.ps">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="transparent.ps">
|
<CopyFileToFolders Include="src\hlsl\refraction.vs">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="transparent.vs">
|
<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>
|
<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>
|
||||||
<CopyFileToFolders Include="refraction.ps">
|
<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>
|
<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>
|
||||||
<CopyFileToFolders Include="refraction.vs">
|
<CopyFileToFolders Include="src\hlsl\specmap.ps">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
<CopyFileToFolders Include="water.vs">
|
<CopyFileToFolders Include="src\hlsl\specmap.vs">
|
||||||
<FileType>Document</FileType>
|
<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>
|
||||||
</ItemGroup>
|
<CopyFileToFolders Include="src\hlsl\sunlight.ps">
|
||||||
<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>
|
<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>
|
||||||
<CopyFileToFolders Include="Color.vs">
|
<CopyFileToFolders Include="src\hlsl\sunlight.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>
|
<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\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="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="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="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="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="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="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="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>
|
</CopyFileToFolders>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<CopyFileToFolders Include="font01.tga" />
|
<CopyFileToFolders Include="font01.tga" />
|
||||||
<CopyFileToFolders Include="assets\Texture\alpha01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\Bricks2K.png">
|
<CopyFileToFolders Include="assets\Texture\Bricks2K.png">
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Texture\BricksGLOSS2K.png">
|
<CopyFileToFolders Include="assets\Texture\BricksGLOSS2K.png">
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Texture\BricksNRM2K.png">
|
<CopyFileToFolders Include="assets\Texture\BricksNRM2K.png">
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
|
||||||
<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>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Texture\dirt01.png">
|
<CopyFileToFolders Include="assets\Texture\dirt01.png">
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
|
||||||
<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\font01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\ground01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\light01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\marble01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\moss01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\normal01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\spec02.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\sprite01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\sprite02.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\sprite03.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\sprite04.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\stone01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\stone01.tga">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\wall.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\wall01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\water01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Texture\EmptyTexture.png">
|
<CopyFileToFolders Include="assets\Texture\EmptyTexture.png">
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
|
||||||
<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\font01.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\ground01.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\light01.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\marble01.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\moss01.png">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
</ExcludedFromBuild>
|
||||||
|
<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\normal01.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\spec02.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\sprite01.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\sprite02.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\sprite03.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\sprite04.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\stone01.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\stone01.tga">
|
||||||
|
<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\wall.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\wall01.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\water01.png">
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<Image Include="KhaoticIcon.ico" />
|
<Image Include="KhaoticIcon.ico" />
|
||||||
<CopyFileToFolders Include="sprite01.tga" />
|
<CopyFileToFolders Include="sprite01.tga" />
|
||||||
@ -319,93 +439,140 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<CopyFileToFolders Include="font01.txt" />
|
<CopyFileToFolders Include="font01.txt" />
|
||||||
</ItemGroup>
|
</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>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="resources.rc" />
|
<ResourceCompile Include="resources.rc" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\86.obj">
|
|
||||||
<FileType>Document</FileType>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\cone.obj">
|
|
||||||
<FileType>Document</FileType>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\isosphere.obj">
|
|
||||||
<FileType>Document</FileType>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\monke.obj">
|
|
||||||
<FileType>Document</FileType>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\vaisseau.obj">
|
|
||||||
<FileType>Document</FileType>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\bath.txt">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\chunk.txt">
|
|
||||||
<FileType>Text</FileType>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\cube.txt">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\ground.txt">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\plane.txt">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\sphere.txt">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\square.txt">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\wall.txt">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\water.txt">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<CopyFileToFolders Include="sprite_data_01.txt" />
|
<CopyFileToFolders Include="sprite_data_01.txt" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Content Include="assets\Model\OBJ\86.obj" />
|
||||||
|
<Content Include="assets\Model\OBJ\cone.obj" />
|
||||||
|
<Content Include="assets\Model\OBJ\invertcube.obj" />
|
||||||
|
<Content Include="assets\Model\OBJ\isosphere.obj" />
|
||||||
|
<Content Include="assets\Model\OBJ\monke.obj" />
|
||||||
|
<Content Include="assets\Model\OBJ\plane.obj" />
|
||||||
|
<Content Include="assets\Model\OBJ\vaisseautri.obj" />
|
||||||
|
<Content Include="assets\Model\TXT\bath.txt" />
|
||||||
|
<Content Include="assets\Model\TXT\chunk.txt" />
|
||||||
|
<Content Include="assets\Model\TXT\cube.txt" />
|
||||||
|
<Content Include="assets\Model\TXT\ground.txt" />
|
||||||
|
<Content Include="assets\Model\TXT\plane.txt" />
|
||||||
|
<Content Include="assets\Model\TXT\sphere.txt" />
|
||||||
|
<Content Include="assets\Model\TXT\square.txt" />
|
||||||
|
<Content Include="assets\Model\TXT\wall.txt" />
|
||||||
|
<Content Include="assets\Model\TXT\water.txt" />
|
||||||
|
<CopyFileToFolders Include="assets\Texture\alpha01.png" />
|
||||||
|
<Content Include="assets\Texture\dirt01.png" />
|
||||||
|
<Content Include="assets\Texture\EmptyTexture.png" />
|
||||||
|
<Content Include="assets\Texture\font01.png" />
|
||||||
|
<Content Include="assets\Texture\ground01.png" />
|
||||||
|
<Content Include="assets\Texture\imgui.ini" />
|
||||||
|
<Content Include="assets\Texture\light01.png" />
|
||||||
|
<Content Include="assets\Texture\marble01.png" />
|
||||||
|
<Content Include="assets\Texture\moss01.png" />
|
||||||
|
<Content Include="assets\Texture\normal01.png" />
|
||||||
|
<Content Include="assets\Texture\spec02.png" />
|
||||||
|
<Content Include="assets\Texture\sprite01.png" />
|
||||||
|
<Content Include="assets\Texture\sprite02.png" />
|
||||||
|
<Content Include="assets\Texture\sprite03.png" />
|
||||||
|
<Content Include="assets\Texture\sprite04.png" />
|
||||||
|
<Content Include="assets\Texture\stone01.png" />
|
||||||
|
<Content Include="assets\Texture\stone01.tga" />
|
||||||
|
<Content Include="assets\Texture\wall.png" />
|
||||||
|
<Content Include="assets\Texture\wall01.png" />
|
||||||
|
<Content Include="assets\Texture\water01.png" />
|
||||||
|
<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>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="assets\Texture\imgui.ini" />
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<CopyFileToFolders Include="assets\Model\OBJ\86.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>
|
||||||
|
<CopyFileToFolders Include="assets\Model\OBJ\cone.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>
|
||||||
|
<CopyFileToFolders Include="assets\Model\OBJ\invertcube.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>
|
||||||
|
<CopyFileToFolders Include="assets\Model\OBJ\isosphere.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>
|
||||||
|
<CopyFileToFolders Include="assets\Model\OBJ\monke.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>
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\plane.obj">
|
<CopyFileToFolders Include="assets\Model\OBJ\plane.obj">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\OBJ\vaisseau.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>
|
||||||
|
<CopyFileToFolders Include="assets\Model\OBJ\vaisseautri.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>
|
||||||
|
<ItemGroup>
|
||||||
|
<CopyFileToFolders Include="assets\Model\TXT\bath.txt">
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\TXT\chunk.txt">
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\TXT\cube.txt">
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\TXT\ground.txt">
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\TXT\plane.txt">
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\TXT\sphere.txt">
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\TXT\square.txt">
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\TXT\wall.txt">
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\TXT\water.txt">
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
@ -494,12 +661,13 @@
|
|||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)enginecustom\include\backends;$(SolutionDir)enginecustom\include\Inc;$(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>
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>$(SolutionDir)enginecustom\include\Vulkan\Lib;$(SolutionDir)enginecustom\include\GLFW\lib-vc2022;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
@ -511,13 +679,14 @@
|
|||||||
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)enginecustom\include\backends;$(SolutionDir)enginecustom\include\Inc;$(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>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>$(SolutionDir)enginecustom\include\Vulkan\Lib;$(SolutionDir)enginecustom\include\GLFW\lib-vc2022;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
@ -52,23 +52,20 @@
|
|||||||
<Filter Include="Fichiers d%27en-tête\Shader">
|
<Filter Include="Fichiers d%27en-tête\Shader">
|
||||||
<UniqueIdentifier>{e087647e-a306-4246-9320-bab0830bb634}</UniqueIdentifier>
|
<UniqueIdentifier>{e087647e-a306-4246-9320-bab0830bb634}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Fichiers d%27en-tête\System">
|
|
||||||
<UniqueIdentifier>{14b07251-cf6d-4391-9fca-ec94e08d4427}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Fichiers sources\Shader">
|
<Filter Include="Fichiers sources\Shader">
|
||||||
<UniqueIdentifier>{3c669b93-a9fd-4b74-813f-f9780413f76b}</UniqueIdentifier>
|
<UniqueIdentifier>{3c669b93-a9fd-4b74-813f-f9780413f76b}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Fichiers sources\System">
|
<Filter Include="Fichiers sources\System">
|
||||||
<UniqueIdentifier>{b2659b1e-695d-488e-9a1c-341691d312bc}</UniqueIdentifier>
|
<UniqueIdentifier>{b2659b1e-695d-488e-9a1c-341691d312bc}</UniqueIdentifier>
|
||||||
</Filter>
|
</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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="Main.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">
|
<ClCompile Include="include\backends\imgui_impl_dx11.cpp">
|
||||||
<Filter>Fichiers sources\ImGui</Filter>
|
<Filter>Fichiers sources\ImGui</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -87,33 +84,6 @@
|
|||||||
<ClCompile Include="include\imgui_widgets.cpp">
|
<ClCompile Include="include\imgui_widgets.cpp">
|
||||||
<Filter>Fichiers sources\ImGui</Filter>
|
<Filter>Fichiers sources\ImGui</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="bitmapclass.cpp">
|
|
||||||
<Filter>Fichiers sources</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="fontclass.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="textclass.cpp">
|
|
||||||
<Filter>Fichiers sources</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="fpsclass.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="displayplaneclass.cpp">
|
|
||||||
<Filter>Fichiers sources</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="include\Src\DDSTextureLoader.cpp">
|
<ClCompile Include="include\Src\DDSTextureLoader.cpp">
|
||||||
<Filter>Fichiers sources\DirectX Tool Kit</Filter>
|
<Filter>Fichiers sources\DirectX Tool Kit</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -129,104 +99,155 @@
|
|||||||
<ClCompile Include="include\Src\WICTextureLoader.cpp">
|
<ClCompile Include="include\Src\WICTextureLoader.cpp">
|
||||||
<Filter>Fichiers sources\DirectX Tool Kit</Filter>
|
<Filter>Fichiers sources\DirectX Tool Kit</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="alphamapshaderclass.cpp">
|
<ClCompile Include="src\src\system\frustum.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="CelShadingShader.cpp">
|
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Colorshaderclass.cpp">
|
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="fontshaderclass.cpp">
|
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="lightmapshaderclass.cpp">
|
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Lightshaderclass.cpp">
|
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Multitextureshaderclass.cpp">
|
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="normalmapshaderclass.cpp">
|
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="reflectionshaderclass.cpp">
|
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="refractionshaderclass.cpp">
|
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="shadermanagerclass.cpp">
|
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="specmapshaderclass.cpp">
|
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="watershaderclass.cpp">
|
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="transparentshaderclass.cpp">
|
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="translateshaderclass.cpp">
|
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="textureshaderclass.cpp">
|
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="applicationclass.cpp">
|
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources\System</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Cameraclass.cpp">
|
<ClCompile Include="src\src\system\frustumclass.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources\System</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="d3dclass.cpp">
|
<ClCompile Include="src\src\system\imguiManager.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources\System</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="imguiManager.cpp">
|
<ClCompile Include="src\src\system\Main.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources\System</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="inputclass.cpp">
|
<ClCompile Include="src\src\system\Modellistclass.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources\System</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Lightclass.cpp">
|
<ClCompile Include="src\src\system\object.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources\System</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="object.cpp">
|
<ClCompile Include="src\src\system\physics.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources\System</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="physics.cpp">
|
<ClCompile Include="src\src\system\vulkan.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="modelclass.cpp">
|
<ClCompile Include="src\src\system\Skybox.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="positionclass.cpp">
|
<ClCompile Include="src\src\shader\alpha_map_shader_class.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="rendertextureclass.cpp">
|
<ClCompile Include="src\src\shader\celshade_class.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Systemclass.cpp">
|
<ClCompile Include="src\src\shader\color_shader_class.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Timerclass.cpp">
|
<ClCompile Include="src\src\shader\depth_shader_class.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="textureclass.cpp">
|
<ClCompile Include="src\src\shader\font_shader_class.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="frustum.cpp">
|
<ClCompile Include="src\src\shader\light_map_shader_class.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\shader\light_shader_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\shader\master_shader.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\shader\multi_texture_shader_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\shader\normal_map_shader_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\shader\reflection_shader_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\shader\refraction_shader_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\shader\shader_manager_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\shader\skybox_shader_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\shader\spec_map_shader_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\shader\sunlight_shader_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\shader\texture_shader_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\shader\translate_shader_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\shader\transparent_shader_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\shader\water_shader_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\application_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\bitmap_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\camera_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\d_3d_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\display_plane_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\font_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\fps_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\input_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\light_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\model_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\position_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\render_texture_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\shadow_map.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\sprite_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\system_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\text_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\texture_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\timer_class.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\scene_manager.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\src\system\stats.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="systemclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="include\imconfig.h">
|
<ClInclude Include="include\imconfig.h">
|
||||||
<Filter>Fichiers d%27en-tête\ImGui</Filter>
|
<Filter>Fichiers d%27en-tête\ImGui</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@ -251,33 +272,6 @@
|
|||||||
<ClInclude Include="include\backends\imgui_impl_win32.h">
|
<ClInclude Include="include\backends\imgui_impl_win32.h">
|
||||||
<Filter>Fichiers d%27en-tête\ImGui</Filter>
|
<Filter>Fichiers d%27en-tête\ImGui</Filter>
|
||||||
</ClInclude>
|
</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="fpsclass.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="fpsclass.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="displayplaneclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="include\Src\CMO.h">
|
<ClInclude Include="include\Src\CMO.h">
|
||||||
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
|
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@ -293,101 +287,158 @@
|
|||||||
<ClInclude Include="include\Src\PlatformHelpers.h">
|
<ClInclude Include="include\Src\PlatformHelpers.h">
|
||||||
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
|
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="alphamapshaderclass.h">
|
<ClInclude Include="src\inc\system\frustum.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="CelShadingShader.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Colorshaderclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="fontshaderclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="lightmapshaderclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="lightshaderclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Multitextureshaderclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="normalmapshaderclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="reflectionshaderclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="refractionshaderclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="shadermanagerclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="specmapshaderclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="textureshaderclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="translateshaderclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="transparentshaderclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="watershaderclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="applicationclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="d3dclass.h">
|
<ClInclude Include="src\inc\system\frustumclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Cameraclass.h">
|
<ClInclude Include="src\inc\system\imguiManager.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="imguiManager.h">
|
<ClInclude Include="src\inc\system\Logger.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Logger.h">
|
<ClInclude Include="src\inc\system\Modellistclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="inputclass.h">
|
<ClInclude Include="src\inc\system\object.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="lightclass.h">
|
<ClInclude Include="src\inc\system\physics.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="modelclass.h">
|
<ClInclude Include="src\inc\system\sceneManager.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="physics.h">
|
<ClInclude Include="src\inc\system\vulkan.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Timerclass.h">
|
<ClInclude Include="src\inc\system\Skybox.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="textureclass.h">
|
<ClInclude Include="src\inc\shader\alpha_map_shader_class.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="resources.h">
|
<ClInclude Include="src\inc\shader\celshade_class.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="rendertextureclass.h">
|
<ClInclude Include="src\inc\shader\color_shader_class.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="positionclass.h">
|
<ClInclude Include="src\inc\shader\depth_shader_class.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="object.h">
|
<ClInclude Include="src\inc\shader\font_shader_class.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="frustum.h">
|
<ClInclude Include="src\inc\shader\light_map_shader_class.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\shader\light_shader_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\shader\master_shader.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\shader\multi_texture_shader_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\shader\normal_map_shader_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\shader\reflection_shader_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\shader\refraction_shader_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\shader\shader_manager_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\shader\skybox_shader_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\shader\spec_map_shader_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\shader\sunlight_shader_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\shader\texture_shader_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\shader\translate_shader_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\shader\transparent_shader_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\shader\water_shader_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\application_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\bitmap_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\camera_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\d_3d_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\display_plane_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\font_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\fps_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\fps_limiter.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\input_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\light_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\model_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\position_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\render_texture_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\shadow_map.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\sprite_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\system_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\text_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\texture_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\timer_class.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\scene_manager.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\stats.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -395,122 +446,164 @@
|
|||||||
<Filter>Assets</Filter>
|
<Filter>Assets</Filter>
|
||||||
</Image>
|
</Image>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="resources.rc">
|
<ResourceCompile Include="resources.rc">
|
||||||
<Filter>Fichiers de ressources</Filter>
|
<Filter>Fichiers de ressources</Filter>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<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">
|
<CopyFileToFolders Include="font01.txt">
|
||||||
<Filter>Fonts</Filter>
|
<Filter>Fonts</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="font01.tga">
|
<CopyFileToFolders Include="font01.tga">
|
||||||
<Filter>fonts</Filter>
|
<Filter>fonts</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="sprite01.tga">
|
<CopyFileToFolders Include="sprite_data_01.txt">
|
||||||
<Filter>Assets</Filter>
|
<Filter>Assets</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="sprite01.tga">
|
||||||
|
<Filter>Assets\Texture</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="sprite02.tga">
|
<CopyFileToFolders Include="sprite02.tga">
|
||||||
<Filter>Assets</Filter>
|
<Filter>Assets\Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="sprite03.tga">
|
<CopyFileToFolders Include="sprite03.tga">
|
||||||
<Filter>Assets</Filter>
|
<Filter>Assets\Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="sprite04.tga">
|
<CopyFileToFolders Include="sprite04.tga">
|
||||||
<Filter>Assets</Filter>
|
<Filter>Assets\Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="Color.ps">
|
<CopyFileToFolders Include="src\hlsl\alphamap.ps" />
|
||||||
<Filter>shader</Filter>
|
<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>
|
||||||
<CopyFileToFolders Include="light.vs">
|
<CopyFileToFolders Include="assets\Texture\BricksNRM2K.png">
|
||||||
<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">
|
|
||||||
<Filter>Texture</Filter>
|
<Filter>Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="Multitexture.vs">
|
<CopyFileToFolders Include="assets\Texture\BricksGLOSS2K.png">
|
||||||
<Filter>Texture</Filter>
|
<Filter>Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="normalmap.ps">
|
<CopyFileToFolders Include="assets\Texture\Bricks2K.png">
|
||||||
<Filter>Texture</Filter>
|
<Filter>Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="normalmap.vs">
|
<CopyFileToFolders Include="assets\Skybox\skybox.png">
|
||||||
|
<Filter>Assets\Skybox</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="src\hlsl\depth.ps" />
|
||||||
|
<CopyFileToFolders Include="src\hlsl\depth.vs" />
|
||||||
|
<CopyFileToFolders Include="assets\Texture\alpha01.png">
|
||||||
|
<Filter>Fichiers de ressources</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Texture\dirt01.png">
|
||||||
<Filter>Texture</Filter>
|
<Filter>Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="specmap.ps">
|
<CopyFileToFolders Include="assets\Texture\EmptyTexture.png">
|
||||||
<Filter>Texture</Filter>
|
<Filter>Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="specmap.vs">
|
<CopyFileToFolders Include="assets\Texture\font01.png">
|
||||||
<Filter>Texture</Filter>
|
<Filter>Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="texture.ps">
|
<CopyFileToFolders Include="assets\Texture\ground01.png">
|
||||||
<Filter>Texture</Filter>
|
<Filter>Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="texture.vs">
|
<CopyFileToFolders Include="assets\Texture\light01.png">
|
||||||
<Filter>Texture</Filter>
|
<Filter>Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="alphamap.vs">
|
<CopyFileToFolders Include="assets\Texture\marble01.png">
|
||||||
<Filter>Texture</Filter>
|
<Filter>Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="alphamap.ps">
|
<CopyFileToFolders Include="assets\Texture\moss01.png">
|
||||||
<Filter>Texture</Filter>
|
<Filter>Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="refraction.ps">
|
<CopyFileToFolders Include="assets\Texture\normal01.png">
|
||||||
<Filter>shader</Filter>
|
<Filter>Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="refraction.vs">
|
<CopyFileToFolders Include="assets\Texture\spec02.png">
|
||||||
<Filter>shader</Filter>
|
<Filter>Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="..\KhaoticDemo\water.ps">
|
<CopyFileToFolders Include="assets\Texture\sprite01.png">
|
||||||
<Filter>shader</Filter>
|
<Filter>Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="water.vs">
|
<CopyFileToFolders Include="assets\Texture\sprite02.png">
|
||||||
<Filter>shader</Filter>
|
<Filter>Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="celshading.vs">
|
<CopyFileToFolders Include="assets\Texture\sprite03.png">
|
||||||
<Filter>shader</Filter>
|
<Filter>Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="celshading.ps">
|
<CopyFileToFolders Include="assets\Texture\sprite04.png">
|
||||||
<Filter>shader</Filter>
|
<Filter>Texture</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Texture\stone01.png">
|
||||||
|
<Filter>Texture</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Texture\stone01.tga">
|
||||||
|
<Filter>Texture</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Texture\wall.png">
|
||||||
|
<Filter>Texture</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Texture\wall01.png">
|
||||||
|
<Filter>Texture</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Texture\water01.png">
|
||||||
|
<Filter>Texture</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\OBJ\vaisseautri.obj">
|
||||||
|
<Filter>Assets\Model\OBJ</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\OBJ\vaisseau.obj">
|
||||||
|
<Filter>Assets\Model\OBJ</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\OBJ\plane.obj">
|
||||||
|
<Filter>Assets\Model\OBJ</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\OBJ\monke.obj">
|
||||||
|
<Filter>Assets\Model\OBJ</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\OBJ\isosphere.obj">
|
||||||
|
<Filter>Assets\Model\OBJ</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\OBJ\invertcube.obj">
|
||||||
|
<Filter>Assets\Model\OBJ</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\OBJ\cone.obj">
|
||||||
|
<Filter>Assets\Model\OBJ</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="assets\Model\OBJ\86.obj">
|
||||||
|
<Filter>Assets\Model\OBJ</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\bath.txt">
|
<CopyFileToFolders Include="assets\Model\TXT\bath.txt">
|
||||||
<Filter>Assets\Model\TXT</Filter>
|
<Filter>Assets\Model\TXT</Filter>
|
||||||
@ -539,92 +632,11 @@
|
|||||||
<CopyFileToFolders Include="assets\Model\TXT\water.txt">
|
<CopyFileToFolders Include="assets\Model\TXT\water.txt">
|
||||||
<Filter>Assets\Model\TXT</Filter>
|
<Filter>Assets\Model\TXT</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\vaisseau.obj">
|
</ItemGroup>
|
||||||
<Filter>Assets\Model\OBJ</Filter>
|
<ItemGroup>
|
||||||
</CopyFileToFolders>
|
<None Include="packages.config" />
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\monke.obj">
|
<None Include="assets\Texture\imgui.ini">
|
||||||
<Filter>Assets\Model\OBJ</Filter>
|
<Filter>Texture</Filter>
|
||||||
</CopyFileToFolders>
|
</None>
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\isosphere.obj">
|
|
||||||
<Filter>Assets\Model\OBJ</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\cone.obj">
|
|
||||||
<Filter>Assets\Model\OBJ</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\86.obj">
|
|
||||||
<Filter>Assets\Model\OBJ</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="sprite_data_01.txt">
|
|
||||||
<Filter>Assets</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\stone01.tga">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\alpha01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\Bricks2K.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\BricksGLOSS2K.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\BricksNRM2K.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\dirt01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\font01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\ground01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\light01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\marble01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\moss01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\normal01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\spec02.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\sprite01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\sprite02.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\sprite03.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\sprite04.png">
|
|
||||||
<Filter>Fichiers de ressources</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\stone01.png">
|
|
||||||
<Filter>Fichiers de ressources</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\wall.png">
|
|
||||||
<Filter>Fichiers de ressources</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\wall01.png">
|
|
||||||
<Filter>Fichiers de ressources</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\water01.png">
|
|
||||||
<Filter>Fichiers de ressources</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\plane.obj">
|
|
||||||
<Filter>Assets\Model\OBJ</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\EmptyTexture.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -1,62 +0,0 @@
|
|||||||
#ifndef _FONTSHADERCLASS_H_
|
|
||||||
#define _FONTSHADERCLASS_H_
|
|
||||||
|
|
||||||
|
|
||||||
//////////////
|
|
||||||
// INCLUDES //
|
|
||||||
//////////////
|
|
||||||
#include "Logger.h"
|
|
||||||
#include <d3d11.h>
|
|
||||||
#include <d3dcompiler.h>
|
|
||||||
#include <directxmath.h>
|
|
||||||
#include <fstream>
|
|
||||||
using namespace DirectX;
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Class name: FontShaderClass
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
class FontShaderClass
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
struct MatrixBufferType
|
|
||||||
{
|
|
||||||
XMMATRIX world;
|
|
||||||
XMMATRIX view;
|
|
||||||
XMMATRIX projection;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct PixelBufferType
|
|
||||||
{
|
|
||||||
XMFLOAT4 pixelColor;
|
|
||||||
};
|
|
||||||
|
|
||||||
public:
|
|
||||||
FontShaderClass();
|
|
||||||
FontShaderClass(const FontShaderClass&);
|
|
||||||
~FontShaderClass();
|
|
||||||
|
|
||||||
bool Initialize(ID3D11Device*, HWND);
|
|
||||||
void Shutdown();
|
|
||||||
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4);
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
|
|
||||||
void ShutdownShader();
|
|
||||||
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
|
|
||||||
|
|
||||||
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4);
|
|
||||||
void RenderShader(ID3D11DeviceContext*, int);
|
|
||||||
|
|
||||||
private:
|
|
||||||
ID3D11VertexShader* m_vertexShader;
|
|
||||||
ID3D11PixelShader* m_pixelShader;
|
|
||||||
ID3D11InputLayout* m_layout;
|
|
||||||
ID3D11Buffer* m_matrixBuffer;
|
|
||||||
ID3D11SamplerState* m_sampleState;
|
|
||||||
ID3D11Buffer* m_pixelBuffer;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,46 +0,0 @@
|
|||||||
#include "fpsclass.h"
|
|
||||||
|
|
||||||
|
|
||||||
FpsClass::FpsClass()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
FpsClass::FpsClass(const FpsClass& other)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
FpsClass::~FpsClass()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void FpsClass::Initialize()
|
|
||||||
{
|
|
||||||
m_fps = 0;
|
|
||||||
m_count = 0;
|
|
||||||
|
|
||||||
m_startTime = timeGetTime();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FpsClass::Frame()
|
|
||||||
{
|
|
||||||
m_count++;
|
|
||||||
|
|
||||||
if (timeGetTime() >= (m_startTime + 1000))
|
|
||||||
{
|
|
||||||
m_fps = m_count;
|
|
||||||
m_count = 0;
|
|
||||||
|
|
||||||
m_startTime = timeGetTime();
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int FpsClass::GetFps()
|
|
||||||
{
|
|
||||||
return m_fps;
|
|
||||||
}
|
|
@ -1,28 +1,37 @@
|
|||||||
|
[Window][DockSpace]
|
||||||
|
Pos=0,0
|
||||||
|
Size=1584,861
|
||||||
|
Collapsed=0
|
||||||
|
|
||||||
[Window][Debug##Default]
|
[Window][Debug##Default]
|
||||||
Pos=60,60
|
Pos=60,60
|
||||||
Size=400,400
|
Size=400,400
|
||||||
|
Collapsed=0
|
||||||
|
|
||||||
[Window][Khaotic Engine]
|
[Window][Khaotic Engine]
|
||||||
Pos=1143,44
|
Pos=1267,19
|
||||||
Size=392,273
|
Size=317,842
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000002,0
|
||||||
|
|
||||||
|
[Window][render Stats]
|
||||||
|
Pos=275,630
|
||||||
|
Size=1309,231
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000004,0
|
||||||
|
|
||||||
[Window][Objects]
|
[Window][Objects]
|
||||||
Pos=934,36
|
Pos=0,19
|
||||||
Size=457,294
|
Size=273,842
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000005,0
|
||||||
|
|
||||||
[Window][Terrain]
|
[Docking][Data]
|
||||||
Pos=58,62
|
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=0,19 Size=1584,842 Split=X
|
||||||
Size=342,82
|
DockNode ID=0x00000005 Parent=0xCCBD8CF7 SizeRef=273,842 Selected=0x031DC75C
|
||||||
|
DockNode ID=0x00000006 Parent=0xCCBD8CF7 SizeRef=1309,842 Split=Y
|
||||||
[Window][Light]
|
DockNode ID=0x00000003 Parent=0x00000006 SizeRef=1584,609 Split=X
|
||||||
Pos=1548,17
|
DockNode ID=0x00000001 Parent=0x00000003 SizeRef=990,842 CentralNode=1
|
||||||
Size=358,535
|
DockNode ID=0x00000002 Parent=0x00000003 SizeRef=317,842 Selected=0x9F035453
|
||||||
|
DockNode ID=0x00000004 Parent=0x00000006 SizeRef=1584,231 Selected=0xF5D1BB37
|
||||||
[Window][Shader Manager]
|
|
||||||
Pos=471,90
|
|
||||||
Size=180,79
|
|
||||||
|
|
||||||
[Window][Engine Settings]
|
|
||||||
Pos=106,212
|
|
||||||
Size=407,81
|
|
||||||
|
|
||||||
|
@ -1,446 +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",
|
|
||||||
"Reflection",
|
|
||||||
"Refraction"
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
for (int count = 0; count < 1; 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 < 1; 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*.png\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);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Shader selection
|
|
||||||
std::string shaderLabel = "Shader##" + std::to_string(index);
|
|
||||||
|
|
||||||
// Radio buttons for shader options
|
|
||||||
Object::ShaderType activeShader = object->GetActiveShader();
|
|
||||||
|
|
||||||
if (ImGui::RadioButton("Enable Lighting", activeShader == Object::LIGHTING))
|
|
||||||
{
|
|
||||||
object->SetActiveShader(Object::LIGHTING);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::RadioButton("Enable Cel Shading", activeShader == Object::CEL_SHADING))
|
|
||||||
{
|
|
||||||
object->SetActiveShader(Object::CEL_SHADING);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::RadioButton("Enable Normal Mapping", activeShader == Object::NORMAL_MAPPING))
|
|
||||||
{
|
|
||||||
object->SetActiveShader(Object::NORMAL_MAPPING);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::RadioButton("Enable Specular Mapping", activeShader == Object::SPECULAR_MAPPING))
|
|
||||||
{
|
|
||||||
object->SetActiveShader(Object::SPECULAR_MAPPING);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::Button("Open Engine Settings Window"))
|
|
||||||
{
|
|
||||||
showEngineSettingsWindow = 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);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (showEngineSettingsWindow)
|
|
||||||
{
|
|
||||||
WidgetEngineSettingsWindow(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();
|
|
||||||
}
|
|
||||||
|
|
||||||
void imguiManager::WidgetEngineSettingsWindow(ApplicationClass* app)
|
|
||||||
{
|
|
||||||
ImGui::Begin("Engine Settings", &showEngineSettingsWindow);
|
|
||||||
|
|
||||||
// Checkbox for toggling vsync globally in the application class by calling the SetVsync function in the application class when the checkbox state changes
|
|
||||||
bool vsync = app->GetVsync();
|
|
||||||
if (ImGui::Checkbox("Vsync", &vsync))
|
|
||||||
{
|
|
||||||
app->SetVsync(vsync);
|
|
||||||
}
|
|
||||||
|
|
||||||
// float input for frustum tolerance
|
|
||||||
float frustumTolerance = app->GetFrustumTolerance();
|
|
||||||
if (ImGui::DragFloat("Frustum Tolerance", &frustumTolerance, 0.1f, 0.0f, 100.0f))
|
|
||||||
{
|
|
||||||
app->SetFrustumTolerance(frustumTolerance);
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::End();
|
|
||||||
}
|
|
@ -1,58 +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);
|
|
||||||
void WidgetEngineSettingsWindow(ApplicationClass* app);
|
|
||||||
|
|
||||||
bool ImGuiWidgetRenderer(ApplicationClass* app);
|
|
||||||
|
|
||||||
// Shader toggles
|
|
||||||
|
|
||||||
bool m_EnableCelShading;
|
|
||||||
|
|
||||||
private :
|
|
||||||
bool showObjectWindow = false;
|
|
||||||
bool showTerrainWindow = false;
|
|
||||||
bool showLightWindow = false;
|
|
||||||
bool showShaderWindow = false;
|
|
||||||
bool showEngineSettingsWindow = 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_ */
|
||||||
|
|
234
enginecustom/include/Vulkan/Include/SDL2/SDL.h
Normal file
@ -0,0 +1,234 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file SDL.h
|
||||||
|
*
|
||||||
|
* Main include header for the SDL library
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_h_
|
||||||
|
#define SDL_h_
|
||||||
|
|
||||||
|
#include "SDL_main.h"
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
#include "SDL_assert.h"
|
||||||
|
#include "SDL_atomic.h"
|
||||||
|
#include "SDL_audio.h"
|
||||||
|
#include "SDL_clipboard.h"
|
||||||
|
#include "SDL_cpuinfo.h"
|
||||||
|
#include "SDL_endian.h"
|
||||||
|
#include "SDL_error.h"
|
||||||
|
#include "SDL_events.h"
|
||||||
|
#include "SDL_filesystem.h"
|
||||||
|
#include "SDL_gamecontroller.h"
|
||||||
|
#include "SDL_guid.h"
|
||||||
|
#include "SDL_haptic.h"
|
||||||
|
#include "SDL_hidapi.h"
|
||||||
|
#include "SDL_hints.h"
|
||||||
|
#include "SDL_joystick.h"
|
||||||
|
#include "SDL_loadso.h"
|
||||||
|
#include "SDL_log.h"
|
||||||
|
#include "SDL_messagebox.h"
|
||||||
|
#include "SDL_metal.h"
|
||||||
|
#include "SDL_mutex.h"
|
||||||
|
#include "SDL_power.h"
|
||||||
|
#include "SDL_render.h"
|
||||||
|
#include "SDL_rwops.h"
|
||||||
|
#include "SDL_sensor.h"
|
||||||
|
#include "SDL_shape.h"
|
||||||
|
#include "SDL_system.h"
|
||||||
|
#include "SDL_thread.h"
|
||||||
|
#include "SDL_timer.h"
|
||||||
|
#include "SDL_version.h"
|
||||||
|
#include "SDL_video.h"
|
||||||
|
#include "SDL_locale.h"
|
||||||
|
#include "SDL_misc.h"
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* WIKI CATEGORY: Init */
|
||||||
|
|
||||||
|
/* As of version 0.5, SDL is loaded dynamically into the application */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \name SDL_INIT_*
|
||||||
|
*
|
||||||
|
* These are the flags which may be passed to SDL_Init(). You should
|
||||||
|
* specify the subsystems which you will be using in your application.
|
||||||
|
*/
|
||||||
|
/* @{ */
|
||||||
|
#define SDL_INIT_TIMER 0x00000001u
|
||||||
|
#define SDL_INIT_AUDIO 0x00000010u
|
||||||
|
#define SDL_INIT_VIDEO 0x00000020u /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
|
||||||
|
#define SDL_INIT_JOYSTICK 0x00000200u /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
|
||||||
|
#define SDL_INIT_HAPTIC 0x00001000u
|
||||||
|
#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
|
||||||
|
#define SDL_INIT_EVENTS 0x00004000u
|
||||||
|
#define SDL_INIT_SENSOR 0x00008000u
|
||||||
|
#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
|
||||||
|
#define SDL_INIT_EVERYTHING ( \
|
||||||
|
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
|
||||||
|
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
|
||||||
|
)
|
||||||
|
/* @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the SDL library.
|
||||||
|
*
|
||||||
|
* SDL_Init() simply forwards to calling SDL_InitSubSystem(). Therefore, the
|
||||||
|
* two may be used interchangeably. Though for readability of your code
|
||||||
|
* SDL_InitSubSystem() might be preferred.
|
||||||
|
*
|
||||||
|
* The file I/O (for example: SDL_RWFromFile) and threading (SDL_CreateThread)
|
||||||
|
* subsystems are initialized by default. Message boxes
|
||||||
|
* (SDL_ShowSimpleMessageBox) also attempt to work without initializing the
|
||||||
|
* video subsystem, in hopes of being useful in showing an error dialog when
|
||||||
|
* SDL_Init fails. You must specifically initialize other subsystems if you
|
||||||
|
* use them in your application.
|
||||||
|
*
|
||||||
|
* Logging (such as SDL_Log) works without initialization, too.
|
||||||
|
*
|
||||||
|
* `flags` may be any of the following OR'd together:
|
||||||
|
*
|
||||||
|
* - `SDL_INIT_TIMER`: timer subsystem
|
||||||
|
* - `SDL_INIT_AUDIO`: audio subsystem
|
||||||
|
* - `SDL_INIT_VIDEO`: video subsystem; automatically initializes the events
|
||||||
|
* subsystem
|
||||||
|
* - `SDL_INIT_JOYSTICK`: joystick subsystem; automatically initializes the
|
||||||
|
* events subsystem
|
||||||
|
* - `SDL_INIT_HAPTIC`: haptic (force feedback) subsystem
|
||||||
|
* - `SDL_INIT_GAMECONTROLLER`: controller subsystem; automatically
|
||||||
|
* initializes the joystick subsystem
|
||||||
|
* - `SDL_INIT_EVENTS`: events subsystem
|
||||||
|
* - `SDL_INIT_EVERYTHING`: all of the above subsystems
|
||||||
|
* - `SDL_INIT_NOPARACHUTE`: compatibility; this flag is ignored
|
||||||
|
*
|
||||||
|
* Subsystem initialization is ref-counted, you must call SDL_QuitSubSystem()
|
||||||
|
* for each SDL_InitSubSystem() to correctly shutdown a subsystem manually (or
|
||||||
|
* call SDL_Quit() to force shutdown). If a subsystem is already loaded then
|
||||||
|
* this call will increase the ref-count and return.
|
||||||
|
*
|
||||||
|
* \param flags subsystem initialization flags.
|
||||||
|
* \returns 0 on success or a negative error code on failure; call
|
||||||
|
* SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_InitSubSystem
|
||||||
|
* \sa SDL_Quit
|
||||||
|
* \sa SDL_SetMainReady
|
||||||
|
* \sa SDL_WasInit
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compatibility function to initialize the SDL library.
|
||||||
|
*
|
||||||
|
* In SDL2, this function and SDL_Init() are interchangeable.
|
||||||
|
*
|
||||||
|
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
|
||||||
|
* \returns 0 on success or a negative error code on failure; call
|
||||||
|
* SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Init
|
||||||
|
* \sa SDL_Quit
|
||||||
|
* \sa SDL_QuitSubSystem
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shut down specific SDL subsystems.
|
||||||
|
*
|
||||||
|
* If you start a subsystem using a call to that subsystem's init function
|
||||||
|
* (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
|
||||||
|
* SDL_QuitSubSystem() and SDL_WasInit() will not work. You will need to use
|
||||||
|
* that subsystem's quit function (SDL_VideoQuit()) directly instead. But
|
||||||
|
* generally, you should not be using those functions directly anyhow; use
|
||||||
|
* SDL_Init() instead.
|
||||||
|
*
|
||||||
|
* You still need to call SDL_Quit() even if you close all open subsystems
|
||||||
|
* with SDL_QuitSubSystem().
|
||||||
|
*
|
||||||
|
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_InitSubSystem
|
||||||
|
* \sa SDL_Quit
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a mask of the specified subsystems which are currently initialized.
|
||||||
|
*
|
||||||
|
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
|
||||||
|
* \returns a mask of all initialized subsystems if `flags` is 0, otherwise it
|
||||||
|
* returns the initialization status of the specified subsystems.
|
||||||
|
*
|
||||||
|
* The return value does not include SDL_INIT_NOPARACHUTE.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Init
|
||||||
|
* \sa SDL_InitSubSystem
|
||||||
|
*/
|
||||||
|
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clean up all initialized subsystems.
|
||||||
|
*
|
||||||
|
* You should call this function even if you have already shutdown each
|
||||||
|
* initialized subsystem with SDL_QuitSubSystem(). It is safe to call this
|
||||||
|
* function even in the case of errors in initialization.
|
||||||
|
*
|
||||||
|
* If you start a subsystem using a call to that subsystem's init function
|
||||||
|
* (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
|
||||||
|
* then you must use that subsystem's quit function (SDL_VideoQuit()) to shut
|
||||||
|
* it down before calling SDL_Quit(). But generally, you should not be using
|
||||||
|
* those functions directly anyhow; use SDL_Init() instead.
|
||||||
|
*
|
||||||
|
* You can use this function with atexit() to ensure that it is run when your
|
||||||
|
* application is shutdown, but it is not wise to do this from a library or
|
||||||
|
* other dynamically loaded code.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Init
|
||||||
|
* \sa SDL_QuitSubSystem
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_Quit(void);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
324
enginecustom/include/Vulkan/Include/SDL2/SDL_assert.h
Normal file
@ -0,0 +1,324 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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 SDL_assert_h_
|
||||||
|
#define SDL_assert_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SDL_ASSERT_LEVEL
|
||||||
|
#ifdef SDL_DEFAULT_ASSERT_LEVEL
|
||||||
|
#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
|
||||||
|
#elif defined(_DEBUG) || defined(DEBUG) || \
|
||||||
|
(defined(__GNUC__) && !defined(__OPTIMIZE__))
|
||||||
|
#define SDL_ASSERT_LEVEL 2
|
||||||
|
#else
|
||||||
|
#define SDL_ASSERT_LEVEL 1
|
||||||
|
#endif
|
||||||
|
#endif /* SDL_ASSERT_LEVEL */
|
||||||
|
|
||||||
|
/*
|
||||||
|
These are macros and not first class functions so that the debugger breaks
|
||||||
|
on the assertion line and not in some random guts of SDL, and so each
|
||||||
|
assert can have unique static variables associated with it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
/* Don't include intrin.h here because it contains C++ code */
|
||||||
|
extern void __cdecl __debugbreak(void);
|
||||||
|
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||||
|
#elif _SDL_HAS_BUILTIN(__builtin_debugtrap)
|
||||||
|
#define SDL_TriggerBreakpoint() __builtin_debugtrap()
|
||||||
|
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
|
||||||
|
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||||
|
#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv)
|
||||||
|
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "ebreak\n\t" )
|
||||||
|
#elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
|
||||||
|
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
|
||||||
|
#elif defined(__APPLE__) && defined(__arm__)
|
||||||
|
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
|
||||||
|
#elif defined(_WIN32) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__arm64__) || defined(__aarch64__)) )
|
||||||
|
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #0xF000\n\t" )
|
||||||
|
#elif defined(__386__) && defined(__WATCOMC__)
|
||||||
|
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
|
||||||
|
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
|
||||||
|
#include <signal.h>
|
||||||
|
#define SDL_TriggerBreakpoint() raise(SIGTRAP)
|
||||||
|
#else
|
||||||
|
/* How do we trigger breakpoints on this platform? */
|
||||||
|
#define SDL_TriggerBreakpoint()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
|
||||||
|
# define SDL_FUNCTION __func__
|
||||||
|
#elif ((defined(__GNUC__) && (__GNUC__ >= 2)) || defined(_MSC_VER) || defined (__WATCOMC__))
|
||||||
|
# define SDL_FUNCTION __FUNCTION__
|
||||||
|
#else
|
||||||
|
# define SDL_FUNCTION "???"
|
||||||
|
#endif
|
||||||
|
#define SDL_FILE __FILE__
|
||||||
|
#define SDL_LINE __LINE__
|
||||||
|
|
||||||
|
/*
|
||||||
|
sizeof (x) makes the compiler still parse the expression even without
|
||||||
|
assertions enabled, so the code is always checked at compile time, but
|
||||||
|
doesn't actually generate code for it, so there are no side effects or
|
||||||
|
expensive checks at run time, just the constant size of what x WOULD be,
|
||||||
|
which presumably gets optimized out as unused.
|
||||||
|
This also solves the problem of...
|
||||||
|
|
||||||
|
int somevalue = blah();
|
||||||
|
SDL_assert(somevalue == 1);
|
||||||
|
|
||||||
|
...which would cause compiles to complain that somevalue is unused if we
|
||||||
|
disable assertions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
|
||||||
|
this condition isn't constant. And looks like an owl's face! */
|
||||||
|
#ifdef _MSC_VER /* stupid /W4 warnings. */
|
||||||
|
#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
|
||||||
|
#else
|
||||||
|
#define SDL_NULL_WHILE_LOOP_CONDITION (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define SDL_disabled_assert(condition) \
|
||||||
|
do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SDL_ASSERTION_RETRY, /**< Retry the assert immediately. */
|
||||||
|
SDL_ASSERTION_BREAK, /**< Make the debugger trigger a breakpoint. */
|
||||||
|
SDL_ASSERTION_ABORT, /**< Terminate the program. */
|
||||||
|
SDL_ASSERTION_IGNORE, /**< Ignore the assert. */
|
||||||
|
SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */
|
||||||
|
} SDL_AssertState;
|
||||||
|
|
||||||
|
typedef struct SDL_AssertData
|
||||||
|
{
|
||||||
|
int always_ignore;
|
||||||
|
unsigned int trigger_count;
|
||||||
|
const char *condition;
|
||||||
|
const char *filename;
|
||||||
|
int linenum;
|
||||||
|
const char *function;
|
||||||
|
const struct SDL_AssertData *next;
|
||||||
|
} SDL_AssertData;
|
||||||
|
|
||||||
|
/* Never call this directly. Use the SDL_assert* macros. */
|
||||||
|
extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
|
||||||
|
const char *,
|
||||||
|
const char *, int)
|
||||||
|
#if defined(__clang__)
|
||||||
|
#if __has_feature(attribute_analyzer_noreturn)
|
||||||
|
/* this tells Clang's static analysis that we're a custom assert function,
|
||||||
|
and that the analyzer should assume the condition was always true past this
|
||||||
|
SDL_assert test. */
|
||||||
|
__attribute__((analyzer_noreturn))
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
|
||||||
|
/* the do {} while(0) avoids dangling else problems:
|
||||||
|
if (x) SDL_assert(y); else blah();
|
||||||
|
... without the do/while, the "else" could attach to this macro's "if".
|
||||||
|
We try to handle just the minimum we need here in a macro...the loop,
|
||||||
|
the static vars, and break points. The heavy lifting is handled in
|
||||||
|
SDL_ReportAssertion(), in SDL_assert.c.
|
||||||
|
*/
|
||||||
|
#define SDL_enabled_assert(condition) \
|
||||||
|
do { \
|
||||||
|
while ( !(condition) ) { \
|
||||||
|
static struct SDL_AssertData sdl_assert_data = { 0, 0, #condition, 0, 0, 0, 0 }; \
|
||||||
|
const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
|
||||||
|
if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
|
||||||
|
continue; /* go again. */ \
|
||||||
|
} else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
|
||||||
|
SDL_TriggerBreakpoint(); \
|
||||||
|
} \
|
||||||
|
break; /* not retrying. */ \
|
||||||
|
} \
|
||||||
|
} while (SDL_NULL_WHILE_LOOP_CONDITION)
|
||||||
|
|
||||||
|
/* Enable various levels of assertions. */
|
||||||
|
#if SDL_ASSERT_LEVEL == 0 /* assertions disabled */
|
||||||
|
# define SDL_assert(condition) SDL_disabled_assert(condition)
|
||||||
|
# define SDL_assert_release(condition) SDL_disabled_assert(condition)
|
||||||
|
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||||
|
#elif SDL_ASSERT_LEVEL == 1 /* release settings. */
|
||||||
|
# define SDL_assert(condition) SDL_disabled_assert(condition)
|
||||||
|
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||||
|
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||||
|
#elif SDL_ASSERT_LEVEL == 2 /* normal settings. */
|
||||||
|
# define SDL_assert(condition) SDL_enabled_assert(condition)
|
||||||
|
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||||
|
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||||
|
#elif SDL_ASSERT_LEVEL == 3 /* paranoid settings. */
|
||||||
|
# define SDL_assert(condition) SDL_enabled_assert(condition)
|
||||||
|
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||||
|
# define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)
|
||||||
|
#else
|
||||||
|
# error Unknown assertion level.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* this assertion is never disabled at any level. */
|
||||||
|
#define SDL_assert_always(condition) SDL_enabled_assert(condition)
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A callback that fires when an SDL assertion fails.
|
||||||
|
*
|
||||||
|
* \param data a pointer to the SDL_AssertData structure corresponding to the
|
||||||
|
* current assertion.
|
||||||
|
* \param userdata what was passed as `userdata` to SDL_SetAssertionHandler().
|
||||||
|
* \returns an SDL_AssertState value indicating how to handle the failure.
|
||||||
|
*/
|
||||||
|
typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
|
||||||
|
const SDL_AssertData* data, void* userdata);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set an application-defined assertion handler.
|
||||||
|
*
|
||||||
|
* This function allows an application to show its own assertion UI and/or
|
||||||
|
* force the response to an assertion failure. If the application doesn't
|
||||||
|
* provide this, SDL will try to do the right thing, popping up a
|
||||||
|
* system-specific GUI dialog, and probably minimizing any fullscreen windows.
|
||||||
|
*
|
||||||
|
* This callback may fire from any thread, but it runs wrapped in a mutex, so
|
||||||
|
* it will only fire from one thread at a time.
|
||||||
|
*
|
||||||
|
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
|
||||||
|
*
|
||||||
|
* \param handler the SDL_AssertionHandler function to call when an assertion
|
||||||
|
* fails or NULL for the default handler.
|
||||||
|
* \param userdata a pointer that is passed to `handler`.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetAssertionHandler
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
|
||||||
|
SDL_AssertionHandler handler,
|
||||||
|
void *userdata);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the default assertion handler.
|
||||||
|
*
|
||||||
|
* This returns the function pointer that is called by default when an
|
||||||
|
* assertion is triggered. This is an internal function provided by SDL, that
|
||||||
|
* is used for assertions when SDL_SetAssertionHandler() hasn't been used to
|
||||||
|
* provide a different function.
|
||||||
|
*
|
||||||
|
* \returns the default SDL_AssertionHandler that is called when an assert
|
||||||
|
* triggers.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetAssertionHandler
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current assertion handler.
|
||||||
|
*
|
||||||
|
* This returns the function pointer that is called when an assertion is
|
||||||
|
* triggered. This is either the value last passed to
|
||||||
|
* SDL_SetAssertionHandler(), or if no application-specified function is set,
|
||||||
|
* is equivalent to calling SDL_GetDefaultAssertionHandler().
|
||||||
|
*
|
||||||
|
* The parameter `puserdata` is a pointer to a void*, which will store the
|
||||||
|
* "userdata" pointer that was passed to SDL_SetAssertionHandler(). This value
|
||||||
|
* will always be NULL for the default handler. If you don't care about this
|
||||||
|
* data, it is safe to pass a NULL pointer to this function to ignore it.
|
||||||
|
*
|
||||||
|
* \param puserdata pointer which is filled with the "userdata" pointer that
|
||||||
|
* was passed to SDL_SetAssertionHandler().
|
||||||
|
* \returns the SDL_AssertionHandler that is called when an assert triggers.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*
|
||||||
|
* \sa SDL_SetAssertionHandler
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a list of all assertion failures.
|
||||||
|
*
|
||||||
|
* This function gets all assertions triggered since the last call to
|
||||||
|
* SDL_ResetAssertionReport(), or the start of the program.
|
||||||
|
*
|
||||||
|
* The proper way to examine this data looks something like this:
|
||||||
|
*
|
||||||
|
* ```c
|
||||||
|
* const SDL_AssertData *item = SDL_GetAssertionReport();
|
||||||
|
* while (item) {
|
||||||
|
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
|
||||||
|
* item->condition, item->function, item->filename,
|
||||||
|
* item->linenum, item->trigger_count,
|
||||||
|
* item->always_ignore ? "yes" : "no");
|
||||||
|
* item = item->next;
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* \returns a list of all failed assertions or NULL if the list is empty. This
|
||||||
|
* memory should not be modified or freed by the application.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_ResetAssertionReport
|
||||||
|
*/
|
||||||
|
extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear the list of all assertion failures.
|
||||||
|
*
|
||||||
|
* This function will clear the list of all assertions triggered up to that
|
||||||
|
* point. Immediately following this call, SDL_GetAssertionReport will return
|
||||||
|
* no items. In addition, any previously-triggered assertions will be reset to
|
||||||
|
* a trigger_count of zero, and their always_ignore state will be false.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetAssertionReport
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
|
||||||
|
|
||||||
|
|
||||||
|
/* these had wrong naming conventions until 2.0.4. Please update your app! */
|
||||||
|
#define SDL_assert_state SDL_AssertState
|
||||||
|
#define SDL_assert_data SDL_AssertData
|
||||||
|
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_assert_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
408
enginecustom/include/Vulkan/Include/SDL2/SDL_atomic.h
Normal file
@ -0,0 +1,408 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryAtomic
|
||||||
|
*
|
||||||
|
* Atomic operations.
|
||||||
|
*
|
||||||
|
* IMPORTANT: If you are not an expert in concurrent lockless programming, you
|
||||||
|
* should not be using any functions in this file. You should be protecting
|
||||||
|
* your data structures with full mutexes instead.
|
||||||
|
*
|
||||||
|
* ***Seriously, here be dragons!***
|
||||||
|
*
|
||||||
|
* You can find out a little more about lockless programming and the subtle
|
||||||
|
* issues that can arise here:
|
||||||
|
* https://learn.microsoft.com/en-us/windows/win32/dxtecharts/lockless-programming
|
||||||
|
*
|
||||||
|
* There's also lots of good information here:
|
||||||
|
*
|
||||||
|
* - https://www.1024cores.net/home/lock-free-algorithms
|
||||||
|
* - https://preshing.com/
|
||||||
|
*
|
||||||
|
* These operations may or may not actually be implemented using processor
|
||||||
|
* specific atomic operations. When possible they are implemented as true
|
||||||
|
* processor specific atomic operations. When that is not possible the are
|
||||||
|
* implemented using locks that *do* use the available atomic operations.
|
||||||
|
*
|
||||||
|
* All of the atomic operations that modify memory are full memory barriers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_atomic_h_
|
||||||
|
#define SDL_atomic_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
#include "SDL_platform.h"
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \name SDL AtomicLock
|
||||||
|
*
|
||||||
|
* The atomic locks are efficient spinlocks using CPU instructions,
|
||||||
|
* but are vulnerable to starvation and can spin forever if a thread
|
||||||
|
* holding a lock has been terminated. For this reason you should
|
||||||
|
* minimize the code executed inside an atomic lock and never do
|
||||||
|
* expensive things like API or system calls while holding them.
|
||||||
|
*
|
||||||
|
* The atomic locks are not safe to lock recursively.
|
||||||
|
*
|
||||||
|
* Porting Note:
|
||||||
|
* The spin lock functions and type are required and can not be
|
||||||
|
* emulated because they are used in the atomic emulation code.
|
||||||
|
*/
|
||||||
|
/* @{ */
|
||||||
|
|
||||||
|
typedef int SDL_SpinLock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Try to lock a spin lock by setting it to a non-zero value.
|
||||||
|
*
|
||||||
|
* ***Please note that spinlocks are dangerous if you don't know what you're
|
||||||
|
* doing. Please be careful using any sort of spinlock!***
|
||||||
|
*
|
||||||
|
* \param lock a pointer to a lock variable.
|
||||||
|
* \returns SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already
|
||||||
|
* held.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicLock
|
||||||
|
* \sa SDL_AtomicUnlock
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lock a spin lock by setting it to a non-zero value.
|
||||||
|
*
|
||||||
|
* ***Please note that spinlocks are dangerous if you don't know what you're
|
||||||
|
* doing. Please be careful using any sort of spinlock!***
|
||||||
|
*
|
||||||
|
* \param lock a pointer to a lock variable.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicTryLock
|
||||||
|
* \sa SDL_AtomicUnlock
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unlock a spin lock by setting it to 0.
|
||||||
|
*
|
||||||
|
* Always returns immediately.
|
||||||
|
*
|
||||||
|
* ***Please note that spinlocks are dangerous if you don't know what you're
|
||||||
|
* doing. Please be careful using any sort of spinlock!***
|
||||||
|
*
|
||||||
|
* \param lock a pointer to a lock variable.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicLock
|
||||||
|
* \sa SDL_AtomicTryLock
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
|
||||||
|
|
||||||
|
/* @} *//* SDL AtomicLock */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The compiler barrier prevents the compiler from reordering
|
||||||
|
* reads and writes to globally visible variables across the call.
|
||||||
|
*/
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
|
||||||
|
void _ReadWriteBarrier(void);
|
||||||
|
#pragma intrinsic(_ReadWriteBarrier)
|
||||||
|
#define SDL_CompilerBarrier() _ReadWriteBarrier()
|
||||||
|
#elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
|
||||||
|
/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
|
||||||
|
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
|
||||||
|
#elif defined(__WATCOMC__)
|
||||||
|
extern __inline void SDL_CompilerBarrier(void);
|
||||||
|
#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
|
||||||
|
#else
|
||||||
|
#define SDL_CompilerBarrier() \
|
||||||
|
{ SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Memory barriers are designed to prevent reads and writes from being
|
||||||
|
* reordered by the compiler and being seen out of order on multi-core CPUs.
|
||||||
|
*
|
||||||
|
* A typical pattern would be for thread A to write some data and a flag, and
|
||||||
|
* for thread B to read the flag and get the data. In this case you would
|
||||||
|
* insert a release barrier between writing the data and the flag,
|
||||||
|
* guaranteeing that the data write completes no later than the flag is
|
||||||
|
* written, and you would insert an acquire barrier between reading the flag
|
||||||
|
* and reading the data, to ensure that all the reads associated with the flag
|
||||||
|
* have completed.
|
||||||
|
*
|
||||||
|
* In this pattern you should always see a release barrier paired with an
|
||||||
|
* acquire barrier and you should gate the data reads/writes with a single
|
||||||
|
* flag variable.
|
||||||
|
*
|
||||||
|
* For more information on these semantics, take a look at the blog post:
|
||||||
|
* http://preshing.com/20120913/acquire-and-release-semantics
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.6.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);
|
||||||
|
extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||||
|
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||||
|
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||||
|
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||||
|
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||||
|
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||||
|
#elif defined(__GNUC__) && defined(__arm__)
|
||||||
|
#if 0 /* defined(__LINUX__) || defined(__ANDROID__) */
|
||||||
|
/* Information from:
|
||||||
|
https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
|
||||||
|
|
||||||
|
The Linux kernel provides a helper function which provides the right code for a memory barrier,
|
||||||
|
hard-coded at address 0xffff0fa0
|
||||||
|
*/
|
||||||
|
typedef void (*SDL_KernelMemoryBarrierFunc)();
|
||||||
|
#define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
|
||||||
|
#define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
|
||||||
|
#elif 0 /* defined(__QNXNTO__) */
|
||||||
|
#include <sys/cpuinline.h>
|
||||||
|
|
||||||
|
#define SDL_MemoryBarrierRelease() __cpu_membarrier()
|
||||||
|
#define SDL_MemoryBarrierAcquire() __cpu_membarrier()
|
||||||
|
#else
|
||||||
|
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
|
||||||
|
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||||
|
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||||
|
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
|
||||||
|
#ifdef __thumb__
|
||||||
|
/* The mcr instruction isn't available in thumb mode, use real functions */
|
||||||
|
#define SDL_MEMORY_BARRIER_USES_FUNCTION
|
||||||
|
#define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
|
||||||
|
#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
|
||||||
|
#else
|
||||||
|
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
|
||||||
|
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
|
||||||
|
#endif /* __thumb__ */
|
||||||
|
#else
|
||||||
|
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
|
||||||
|
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
|
||||||
|
#endif /* __LINUX__ || __ANDROID__ */
|
||||||
|
#endif /* __GNUC__ && __arm__ */
|
||||||
|
#else
|
||||||
|
#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
|
||||||
|
/* This is correct for all CPUs on Solaris when using Solaris Studio 12.1+. */
|
||||||
|
#include <mbarrier.h>
|
||||||
|
#define SDL_MemoryBarrierRelease() __machine_rel_barrier()
|
||||||
|
#define SDL_MemoryBarrierAcquire() __machine_acq_barrier()
|
||||||
|
#else
|
||||||
|
/* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */
|
||||||
|
#define SDL_MemoryBarrierRelease() SDL_CompilerBarrier()
|
||||||
|
#define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier()
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* "REP NOP" is PAUSE, coded for tools that don't know it by that name. */
|
||||||
|
#if (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
|
||||||
|
#define SDL_CPUPauseInstruction() __asm__ __volatile__("pause\n") /* Some assemblers can't do REP NOP, so go with PAUSE. */
|
||||||
|
#elif (defined(__arm__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7) || defined(__aarch64__)
|
||||||
|
#define SDL_CPUPauseInstruction() __asm__ __volatile__("yield" ::: "memory")
|
||||||
|
#elif (defined(__powerpc__) || defined(__powerpc64__))
|
||||||
|
#define SDL_CPUPauseInstruction() __asm__ __volatile__("or 27,27,27");
|
||||||
|
#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
|
||||||
|
#define SDL_CPUPauseInstruction() _mm_pause() /* this is actually "rep nop" and not a SIMD instruction. No inline asm in MSVC x86-64! */
|
||||||
|
#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
|
||||||
|
#define SDL_CPUPauseInstruction() __yield()
|
||||||
|
#elif defined(__WATCOMC__) && defined(__386__)
|
||||||
|
extern __inline void SDL_CPUPauseInstruction(void);
|
||||||
|
#pragma aux SDL_CPUPauseInstruction = ".686p" ".xmm2" "pause"
|
||||||
|
#else
|
||||||
|
#define SDL_CPUPauseInstruction()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A type representing an atomic integer value.
|
||||||
|
*
|
||||||
|
* It is a struct so people don't accidentally use numeric operations on it.
|
||||||
|
*/
|
||||||
|
typedef struct SDL_atomic_t {
|
||||||
|
int value;
|
||||||
|
} SDL_atomic_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set an atomic variable to a new value if it is currently an old value.
|
||||||
|
*
|
||||||
|
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||||
|
* it!***
|
||||||
|
*
|
||||||
|
* \param a a pointer to an SDL_atomic_t variable to be modified.
|
||||||
|
* \param oldval the old value.
|
||||||
|
* \param newval the new value.
|
||||||
|
* \returns SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicCASPtr
|
||||||
|
* \sa SDL_AtomicGet
|
||||||
|
* \sa SDL_AtomicSet
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set an atomic variable to a value.
|
||||||
|
*
|
||||||
|
* This function also acts as a full memory barrier.
|
||||||
|
*
|
||||||
|
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||||
|
* it!***
|
||||||
|
*
|
||||||
|
* \param a a pointer to an SDL_atomic_t variable to be modified.
|
||||||
|
* \param v the desired value.
|
||||||
|
* \returns the previous value of the atomic variable.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicGet
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of an atomic variable.
|
||||||
|
*
|
||||||
|
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||||
|
* it!***
|
||||||
|
*
|
||||||
|
* \param a a pointer to an SDL_atomic_t variable.
|
||||||
|
* \returns the current value of an atomic variable.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicSet
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add to an atomic variable.
|
||||||
|
*
|
||||||
|
* This function also acts as a full memory barrier.
|
||||||
|
*
|
||||||
|
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||||
|
* it!***
|
||||||
|
*
|
||||||
|
* \param a a pointer to an SDL_atomic_t variable to be modified.
|
||||||
|
* \param v the desired value to add.
|
||||||
|
* \returns the previous value of the atomic variable.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicDecRef
|
||||||
|
* \sa SDL_AtomicIncRef
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Increment an atomic variable used as a reference count.
|
||||||
|
*/
|
||||||
|
#ifndef SDL_AtomicIncRef
|
||||||
|
#define SDL_AtomicIncRef(a) SDL_AtomicAdd(a, 1)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Decrement an atomic variable used as a reference count.
|
||||||
|
*
|
||||||
|
* \return SDL_TRUE if the variable reached zero after decrementing,
|
||||||
|
* SDL_FALSE otherwise
|
||||||
|
*/
|
||||||
|
#ifndef SDL_AtomicDecRef
|
||||||
|
#define SDL_AtomicDecRef(a) (SDL_AtomicAdd(a, -1) == 1)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set a pointer to a new value if it is currently an old value.
|
||||||
|
*
|
||||||
|
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||||
|
* it!***
|
||||||
|
*
|
||||||
|
* \param a a pointer to a pointer.
|
||||||
|
* \param oldval the old pointer value.
|
||||||
|
* \param newval the new pointer value.
|
||||||
|
* \returns SDL_TRUE if the pointer was set, SDL_FALSE otherwise.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicCAS
|
||||||
|
* \sa SDL_AtomicGetPtr
|
||||||
|
* \sa SDL_AtomicSetPtr
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set a pointer to a value atomically.
|
||||||
|
*
|
||||||
|
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||||
|
* it!***
|
||||||
|
*
|
||||||
|
* \param a a pointer to a pointer.
|
||||||
|
* \param v the desired pointer value.
|
||||||
|
* \returns the previous value of the pointer.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicCASPtr
|
||||||
|
* \sa SDL_AtomicGetPtr
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of a pointer atomically.
|
||||||
|
*
|
||||||
|
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||||
|
* it!***
|
||||||
|
*
|
||||||
|
* \param a a pointer to a pointer.
|
||||||
|
* \returns the current value of a pointer.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicCASPtr
|
||||||
|
* \sa SDL_AtomicSetPtr
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_atomic_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
1502
enginecustom/include/Vulkan/Include/SDL2/SDL_audio.h
Normal file
132
enginecustom/include/Vulkan/Include/SDL2/SDL_bits.h
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryBits
|
||||||
|
*
|
||||||
|
* Functions for fiddling with bits and bitmasks.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_bits_h_
|
||||||
|
#define SDL_bits_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file SDL_bits.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the index of the most significant bit. Result is undefined when called
|
||||||
|
* with 0. This operation can also be stated as "count leading zeroes" and
|
||||||
|
* "log base 2".
|
||||||
|
*
|
||||||
|
* \return the index of the most significant bit, or -1 if the value is 0.
|
||||||
|
*/
|
||||||
|
#if defined(__WATCOMC__) && defined(__386__)
|
||||||
|
extern __inline int _SDL_bsr_watcom(Uint32);
|
||||||
|
#pragma aux _SDL_bsr_watcom = \
|
||||||
|
"bsr eax, eax" \
|
||||||
|
parm [eax] nomemory \
|
||||||
|
value [eax] \
|
||||||
|
modify exact [eax] nomemory;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this function to get the index of the most significant (set) bit in a
|
||||||
|
*
|
||||||
|
* \param x the number to find the MSB of.
|
||||||
|
* \returns the index of the most significant bit of x, or -1 if x is 0.
|
||||||
|
*/
|
||||||
|
SDL_FORCE_INLINE int
|
||||||
|
SDL_MostSignificantBitIndex32(Uint32 x)
|
||||||
|
{
|
||||||
|
#if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
||||||
|
/* Count Leading Zeroes builtin in GCC.
|
||||||
|
* http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html
|
||||||
|
*/
|
||||||
|
if (x == 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return 31 - __builtin_clz(x);
|
||||||
|
#elif defined(__WATCOMC__) && defined(__386__)
|
||||||
|
if (x == 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return _SDL_bsr_watcom(x);
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
unsigned long index;
|
||||||
|
if (_BitScanReverse(&index, x)) {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
#else
|
||||||
|
/* Based off of Bit Twiddling Hacks by Sean Eron Anderson
|
||||||
|
* <seander@cs.stanford.edu>, released in the public domain.
|
||||||
|
* http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog
|
||||||
|
*/
|
||||||
|
const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};
|
||||||
|
const int S[] = {1, 2, 4, 8, 16};
|
||||||
|
|
||||||
|
int msbIndex = 0;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (x == 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 4; i >= 0; i--)
|
||||||
|
{
|
||||||
|
if (x & b[i])
|
||||||
|
{
|
||||||
|
x >>= S[i];
|
||||||
|
msbIndex |= S[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return msbIndex;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_FORCE_INLINE SDL_bool
|
||||||
|
SDL_HasExactlyOneBitSet32(Uint32 x)
|
||||||
|
{
|
||||||
|
if (x && !(x & (x - 1))) {
|
||||||
|
return SDL_TRUE;
|
||||||
|
}
|
||||||
|
return SDL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_bits_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
199
enginecustom/include/Vulkan/Include/SDL2/SDL_blendmode.h
Normal file
@ -0,0 +1,199 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryBlendmode
|
||||||
|
*
|
||||||
|
* Header file declaring the SDL_BlendMode enumeration
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_blendmode_h_
|
||||||
|
#define SDL_blendmode_h_
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The blend mode used in SDL_RenderCopy() and drawing operations.
|
||||||
|
*/
|
||||||
|
typedef enum SDL_BlendMode
|
||||||
|
{
|
||||||
|
SDL_BLENDMODE_NONE = 0x00000000, /**< no blending
|
||||||
|
dstRGBA = srcRGBA */
|
||||||
|
SDL_BLENDMODE_BLEND = 0x00000001, /**< alpha blending
|
||||||
|
dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
|
||||||
|
dstA = srcA + (dstA * (1-srcA)) */
|
||||||
|
SDL_BLENDMODE_ADD = 0x00000002, /**< additive blending
|
||||||
|
dstRGB = (srcRGB * srcA) + dstRGB
|
||||||
|
dstA = dstA */
|
||||||
|
SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate
|
||||||
|
dstRGB = srcRGB * dstRGB
|
||||||
|
dstA = dstA */
|
||||||
|
SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
|
||||||
|
dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
|
||||||
|
dstA = dstA */
|
||||||
|
SDL_BLENDMODE_INVALID = 0x7FFFFFFF
|
||||||
|
|
||||||
|
/* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
|
||||||
|
|
||||||
|
} SDL_BlendMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The blend operation used when combining source and destination pixel
|
||||||
|
* components
|
||||||
|
*/
|
||||||
|
typedef enum SDL_BlendOperation
|
||||||
|
{
|
||||||
|
SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
|
||||||
|
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||||
|
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||||
|
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */
|
||||||
|
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
|
||||||
|
} SDL_BlendOperation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The normalized factor used to multiply pixel components
|
||||||
|
*/
|
||||||
|
typedef enum SDL_BlendFactor
|
||||||
|
{
|
||||||
|
SDL_BLENDFACTOR_ZERO = 0x1, /**< 0, 0, 0, 0 */
|
||||||
|
SDL_BLENDFACTOR_ONE = 0x2, /**< 1, 1, 1, 1 */
|
||||||
|
SDL_BLENDFACTOR_SRC_COLOR = 0x3, /**< srcR, srcG, srcB, srcA */
|
||||||
|
SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR = 0x4, /**< 1-srcR, 1-srcG, 1-srcB, 1-srcA */
|
||||||
|
SDL_BLENDFACTOR_SRC_ALPHA = 0x5, /**< srcA, srcA, srcA, srcA */
|
||||||
|
SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA = 0x6, /**< 1-srcA, 1-srcA, 1-srcA, 1-srcA */
|
||||||
|
SDL_BLENDFACTOR_DST_COLOR = 0x7, /**< dstR, dstG, dstB, dstA */
|
||||||
|
SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */
|
||||||
|
SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */
|
||||||
|
SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */
|
||||||
|
} SDL_BlendFactor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compose a custom blend mode for renderers.
|
||||||
|
*
|
||||||
|
* The functions SDL_SetRenderDrawBlendMode and SDL_SetTextureBlendMode accept
|
||||||
|
* the SDL_BlendMode returned by this function if the renderer supports it.
|
||||||
|
*
|
||||||
|
* A blend mode controls how the pixels from a drawing operation (source) get
|
||||||
|
* combined with the pixels from the render target (destination). First, the
|
||||||
|
* components of the source and destination pixels get multiplied with their
|
||||||
|
* blend factors. Then, the blend operation takes the two products and
|
||||||
|
* calculates the result that will get stored in the render target.
|
||||||
|
*
|
||||||
|
* Expressed in pseudocode, it would look like this:
|
||||||
|
*
|
||||||
|
* ```c
|
||||||
|
* dstRGB = colorOperation(srcRGB * srcColorFactor, dstRGB * dstColorFactor);
|
||||||
|
* dstA = alphaOperation(srcA * srcAlphaFactor, dstA * dstAlphaFactor);
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* Where the functions `colorOperation(src, dst)` and `alphaOperation(src,
|
||||||
|
* dst)` can return one of the following:
|
||||||
|
*
|
||||||
|
* - `src + dst`
|
||||||
|
* - `src - dst`
|
||||||
|
* - `dst - src`
|
||||||
|
* - `min(src, dst)`
|
||||||
|
* - `max(src, dst)`
|
||||||
|
*
|
||||||
|
* The red, green, and blue components are always multiplied with the first,
|
||||||
|
* second, and third components of the SDL_BlendFactor, respectively. The
|
||||||
|
* fourth component is not used.
|
||||||
|
*
|
||||||
|
* The alpha component is always multiplied with the fourth component of the
|
||||||
|
* SDL_BlendFactor. The other components are not used in the alpha
|
||||||
|
* calculation.
|
||||||
|
*
|
||||||
|
* Support for these blend modes varies for each renderer. To check if a
|
||||||
|
* specific SDL_BlendMode is supported, create a renderer and pass it to
|
||||||
|
* either SDL_SetRenderDrawBlendMode or SDL_SetTextureBlendMode. They will
|
||||||
|
* return with an error if the blend mode is not supported.
|
||||||
|
*
|
||||||
|
* This list describes the support of custom blend modes for each renderer in
|
||||||
|
* SDL 2.0.6. All renderers support the four blend modes listed in the
|
||||||
|
* SDL_BlendMode enumeration.
|
||||||
|
*
|
||||||
|
* - **direct3d**: Supports all operations with all factors. However, some
|
||||||
|
* factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and
|
||||||
|
* `SDL_BLENDOPERATION_MAXIMUM`.
|
||||||
|
* - **direct3d11**: Same as Direct3D 9.
|
||||||
|
* - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
|
||||||
|
* factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly with SDL
|
||||||
|
* 2.0.6.
|
||||||
|
* - **opengles**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
|
||||||
|
* factors. Color and alpha factors need to be the same. OpenGL ES 1
|
||||||
|
* implementation specific: May also support `SDL_BLENDOPERATION_SUBTRACT`
|
||||||
|
* and `SDL_BLENDOPERATION_REV_SUBTRACT`. May support color and alpha
|
||||||
|
* operations being different from each other. May support color and alpha
|
||||||
|
* factors being different from each other.
|
||||||
|
* - **opengles2**: Supports the `SDL_BLENDOPERATION_ADD`,
|
||||||
|
* `SDL_BLENDOPERATION_SUBTRACT`, `SDL_BLENDOPERATION_REV_SUBTRACT`
|
||||||
|
* operations with all factors.
|
||||||
|
* - **psp**: No custom blend mode support.
|
||||||
|
* - **software**: No custom blend mode support.
|
||||||
|
*
|
||||||
|
* Some renderers do not provide an alpha component for the default render
|
||||||
|
* target. The `SDL_BLENDFACTOR_DST_ALPHA` and
|
||||||
|
* `SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA` factors do not have an effect in this
|
||||||
|
* case.
|
||||||
|
*
|
||||||
|
* \param srcColorFactor the SDL_BlendFactor applied to the red, green, and
|
||||||
|
* blue components of the source pixels.
|
||||||
|
* \param dstColorFactor the SDL_BlendFactor applied to the red, green, and
|
||||||
|
* blue components of the destination pixels.
|
||||||
|
* \param colorOperation the SDL_BlendOperation used to combine the red,
|
||||||
|
* green, and blue components of the source and
|
||||||
|
* destination pixels.
|
||||||
|
* \param srcAlphaFactor the SDL_BlendFactor applied to the alpha component of
|
||||||
|
* the source pixels.
|
||||||
|
* \param dstAlphaFactor the SDL_BlendFactor applied to the alpha component of
|
||||||
|
* the destination pixels.
|
||||||
|
* \param alphaOperation the SDL_BlendOperation used to combine the alpha
|
||||||
|
* component of the source and destination pixels.
|
||||||
|
* \returns an SDL_BlendMode that represents the chosen factors and
|
||||||
|
* operations.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.6.
|
||||||
|
*
|
||||||
|
* \sa SDL_SetRenderDrawBlendMode
|
||||||
|
* \sa SDL_GetRenderDrawBlendMode
|
||||||
|
* \sa SDL_SetTextureBlendMode
|
||||||
|
* \sa SDL_GetTextureBlendMode
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor,
|
||||||
|
SDL_BlendFactor dstColorFactor,
|
||||||
|
SDL_BlendOperation colorOperation,
|
||||||
|
SDL_BlendFactor srcAlphaFactor,
|
||||||
|
SDL_BlendFactor dstAlphaFactor,
|
||||||
|
SDL_BlendOperation alphaOperation);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_blendmode_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
141
enginecustom/include/Vulkan/Include/SDL2/SDL_clipboard.h
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryClipboard
|
||||||
|
*
|
||||||
|
* Include file for SDL clipboard handling
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_clipboard_h_
|
||||||
|
#define SDL_clipboard_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Function prototypes */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Put UTF-8 text into the clipboard.
|
||||||
|
*
|
||||||
|
* \param text the text to store in the clipboard.
|
||||||
|
* \returns 0 on success or a negative error code on failure; call
|
||||||
|
* SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetClipboardText
|
||||||
|
* \sa SDL_HasClipboardText
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get UTF-8 text from the clipboard, which must be freed with SDL_free().
|
||||||
|
*
|
||||||
|
* This functions returns empty string if there was not enough memory left for
|
||||||
|
* a copy of the clipboard's content.
|
||||||
|
*
|
||||||
|
* \returns the clipboard text on success or an empty string on failure; call
|
||||||
|
* SDL_GetError() for more information. Caller must call SDL_free()
|
||||||
|
* on the returned pointer when done with it (even if there was an
|
||||||
|
* error).
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_HasClipboardText
|
||||||
|
* \sa SDL_SetClipboardText
|
||||||
|
*/
|
||||||
|
extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Query whether the clipboard exists and contains a non-empty text string.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the clipboard has text, or SDL_FALSE if it does not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetClipboardText
|
||||||
|
* \sa SDL_SetClipboardText
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Put UTF-8 text into the primary selection.
|
||||||
|
*
|
||||||
|
* \param text the text to store in the primary selection.
|
||||||
|
* \returns 0 on success or a negative error code on failure; call
|
||||||
|
* SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.26.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetPrimarySelectionText
|
||||||
|
* \sa SDL_HasPrimarySelectionText
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_SetPrimarySelectionText(const char *text);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get UTF-8 text from the primary selection, which must be freed with
|
||||||
|
* SDL_free().
|
||||||
|
*
|
||||||
|
* This functions returns empty string if there was not enough memory left for
|
||||||
|
* a copy of the primary selection's content.
|
||||||
|
*
|
||||||
|
* \returns the primary selection text on success or an empty string on
|
||||||
|
* failure; call SDL_GetError() for more information. Caller must
|
||||||
|
* call SDL_free() on the returned pointer when done with it (even if
|
||||||
|
* there was an error).
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.26.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_HasPrimarySelectionText
|
||||||
|
* \sa SDL_SetPrimarySelectionText
|
||||||
|
*/
|
||||||
|
extern DECLSPEC char * SDLCALL SDL_GetPrimarySelectionText(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Query whether the primary selection exists and contains a non-empty text
|
||||||
|
* string.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the primary selection has text, or SDL_FALSE if it
|
||||||
|
* does not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.26.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetPrimarySelectionText
|
||||||
|
* \sa SDL_SetPrimarySelectionText
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasPrimarySelectionText(void);
|
||||||
|
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_clipboard_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
570
enginecustom/include/Vulkan/Include/SDL2/SDL_config.h
Normal file
@ -0,0 +1,570 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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 SDL_config_h_
|
||||||
|
#define SDL_config_h_
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file SDL_config.h.in
|
||||||
|
*
|
||||||
|
* This is a set of defines to configure the SDL features
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* General platform specific identifiers */
|
||||||
|
#include "SDL_platform.h"
|
||||||
|
|
||||||
|
/* C language features */
|
||||||
|
/* #undef const */
|
||||||
|
/* #undef inline */
|
||||||
|
/* #undef volatile */
|
||||||
|
|
||||||
|
/* C datatypes */
|
||||||
|
/* Define SIZEOF_VOIDP for 64/32 architectures */
|
||||||
|
#if defined(__LP64__) || defined(_LP64) || defined(_WIN64)
|
||||||
|
#define SIZEOF_VOIDP 8
|
||||||
|
#else
|
||||||
|
#define SIZEOF_VOIDP 4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* #undef HAVE_GCC_ATOMICS */
|
||||||
|
/* #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET */
|
||||||
|
|
||||||
|
/* Comment this if you want to build without any C library requirements */
|
||||||
|
/* #undef HAVE_LIBC */
|
||||||
|
#ifdef HAVE_LIBC
|
||||||
|
|
||||||
|
/* Useful headers */
|
||||||
|
/* #undef STDC_HEADERS */
|
||||||
|
/* #undef HAVE_ALLOCA_H */
|
||||||
|
/* #undef HAVE_CTYPE_H */
|
||||||
|
/* #undef HAVE_FLOAT_H */
|
||||||
|
/* #undef HAVE_ICONV_H */
|
||||||
|
/* #undef HAVE_INTTYPES_H */
|
||||||
|
/* #undef HAVE_LIMITS_H */
|
||||||
|
/* #undef HAVE_MALLOC_H */
|
||||||
|
/* #undef HAVE_MATH_H */
|
||||||
|
/* #undef HAVE_MEMORY_H */
|
||||||
|
/* #undef HAVE_SIGNAL_H */
|
||||||
|
#define HAVE_STDARG_H 1
|
||||||
|
#define HAVE_STDDEF_H 1
|
||||||
|
#define HAVE_STDINT_H 1
|
||||||
|
/* #undef HAVE_STDIO_H */
|
||||||
|
/* #undef HAVE_STDLIB_H */
|
||||||
|
/* #undef HAVE_STRINGS_H */
|
||||||
|
/* #undef HAVE_STRING_H */
|
||||||
|
/* #undef HAVE_SYS_TYPES_H */
|
||||||
|
/* #undef HAVE_WCHAR_H */
|
||||||
|
/* #undef HAVE_LINUX_INPUT_H */
|
||||||
|
/* #undef HAVE_PTHREAD_NP_H */
|
||||||
|
/* #undef HAVE_LIBUNWIND_H */
|
||||||
|
|
||||||
|
/* C library functions */
|
||||||
|
/* #undef HAVE_DLOPEN */
|
||||||
|
/* #undef HAVE_MALLOC */
|
||||||
|
/* #undef HAVE_CALLOC */
|
||||||
|
/* #undef HAVE_REALLOC */
|
||||||
|
/* #undef HAVE_FREE */
|
||||||
|
/* #undef HAVE_ALLOCA */
|
||||||
|
#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
|
||||||
|
/* #undef HAVE_GETENV */
|
||||||
|
/* #undef HAVE_SETENV */
|
||||||
|
/* #undef HAVE_PUTENV */
|
||||||
|
/* #undef HAVE_UNSETENV */
|
||||||
|
#endif
|
||||||
|
/* #undef HAVE_QSORT */
|
||||||
|
/* #undef HAVE_BSEARCH */
|
||||||
|
/* #undef HAVE_ABS */
|
||||||
|
/* #undef HAVE_BCOPY */
|
||||||
|
/* #undef HAVE_MEMSET */
|
||||||
|
/* #undef HAVE_MEMCPY */
|
||||||
|
/* #undef HAVE_MEMMOVE */
|
||||||
|
/* #undef HAVE_MEMCMP */
|
||||||
|
/* #undef HAVE_WCSLEN */
|
||||||
|
/* #undef HAVE_WCSLCPY */
|
||||||
|
/* #undef HAVE_WCSLCAT */
|
||||||
|
/* #undef HAVE__WCSDUP */
|
||||||
|
/* #undef HAVE_WCSDUP */
|
||||||
|
/* #undef HAVE_WCSSTR */
|
||||||
|
/* #undef HAVE_WCSCMP */
|
||||||
|
/* #undef HAVE_WCSNCMP */
|
||||||
|
/* #undef HAVE_WCSCASECMP */
|
||||||
|
/* #undef HAVE__WCSICMP */
|
||||||
|
/* #undef HAVE_WCSNCASECMP */
|
||||||
|
/* #undef HAVE__WCSNICMP */
|
||||||
|
/* #undef HAVE_STRLEN */
|
||||||
|
/* #undef HAVE_STRLCPY */
|
||||||
|
/* #undef HAVE_STRLCAT */
|
||||||
|
/* #undef HAVE__STRREV */
|
||||||
|
/* #undef HAVE__STRUPR */
|
||||||
|
/* #undef HAVE__STRLWR */
|
||||||
|
/* #undef HAVE_INDEX */
|
||||||
|
/* #undef HAVE_RINDEX */
|
||||||
|
/* #undef HAVE_STRCHR */
|
||||||
|
/* #undef HAVE_STRRCHR */
|
||||||
|
/* #undef HAVE_STRSTR */
|
||||||
|
/* #undef HAVE_STRTOK_R */
|
||||||
|
/* #undef HAVE_ITOA */
|
||||||
|
/* #undef HAVE__LTOA */
|
||||||
|
/* #undef HAVE__UITOA */
|
||||||
|
/* #undef HAVE__ULTOA */
|
||||||
|
/* #undef HAVE_STRTOL */
|
||||||
|
/* #undef HAVE_STRTOUL */
|
||||||
|
/* #undef HAVE__I64TOA */
|
||||||
|
/* #undef HAVE__UI64TOA */
|
||||||
|
/* #undef HAVE_STRTOLL */
|
||||||
|
/* #undef HAVE_STRTOULL */
|
||||||
|
/* #undef HAVE_STRTOD */
|
||||||
|
/* #undef HAVE_ATOI */
|
||||||
|
/* #undef HAVE_ATOF */
|
||||||
|
/* #undef HAVE_STRCMP */
|
||||||
|
/* #undef HAVE_STRNCMP */
|
||||||
|
/* #undef HAVE__STRICMP */
|
||||||
|
/* #undef HAVE_STRCASECMP */
|
||||||
|
/* #undef HAVE__STRNICMP */
|
||||||
|
/* #undef HAVE_STRNCASECMP */
|
||||||
|
/* #undef HAVE_STRCASESTR */
|
||||||
|
/* #undef HAVE_SSCANF */
|
||||||
|
/* #undef HAVE_VSSCANF */
|
||||||
|
/* #undef HAVE_VSNPRINTF */
|
||||||
|
/* #undef HAVE_M_PI */
|
||||||
|
/* #undef HAVE_ACOS */
|
||||||
|
/* #undef HAVE_ACOSF */
|
||||||
|
/* #undef HAVE_ASIN */
|
||||||
|
/* #undef HAVE_ASINF */
|
||||||
|
/* #undef HAVE_ATAN */
|
||||||
|
/* #undef HAVE_ATANF */
|
||||||
|
/* #undef HAVE_ATAN2 */
|
||||||
|
/* #undef HAVE_ATAN2F */
|
||||||
|
/* #undef HAVE_CEIL */
|
||||||
|
/* #undef HAVE_CEILF */
|
||||||
|
/* #undef HAVE_COPYSIGN */
|
||||||
|
/* #undef HAVE_COPYSIGNF */
|
||||||
|
/* #undef HAVE_COS */
|
||||||
|
/* #undef HAVE_COSF */
|
||||||
|
/* #undef HAVE_EXP */
|
||||||
|
/* #undef HAVE_EXPF */
|
||||||
|
/* #undef HAVE_FABS */
|
||||||
|
/* #undef HAVE_FABSF */
|
||||||
|
/* #undef HAVE_FLOOR */
|
||||||
|
/* #undef HAVE_FLOORF */
|
||||||
|
/* #undef HAVE_FMOD */
|
||||||
|
/* #undef HAVE_FMODF */
|
||||||
|
/* #undef HAVE_LOG */
|
||||||
|
/* #undef HAVE_LOGF */
|
||||||
|
/* #undef HAVE_LOG10 */
|
||||||
|
/* #undef HAVE_LOG10F */
|
||||||
|
/* #undef HAVE_LROUND */
|
||||||
|
/* #undef HAVE_LROUNDF */
|
||||||
|
/* #undef HAVE_POW */
|
||||||
|
/* #undef HAVE_POWF */
|
||||||
|
/* #undef HAVE_ROUND */
|
||||||
|
/* #undef HAVE_ROUNDF */
|
||||||
|
/* #undef HAVE_SCALBN */
|
||||||
|
/* #undef HAVE_SCALBNF */
|
||||||
|
/* #undef HAVE_SIN */
|
||||||
|
/* #undef HAVE_SINF */
|
||||||
|
/* #undef HAVE_SQRT */
|
||||||
|
/* #undef HAVE_SQRTF */
|
||||||
|
/* #undef HAVE_TAN */
|
||||||
|
/* #undef HAVE_TANF */
|
||||||
|
/* #undef HAVE_TRUNC */
|
||||||
|
/* #undef HAVE_TRUNCF */
|
||||||
|
/* #undef HAVE_FOPEN64 */
|
||||||
|
/* #undef HAVE_FSEEKO */
|
||||||
|
/* #undef HAVE_FSEEKO64 */
|
||||||
|
/* #undef HAVE_MEMFD_CREATE */
|
||||||
|
/* #undef HAVE_POSIX_FALLOCATE */
|
||||||
|
/* #undef HAVE_SIGACTION */
|
||||||
|
/* #undef HAVE_SA_SIGACTION */
|
||||||
|
/* #undef HAVE_SETJMP */
|
||||||
|
/* #undef HAVE_NANOSLEEP */
|
||||||
|
/* #undef HAVE_SYSCONF */
|
||||||
|
/* #undef HAVE_SYSCTLBYNAME */
|
||||||
|
/* #undef HAVE_CLOCK_GETTIME */
|
||||||
|
/* #undef HAVE_GETPAGESIZE */
|
||||||
|
/* #undef HAVE_MPROTECT */
|
||||||
|
/* #undef HAVE_ICONV */
|
||||||
|
/* #undef SDL_USE_LIBICONV */
|
||||||
|
/* #undef HAVE_PTHREAD_SETNAME_NP */
|
||||||
|
/* #undef HAVE_PTHREAD_SET_NAME_NP */
|
||||||
|
/* #undef HAVE_SEM_TIMEDWAIT */
|
||||||
|
/* #undef HAVE_GETAUXVAL */
|
||||||
|
/* #undef HAVE_ELF_AUX_INFO */
|
||||||
|
/* #undef HAVE_POLL */
|
||||||
|
/* #undef HAVE__EXIT */
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define HAVE_STDARG_H 1
|
||||||
|
#define HAVE_STDDEF_H 1
|
||||||
|
#define HAVE_STDINT_H 1
|
||||||
|
/* #undef HAVE_FLOAT_H */
|
||||||
|
#endif /* HAVE_LIBC */
|
||||||
|
|
||||||
|
/* #undef HAVE_ALTIVEC_H */
|
||||||
|
/* #undef HAVE_DBUS_DBUS_H */
|
||||||
|
/* #undef HAVE_FCITX */
|
||||||
|
/* #undef HAVE_IBUS_IBUS_H */
|
||||||
|
/* #undef HAVE_SYS_INOTIFY_H */
|
||||||
|
/* #undef HAVE_INOTIFY_INIT */
|
||||||
|
/* #undef HAVE_INOTIFY_INIT1 */
|
||||||
|
/* #undef HAVE_INOTIFY */
|
||||||
|
/* #undef HAVE_LIBUSB */
|
||||||
|
/* #undef HAVE_O_CLOEXEC */
|
||||||
|
|
||||||
|
/* Apple platforms might be building universal binaries, where Intel builds
|
||||||
|
can use immintrin.h but other architectures can't. */
|
||||||
|
#ifdef __APPLE__
|
||||||
|
# if defined(__has_include) && (defined(__i386__) || defined(__x86_64))
|
||||||
|
# if __has_include(<immintrin.h>)
|
||||||
|
# define HAVE_IMMINTRIN_H 1
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#else /* non-Apple platforms can use the normal CMake check for this. */
|
||||||
|
#define HAVE_IMMINTRIN_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* #undef HAVE_LIBUDEV_H */
|
||||||
|
/* #undef HAVE_LIBSAMPLERATE_H */
|
||||||
|
/* #undef HAVE_LIBDECOR_H */
|
||||||
|
|
||||||
|
#define HAVE_D3D_H 1
|
||||||
|
#define HAVE_D3D11_H 1
|
||||||
|
#define HAVE_D3D12_H 1
|
||||||
|
#define HAVE_DDRAW_H 1
|
||||||
|
#define HAVE_DSOUND_H 1
|
||||||
|
#define HAVE_DINPUT_H 1
|
||||||
|
#define HAVE_XINPUT_H 1
|
||||||
|
#define HAVE_WINDOWS_GAMING_INPUT_H 1
|
||||||
|
#define HAVE_DXGI_H 1
|
||||||
|
|
||||||
|
#define HAVE_MMDEVICEAPI_H 1
|
||||||
|
#define HAVE_AUDIOCLIENT_H 1
|
||||||
|
#define HAVE_TPCSHRD_H 1
|
||||||
|
#define HAVE_SENSORSAPI_H 1
|
||||||
|
#define HAVE_ROAPI_H 1
|
||||||
|
#define HAVE_SHELLSCALINGAPI_H 1
|
||||||
|
|
||||||
|
/* #undef USE_POSIX_SPAWN */
|
||||||
|
|
||||||
|
/* SDL internal assertion support */
|
||||||
|
#if 0
|
||||||
|
/* #undef SDL_DEFAULT_ASSERT_LEVEL */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Allow disabling of core subsystems */
|
||||||
|
/* #undef SDL_ATOMIC_DISABLED */
|
||||||
|
/* #undef SDL_AUDIO_DISABLED */
|
||||||
|
/* #undef SDL_CPUINFO_DISABLED */
|
||||||
|
/* #undef SDL_EVENTS_DISABLED */
|
||||||
|
/* #undef SDL_FILE_DISABLED */
|
||||||
|
/* #undef SDL_JOYSTICK_DISABLED */
|
||||||
|
/* #undef SDL_HAPTIC_DISABLED */
|
||||||
|
/* #undef SDL_HIDAPI_DISABLED */
|
||||||
|
/* #undef SDL_SENSOR_DISABLED */
|
||||||
|
/* #undef SDL_LOADSO_DISABLED */
|
||||||
|
/* #undef SDL_RENDER_DISABLED */
|
||||||
|
/* #undef SDL_THREADS_DISABLED */
|
||||||
|
/* #undef SDL_TIMERS_DISABLED */
|
||||||
|
/* #undef SDL_VIDEO_DISABLED */
|
||||||
|
/* #undef SDL_POWER_DISABLED */
|
||||||
|
/* #undef SDL_FILESYSTEM_DISABLED */
|
||||||
|
/* #undef SDL_LOCALE_DISABLED */
|
||||||
|
/* #undef SDL_MISC_DISABLED */
|
||||||
|
|
||||||
|
/* Enable various audio drivers */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_ALSA */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_ANDROID */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_OPENSLES */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_AAUDIO */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_ARTS */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_COREAUDIO */
|
||||||
|
#define SDL_AUDIO_DRIVER_DISK 1
|
||||||
|
#define SDL_AUDIO_DRIVER_DSOUND 1
|
||||||
|
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_EMSCRIPTEN */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_ESD */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_HAIKU */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_JACK */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_JACK_DYNAMIC */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_NAS */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_NETBSD */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_OSS */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_PAUDIO */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_PIPEWIRE */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_QSA */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_SNDIO */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */
|
||||||
|
#define SDL_AUDIO_DRIVER_WASAPI 1
|
||||||
|
#define SDL_AUDIO_DRIVER_WINMM 1
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_OS2 */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_VITA */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_PSP */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_PS2 */
|
||||||
|
/* #undef SDL_AUDIO_DRIVER_N3DS */
|
||||||
|
|
||||||
|
/* Enable various input drivers */
|
||||||
|
/* #undef SDL_INPUT_LINUXEV */
|
||||||
|
/* #undef SDL_INPUT_LINUXKD */
|
||||||
|
/* #undef SDL_INPUT_FBSDKBIO */
|
||||||
|
/* #undef SDL_INPUT_WSCONS */
|
||||||
|
/* #undef SDL_JOYSTICK_ANDROID */
|
||||||
|
/* #undef SDL_JOYSTICK_HAIKU */
|
||||||
|
#define SDL_JOYSTICK_WGI 1
|
||||||
|
#define SDL_JOYSTICK_DINPUT 1
|
||||||
|
#define SDL_JOYSTICK_XINPUT 1
|
||||||
|
/* #undef SDL_JOYSTICK_DUMMY */
|
||||||
|
/* #undef SDL_JOYSTICK_IOKIT */
|
||||||
|
/* #undef SDL_JOYSTICK_MFI */
|
||||||
|
/* #undef SDL_JOYSTICK_LINUX */
|
||||||
|
/* #undef SDL_JOYSTICK_OS2 */
|
||||||
|
/* #undef SDL_JOYSTICK_USBHID */
|
||||||
|
/* #undef SDL_HAVE_MACHINE_JOYSTICK_H */
|
||||||
|
#define SDL_JOYSTICK_HIDAPI 1
|
||||||
|
#define SDL_JOYSTICK_RAWINPUT 1
|
||||||
|
/* #undef SDL_JOYSTICK_EMSCRIPTEN */
|
||||||
|
#define SDL_JOYSTICK_VIRTUAL 1
|
||||||
|
/* #undef SDL_JOYSTICK_VITA */
|
||||||
|
/* #undef SDL_JOYSTICK_PSP */
|
||||||
|
/* #undef SDL_JOYSTICK_PS2 */
|
||||||
|
/* #undef SDL_JOYSTICK_N3DS */
|
||||||
|
/* #undef SDL_HAPTIC_DUMMY */
|
||||||
|
/* #undef SDL_HAPTIC_LINUX */
|
||||||
|
/* #undef SDL_HAPTIC_IOKIT */
|
||||||
|
#define SDL_HAPTIC_DINPUT 1
|
||||||
|
#define SDL_HAPTIC_XINPUT 1
|
||||||
|
/* #undef SDL_HAPTIC_ANDROID */
|
||||||
|
/* #undef SDL_LIBUSB_DYNAMIC */
|
||||||
|
/* #undef SDL_UDEV_DYNAMIC */
|
||||||
|
|
||||||
|
/* Enable various sensor drivers */
|
||||||
|
/* #undef SDL_SENSOR_ANDROID */
|
||||||
|
/* #undef SDL_SENSOR_COREMOTION */
|
||||||
|
#define SDL_SENSOR_WINDOWS 1
|
||||||
|
/* #undef SDL_SENSOR_DUMMY */
|
||||||
|
/* #undef SDL_SENSOR_VITA */
|
||||||
|
/* #undef SDL_SENSOR_N3DS */
|
||||||
|
|
||||||
|
/* Enable various shared object loading systems */
|
||||||
|
/* #undef SDL_LOADSO_DLOPEN */
|
||||||
|
/* #undef SDL_LOADSO_DUMMY */
|
||||||
|
/* #undef SDL_LOADSO_LDG */
|
||||||
|
#define SDL_LOADSO_WINDOWS 1
|
||||||
|
/* #undef SDL_LOADSO_OS2 */
|
||||||
|
|
||||||
|
/* Enable various threading systems */
|
||||||
|
#define SDL_THREAD_GENERIC_COND_SUFFIX 1
|
||||||
|
/* #undef SDL_THREAD_PTHREAD */
|
||||||
|
/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX */
|
||||||
|
/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */
|
||||||
|
#define SDL_THREAD_WINDOWS 1
|
||||||
|
/* #undef SDL_THREAD_OS2 */
|
||||||
|
/* #undef SDL_THREAD_VITA */
|
||||||
|
/* #undef SDL_THREAD_PSP */
|
||||||
|
/* #undef SDL_THREAD_PS2 */
|
||||||
|
/* #undef SDL_THREAD_N3DS */
|
||||||
|
|
||||||
|
/* Enable various timer systems */
|
||||||
|
/* #undef SDL_TIMER_HAIKU */
|
||||||
|
/* #undef SDL_TIMER_DUMMY */
|
||||||
|
/* #undef SDL_TIMER_UNIX */
|
||||||
|
#define SDL_TIMER_WINDOWS 1
|
||||||
|
/* #undef SDL_TIMER_OS2 */
|
||||||
|
/* #undef SDL_TIMER_VITA */
|
||||||
|
/* #undef SDL_TIMER_PSP */
|
||||||
|
/* #undef SDL_TIMER_PS2 */
|
||||||
|
/* #undef SDL_TIMER_N3DS */
|
||||||
|
|
||||||
|
/* Enable various video drivers */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_ANDROID */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_EMSCRIPTEN */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_HAIKU */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_COCOA */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_UIKIT */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_DIRECTFB */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC */
|
||||||
|
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||||
|
#define SDL_VIDEO_DRIVER_OFFSCREEN 1
|
||||||
|
#define SDL_VIDEO_DRIVER_WINDOWS 1
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_WINRT */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_WAYLAND */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_RPI */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_VIVANTE */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_VIVANTE_VDK */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_OS2 */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_QNX */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_RISCOS */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_PSP */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_PS2 */
|
||||||
|
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_KMSDRM */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM */
|
||||||
|
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR */
|
||||||
|
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11 */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_XCURSOR */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_XDBE */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2 */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_XFIXES */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_XRANDR */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_XSHAPE */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_VITA */
|
||||||
|
/* #undef SDL_VIDEO_DRIVER_N3DS */
|
||||||
|
|
||||||
|
#define SDL_VIDEO_RENDER_D3D 1
|
||||||
|
#define SDL_VIDEO_RENDER_D3D11 1
|
||||||
|
#define SDL_VIDEO_RENDER_D3D12 1
|
||||||
|
#define SDL_VIDEO_RENDER_OGL 1
|
||||||
|
/* #undef SDL_VIDEO_RENDER_OGL_ES */
|
||||||
|
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||||
|
/* #undef SDL_VIDEO_RENDER_DIRECTFB */
|
||||||
|
/* #undef SDL_VIDEO_RENDER_METAL */
|
||||||
|
/* #undef SDL_VIDEO_RENDER_VITA_GXM */
|
||||||
|
/* #undef SDL_VIDEO_RENDER_PS2 */
|
||||||
|
/* #undef SDL_VIDEO_RENDER_PSP */
|
||||||
|
|
||||||
|
/* Enable OpenGL support */
|
||||||
|
#define SDL_VIDEO_OPENGL 1
|
||||||
|
/* #undef SDL_VIDEO_OPENGL_ES */
|
||||||
|
#define SDL_VIDEO_OPENGL_ES2 1
|
||||||
|
/* #undef SDL_VIDEO_OPENGL_BGL */
|
||||||
|
/* #undef SDL_VIDEO_OPENGL_CGL */
|
||||||
|
/* #undef SDL_VIDEO_OPENGL_GLX */
|
||||||
|
#define SDL_VIDEO_OPENGL_WGL 1
|
||||||
|
#define SDL_VIDEO_OPENGL_EGL 1
|
||||||
|
/* #undef SDL_VIDEO_OPENGL_OSMESA */
|
||||||
|
/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
|
||||||
|
|
||||||
|
/* Enable Vulkan support */
|
||||||
|
#define SDL_VIDEO_VULKAN 1
|
||||||
|
|
||||||
|
/* Enable Metal support */
|
||||||
|
/* #undef SDL_VIDEO_METAL */
|
||||||
|
|
||||||
|
/* Enable system power support */
|
||||||
|
/* #undef SDL_POWER_ANDROID */
|
||||||
|
/* #undef SDL_POWER_LINUX */
|
||||||
|
#define SDL_POWER_WINDOWS 1
|
||||||
|
/* #undef SDL_POWER_WINRT */
|
||||||
|
/* #undef SDL_POWER_MACOSX */
|
||||||
|
/* #undef SDL_POWER_UIKIT */
|
||||||
|
/* #undef SDL_POWER_HAIKU */
|
||||||
|
/* #undef SDL_POWER_EMSCRIPTEN */
|
||||||
|
/* #undef SDL_POWER_HARDWIRED */
|
||||||
|
/* #undef SDL_POWER_VITA */
|
||||||
|
/* #undef SDL_POWER_PSP */
|
||||||
|
/* #undef SDL_POWER_N3DS */
|
||||||
|
|
||||||
|
/* Enable system filesystem support */
|
||||||
|
/* #undef SDL_FILESYSTEM_ANDROID */
|
||||||
|
/* #undef SDL_FILESYSTEM_HAIKU */
|
||||||
|
/* #undef SDL_FILESYSTEM_COCOA */
|
||||||
|
/* #undef SDL_FILESYSTEM_DUMMY */
|
||||||
|
/* #undef SDL_FILESYSTEM_RISCOS */
|
||||||
|
/* #undef SDL_FILESYSTEM_UNIX */
|
||||||
|
#define SDL_FILESYSTEM_WINDOWS 1
|
||||||
|
/* #undef SDL_FILESYSTEM_EMSCRIPTEN */
|
||||||
|
/* #undef SDL_FILESYSTEM_OS2 */
|
||||||
|
/* #undef SDL_FILESYSTEM_VITA */
|
||||||
|
/* #undef SDL_FILESYSTEM_PSP */
|
||||||
|
/* #undef SDL_FILESYSTEM_PS2 */
|
||||||
|
/* #undef SDL_FILESYSTEM_N3DS */
|
||||||
|
|
||||||
|
/* Enable misc subsystem */
|
||||||
|
/* #undef SDL_MISC_DUMMY */
|
||||||
|
|
||||||
|
/* Enable locale subsystem */
|
||||||
|
/* #undef SDL_LOCALE_DUMMY */
|
||||||
|
|
||||||
|
/* Enable assembly routines */
|
||||||
|
/* #undef SDL_ALTIVEC_BLITTERS */
|
||||||
|
/* #undef SDL_ARM_SIMD_BLITTERS */
|
||||||
|
/* #undef SDL_ARM_NEON_BLITTERS */
|
||||||
|
|
||||||
|
/* Whether SDL_DYNAMIC_API needs dlopen */
|
||||||
|
/* #undef DYNAPI_NEEDS_DLOPEN */
|
||||||
|
|
||||||
|
/* Enable dynamic libsamplerate support */
|
||||||
|
/* #undef SDL_LIBSAMPLERATE_DYNAMIC */
|
||||||
|
|
||||||
|
/* Enable ime support */
|
||||||
|
/* #undef SDL_USE_IME */
|
||||||
|
|
||||||
|
/* Platform specific definitions */
|
||||||
|
/* #undef SDL_IPHONE_KEYBOARD */
|
||||||
|
/* #undef SDL_IPHONE_LAUNCHSCREEN */
|
||||||
|
|
||||||
|
/* #undef SDL_VIDEO_VITA_PIB */
|
||||||
|
/* #undef SDL_VIDEO_VITA_PVR */
|
||||||
|
/* #undef SDL_VIDEO_VITA_PVR_OGL */
|
||||||
|
|
||||||
|
/* #undef SDL_HAVE_LIBDECOR_GET_MIN_MAX */
|
||||||
|
|
||||||
|
#if !defined(HAVE_STDINT_H) && !defined(_STDINT_H_)
|
||||||
|
/* Most everything except Visual Studio 2008 and earlier has stdint.h now */
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||||
|
typedef signed __int8 int8_t;
|
||||||
|
typedef unsigned __int8 uint8_t;
|
||||||
|
typedef signed __int16 int16_t;
|
||||||
|
typedef unsigned __int16 uint16_t;
|
||||||
|
typedef signed __int32 int32_t;
|
||||||
|
typedef unsigned __int32 uint32_t;
|
||||||
|
typedef signed __int64 int64_t;
|
||||||
|
typedef unsigned __int64 uint64_t;
|
||||||
|
#ifndef _UINTPTR_T_DEFINED
|
||||||
|
#ifdef _WIN64
|
||||||
|
typedef unsigned __int64 uintptr_t;
|
||||||
|
#else
|
||||||
|
typedef unsigned int uintptr_t;
|
||||||
|
#endif
|
||||||
|
#define _UINTPTR_T_DEFINED
|
||||||
|
#endif
|
||||||
|
#endif /* Visual Studio 2008 */
|
||||||
|
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||||
|
|
||||||
|
#endif /* SDL_config_h_ */
|
20
enginecustom/include/Vulkan/Include/SDL2/SDL_copying.h
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
602
enginecustom/include/Vulkan/Include/SDL2/SDL_cpuinfo.h
Normal file
@ -0,0 +1,602 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* WIKI CATEGORY: CPUInfo */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryCPUInfo
|
||||||
|
*
|
||||||
|
* CPU feature detection for SDL.
|
||||||
|
*
|
||||||
|
* These functions are largely concerned with reporting if the system has
|
||||||
|
* access to various SIMD instruction sets, but also has other important info
|
||||||
|
* to share, such as number of logical CPU cores.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_cpuinfo_h_
|
||||||
|
#define SDL_cpuinfo_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
|
||||||
|
/* Need to do this here because intrin.h has C++ code in it */
|
||||||
|
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
|
||||||
|
#ifdef __clang__
|
||||||
|
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||||
|
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||||
|
|
||||||
|
#ifndef __PRFCHWINTRIN_H
|
||||||
|
#define __PRFCHWINTRIN_H
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_prefetch(void *__P)
|
||||||
|
{
|
||||||
|
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* __PRFCHWINTRIN_H */
|
||||||
|
#endif /* __clang__ */
|
||||||
|
#include <intrin.h>
|
||||||
|
#ifndef _WIN64
|
||||||
|
#ifndef __MMX__
|
||||||
|
#define __MMX__
|
||||||
|
#endif
|
||||||
|
/*
|
||||||
|
#ifndef __3dNOW__
|
||||||
|
#define __3dNOW__
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
#endif
|
||||||
|
#ifndef __SSE__
|
||||||
|
#define __SSE__
|
||||||
|
#endif
|
||||||
|
#ifndef __SSE2__
|
||||||
|
#define __SSE2__
|
||||||
|
#endif
|
||||||
|
#ifndef __SSE3__
|
||||||
|
#define __SSE3__
|
||||||
|
#endif
|
||||||
|
#elif defined(__MINGW64_VERSION_MAJOR)
|
||||||
|
#include <intrin.h>
|
||||||
|
#if !defined(SDL_DISABLE_ARM_NEON_H) && defined(__ARM_NEON)
|
||||||
|
# include <arm_neon.h>
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
|
||||||
|
#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
|
||||||
|
#include <altivec.h>
|
||||||
|
#endif
|
||||||
|
#if !defined(SDL_DISABLE_ARM_NEON_H)
|
||||||
|
# if defined(__ARM_NEON)
|
||||||
|
# include <arm_neon.h>
|
||||||
|
# elif defined(__WINDOWS__) || defined(__WINRT__) || defined(__GDK__)
|
||||||
|
/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
|
||||||
|
# if defined(_M_ARM)
|
||||||
|
# include <armintr.h>
|
||||||
|
# include <arm_neon.h>
|
||||||
|
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
||||||
|
# endif
|
||||||
|
# if defined (_M_ARM64)
|
||||||
|
# include <arm64intr.h>
|
||||||
|
# include <arm64_neon.h>
|
||||||
|
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
||||||
|
# define __ARM_ARCH 8
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
#endif /* compiler version */
|
||||||
|
|
||||||
|
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
|
||||||
|
#include <mm3dnow.h>
|
||||||
|
#endif
|
||||||
|
#if defined(__loongarch_sx) && !defined(SDL_DISABLE_LSX_H)
|
||||||
|
#include <lsxintrin.h>
|
||||||
|
#define __LSX__
|
||||||
|
#endif
|
||||||
|
#if defined(__loongarch_asx) && !defined(SDL_DISABLE_LASX_H)
|
||||||
|
#include <lasxintrin.h>
|
||||||
|
#define __LASX__
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
|
||||||
|
#include <immintrin.h>
|
||||||
|
#else
|
||||||
|
#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
|
||||||
|
#include <mmintrin.h>
|
||||||
|
#endif
|
||||||
|
#if defined(__SSE__) && !defined(SDL_DISABLE_XMMINTRIN_H)
|
||||||
|
#include <xmmintrin.h>
|
||||||
|
#endif
|
||||||
|
#if defined(__SSE2__) && !defined(SDL_DISABLE_EMMINTRIN_H)
|
||||||
|
#include <emmintrin.h>
|
||||||
|
#endif
|
||||||
|
#if defined(__SSE3__) && !defined(SDL_DISABLE_PMMINTRIN_H)
|
||||||
|
#include <pmmintrin.h>
|
||||||
|
#endif
|
||||||
|
#endif /* HAVE_IMMINTRIN_H */
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* This is a guess for the cacheline size used for padding.
|
||||||
|
* Most x86 processors have a 64 byte cache line.
|
||||||
|
* The 64-bit PowerPC processors have a 128 byte cache line.
|
||||||
|
* We'll use the larger value to be generally safe.
|
||||||
|
*/
|
||||||
|
#define SDL_CACHELINE_SIZE 128
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the number of CPU cores available.
|
||||||
|
*
|
||||||
|
* \returns the total number of logical CPU cores. On CPUs that include
|
||||||
|
* technologies such as hyperthreading, the number of logical cores
|
||||||
|
* may be more than the number of physical cores.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine the L1 cache line size of the CPU.
|
||||||
|
*
|
||||||
|
* This is useful for determining multi-threaded structure padding or SIMD
|
||||||
|
* prefetch sizes.
|
||||||
|
*
|
||||||
|
* \returns the L1 cache line size of the CPU, in bytes.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has the RDTSC instruction.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has the RDTSC instruction or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has AltiVec features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using PowerPC instruction
|
||||||
|
* sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has AltiVec features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has MMX features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has MMX features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has 3DNow! features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using AMD instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has 3DNow! features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has SSE features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has SSE features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has SSE2 features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has SSE2 features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has SSE3 features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has SSE3 features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has SSE4.1 features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has SSE4.1 features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has SSE4.2 features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has SSE4.2 features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has AVX features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has AVX features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has AVX2 features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has AVX2 features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.4.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has AVX-512F (foundation) features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has AVX-512F features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.9.
|
||||||
|
*
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has ARM SIMD (ARMv6) features.
|
||||||
|
*
|
||||||
|
* This is different from ARM NEON, which is a different instruction set.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using ARM instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has ARM SIMD features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.12.
|
||||||
|
*
|
||||||
|
* \sa SDL_HasNEON
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has NEON (ARM SIMD) features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using ARM instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has ARM NEON features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.6.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has LSX (LOONGARCH SIMD) features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using LOONGARCH instruction
|
||||||
|
* sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has LOONGARCH LSX features or SDL_FALSE if
|
||||||
|
* not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.24.0.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasLSX(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has LASX (LOONGARCH SIMD) features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using LOONGARCH instruction
|
||||||
|
* sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has LOONGARCH LASX features or SDL_FALSE if
|
||||||
|
* not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.24.0.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasLASX(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the amount of RAM configured in the system.
|
||||||
|
*
|
||||||
|
* \returns the amount of RAM configured in the system in MiB.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.1.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Report the alignment this system needs for SIMD allocations.
|
||||||
|
*
|
||||||
|
* This will return the minimum number of bytes to which a pointer must be
|
||||||
|
* aligned to be compatible with SIMD instructions on the current machine. For
|
||||||
|
* example, if the machine supports SSE only, it will return 16, but if it
|
||||||
|
* supports AVX-512F, it'll return 64 (etc). This only reports values for
|
||||||
|
* instruction sets SDL knows about, so if your SDL build doesn't have
|
||||||
|
* SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
|
||||||
|
* not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
|
||||||
|
* Plan accordingly.
|
||||||
|
*
|
||||||
|
* \returns the alignment in bytes needed for available, known SIMD
|
||||||
|
* instructions.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.10.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allocate memory in a SIMD-friendly way.
|
||||||
|
*
|
||||||
|
* This will allocate a block of memory that is suitable for use with SIMD
|
||||||
|
* instructions. Specifically, it will be properly aligned and padded for the
|
||||||
|
* system's supported vector instructions.
|
||||||
|
*
|
||||||
|
* The memory returned will be padded such that it is safe to read or write an
|
||||||
|
* incomplete vector at the end of the memory block. This can be useful so you
|
||||||
|
* don't have to drop back to a scalar fallback at the end of your SIMD
|
||||||
|
* processing loop to deal with the final elements without overflowing the
|
||||||
|
* allocated buffer.
|
||||||
|
*
|
||||||
|
* You must free this memory with SDL_FreeSIMD(), not free() or SDL_free() or
|
||||||
|
* delete[], etc.
|
||||||
|
*
|
||||||
|
* Note that SDL will only deal with SIMD instruction sets it is aware of; for
|
||||||
|
* example, SDL 2.0.8 knows that SSE wants 16-byte vectors (SDL_HasSSE()), and
|
||||||
|
* AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't know that AVX-512 wants
|
||||||
|
* 64. To be clear: if you can't decide to use an instruction set with an
|
||||||
|
* SDL_Has*() function, don't use that instruction set with memory allocated
|
||||||
|
* through here.
|
||||||
|
*
|
||||||
|
* SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
|
||||||
|
* out of memory, but you are not allowed to dereference it (because you only
|
||||||
|
* own zero bytes of that buffer).
|
||||||
|
*
|
||||||
|
* \param len The length, in bytes, of the block to allocate. The actual
|
||||||
|
* allocated block might be larger due to padding, etc.
|
||||||
|
* \returns a pointer to the newly-allocated block, NULL if out of memory.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.10.
|
||||||
|
*
|
||||||
|
* \sa SDL_SIMDGetAlignment
|
||||||
|
* \sa SDL_SIMDRealloc
|
||||||
|
* \sa SDL_SIMDFree
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reallocate memory obtained from SDL_SIMDAlloc
|
||||||
|
*
|
||||||
|
* It is not valid to use this function on a pointer from anything but
|
||||||
|
* SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
|
||||||
|
* SDL_malloc, memalign, new[], etc.
|
||||||
|
*
|
||||||
|
* \param mem The pointer obtained from SDL_SIMDAlloc. This function also
|
||||||
|
* accepts NULL, at which point this function is the same as
|
||||||
|
* calling SDL_SIMDAlloc with a NULL pointer.
|
||||||
|
* \param len The length, in bytes, of the block to allocated. The actual
|
||||||
|
* allocated block might be larger due to padding, etc. Passing 0
|
||||||
|
* will return a non-NULL pointer, assuming the system isn't out of
|
||||||
|
* memory.
|
||||||
|
* \returns a pointer to the newly-reallocated block, NULL if out of memory.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.14.
|
||||||
|
*
|
||||||
|
* \sa SDL_SIMDGetAlignment
|
||||||
|
* \sa SDL_SIMDAlloc
|
||||||
|
* \sa SDL_SIMDFree
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deallocate memory obtained from SDL_SIMDAlloc
|
||||||
|
*
|
||||||
|
* It is not valid to use this function on a pointer from anything but
|
||||||
|
* SDL_SIMDAlloc() or SDL_SIMDRealloc(). It can't be used on pointers from
|
||||||
|
* malloc, realloc, SDL_malloc, memalign, new[], etc.
|
||||||
|
*
|
||||||
|
* However, SDL_SIMDFree(NULL) is a legal no-op.
|
||||||
|
*
|
||||||
|
* The memory pointed to by `ptr` is no longer valid for access upon return,
|
||||||
|
* and may be returned to the system or reused by a future allocation. The
|
||||||
|
* pointer passed to this function is no longer safe to dereference once this
|
||||||
|
* function returns, and should be discarded.
|
||||||
|
*
|
||||||
|
* \param ptr The pointer, returned from SDL_SIMDAlloc or SDL_SIMDRealloc, to
|
||||||
|
* deallocate. NULL is a legal no-op.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.10.
|
||||||
|
*
|
||||||
|
* \sa SDL_SIMDAlloc
|
||||||
|
* \sa SDL_SIMDRealloc
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_cpuinfo_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
2351
enginecustom/include/Vulkan/Include/SDL2/SDL_egl.h
Normal file
396
enginecustom/include/Vulkan/Include/SDL2/SDL_endian.h
Normal file
@ -0,0 +1,396 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryEndian
|
||||||
|
*
|
||||||
|
* Functions for reading and writing endian-specific values
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_endian_h_
|
||||||
|
#define SDL_endian_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||||
|
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||||
|
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||||
|
#ifdef __clang__
|
||||||
|
#ifndef __PRFCHWINTRIN_H
|
||||||
|
#define __PRFCHWINTRIN_H
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_prefetch(void *__P)
|
||||||
|
{
|
||||||
|
__builtin_prefetch(__P, 0, 3 /* _MM_HINT_T0 */);
|
||||||
|
}
|
||||||
|
#endif /* __PRFCHWINTRIN_H */
|
||||||
|
#endif /* __clang__ */
|
||||||
|
|
||||||
|
#include <intrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \name The two types of endianness
|
||||||
|
*/
|
||||||
|
/* @{ */
|
||||||
|
#define SDL_LIL_ENDIAN 1234
|
||||||
|
#define SDL_BIG_ENDIAN 4321
|
||||||
|
/* @} */
|
||||||
|
|
||||||
|
#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <endian.h>
|
||||||
|
#define SDL_BYTEORDER __BYTE_ORDER
|
||||||
|
#elif defined(__sun) && defined(__SVR4) /* Solaris */
|
||||||
|
#include <sys/byteorder.h>
|
||||||
|
#if defined(_LITTLE_ENDIAN)
|
||||||
|
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||||
|
#elif defined(_BIG_ENDIAN)
|
||||||
|
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||||
|
#else
|
||||||
|
#error Unsupported endianness
|
||||||
|
#endif
|
||||||
|
#elif defined(__OpenBSD__) || defined(__DragonFly__)
|
||||||
|
#include <endian.h>
|
||||||
|
#define SDL_BYTEORDER BYTE_ORDER
|
||||||
|
#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
||||||
|
#include <sys/endian.h>
|
||||||
|
#define SDL_BYTEORDER BYTE_ORDER
|
||||||
|
/* predefs from newer gcc and clang versions: */
|
||||||
|
#elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__BYTE_ORDER__)
|
||||||
|
#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||||
|
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||||
|
#elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||||
|
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||||
|
#else
|
||||||
|
#error Unsupported endianness
|
||||||
|
#endif /**/
|
||||||
|
#else
|
||||||
|
#if defined(__hppa__) || \
|
||||||
|
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
|
||||||
|
(defined(__MIPS__) && defined(__MIPSEB__)) || \
|
||||||
|
defined(__ppc__) || defined(__POWERPC__) || defined(__powerpc__) || defined(__PPC__) || \
|
||||||
|
defined(__sparc__) || defined(__sparc)
|
||||||
|
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||||
|
#else
|
||||||
|
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||||
|
#endif
|
||||||
|
#endif /* __linux__ */
|
||||||
|
#endif /* !SDL_BYTEORDER */
|
||||||
|
|
||||||
|
#ifndef SDL_FLOATWORDORDER /* Not defined in SDL_config.h? */
|
||||||
|
/* predefs from newer gcc versions: */
|
||||||
|
#if defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__FLOAT_WORD_ORDER__)
|
||||||
|
#if (__FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||||
|
#define SDL_FLOATWORDORDER SDL_LIL_ENDIAN
|
||||||
|
#elif (__FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||||
|
#define SDL_FLOATWORDORDER SDL_BIG_ENDIAN
|
||||||
|
#else
|
||||||
|
#error Unsupported endianness
|
||||||
|
#endif /**/
|
||||||
|
#elif defined(__MAVERICK__)
|
||||||
|
/* For Maverick, float words are always little-endian. */
|
||||||
|
#define SDL_FLOATWORDORDER SDL_LIL_ENDIAN
|
||||||
|
#elif (defined(__arm__) || defined(__thumb__)) && !defined(__VFP_FP__) && !defined(__ARM_EABI__)
|
||||||
|
/* For FPA, float words are always big-endian. */
|
||||||
|
#define SDL_FLOATWORDORDER SDL_BIG_ENDIAN
|
||||||
|
#else
|
||||||
|
/* By default, assume that floats words follow the memory system mode. */
|
||||||
|
#define SDL_FLOATWORDORDER SDL_BYTEORDER
|
||||||
|
#endif /* __FLOAT_WORD_ORDER__ */
|
||||||
|
#endif /* !SDL_FLOATWORDORDER */
|
||||||
|
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file SDL_endian.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* various modern compilers may have builtin swap */
|
||||||
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
|
# define HAS_BUILTIN_BSWAP16 (_SDL_HAS_BUILTIN(__builtin_bswap16)) || \
|
||||||
|
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
|
||||||
|
# define HAS_BUILTIN_BSWAP32 (_SDL_HAS_BUILTIN(__builtin_bswap32)) || \
|
||||||
|
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
|
||||||
|
# define HAS_BUILTIN_BSWAP64 (_SDL_HAS_BUILTIN(__builtin_bswap64)) || \
|
||||||
|
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
|
||||||
|
|
||||||
|
/* this one is broken */
|
||||||
|
# define HAS_BROKEN_BSWAP (__GNUC__ == 2 && __GNUC_MINOR__ <= 95)
|
||||||
|
#else
|
||||||
|
# define HAS_BUILTIN_BSWAP16 0
|
||||||
|
# define HAS_BUILTIN_BSWAP32 0
|
||||||
|
# define HAS_BUILTIN_BSWAP64 0
|
||||||
|
# define HAS_BROKEN_BSWAP 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAS_BUILTIN_BSWAP16
|
||||||
|
#define SDL_Swap16(x) __builtin_bswap16(x)
|
||||||
|
#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL)
|
||||||
|
#pragma intrinsic(_byteswap_ushort)
|
||||||
|
#define SDL_Swap16(x) _byteswap_ushort(x)
|
||||||
|
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||||
|
SDL_FORCE_INLINE Uint16
|
||||||
|
SDL_Swap16(Uint16 x)
|
||||||
|
{
|
||||||
|
__asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
#elif defined(__x86_64__)
|
||||||
|
SDL_FORCE_INLINE Uint16
|
||||||
|
SDL_Swap16(Uint16 x)
|
||||||
|
{
|
||||||
|
__asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
#elif (defined(__powerpc__) || defined(__ppc__))
|
||||||
|
SDL_FORCE_INLINE Uint16
|
||||||
|
SDL_Swap16(Uint16 x)
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
|
||||||
|
__asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
|
||||||
|
return (Uint16)result;
|
||||||
|
}
|
||||||
|
#elif (defined(__m68k__) && !defined(__mcoldfire__))
|
||||||
|
SDL_FORCE_INLINE Uint16
|
||||||
|
SDL_Swap16(Uint16 x)
|
||||||
|
{
|
||||||
|
__asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
#elif defined(__WATCOMC__) && defined(__386__)
|
||||||
|
extern __inline Uint16 SDL_Swap16(Uint16);
|
||||||
|
#pragma aux SDL_Swap16 = \
|
||||||
|
"xchg al, ah" \
|
||||||
|
parm [ax] \
|
||||||
|
modify [ax];
|
||||||
|
#else
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this function to swap the byte order of a 16-bit value.
|
||||||
|
*
|
||||||
|
* \param x the value to be swapped.
|
||||||
|
* \returns the swapped value.
|
||||||
|
*
|
||||||
|
* \sa SDL_SwapBE16
|
||||||
|
* \sa SDL_SwapLE16
|
||||||
|
*/
|
||||||
|
SDL_FORCE_INLINE Uint16
|
||||||
|
SDL_Swap16(Uint16 x)
|
||||||
|
{
|
||||||
|
return SDL_static_cast(Uint16, ((x << 8) | (x >> 8)));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAS_BUILTIN_BSWAP32
|
||||||
|
#define SDL_Swap32(x) __builtin_bswap32(x)
|
||||||
|
#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL)
|
||||||
|
#pragma intrinsic(_byteswap_ulong)
|
||||||
|
#define SDL_Swap32(x) _byteswap_ulong(x)
|
||||||
|
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||||
|
SDL_FORCE_INLINE Uint32
|
||||||
|
SDL_Swap32(Uint32 x)
|
||||||
|
{
|
||||||
|
__asm__("bswap %0": "=r"(x):"0"(x));
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
#elif defined(__x86_64__)
|
||||||
|
SDL_FORCE_INLINE Uint32
|
||||||
|
SDL_Swap32(Uint32 x)
|
||||||
|
{
|
||||||
|
__asm__("bswapl %0": "=r"(x):"0"(x));
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
#elif (defined(__powerpc__) || defined(__ppc__))
|
||||||
|
SDL_FORCE_INLINE Uint32
|
||||||
|
SDL_Swap32(Uint32 x)
|
||||||
|
{
|
||||||
|
Uint32 result;
|
||||||
|
|
||||||
|
__asm__("rlwimi %0,%2,24,16,23": "=&r"(result): "0" (x>>24), "r"(x));
|
||||||
|
__asm__("rlwimi %0,%2,8,8,15" : "=&r"(result): "0" (result), "r"(x));
|
||||||
|
__asm__("rlwimi %0,%2,24,0,7" : "=&r"(result): "0" (result), "r"(x));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
#elif (defined(__m68k__) && !defined(__mcoldfire__))
|
||||||
|
SDL_FORCE_INLINE Uint32
|
||||||
|
SDL_Swap32(Uint32 x)
|
||||||
|
{
|
||||||
|
__asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
#elif defined(__WATCOMC__) && defined(__386__)
|
||||||
|
extern __inline Uint32 SDL_Swap32(Uint32);
|
||||||
|
#pragma aux SDL_Swap32 = \
|
||||||
|
"bswap eax" \
|
||||||
|
parm [eax] \
|
||||||
|
modify [eax];
|
||||||
|
#else
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this function to swap the byte order of a 32-bit value.
|
||||||
|
*
|
||||||
|
* \param x the value to be swapped.
|
||||||
|
* \returns the swapped value.
|
||||||
|
*
|
||||||
|
* \sa SDL_SwapBE32
|
||||||
|
* \sa SDL_SwapLE32
|
||||||
|
*/
|
||||||
|
SDL_FORCE_INLINE Uint32
|
||||||
|
SDL_Swap32(Uint32 x)
|
||||||
|
{
|
||||||
|
return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) |
|
||||||
|
((x >> 8) & 0x0000FF00) | (x >> 24)));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAS_BUILTIN_BSWAP64
|
||||||
|
#define SDL_Swap64(x) __builtin_bswap64(x)
|
||||||
|
#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL)
|
||||||
|
#pragma intrinsic(_byteswap_uint64)
|
||||||
|
#define SDL_Swap64(x) _byteswap_uint64(x)
|
||||||
|
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||||
|
SDL_FORCE_INLINE Uint64
|
||||||
|
SDL_Swap64(Uint64 x)
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
Uint32 a, b;
|
||||||
|
} s;
|
||||||
|
Uint64 u;
|
||||||
|
} v;
|
||||||
|
v.u = x;
|
||||||
|
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
|
||||||
|
: "=r"(v.s.a), "=r"(v.s.b)
|
||||||
|
: "0" (v.s.a), "1"(v.s.b));
|
||||||
|
return v.u;
|
||||||
|
}
|
||||||
|
#elif defined(__x86_64__)
|
||||||
|
SDL_FORCE_INLINE Uint64
|
||||||
|
SDL_Swap64(Uint64 x)
|
||||||
|
{
|
||||||
|
__asm__("bswapq %0": "=r"(x):"0"(x));
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
#elif defined(__WATCOMC__) && defined(__386__)
|
||||||
|
extern __inline Uint64 SDL_Swap64(Uint64);
|
||||||
|
#pragma aux SDL_Swap64 = \
|
||||||
|
"bswap eax" \
|
||||||
|
"bswap edx" \
|
||||||
|
"xchg eax,edx" \
|
||||||
|
parm [eax edx] \
|
||||||
|
modify [eax edx];
|
||||||
|
#else
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this function to swap the byte order of a 64-bit value.
|
||||||
|
*
|
||||||
|
* \param x the value to be swapped.
|
||||||
|
* \returns the swapped value.
|
||||||
|
*
|
||||||
|
* \sa SDL_SwapBE64
|
||||||
|
* \sa SDL_SwapLE64
|
||||||
|
*/
|
||||||
|
SDL_FORCE_INLINE Uint64
|
||||||
|
SDL_Swap64(Uint64 x)
|
||||||
|
{
|
||||||
|
Uint32 hi, lo;
|
||||||
|
|
||||||
|
/* Separate into high and low 32-bit values and swap them */
|
||||||
|
lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
|
||||||
|
x >>= 32;
|
||||||
|
hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
|
||||||
|
x = SDL_Swap32(lo);
|
||||||
|
x <<= 32;
|
||||||
|
x |= SDL_Swap32(hi);
|
||||||
|
return (x);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this function to swap the byte order of a floating point value.
|
||||||
|
*
|
||||||
|
* \param x the value to be swapped.
|
||||||
|
* \returns the swapped value.
|
||||||
|
*
|
||||||
|
* \sa SDL_SwapFloatBE
|
||||||
|
* \sa SDL_SwapFloatLE
|
||||||
|
*/
|
||||||
|
SDL_FORCE_INLINE float
|
||||||
|
SDL_SwapFloat(float x)
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
float f;
|
||||||
|
Uint32 ui32;
|
||||||
|
} swapper;
|
||||||
|
swapper.f = x;
|
||||||
|
swapper.ui32 = SDL_Swap32(swapper.ui32);
|
||||||
|
return swapper.f;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* remove extra macros */
|
||||||
|
#undef HAS_BROKEN_BSWAP
|
||||||
|
#undef HAS_BUILTIN_BSWAP16
|
||||||
|
#undef HAS_BUILTIN_BSWAP32
|
||||||
|
#undef HAS_BUILTIN_BSWAP64
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \name Swap to native
|
||||||
|
* Byteswap item from the specified endianness to the native endianness.
|
||||||
|
*/
|
||||||
|
/* @{ */
|
||||||
|
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||||
|
#define SDL_SwapLE16(X) (X)
|
||||||
|
#define SDL_SwapLE32(X) (X)
|
||||||
|
#define SDL_SwapLE64(X) (X)
|
||||||
|
#define SDL_SwapFloatLE(X) (X)
|
||||||
|
#define SDL_SwapBE16(X) SDL_Swap16(X)
|
||||||
|
#define SDL_SwapBE32(X) SDL_Swap32(X)
|
||||||
|
#define SDL_SwapBE64(X) SDL_Swap64(X)
|
||||||
|
#define SDL_SwapFloatBE(X) SDL_SwapFloat(X)
|
||||||
|
#else
|
||||||
|
#define SDL_SwapLE16(X) SDL_Swap16(X)
|
||||||
|
#define SDL_SwapLE32(X) SDL_Swap32(X)
|
||||||
|
#define SDL_SwapLE64(X) SDL_Swap64(X)
|
||||||
|
#define SDL_SwapFloatLE(X) SDL_SwapFloat(X)
|
||||||
|
#define SDL_SwapBE16(X) (X)
|
||||||
|
#define SDL_SwapBE32(X) (X)
|
||||||
|
#define SDL_SwapBE64(X) (X)
|
||||||
|
#define SDL_SwapFloatBE(X) (X)
|
||||||
|
#endif
|
||||||
|
/* @} *//* Swap to native */
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_endian_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
163
enginecustom/include/Vulkan/Include/SDL2/SDL_error.h
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryError
|
||||||
|
*
|
||||||
|
* Simple error message routines for SDL.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_error_h_
|
||||||
|
#define SDL_error_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Public functions */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the SDL error message for the current thread.
|
||||||
|
*
|
||||||
|
* Calling this function will replace any previous error message that was set.
|
||||||
|
*
|
||||||
|
* This function always returns -1, since SDL frequently uses -1 to signify an
|
||||||
|
* failing result, leading to this idiom:
|
||||||
|
*
|
||||||
|
* ```c
|
||||||
|
* if (error_code) {
|
||||||
|
* return SDL_SetError("This operation has failed: %d", error_code);
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* \param fmt a printf()-style message format string.
|
||||||
|
* \param ... additional parameters matching % tokens in the `fmt` string, if
|
||||||
|
* any.
|
||||||
|
* \returns always -1.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_ClearError
|
||||||
|
* \sa SDL_GetError
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve a message about the last error that occurred on the current
|
||||||
|
* thread.
|
||||||
|
*
|
||||||
|
* It is possible for multiple errors to occur before calling SDL_GetError().
|
||||||
|
* Only the last error is returned.
|
||||||
|
*
|
||||||
|
* The message is only applicable when an SDL function has signaled an error.
|
||||||
|
* You must check the return values of SDL function calls to determine when to
|
||||||
|
* appropriately call SDL_GetError(). You should *not* use the results of
|
||||||
|
* SDL_GetError() to decide if an error has occurred! Sometimes SDL will set
|
||||||
|
* an error string even when reporting success.
|
||||||
|
*
|
||||||
|
* SDL will *not* clear the error string for successful API calls. You *must*
|
||||||
|
* check return values for failure cases before you can assume the error
|
||||||
|
* string applies.
|
||||||
|
*
|
||||||
|
* Error strings are set per-thread, so an error set in a different thread
|
||||||
|
* will not interfere with the current thread's operation.
|
||||||
|
*
|
||||||
|
* The returned string is internally allocated and must not be freed by the
|
||||||
|
* application.
|
||||||
|
*
|
||||||
|
* \returns a message with information about the specific error that occurred,
|
||||||
|
* or an empty string if there hasn't been an error message set since
|
||||||
|
* the last call to SDL_ClearError(). The message is only applicable
|
||||||
|
* when an SDL function has signaled an error. You must check the
|
||||||
|
* return values of SDL function calls to determine when to
|
||||||
|
* appropriately call SDL_GetError().
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_ClearError
|
||||||
|
* \sa SDL_SetError
|
||||||
|
*/
|
||||||
|
extern DECLSPEC const char *SDLCALL SDL_GetError(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the last error message that was set for the current thread.
|
||||||
|
*
|
||||||
|
* This allows the caller to copy the error string into a provided buffer, but
|
||||||
|
* otherwise operates exactly the same as SDL_GetError().
|
||||||
|
*
|
||||||
|
* \param errstr A buffer to fill with the last error message that was set for
|
||||||
|
* the current thread.
|
||||||
|
* \param maxlen The size of the buffer pointed to by the errstr parameter.
|
||||||
|
* \returns the pointer passed in as the `errstr` parameter.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.14.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetError
|
||||||
|
*/
|
||||||
|
extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear any previous error message for this thread.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetError
|
||||||
|
* \sa SDL_SetError
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_ClearError(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \name Internal error functions
|
||||||
|
*
|
||||||
|
* \internal
|
||||||
|
* Private error reporting function - used internally.
|
||||||
|
*/
|
||||||
|
/* @{ */
|
||||||
|
#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)
|
||||||
|
#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED)
|
||||||
|
#define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param))
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SDL_ENOMEM,
|
||||||
|
SDL_EFREAD,
|
||||||
|
SDL_EFWRITE,
|
||||||
|
SDL_EFSEEK,
|
||||||
|
SDL_UNSUPPORTED,
|
||||||
|
SDL_LASTERROR
|
||||||
|
} SDL_errorcode;
|
||||||
|
/* SDL_Error() unconditionally returns -1. */
|
||||||
|
extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code);
|
||||||
|
/* @} *//* Internal error functions */
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_error_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
1196
enginecustom/include/Vulkan/Include/SDL2/SDL_events.h
Normal file
149
enginecustom/include/Vulkan/Include/SDL2/SDL_filesystem.h
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryFilesystem
|
||||||
|
*
|
||||||
|
* Include file for filesystem SDL API functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_filesystem_h_
|
||||||
|
#define SDL_filesystem_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the directory where the application was run from.
|
||||||
|
*
|
||||||
|
* This is not necessarily a fast call, so you should call this once near
|
||||||
|
* startup and save the string if you need it.
|
||||||
|
*
|
||||||
|
* **Mac OS X and iOS Specific Functionality**: If the application is in a
|
||||||
|
* ".app" bundle, this function returns the Resource directory (e.g.
|
||||||
|
* MyApp.app/Contents/Resources/). This behaviour can be overridden by adding
|
||||||
|
* a property to the Info.plist file. Adding a string key with the name
|
||||||
|
* SDL_FILESYSTEM_BASE_DIR_TYPE with a supported value will change the
|
||||||
|
* behaviour.
|
||||||
|
*
|
||||||
|
* Supported values for the SDL_FILESYSTEM_BASE_DIR_TYPE property (Given an
|
||||||
|
* application in /Applications/SDLApp/MyApp.app):
|
||||||
|
*
|
||||||
|
* - `resource`: bundle resource directory (the default). For example:
|
||||||
|
* `/Applications/SDLApp/MyApp.app/Contents/Resources`
|
||||||
|
* - `bundle`: the Bundle directory. For example:
|
||||||
|
* `/Applications/SDLApp/MyApp.app/`
|
||||||
|
* - `parent`: the containing directory of the bundle. For example:
|
||||||
|
* `/Applications/SDLApp/`
|
||||||
|
*
|
||||||
|
* **Nintendo 3DS Specific Functionality**: This function returns "romfs"
|
||||||
|
* directory of the application as it is uncommon to store resources outside
|
||||||
|
* the executable. As such it is not a writable directory.
|
||||||
|
*
|
||||||
|
* The returned path is guaranteed to end with a path separator ('\\' on
|
||||||
|
* Windows, '/' on most other platforms).
|
||||||
|
*
|
||||||
|
* The pointer returned is owned by the caller. Please call SDL_free() on the
|
||||||
|
* pointer when done with it.
|
||||||
|
*
|
||||||
|
* \returns an absolute path in UTF-8 encoding to the application data
|
||||||
|
* directory. NULL will be returned on error or when the platform
|
||||||
|
* doesn't implement this functionality, call SDL_GetError() for more
|
||||||
|
* information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.1.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetPrefPath
|
||||||
|
*/
|
||||||
|
extern DECLSPEC char *SDLCALL SDL_GetBasePath(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the user-and-app-specific path where files can be written.
|
||||||
|
*
|
||||||
|
* Get the "pref dir". This is meant to be where users can write personal
|
||||||
|
* files (preferences and save games, etc) that are specific to your
|
||||||
|
* application. This directory is unique per user, per application.
|
||||||
|
*
|
||||||
|
* This function will decide the appropriate location in the native
|
||||||
|
* filesystem, create the directory if necessary, and return a string of the
|
||||||
|
* absolute path to the directory in UTF-8 encoding.
|
||||||
|
*
|
||||||
|
* On Windows, the string might look like:
|
||||||
|
*
|
||||||
|
* `C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\`
|
||||||
|
*
|
||||||
|
* On Linux, the string might look like:
|
||||||
|
*
|
||||||
|
* `/home/bob/.local/share/My Program Name/`
|
||||||
|
*
|
||||||
|
* On Mac OS X, the string might look like:
|
||||||
|
*
|
||||||
|
* `/Users/bob/Library/Application Support/My Program Name/`
|
||||||
|
*
|
||||||
|
* You should assume the path returned by this function is the only safe place
|
||||||
|
* to write files (and that SDL_GetBasePath(), while it might be writable, or
|
||||||
|
* even the parent of the returned path, isn't where you should be writing
|
||||||
|
* things).
|
||||||
|
*
|
||||||
|
* Both the org and app strings may become part of a directory name, so please
|
||||||
|
* follow these rules:
|
||||||
|
*
|
||||||
|
* - Try to use the same org string (_including case-sensitivity_) for all
|
||||||
|
* your applications that use this function.
|
||||||
|
* - Always use a unique app string for each one, and make sure it never
|
||||||
|
* changes for an app once you've decided on it.
|
||||||
|
* - Unicode characters are legal, as long as it's UTF-8 encoded, but...
|
||||||
|
* - ...only use letters, numbers, and spaces. Avoid punctuation like "Game
|
||||||
|
* Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
|
||||||
|
*
|
||||||
|
* The returned path is guaranteed to end with a path separator ('\\' on
|
||||||
|
* Windows, '/' on most other platforms).
|
||||||
|
*
|
||||||
|
* The pointer returned is owned by the caller. Please call SDL_free() on the
|
||||||
|
* pointer when done with it.
|
||||||
|
*
|
||||||
|
* \param org the name of your organization.
|
||||||
|
* \param app the name of your application.
|
||||||
|
* \returns a UTF-8 string of the user directory in platform-dependent
|
||||||
|
* notation. NULL if there's a problem (creating directory failed,
|
||||||
|
* etc.).
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.1.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetBasePath
|
||||||
|
*/
|
||||||
|
extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_filesystem_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
1110
enginecustom/include/Vulkan/Include/SDL2/SDL_gamecontroller.h
Normal file
117
enginecustom/include/Vulkan/Include/SDL2/SDL_gesture.h
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryGesture
|
||||||
|
*
|
||||||
|
* Include file for SDL gesture event handling.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_gesture_h_
|
||||||
|
#define SDL_gesture_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
#include "SDL_error.h"
|
||||||
|
#include "SDL_video.h"
|
||||||
|
|
||||||
|
#include "SDL_touch.h"
|
||||||
|
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef Sint64 SDL_GestureID;
|
||||||
|
|
||||||
|
/* Function prototypes */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Begin recording a gesture on a specified touch device or all touch devices.
|
||||||
|
*
|
||||||
|
* If the parameter `touchId` is -1 (i.e., all devices), this function will
|
||||||
|
* always return 1, regardless of whether there actually are any devices.
|
||||||
|
*
|
||||||
|
* \param touchId the touch device id, or -1 for all touch devices.
|
||||||
|
* \returns 1 on success or 0 if the specified device could not be found.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetTouchDevice
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save all currently loaded Dollar Gesture templates.
|
||||||
|
*
|
||||||
|
* \param dst a SDL_RWops to save to.
|
||||||
|
* \returns the number of saved templates on success or 0 on failure; call
|
||||||
|
* SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_LoadDollarTemplates
|
||||||
|
* \sa SDL_SaveDollarTemplate
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save a currently loaded Dollar Gesture template.
|
||||||
|
*
|
||||||
|
* \param gestureId a gesture id.
|
||||||
|
* \param dst a SDL_RWops to save to.
|
||||||
|
* \returns 1 on success or 0 on failure; call SDL_GetError() for more
|
||||||
|
* information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_LoadDollarTemplates
|
||||||
|
* \sa SDL_SaveAllDollarTemplates
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load Dollar Gesture templates from a file.
|
||||||
|
*
|
||||||
|
* \param touchId a touch id.
|
||||||
|
* \param src a SDL_RWops to load from.
|
||||||
|
* \returns the number of loaded templates on success or a negative error code
|
||||||
|
* (or 0) on failure; call SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_SaveAllDollarTemplates
|
||||||
|
* \sa SDL_SaveDollarTemplate
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_gesture_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
107
enginecustom/include/Vulkan/Include/SDL2/SDL_guid.h
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* WIKI CATEGORY: GUID */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryGUID
|
||||||
|
*
|
||||||
|
* A GUID is a 128-bit value that represents something that is uniquely
|
||||||
|
* identifiable by this value: "globally unique."
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_guid_h_
|
||||||
|
#define SDL_guid_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
#include "SDL_error.h"
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An SDL_GUID is a 128-bit identifier.
|
||||||
|
*
|
||||||
|
* This is an acronym for "Globally Unique ID."
|
||||||
|
*
|
||||||
|
* While a GUID can be used to assign a unique value to almost anything, in
|
||||||
|
* SDL these are largely used to identify input devices across runs of SDL
|
||||||
|
* programs on the same platform.If the device is detached and then
|
||||||
|
* re-attached to a different port, or if the base system is rebooted, the
|
||||||
|
* device should still report the same GUID.
|
||||||
|
*
|
||||||
|
* GUIDs are as precise as possible but are not guaranteed to distinguish
|
||||||
|
* physically distinct but equivalent devices. For example, two game
|
||||||
|
* controllers from the same vendor with the same product ID and revision may
|
||||||
|
* have the same GUID.
|
||||||
|
*
|
||||||
|
* GUIDs may be platform-dependent (i.e., the same device may report different
|
||||||
|
* GUIDs on different operating systems).
|
||||||
|
*/
|
||||||
|
typedef struct SDL_GUID {
|
||||||
|
Uint8 data[16];
|
||||||
|
} SDL_GUID;
|
||||||
|
|
||||||
|
/* Function prototypes */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get an ASCII string representation for a given SDL_GUID.
|
||||||
|
*
|
||||||
|
* You should supply at least 33 bytes for pszGUID.
|
||||||
|
*
|
||||||
|
* \param guid the SDL_GUID you wish to convert to string.
|
||||||
|
* \param pszGUID buffer in which to write the ASCII string.
|
||||||
|
* \param cbGUID the size of pszGUID.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.24.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GUIDFromString
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert a GUID string into a SDL_GUID structure.
|
||||||
|
*
|
||||||
|
* Performs no error checking. If this function is given a string containing
|
||||||
|
* an invalid GUID, the function will silently succeed, but the GUID generated
|
||||||
|
* will not be useful.
|
||||||
|
*
|
||||||
|
* \param pchGUID string containing an ASCII representation of a GUID.
|
||||||
|
* \returns a SDL_GUID structure.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.24.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GUIDToString
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_GUID SDLCALL SDL_GUIDFromString(const char *pchGUID);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_guid_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
1354
enginecustom/include/Vulkan/Include/SDL2/SDL_haptic.h
Normal file
443
enginecustom/include/Vulkan/Include/SDL2/SDL_hidapi.h
Normal file
@ -0,0 +1,443 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* WIKI CATEGORY: HIDAPI */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryHIDAPI
|
||||||
|
*
|
||||||
|
* Header file for SDL HIDAPI functions.
|
||||||
|
*
|
||||||
|
* This is an adaptation of the original HIDAPI interface by Alan Ott, and
|
||||||
|
* includes source code licensed under the following license:
|
||||||
|
*
|
||||||
|
* ```
|
||||||
|
* HIDAPI - Multi-Platform library for
|
||||||
|
* communication with HID devices.
|
||||||
|
*
|
||||||
|
* Copyright 2009, Alan Ott, Signal 11 Software.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*
|
||||||
|
* This software may be used by anyone for any reason so
|
||||||
|
* long as the copyright notice in the source files
|
||||||
|
* remains intact.
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* (Note that this license is the same as item three of SDL's zlib license, so
|
||||||
|
* it adds no new requirements on the user.)
|
||||||
|
*
|
||||||
|
* If you would like a version of SDL without this code, you can build SDL
|
||||||
|
* with SDL_HIDAPI_DISABLED defined to 1. You might want to do this for
|
||||||
|
* example on iOS or tvOS to avoid a dependency on the CoreBluetooth
|
||||||
|
* framework.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_hidapi_h_
|
||||||
|
#define SDL_hidapi_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A handle representing an open HID device
|
||||||
|
*/
|
||||||
|
struct SDL_hid_device_;
|
||||||
|
typedef struct SDL_hid_device_ SDL_hid_device; /**< opaque hidapi structure */
|
||||||
|
|
||||||
|
/** hidapi info structure */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Information about a connected HID device
|
||||||
|
*/
|
||||||
|
typedef struct SDL_hid_device_info
|
||||||
|
{
|
||||||
|
/** Platform-specific device path */
|
||||||
|
char *path;
|
||||||
|
/** Device Vendor ID */
|
||||||
|
unsigned short vendor_id;
|
||||||
|
/** Device Product ID */
|
||||||
|
unsigned short product_id;
|
||||||
|
/** Serial Number */
|
||||||
|
wchar_t *serial_number;
|
||||||
|
/** Device Release Number in binary-coded decimal,
|
||||||
|
also known as Device Version Number */
|
||||||
|
unsigned short release_number;
|
||||||
|
/** Manufacturer String */
|
||||||
|
wchar_t *manufacturer_string;
|
||||||
|
/** Product string */
|
||||||
|
wchar_t *product_string;
|
||||||
|
/** Usage Page for this Device/Interface
|
||||||
|
(Windows/Mac only). */
|
||||||
|
unsigned short usage_page;
|
||||||
|
/** Usage for this Device/Interface
|
||||||
|
(Windows/Mac only).*/
|
||||||
|
unsigned short usage;
|
||||||
|
/** The USB interface which this logical device
|
||||||
|
represents.
|
||||||
|
|
||||||
|
* Valid on both Linux implementations in all cases.
|
||||||
|
* Valid on the Windows implementation only if the device
|
||||||
|
contains more than one interface. */
|
||||||
|
int interface_number;
|
||||||
|
|
||||||
|
/** Additional information about the USB interface.
|
||||||
|
Valid on libusb and Android implementations. */
|
||||||
|
int interface_class;
|
||||||
|
int interface_subclass;
|
||||||
|
int interface_protocol;
|
||||||
|
|
||||||
|
/** Pointer to the next device */
|
||||||
|
struct SDL_hid_device_info *next;
|
||||||
|
} SDL_hid_device_info;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the HIDAPI library.
|
||||||
|
*
|
||||||
|
* This function initializes the HIDAPI library. Calling it is not strictly
|
||||||
|
* necessary, as it will be called automatically by SDL_hid_enumerate() and
|
||||||
|
* any of the SDL_hid_open_*() functions if it is needed. This function should
|
||||||
|
* be called at the beginning of execution however, if there is a chance of
|
||||||
|
* HIDAPI handles being opened by different threads simultaneously.
|
||||||
|
*
|
||||||
|
* Each call to this function should have a matching call to SDL_hid_exit()
|
||||||
|
*
|
||||||
|
* \returns 0 on success and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*
|
||||||
|
* \sa SDL_hid_exit
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_init(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finalize the HIDAPI library.
|
||||||
|
*
|
||||||
|
* This function frees all of the static data associated with HIDAPI. It
|
||||||
|
* should be called at the end of execution to avoid memory leaks.
|
||||||
|
*
|
||||||
|
* \returns 0 on success and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*
|
||||||
|
* \sa SDL_hid_init
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_exit(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check to see if devices may have been added or removed.
|
||||||
|
*
|
||||||
|
* Enumerating the HID devices is an expensive operation, so you can call this
|
||||||
|
* to see if there have been any system device changes since the last call to
|
||||||
|
* this function. A change in the counter returned doesn't necessarily mean
|
||||||
|
* that anything has changed, but you can call SDL_hid_enumerate() to get an
|
||||||
|
* updated device list.
|
||||||
|
*
|
||||||
|
* Calling this function for the first time may cause a thread or other system
|
||||||
|
* resource to be allocated to track device change notifications.
|
||||||
|
*
|
||||||
|
* \returns a change counter that is incremented with each potential device
|
||||||
|
* change, or 0 if device change detection isn't available.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*
|
||||||
|
* \sa SDL_hid_enumerate
|
||||||
|
*/
|
||||||
|
extern DECLSPEC Uint32 SDLCALL SDL_hid_device_change_count(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enumerate the HID Devices.
|
||||||
|
*
|
||||||
|
* This function returns a linked list of all the HID devices attached to the
|
||||||
|
* system which match vendor_id and product_id. If `vendor_id` is set to 0
|
||||||
|
* then any vendor matches. If `product_id` is set to 0 then any product
|
||||||
|
* matches. If `vendor_id` and `product_id` are both set to 0, then all HID
|
||||||
|
* devices will be returned.
|
||||||
|
*
|
||||||
|
* \param vendor_id The Vendor ID (VID) of the types of device to open.
|
||||||
|
* \param product_id The Product ID (PID) of the types of device to open.
|
||||||
|
* \returns a pointer to a linked list of type SDL_hid_device_info, containing
|
||||||
|
* information about the HID devices attached to the system, or NULL
|
||||||
|
* in the case of failure. Free this linked list by calling
|
||||||
|
* SDL_hid_free_enumeration().
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*
|
||||||
|
* \sa SDL_hid_device_change_count
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_enumerate(unsigned short vendor_id, unsigned short product_id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Free an enumeration Linked List
|
||||||
|
*
|
||||||
|
* This function frees a linked list created by SDL_hid_enumerate().
|
||||||
|
*
|
||||||
|
* \param devs Pointer to a list of struct_device returned from
|
||||||
|
* SDL_hid_enumerate().
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_hid_free_enumeration(SDL_hid_device_info *devs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally
|
||||||
|
* a serial number.
|
||||||
|
*
|
||||||
|
* If `serial_number` is NULL, the first device with the specified VID and PID
|
||||||
|
* is opened.
|
||||||
|
*
|
||||||
|
* \param vendor_id The Vendor ID (VID) of the device to open.
|
||||||
|
* \param product_id The Product ID (PID) of the device to open.
|
||||||
|
* \param serial_number The Serial Number of the device to open (Optionally
|
||||||
|
* NULL).
|
||||||
|
* \returns a pointer to a SDL_hid_device object on success or NULL on
|
||||||
|
* failure.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open a HID device by its path name.
|
||||||
|
*
|
||||||
|
* The path name be determined by calling SDL_hid_enumerate(), or a
|
||||||
|
* platform-specific path name can be used (eg: /dev/hidraw0 on Linux).
|
||||||
|
*
|
||||||
|
* \param path The path name of the device to open.
|
||||||
|
* \returns a pointer to a SDL_hid_device object on success or NULL on
|
||||||
|
* failure.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open_path(const char *path, int bExclusive);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write an Output report to a HID device.
|
||||||
|
*
|
||||||
|
* The first byte of `data` must contain the Report ID. For devices which only
|
||||||
|
* support a single report, this must be set to 0x0. The remaining bytes
|
||||||
|
* contain the report data. Since the Report ID is mandatory, calls to
|
||||||
|
* SDL_hid_write() will always contain one more byte than the report contains.
|
||||||
|
* For example, if a hid report is 16 bytes long, 17 bytes must be passed to
|
||||||
|
* SDL_hid_write(), the Report ID (or 0x0, for devices with a single report),
|
||||||
|
* followed by the report data (16 bytes). In this example, the length passed
|
||||||
|
* in would be 17.
|
||||||
|
*
|
||||||
|
* SDL_hid_write() will send the data on the first OUT endpoint, if one
|
||||||
|
* exists. If it does not, it will send the data through the Control Endpoint
|
||||||
|
* (Endpoint 0).
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param data The data to send, including the report number as the first
|
||||||
|
* byte.
|
||||||
|
* \param length The length in bytes of the data to send.
|
||||||
|
* \returns the actual number of bytes written and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_write(SDL_hid_device *dev, const unsigned char *data, size_t length);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read an Input report from a HID device with timeout.
|
||||||
|
*
|
||||||
|
* Input reports are returned to the host through the INTERRUPT IN endpoint.
|
||||||
|
* The first byte will contain the Report number if the device uses numbered
|
||||||
|
* reports.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param data A buffer to put the read data into.
|
||||||
|
* \param length The number of bytes to read. For devices with multiple
|
||||||
|
* reports, make sure to read an extra byte for the report
|
||||||
|
* number.
|
||||||
|
* \param milliseconds timeout in milliseconds or -1 for blocking wait.
|
||||||
|
* \returns the actual number of bytes read and -1 on error. If no packet was
|
||||||
|
* available to be read within the timeout period, this function
|
||||||
|
* returns 0.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_read_timeout(SDL_hid_device *dev, unsigned char *data, size_t length, int milliseconds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read an Input report from a HID device.
|
||||||
|
*
|
||||||
|
* Input reports are returned to the host through the INTERRUPT IN endpoint.
|
||||||
|
* The first byte will contain the Report number if the device uses numbered
|
||||||
|
* reports.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param data A buffer to put the read data into.
|
||||||
|
* \param length The number of bytes to read. For devices with multiple
|
||||||
|
* reports, make sure to read an extra byte for the report
|
||||||
|
* number.
|
||||||
|
* \returns the actual number of bytes read and -1 on error. If no packet was
|
||||||
|
* available to be read and the handle is in non-blocking mode, this
|
||||||
|
* function returns 0.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_read(SDL_hid_device *dev, unsigned char *data, size_t length);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the device handle to be non-blocking.
|
||||||
|
*
|
||||||
|
* In non-blocking mode calls to SDL_hid_read() will return immediately with a
|
||||||
|
* value of 0 if there is no data to be read. In blocking mode, SDL_hid_read()
|
||||||
|
* will wait (block) until there is data to read before returning.
|
||||||
|
*
|
||||||
|
* Nonblocking can be turned on and off at any time.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param nonblock enable or not the nonblocking reads - 1 to enable
|
||||||
|
* nonblocking - 0 to disable nonblocking.
|
||||||
|
* \returns 0 on success and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_set_nonblocking(SDL_hid_device *dev, int nonblock);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a Feature report to the device.
|
||||||
|
*
|
||||||
|
* Feature reports are sent over the Control endpoint as a Set_Report
|
||||||
|
* transfer. The first byte of `data` must contain the Report ID. For devices
|
||||||
|
* which only support a single report, this must be set to 0x0. The remaining
|
||||||
|
* bytes contain the report data. Since the Report ID is mandatory, calls to
|
||||||
|
* SDL_hid_send_feature_report() will always contain one more byte than the
|
||||||
|
* report contains. For example, if a hid report is 16 bytes long, 17 bytes
|
||||||
|
* must be passed to SDL_hid_send_feature_report(): the Report ID (or 0x0, for
|
||||||
|
* devices which do not use numbered reports), followed by the report data (16
|
||||||
|
* bytes). In this example, the length passed in would be 17.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param data The data to send, including the report number as the first
|
||||||
|
* byte.
|
||||||
|
* \param length The length in bytes of the data to send, including the report
|
||||||
|
* number.
|
||||||
|
* \returns the actual number of bytes written and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_send_feature_report(SDL_hid_device *dev, const unsigned char *data, size_t length);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a feature report from a HID device.
|
||||||
|
*
|
||||||
|
* Set the first byte of `data` to the Report ID of the report to be read.
|
||||||
|
* Make sure to allow space for this extra byte in `data`. Upon return, the
|
||||||
|
* first byte will still contain the Report ID, and the report data will start
|
||||||
|
* in data[1].
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param data A buffer to put the read data into, including the Report ID.
|
||||||
|
* Set the first byte of `data` to the Report ID of the report to
|
||||||
|
* be read, or set it to zero if your device does not use numbered
|
||||||
|
* reports.
|
||||||
|
* \param length The number of bytes to read, including an extra byte for the
|
||||||
|
* report ID. The buffer can be longer than the actual report.
|
||||||
|
* \returns the number of bytes read plus one for the report ID (which is
|
||||||
|
* still in the first byte), or -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_get_feature_report(SDL_hid_device *dev, unsigned char *data, size_t length);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Close a HID device.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_hid_close(SDL_hid_device *dev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Manufacturer String from a HID device.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param string A wide string buffer to put the data into.
|
||||||
|
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||||
|
* \returns 0 on success and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_get_manufacturer_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Product String from a HID device.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param string A wide string buffer to put the data into.
|
||||||
|
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||||
|
* \returns 0 on success and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_get_product_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Serial Number String from a HID device.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param string A wide string buffer to put the data into.
|
||||||
|
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||||
|
* \returns 0 on success and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_get_serial_number_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a string from a HID device, based on its string index.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param string_index The index of the string to get.
|
||||||
|
* \param string A wide string buffer to put the data into.
|
||||||
|
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||||
|
* \returns 0 on success and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_get_indexed_string(SDL_hid_device *dev, int string_index, wchar_t *string, size_t maxlen);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers
|
||||||
|
*
|
||||||
|
* \param active SDL_TRUE to start the scan, SDL_FALSE to stop the scan.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_hid_ble_scan(SDL_bool active);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_hidapi_h_ */
|
||||||
|
|
||||||
|
/* vi: set sts=4 ts=4 sw=4 expandtab: */
|
3282
enginecustom/include/Vulkan/Include/SDL2/SDL_hints.h
Normal file
1088
enginecustom/include/Vulkan/Include/SDL2/SDL_joystick.h
Normal file
361
enginecustom/include/Vulkan/Include/SDL2/SDL_keyboard.h
Normal file
@ -0,0 +1,361 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryKeyboard
|
||||||
|
*
|
||||||
|
* Include file for SDL keyboard event handling
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_keyboard_h_
|
||||||
|
#define SDL_keyboard_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
#include "SDL_error.h"
|
||||||
|
#include "SDL_keycode.h"
|
||||||
|
#include "SDL_video.h"
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The SDL keysym structure, used in key events.
|
||||||
|
*
|
||||||
|
* If you are looking for translated character input, see the SDL_TEXTINPUT
|
||||||
|
* event.
|
||||||
|
*/
|
||||||
|
typedef struct SDL_Keysym
|
||||||
|
{
|
||||||
|
SDL_Scancode scancode; /**< SDL physical key code - see SDL_Scancode for details */
|
||||||
|
SDL_Keycode sym; /**< SDL virtual key code - see SDL_Keycode for details */
|
||||||
|
Uint16 mod; /**< current key modifiers */
|
||||||
|
Uint32 unused;
|
||||||
|
} SDL_Keysym;
|
||||||
|
|
||||||
|
/* Function prototypes */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Query the window which currently has keyboard focus.
|
||||||
|
*
|
||||||
|
* \returns the window with keyboard focus.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a snapshot of the current state of the keyboard.
|
||||||
|
*
|
||||||
|
* The pointer returned is a pointer to an internal SDL array. It will be
|
||||||
|
* valid for the whole lifetime of the application and should not be freed by
|
||||||
|
* the caller.
|
||||||
|
*
|
||||||
|
* A array element with a value of 1 means that the key is pressed and a value
|
||||||
|
* of 0 means that it is not. Indexes into this array are obtained by using
|
||||||
|
* SDL_Scancode values.
|
||||||
|
*
|
||||||
|
* Use SDL_PumpEvents() to update the state array.
|
||||||
|
*
|
||||||
|
* This function gives you the current state after all events have been
|
||||||
|
* processed, so if a key or button has been pressed and released before you
|
||||||
|
* process events, then the pressed state will never show up in the
|
||||||
|
* SDL_GetKeyboardState() calls.
|
||||||
|
*
|
||||||
|
* Note: This function doesn't take into account whether shift has been
|
||||||
|
* pressed or not.
|
||||||
|
*
|
||||||
|
* \param numkeys if non-NULL, receives the length of the returned array.
|
||||||
|
* \returns a pointer to an array of key states.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_PumpEvents
|
||||||
|
* \sa SDL_ResetKeyboard
|
||||||
|
*/
|
||||||
|
extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear the state of the keyboard
|
||||||
|
*
|
||||||
|
* This function will generate key up events for all pressed keys.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.24.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetKeyboardState
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_ResetKeyboard(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current key modifier state for the keyboard.
|
||||||
|
*
|
||||||
|
* \returns an OR'd combination of the modifier keys for the keyboard. See
|
||||||
|
* SDL_Keymod for details.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetKeyboardState
|
||||||
|
* \sa SDL_SetModState
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the current key modifier state for the keyboard.
|
||||||
|
*
|
||||||
|
* The inverse of SDL_GetModState(), SDL_SetModState() allows you to impose
|
||||||
|
* modifier key states on your application. Simply pass your desired modifier
|
||||||
|
* states into `modstate`. This value may be a bitwise, OR'd combination of
|
||||||
|
* SDL_Keymod values.
|
||||||
|
*
|
||||||
|
* This does not change the keyboard state, only the key modifier flags that
|
||||||
|
* SDL reports.
|
||||||
|
*
|
||||||
|
* \param modstate the desired SDL_Keymod for the keyboard.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetModState
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the key code corresponding to the given scancode according to the
|
||||||
|
* current keyboard layout.
|
||||||
|
*
|
||||||
|
* See SDL_Keycode for details.
|
||||||
|
*
|
||||||
|
* \param scancode the desired SDL_Scancode to query.
|
||||||
|
* \returns the SDL_Keycode that corresponds to the given SDL_Scancode.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetKeyName
|
||||||
|
* \sa SDL_GetScancodeFromKey
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the scancode corresponding to the given key code according to the
|
||||||
|
* current keyboard layout.
|
||||||
|
*
|
||||||
|
* See SDL_Scancode for details.
|
||||||
|
*
|
||||||
|
* \param key the desired SDL_Keycode to query.
|
||||||
|
* \returns the SDL_Scancode that corresponds to the given SDL_Keycode.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetKeyFromScancode
|
||||||
|
* \sa SDL_GetScancodeName
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a human-readable name for a scancode.
|
||||||
|
*
|
||||||
|
* See SDL_Scancode for details.
|
||||||
|
*
|
||||||
|
* **Warning**: The returned name is by design not stable across platforms,
|
||||||
|
* e.g. the name for `SDL_SCANCODE_LGUI` is "Left GUI" under Linux but "Left
|
||||||
|
* Windows" under Microsoft Windows, and some scancodes like
|
||||||
|
* `SDL_SCANCODE_NONUSBACKSLASH` don't have any name at all. There are even
|
||||||
|
* scancodes that share names, e.g. `SDL_SCANCODE_RETURN` and
|
||||||
|
* `SDL_SCANCODE_RETURN2` (both called "Return"). This function is therefore
|
||||||
|
* unsuitable for creating a stable cross-platform two-way mapping between
|
||||||
|
* strings and scancodes.
|
||||||
|
*
|
||||||
|
* \param scancode the desired SDL_Scancode to query.
|
||||||
|
* \returns a pointer to the name for the scancode. If the scancode doesn't
|
||||||
|
* have a name this function returns an empty string ("").
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetScancodeFromKey
|
||||||
|
* \sa SDL_GetScancodeFromName
|
||||||
|
*/
|
||||||
|
extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a scancode from a human-readable name.
|
||||||
|
*
|
||||||
|
* \param name the human-readable scancode name.
|
||||||
|
* \returns the SDL_Scancode, or `SDL_SCANCODE_UNKNOWN` if the name wasn't
|
||||||
|
* recognized; call SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetKeyFromName
|
||||||
|
* \sa SDL_GetScancodeFromKey
|
||||||
|
* \sa SDL_GetScancodeName
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a human-readable name for a key.
|
||||||
|
*
|
||||||
|
* See SDL_Scancode and SDL_Keycode for details.
|
||||||
|
*
|
||||||
|
* \param key the desired SDL_Keycode to query.
|
||||||
|
* \returns a pointer to a UTF-8 string that stays valid at least until the
|
||||||
|
* next call to this function. If you need it around any longer, you
|
||||||
|
* must copy it. If the key doesn't have a name, this function
|
||||||
|
* returns an empty string ("").
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetKeyFromName
|
||||||
|
* \sa SDL_GetKeyFromScancode
|
||||||
|
* \sa SDL_GetScancodeFromKey
|
||||||
|
*/
|
||||||
|
extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a key code from a human-readable name.
|
||||||
|
*
|
||||||
|
* \param name the human-readable key name.
|
||||||
|
* \returns key code, or `SDLK_UNKNOWN` if the name wasn't recognized; call
|
||||||
|
* SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetKeyFromScancode
|
||||||
|
* \sa SDL_GetKeyName
|
||||||
|
* \sa SDL_GetScancodeFromName
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start accepting Unicode text input events.
|
||||||
|
*
|
||||||
|
* This function will start accepting Unicode text input events in the focused
|
||||||
|
* SDL window, and start emitting SDL_TextInputEvent (SDL_TEXTINPUT) and
|
||||||
|
* SDL_TextEditingEvent (SDL_TEXTEDITING) events. Please use this function in
|
||||||
|
* pair with SDL_StopTextInput().
|
||||||
|
*
|
||||||
|
* On some platforms using this function activates the screen keyboard.
|
||||||
|
*
|
||||||
|
* On desktop platforms, SDL_StartTextInput() is implicitly called on SDL
|
||||||
|
* window creation which will cause events SDL_TextInputEvent and
|
||||||
|
* SDL_TextEditingEvent to begin emitting.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_SetTextInputRect
|
||||||
|
* \sa SDL_StopTextInput
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether or not Unicode text input events are enabled.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if text input events are enabled else SDL_FALSE.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_StartTextInput
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stop receiving any text input events.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_StartTextInput
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dismiss the composition window/IME without disabling the subsystem.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.22.
|
||||||
|
*
|
||||||
|
* \sa SDL_StartTextInput
|
||||||
|
* \sa SDL_StopTextInput
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_ClearComposition(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if an IME Composite or Candidate window is currently shown.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.22.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputShown(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the rectangle used to type Unicode text inputs.
|
||||||
|
*
|
||||||
|
* Native input methods will place a window with word suggestions near it,
|
||||||
|
* without covering the text being inputted.
|
||||||
|
*
|
||||||
|
* To start text input in a given location, this function is intended to be
|
||||||
|
* called before SDL_StartTextInput, although some platforms support moving
|
||||||
|
* the rectangle even while text input (and a composition) is active.
|
||||||
|
*
|
||||||
|
* Note: If you want to use the system native IME window, try setting hint
|
||||||
|
* **SDL_HINT_IME_SHOW_UI** to **1**, otherwise this function won't give you
|
||||||
|
* any feedback.
|
||||||
|
*
|
||||||
|
* \param rect the SDL_Rect structure representing the rectangle to receive
|
||||||
|
* text (ignored if NULL).
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_StartTextInput
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_SetTextInputRect(const SDL_Rect *rect);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether the platform has screen keyboard support.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the platform has some screen keyboard support or
|
||||||
|
* SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_StartTextInput
|
||||||
|
* \sa SDL_IsScreenKeyboardShown
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether the screen keyboard is shown for given window.
|
||||||
|
*
|
||||||
|
* \param window the window for which screen keyboard should be queried.
|
||||||
|
* \returns SDL_TRUE if screen keyboard is shown or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_HasScreenKeyboardSupport
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_keyboard_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
358
enginecustom/include/Vulkan/Include/SDL2/SDL_keycode.h
Normal file
@ -0,0 +1,358 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryKeycode
|
||||||
|
*
|
||||||
|
* Defines constants which identify keyboard keys and modifiers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_keycode_h_
|
||||||
|
#define SDL_keycode_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
#include "SDL_scancode.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The SDL virtual key representation.
|
||||||
|
*
|
||||||
|
* Values of this type are used to represent keyboard keys using the current
|
||||||
|
* layout of the keyboard. These values include Unicode values representing
|
||||||
|
* the unmodified character that would be generated by pressing the key, or an
|
||||||
|
* SDLK_* constant for those keys that do not generate characters.
|
||||||
|
*
|
||||||
|
* A special exception is the number keys at the top of the keyboard which map
|
||||||
|
* to SDLK_0...SDLK_9 on AZERTY layouts.
|
||||||
|
*/
|
||||||
|
typedef Sint32 SDL_Keycode;
|
||||||
|
|
||||||
|
#define SDLK_SCANCODE_MASK (1<<30)
|
||||||
|
#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
|
||||||
|
|
||||||
|
typedef enum SDL_KeyCode
|
||||||
|
{
|
||||||
|
SDLK_UNKNOWN = 0,
|
||||||
|
|
||||||
|
SDLK_RETURN = '\r',
|
||||||
|
SDLK_ESCAPE = '\x1B',
|
||||||
|
SDLK_BACKSPACE = '\b',
|
||||||
|
SDLK_TAB = '\t',
|
||||||
|
SDLK_SPACE = ' ',
|
||||||
|
SDLK_EXCLAIM = '!',
|
||||||
|
SDLK_QUOTEDBL = '"',
|
||||||
|
SDLK_HASH = '#',
|
||||||
|
SDLK_PERCENT = '%',
|
||||||
|
SDLK_DOLLAR = '$',
|
||||||
|
SDLK_AMPERSAND = '&',
|
||||||
|
SDLK_QUOTE = '\'',
|
||||||
|
SDLK_LEFTPAREN = '(',
|
||||||
|
SDLK_RIGHTPAREN = ')',
|
||||||
|
SDLK_ASTERISK = '*',
|
||||||
|
SDLK_PLUS = '+',
|
||||||
|
SDLK_COMMA = ',',
|
||||||
|
SDLK_MINUS = '-',
|
||||||
|
SDLK_PERIOD = '.',
|
||||||
|
SDLK_SLASH = '/',
|
||||||
|
SDLK_0 = '0',
|
||||||
|
SDLK_1 = '1',
|
||||||
|
SDLK_2 = '2',
|
||||||
|
SDLK_3 = '3',
|
||||||
|
SDLK_4 = '4',
|
||||||
|
SDLK_5 = '5',
|
||||||
|
SDLK_6 = '6',
|
||||||
|
SDLK_7 = '7',
|
||||||
|
SDLK_8 = '8',
|
||||||
|
SDLK_9 = '9',
|
||||||
|
SDLK_COLON = ':',
|
||||||
|
SDLK_SEMICOLON = ';',
|
||||||
|
SDLK_LESS = '<',
|
||||||
|
SDLK_EQUALS = '=',
|
||||||
|
SDLK_GREATER = '>',
|
||||||
|
SDLK_QUESTION = '?',
|
||||||
|
SDLK_AT = '@',
|
||||||
|
|
||||||
|
/*
|
||||||
|
Skip uppercase letters
|
||||||
|
*/
|
||||||
|
|
||||||
|
SDLK_LEFTBRACKET = '[',
|
||||||
|
SDLK_BACKSLASH = '\\',
|
||||||
|
SDLK_RIGHTBRACKET = ']',
|
||||||
|
SDLK_CARET = '^',
|
||||||
|
SDLK_UNDERSCORE = '_',
|
||||||
|
SDLK_BACKQUOTE = '`',
|
||||||
|
SDLK_a = 'a',
|
||||||
|
SDLK_b = 'b',
|
||||||
|
SDLK_c = 'c',
|
||||||
|
SDLK_d = 'd',
|
||||||
|
SDLK_e = 'e',
|
||||||
|
SDLK_f = 'f',
|
||||||
|
SDLK_g = 'g',
|
||||||
|
SDLK_h = 'h',
|
||||||
|
SDLK_i = 'i',
|
||||||
|
SDLK_j = 'j',
|
||||||
|
SDLK_k = 'k',
|
||||||
|
SDLK_l = 'l',
|
||||||
|
SDLK_m = 'm',
|
||||||
|
SDLK_n = 'n',
|
||||||
|
SDLK_o = 'o',
|
||||||
|
SDLK_p = 'p',
|
||||||
|
SDLK_q = 'q',
|
||||||
|
SDLK_r = 'r',
|
||||||
|
SDLK_s = 's',
|
||||||
|
SDLK_t = 't',
|
||||||
|
SDLK_u = 'u',
|
||||||
|
SDLK_v = 'v',
|
||||||
|
SDLK_w = 'w',
|
||||||
|
SDLK_x = 'x',
|
||||||
|
SDLK_y = 'y',
|
||||||
|
SDLK_z = 'z',
|
||||||
|
|
||||||
|
SDLK_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK),
|
||||||
|
|
||||||
|
SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1),
|
||||||
|
SDLK_F2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2),
|
||||||
|
SDLK_F3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3),
|
||||||
|
SDLK_F4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4),
|
||||||
|
SDLK_F5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5),
|
||||||
|
SDLK_F6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6),
|
||||||
|
SDLK_F7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7),
|
||||||
|
SDLK_F8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8),
|
||||||
|
SDLK_F9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9),
|
||||||
|
SDLK_F10 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10),
|
||||||
|
SDLK_F11 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11),
|
||||||
|
SDLK_F12 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12),
|
||||||
|
|
||||||
|
SDLK_PRINTSCREEN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN),
|
||||||
|
SDLK_SCROLLLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK),
|
||||||
|
SDLK_PAUSE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE),
|
||||||
|
SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT),
|
||||||
|
SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME),
|
||||||
|
SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP),
|
||||||
|
SDLK_DELETE = '\x7F',
|
||||||
|
SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END),
|
||||||
|
SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN),
|
||||||
|
SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT),
|
||||||
|
SDLK_LEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT),
|
||||||
|
SDLK_DOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN),
|
||||||
|
SDLK_UP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP),
|
||||||
|
|
||||||
|
SDLK_NUMLOCKCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR),
|
||||||
|
SDLK_KP_DIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE),
|
||||||
|
SDLK_KP_MULTIPLY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY),
|
||||||
|
SDLK_KP_MINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS),
|
||||||
|
SDLK_KP_PLUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS),
|
||||||
|
SDLK_KP_ENTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER),
|
||||||
|
SDLK_KP_1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1),
|
||||||
|
SDLK_KP_2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2),
|
||||||
|
SDLK_KP_3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3),
|
||||||
|
SDLK_KP_4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4),
|
||||||
|
SDLK_KP_5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5),
|
||||||
|
SDLK_KP_6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6),
|
||||||
|
SDLK_KP_7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7),
|
||||||
|
SDLK_KP_8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8),
|
||||||
|
SDLK_KP_9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9),
|
||||||
|
SDLK_KP_0 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0),
|
||||||
|
SDLK_KP_PERIOD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD),
|
||||||
|
|
||||||
|
SDLK_APPLICATION = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION),
|
||||||
|
SDLK_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER),
|
||||||
|
SDLK_KP_EQUALS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS),
|
||||||
|
SDLK_F13 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13),
|
||||||
|
SDLK_F14 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14),
|
||||||
|
SDLK_F15 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15),
|
||||||
|
SDLK_F16 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16),
|
||||||
|
SDLK_F17 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17),
|
||||||
|
SDLK_F18 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18),
|
||||||
|
SDLK_F19 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19),
|
||||||
|
SDLK_F20 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20),
|
||||||
|
SDLK_F21 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21),
|
||||||
|
SDLK_F22 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22),
|
||||||
|
SDLK_F23 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23),
|
||||||
|
SDLK_F24 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24),
|
||||||
|
SDLK_EXECUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE),
|
||||||
|
SDLK_HELP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP),
|
||||||
|
SDLK_MENU = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU),
|
||||||
|
SDLK_SELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT),
|
||||||
|
SDLK_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP),
|
||||||
|
SDLK_AGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN),
|
||||||
|
SDLK_UNDO = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO),
|
||||||
|
SDLK_CUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT),
|
||||||
|
SDLK_COPY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY),
|
||||||
|
SDLK_PASTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE),
|
||||||
|
SDLK_FIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND),
|
||||||
|
SDLK_MUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE),
|
||||||
|
SDLK_VOLUMEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP),
|
||||||
|
SDLK_VOLUMEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN),
|
||||||
|
SDLK_KP_COMMA = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA),
|
||||||
|
SDLK_KP_EQUALSAS400 =
|
||||||
|
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400),
|
||||||
|
|
||||||
|
SDLK_ALTERASE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE),
|
||||||
|
SDLK_SYSREQ = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ),
|
||||||
|
SDLK_CANCEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL),
|
||||||
|
SDLK_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR),
|
||||||
|
SDLK_PRIOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR),
|
||||||
|
SDLK_RETURN2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2),
|
||||||
|
SDLK_SEPARATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR),
|
||||||
|
SDLK_OUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT),
|
||||||
|
SDLK_OPER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER),
|
||||||
|
SDLK_CLEARAGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN),
|
||||||
|
SDLK_CRSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL),
|
||||||
|
SDLK_EXSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL),
|
||||||
|
|
||||||
|
SDLK_KP_00 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00),
|
||||||
|
SDLK_KP_000 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000),
|
||||||
|
SDLK_THOUSANDSSEPARATOR =
|
||||||
|
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR),
|
||||||
|
SDLK_DECIMALSEPARATOR =
|
||||||
|
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR),
|
||||||
|
SDLK_CURRENCYUNIT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT),
|
||||||
|
SDLK_CURRENCYSUBUNIT =
|
||||||
|
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT),
|
||||||
|
SDLK_KP_LEFTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN),
|
||||||
|
SDLK_KP_RIGHTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN),
|
||||||
|
SDLK_KP_LEFTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE),
|
||||||
|
SDLK_KP_RIGHTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE),
|
||||||
|
SDLK_KP_TAB = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB),
|
||||||
|
SDLK_KP_BACKSPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE),
|
||||||
|
SDLK_KP_A = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A),
|
||||||
|
SDLK_KP_B = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B),
|
||||||
|
SDLK_KP_C = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C),
|
||||||
|
SDLK_KP_D = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D),
|
||||||
|
SDLK_KP_E = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E),
|
||||||
|
SDLK_KP_F = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F),
|
||||||
|
SDLK_KP_XOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR),
|
||||||
|
SDLK_KP_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER),
|
||||||
|
SDLK_KP_PERCENT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT),
|
||||||
|
SDLK_KP_LESS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS),
|
||||||
|
SDLK_KP_GREATER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER),
|
||||||
|
SDLK_KP_AMPERSAND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND),
|
||||||
|
SDLK_KP_DBLAMPERSAND =
|
||||||
|
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND),
|
||||||
|
SDLK_KP_VERTICALBAR =
|
||||||
|
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR),
|
||||||
|
SDLK_KP_DBLVERTICALBAR =
|
||||||
|
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR),
|
||||||
|
SDLK_KP_COLON = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON),
|
||||||
|
SDLK_KP_HASH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH),
|
||||||
|
SDLK_KP_SPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE),
|
||||||
|
SDLK_KP_AT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT),
|
||||||
|
SDLK_KP_EXCLAM = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM),
|
||||||
|
SDLK_KP_MEMSTORE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE),
|
||||||
|
SDLK_KP_MEMRECALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL),
|
||||||
|
SDLK_KP_MEMCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR),
|
||||||
|
SDLK_KP_MEMADD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD),
|
||||||
|
SDLK_KP_MEMSUBTRACT =
|
||||||
|
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT),
|
||||||
|
SDLK_KP_MEMMULTIPLY =
|
||||||
|
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY),
|
||||||
|
SDLK_KP_MEMDIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE),
|
||||||
|
SDLK_KP_PLUSMINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS),
|
||||||
|
SDLK_KP_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR),
|
||||||
|
SDLK_KP_CLEARENTRY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY),
|
||||||
|
SDLK_KP_BINARY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY),
|
||||||
|
SDLK_KP_OCTAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL),
|
||||||
|
SDLK_KP_DECIMAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL),
|
||||||
|
SDLK_KP_HEXADECIMAL =
|
||||||
|
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL),
|
||||||
|
|
||||||
|
SDLK_LCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL),
|
||||||
|
SDLK_LSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT),
|
||||||
|
SDLK_LALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT),
|
||||||
|
SDLK_LGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI),
|
||||||
|
SDLK_RCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL),
|
||||||
|
SDLK_RSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT),
|
||||||
|
SDLK_RALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT),
|
||||||
|
SDLK_RGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI),
|
||||||
|
|
||||||
|
SDLK_MODE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE),
|
||||||
|
|
||||||
|
SDLK_AUDIONEXT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT),
|
||||||
|
SDLK_AUDIOPREV = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV),
|
||||||
|
SDLK_AUDIOSTOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP),
|
||||||
|
SDLK_AUDIOPLAY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY),
|
||||||
|
SDLK_AUDIOMUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE),
|
||||||
|
SDLK_MEDIASELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT),
|
||||||
|
SDLK_WWW = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW),
|
||||||
|
SDLK_MAIL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL),
|
||||||
|
SDLK_CALCULATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR),
|
||||||
|
SDLK_COMPUTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER),
|
||||||
|
SDLK_AC_SEARCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH),
|
||||||
|
SDLK_AC_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME),
|
||||||
|
SDLK_AC_BACK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK),
|
||||||
|
SDLK_AC_FORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD),
|
||||||
|
SDLK_AC_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP),
|
||||||
|
SDLK_AC_REFRESH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH),
|
||||||
|
SDLK_AC_BOOKMARKS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS),
|
||||||
|
|
||||||
|
SDLK_BRIGHTNESSDOWN =
|
||||||
|
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN),
|
||||||
|
SDLK_BRIGHTNESSUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP),
|
||||||
|
SDLK_DISPLAYSWITCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH),
|
||||||
|
SDLK_KBDILLUMTOGGLE =
|
||||||
|
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE),
|
||||||
|
SDLK_KBDILLUMDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN),
|
||||||
|
SDLK_KBDILLUMUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP),
|
||||||
|
SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT),
|
||||||
|
SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP),
|
||||||
|
SDLK_APP1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP1),
|
||||||
|
SDLK_APP2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2),
|
||||||
|
|
||||||
|
SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),
|
||||||
|
SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD),
|
||||||
|
|
||||||
|
SDLK_SOFTLEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTLEFT),
|
||||||
|
SDLK_SOFTRIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTRIGHT),
|
||||||
|
SDLK_CALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALL),
|
||||||
|
SDLK_ENDCALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ENDCALL)
|
||||||
|
} SDL_KeyCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enumeration of valid key mods (possibly OR'd together).
|
||||||
|
*/
|
||||||
|
typedef enum SDL_Keymod
|
||||||
|
{
|
||||||
|
KMOD_NONE = 0x0000,
|
||||||
|
KMOD_LSHIFT = 0x0001,
|
||||||
|
KMOD_RSHIFT = 0x0002,
|
||||||
|
KMOD_LCTRL = 0x0040,
|
||||||
|
KMOD_RCTRL = 0x0080,
|
||||||
|
KMOD_LALT = 0x0100,
|
||||||
|
KMOD_RALT = 0x0200,
|
||||||
|
KMOD_LGUI = 0x0400,
|
||||||
|
KMOD_RGUI = 0x0800,
|
||||||
|
KMOD_NUM = 0x1000,
|
||||||
|
KMOD_CAPS = 0x2000,
|
||||||
|
KMOD_MODE = 0x4000,
|
||||||
|
KMOD_SCROLL = 0x8000,
|
||||||
|
|
||||||
|
KMOD_CTRL = KMOD_LCTRL | KMOD_RCTRL,
|
||||||
|
KMOD_SHIFT = KMOD_LSHIFT | KMOD_RSHIFT,
|
||||||
|
KMOD_ALT = KMOD_LALT | KMOD_RALT,
|
||||||
|
KMOD_GUI = KMOD_LGUI | KMOD_RGUI,
|
||||||
|
|
||||||
|
KMOD_RESERVED = KMOD_SCROLL /* This is for source-level compatibility with SDL 2.0.0. */
|
||||||
|
} SDL_Keymod;
|
||||||
|
|
||||||
|
#endif /* SDL_keycode_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
117
enginecustom/include/Vulkan/Include/SDL2/SDL_loadso.h
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* WIKI CATEGORY: LoadSO */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryLoadSO
|
||||||
|
*
|
||||||
|
* System-dependent library loading routines.
|
||||||
|
*
|
||||||
|
* Some things to keep in mind:
|
||||||
|
*
|
||||||
|
* - These functions only work on C function names. Other languages may have
|
||||||
|
* name mangling and intrinsic language support that varies from compiler to
|
||||||
|
* compiler.
|
||||||
|
* - Make sure you declare your function pointers with the same calling
|
||||||
|
* convention as the actual library function. Your code will crash
|
||||||
|
* mysteriously if you do not do this.
|
||||||
|
* - Avoid namespace collisions. If you load a symbol from the library, it is
|
||||||
|
* not defined whether or not it goes into the global symbol namespace for
|
||||||
|
* the application. If it does and it conflicts with symbols in your code or
|
||||||
|
* other shared libraries, you will not get the results you expect. :)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_loadso_h_
|
||||||
|
#define SDL_loadso_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
#include "SDL_error.h"
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dynamically load a shared object.
|
||||||
|
*
|
||||||
|
* \param sofile a system-dependent name of the object file.
|
||||||
|
* \returns an opaque pointer to the object handle or NULL if there was an
|
||||||
|
* error; call SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_LoadFunction
|
||||||
|
* \sa SDL_UnloadObject
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Look up the address of the named function in a shared object.
|
||||||
|
*
|
||||||
|
* This function pointer is no longer valid after calling SDL_UnloadObject().
|
||||||
|
*
|
||||||
|
* This function can only look up C function names. Other languages may have
|
||||||
|
* name mangling and intrinsic language support that varies from compiler to
|
||||||
|
* compiler.
|
||||||
|
*
|
||||||
|
* Make sure you declare your function pointers with the same calling
|
||||||
|
* convention as the actual library function. Your code will crash
|
||||||
|
* mysteriously if you do not do this.
|
||||||
|
*
|
||||||
|
* If the requested function doesn't exist, NULL is returned.
|
||||||
|
*
|
||||||
|
* \param handle a valid shared object handle returned by SDL_LoadObject().
|
||||||
|
* \param name the name of the function to look up.
|
||||||
|
* \returns a pointer to the function or NULL if there was an error; call
|
||||||
|
* SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_LoadObject
|
||||||
|
* \sa SDL_UnloadObject
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle,
|
||||||
|
const char *name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unload a shared object from memory.
|
||||||
|
*
|
||||||
|
* \param handle a valid shared object handle returned by SDL_LoadObject().
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_LoadFunction
|
||||||
|
* \sa SDL_LoadObject
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_loadso_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
103
enginecustom/include/Vulkan/Include/SDL2/SDL_locale.h
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryLocale
|
||||||
|
*
|
||||||
|
* Include file for SDL locale services
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _SDL_locale_h
|
||||||
|
#define _SDL_locale_h
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
#include "SDL_error.h"
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
/* *INDENT-OFF* */
|
||||||
|
extern "C" {
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct SDL_Locale
|
||||||
|
{
|
||||||
|
const char *language; /**< A language name, like "en" for English. */
|
||||||
|
const char *country; /**< A country, like "US" for America. Can be NULL. */
|
||||||
|
} SDL_Locale;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Report the user's preferred locale.
|
||||||
|
*
|
||||||
|
* This returns an array of SDL_Locale structs, the final item zeroed out.
|
||||||
|
* When the caller is done with this array, it should call SDL_free() on the
|
||||||
|
* returned value; all the memory involved is allocated in a single block, so
|
||||||
|
* a single SDL_free() will suffice.
|
||||||
|
*
|
||||||
|
* Returned language strings are in the format xx, where 'xx' is an ISO-639
|
||||||
|
* language specifier (such as "en" for English, "de" for German, etc).
|
||||||
|
* Country strings are in the format YY, where "YY" is an ISO-3166 country
|
||||||
|
* code (such as "US" for the United States, "CA" for Canada, etc). Country
|
||||||
|
* might be NULL if there's no specific guidance on them (so you might get {
|
||||||
|
* "en", "US" } for American English, but { "en", NULL } means "English
|
||||||
|
* language, generically"). Language strings are never NULL, except to
|
||||||
|
* terminate the array.
|
||||||
|
*
|
||||||
|
* Please note that not all of these strings are 2 characters; some are three
|
||||||
|
* or more.
|
||||||
|
*
|
||||||
|
* The returned list of locales are in the order of the user's preference. For
|
||||||
|
* example, a German citizen that is fluent in US English and knows enough
|
||||||
|
* Japanese to navigate around Tokyo might have a list like: { "de", "en_US",
|
||||||
|
* "jp", NULL }. Someone from England might prefer British English (where
|
||||||
|
* "color" is spelled "colour", etc), but will settle for anything like it: {
|
||||||
|
* "en_GB", "en", NULL }.
|
||||||
|
*
|
||||||
|
* This function returns NULL on error, including when the platform does not
|
||||||
|
* supply this information at all.
|
||||||
|
*
|
||||||
|
* This might be a "slow" call that has to query the operating system. It's
|
||||||
|
* best to ask for this once and save the results. However, this list can
|
||||||
|
* change, usually because the user has changed a system preference outside of
|
||||||
|
* your program; SDL will send an SDL_LOCALECHANGED event in this case, if
|
||||||
|
* possible, and you can call this function again to get an updated copy of
|
||||||
|
* preferred locales.
|
||||||
|
*
|
||||||
|
* \return array of locales, terminated with a locale with a NULL language
|
||||||
|
* field. Will return NULL on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.14.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_Locale * SDLCALL SDL_GetPreferredLocales(void);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
/* *INDENT-OFF* */
|
||||||
|
}
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* _SDL_locale_h */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
405
enginecustom/include/Vulkan/Include/SDL2/SDL_log.h
Normal file
@ -0,0 +1,405 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryLog
|
||||||
|
*
|
||||||
|
* Simple log messages with categories and priorities.
|
||||||
|
*
|
||||||
|
* By default logs are quiet, but if you're debugging SDL you might want:
|
||||||
|
*
|
||||||
|
* SDL_LogSetAllPriority(SDL_LOG_PRIORITY_WARN);
|
||||||
|
*
|
||||||
|
* Here's where the messages go on different platforms:
|
||||||
|
*
|
||||||
|
* - Windows: debug output stream
|
||||||
|
* - Android: log output
|
||||||
|
* - Others: standard error output (stderr)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_log_h_
|
||||||
|
#define SDL_log_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The maximum size of a log message prior to SDL 2.0.24
|
||||||
|
*
|
||||||
|
* As of 2.0.24 there is no limit to the length of SDL log messages.
|
||||||
|
*/
|
||||||
|
#define SDL_MAX_LOG_MESSAGE 4096
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The predefined log categories
|
||||||
|
*
|
||||||
|
* By default the application category is enabled at the INFO level, the
|
||||||
|
* assert category is enabled at the WARN level, test is enabled at the
|
||||||
|
* VERBOSE level and all other categories are enabled at the ERROR level.
|
||||||
|
*/
|
||||||
|
typedef enum SDL_LogCategory
|
||||||
|
{
|
||||||
|
SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
SDL_LOG_CATEGORY_ERROR,
|
||||||
|
SDL_LOG_CATEGORY_ASSERT,
|
||||||
|
SDL_LOG_CATEGORY_SYSTEM,
|
||||||
|
SDL_LOG_CATEGORY_AUDIO,
|
||||||
|
SDL_LOG_CATEGORY_VIDEO,
|
||||||
|
SDL_LOG_CATEGORY_RENDER,
|
||||||
|
SDL_LOG_CATEGORY_INPUT,
|
||||||
|
SDL_LOG_CATEGORY_TEST,
|
||||||
|
|
||||||
|
/* Reserved for future SDL library use */
|
||||||
|
SDL_LOG_CATEGORY_RESERVED1,
|
||||||
|
SDL_LOG_CATEGORY_RESERVED2,
|
||||||
|
SDL_LOG_CATEGORY_RESERVED3,
|
||||||
|
SDL_LOG_CATEGORY_RESERVED4,
|
||||||
|
SDL_LOG_CATEGORY_RESERVED5,
|
||||||
|
SDL_LOG_CATEGORY_RESERVED6,
|
||||||
|
SDL_LOG_CATEGORY_RESERVED7,
|
||||||
|
SDL_LOG_CATEGORY_RESERVED8,
|
||||||
|
SDL_LOG_CATEGORY_RESERVED9,
|
||||||
|
SDL_LOG_CATEGORY_RESERVED10,
|
||||||
|
|
||||||
|
/* Beyond this point is reserved for application use, e.g.
|
||||||
|
enum {
|
||||||
|
MYAPP_CATEGORY_AWESOME1 = SDL_LOG_CATEGORY_CUSTOM,
|
||||||
|
MYAPP_CATEGORY_AWESOME2,
|
||||||
|
MYAPP_CATEGORY_AWESOME3,
|
||||||
|
...
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
SDL_LOG_CATEGORY_CUSTOM
|
||||||
|
} SDL_LogCategory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The predefined log priorities
|
||||||
|
*/
|
||||||
|
typedef enum SDL_LogPriority
|
||||||
|
{
|
||||||
|
SDL_LOG_PRIORITY_VERBOSE = 1,
|
||||||
|
SDL_LOG_PRIORITY_DEBUG,
|
||||||
|
SDL_LOG_PRIORITY_INFO,
|
||||||
|
SDL_LOG_PRIORITY_WARN,
|
||||||
|
SDL_LOG_PRIORITY_ERROR,
|
||||||
|
SDL_LOG_PRIORITY_CRITICAL,
|
||||||
|
SDL_NUM_LOG_PRIORITIES
|
||||||
|
} SDL_LogPriority;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the priority of all log categories.
|
||||||
|
*
|
||||||
|
* \param priority the SDL_LogPriority to assign.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_LogSetPriority
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_LogSetAllPriority(SDL_LogPriority priority);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the priority of a particular log category.
|
||||||
|
*
|
||||||
|
* \param category the category to assign a priority to.
|
||||||
|
* \param priority the SDL_LogPriority to assign.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_LogGetPriority
|
||||||
|
* \sa SDL_LogSetAllPriority
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_LogSetPriority(int category,
|
||||||
|
SDL_LogPriority priority);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the priority of a particular log category.
|
||||||
|
*
|
||||||
|
* \param category the category to query.
|
||||||
|
* \returns the SDL_LogPriority for the requested category.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_LogSetPriority
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_LogPriority SDLCALL SDL_LogGetPriority(int category);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset all priorities to default.
|
||||||
|
*
|
||||||
|
* This is called by SDL_Quit().
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_LogSetAllPriority
|
||||||
|
* \sa SDL_LogSetPriority
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_LogResetPriorities(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO.
|
||||||
|
*
|
||||||
|
* = * \param fmt a printf() style message format string
|
||||||
|
*
|
||||||
|
* \param ... additional parameters matching % tokens in the `fmt` string, if
|
||||||
|
* any.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_LogCritical
|
||||||
|
* \sa SDL_LogDebug
|
||||||
|
* \sa SDL_LogError
|
||||||
|
* \sa SDL_LogInfo
|
||||||
|
* \sa SDL_LogMessage
|
||||||
|
* \sa SDL_LogMessageV
|
||||||
|
* \sa SDL_LogVerbose
|
||||||
|
* \sa SDL_LogWarn
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log a message with SDL_LOG_PRIORITY_VERBOSE.
|
||||||
|
*
|
||||||
|
* \param category the category of the message.
|
||||||
|
* \param fmt a printf() style message format string.
|
||||||
|
* \param ... additional parameters matching % tokens in the **fmt** string,
|
||||||
|
* if any.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Log
|
||||||
|
* \sa SDL_LogCritical
|
||||||
|
* \sa SDL_LogDebug
|
||||||
|
* \sa SDL_LogError
|
||||||
|
* \sa SDL_LogInfo
|
||||||
|
* \sa SDL_LogMessage
|
||||||
|
* \sa SDL_LogMessageV
|
||||||
|
* \sa SDL_LogWarn
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log a message with SDL_LOG_PRIORITY_DEBUG.
|
||||||
|
*
|
||||||
|
* \param category the category of the message.
|
||||||
|
* \param fmt a printf() style message format string.
|
||||||
|
* \param ... additional parameters matching % tokens in the **fmt** string,
|
||||||
|
* if any.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Log
|
||||||
|
* \sa SDL_LogCritical
|
||||||
|
* \sa SDL_LogError
|
||||||
|
* \sa SDL_LogInfo
|
||||||
|
* \sa SDL_LogMessage
|
||||||
|
* \sa SDL_LogMessageV
|
||||||
|
* \sa SDL_LogVerbose
|
||||||
|
* \sa SDL_LogWarn
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log a message with SDL_LOG_PRIORITY_INFO.
|
||||||
|
*
|
||||||
|
* \param category the category of the message.
|
||||||
|
* \param fmt a printf() style message format string.
|
||||||
|
* \param ... additional parameters matching % tokens in the **fmt** string,
|
||||||
|
* if any.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Log
|
||||||
|
* \sa SDL_LogCritical
|
||||||
|
* \sa SDL_LogDebug
|
||||||
|
* \sa SDL_LogError
|
||||||
|
* \sa SDL_LogMessage
|
||||||
|
* \sa SDL_LogMessageV
|
||||||
|
* \sa SDL_LogVerbose
|
||||||
|
* \sa SDL_LogWarn
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log a message with SDL_LOG_PRIORITY_WARN.
|
||||||
|
*
|
||||||
|
* \param category the category of the message.
|
||||||
|
* \param fmt a printf() style message format string.
|
||||||
|
* \param ... additional parameters matching % tokens in the **fmt** string,
|
||||||
|
* if any.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Log
|
||||||
|
* \sa SDL_LogCritical
|
||||||
|
* \sa SDL_LogDebug
|
||||||
|
* \sa SDL_LogError
|
||||||
|
* \sa SDL_LogInfo
|
||||||
|
* \sa SDL_LogMessage
|
||||||
|
* \sa SDL_LogMessageV
|
||||||
|
* \sa SDL_LogVerbose
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log a message with SDL_LOG_PRIORITY_ERROR.
|
||||||
|
*
|
||||||
|
* \param category the category of the message.
|
||||||
|
* \param fmt a printf() style message format string.
|
||||||
|
* \param ... additional parameters matching % tokens in the **fmt** string,
|
||||||
|
* if any.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Log
|
||||||
|
* \sa SDL_LogCritical
|
||||||
|
* \sa SDL_LogDebug
|
||||||
|
* \sa SDL_LogInfo
|
||||||
|
* \sa SDL_LogMessage
|
||||||
|
* \sa SDL_LogMessageV
|
||||||
|
* \sa SDL_LogVerbose
|
||||||
|
* \sa SDL_LogWarn
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log a message with SDL_LOG_PRIORITY_CRITICAL.
|
||||||
|
*
|
||||||
|
* \param category the category of the message.
|
||||||
|
* \param fmt a printf() style message format string.
|
||||||
|
* \param ... additional parameters matching % tokens in the **fmt** string,
|
||||||
|
* if any.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Log
|
||||||
|
* \sa SDL_LogDebug
|
||||||
|
* \sa SDL_LogError
|
||||||
|
* \sa SDL_LogInfo
|
||||||
|
* \sa SDL_LogMessage
|
||||||
|
* \sa SDL_LogMessageV
|
||||||
|
* \sa SDL_LogVerbose
|
||||||
|
* \sa SDL_LogWarn
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log a message with the specified category and priority.
|
||||||
|
*
|
||||||
|
* \param category the category of the message.
|
||||||
|
* \param priority the priority of the message.
|
||||||
|
* \param fmt a printf() style message format string.
|
||||||
|
* \param ... additional parameters matching % tokens in the **fmt** string,
|
||||||
|
* if any.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Log
|
||||||
|
* \sa SDL_LogCritical
|
||||||
|
* \sa SDL_LogDebug
|
||||||
|
* \sa SDL_LogError
|
||||||
|
* \sa SDL_LogInfo
|
||||||
|
* \sa SDL_LogMessageV
|
||||||
|
* \sa SDL_LogVerbose
|
||||||
|
* \sa SDL_LogWarn
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_LogMessage(int category,
|
||||||
|
SDL_LogPriority priority,
|
||||||
|
SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log a message with the specified category and priority.
|
||||||
|
*
|
||||||
|
* \param category the category of the message.
|
||||||
|
* \param priority the priority of the message.
|
||||||
|
* \param fmt a printf() style message format string.
|
||||||
|
* \param ap a variable argument list.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Log
|
||||||
|
* \sa SDL_LogCritical
|
||||||
|
* \sa SDL_LogDebug
|
||||||
|
* \sa SDL_LogError
|
||||||
|
* \sa SDL_LogInfo
|
||||||
|
* \sa SDL_LogMessage
|
||||||
|
* \sa SDL_LogVerbose
|
||||||
|
* \sa SDL_LogWarn
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_LogMessageV(int category,
|
||||||
|
SDL_LogPriority priority,
|
||||||
|
SDL_PRINTF_FORMAT_STRING const char *fmt, va_list ap) SDL_PRINTF_VARARG_FUNCV(3);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The prototype for the log output callback function.
|
||||||
|
*
|
||||||
|
* This function is called by SDL when there is new text to be logged.
|
||||||
|
*
|
||||||
|
* \param userdata what was passed as `userdata` to
|
||||||
|
* SDL_LogSetOutputFunction().
|
||||||
|
* \param category the category of the message.
|
||||||
|
* \param priority the priority of the message.
|
||||||
|
* \param message the message being output.
|
||||||
|
*/
|
||||||
|
typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current log output function.
|
||||||
|
*
|
||||||
|
* \param callback an SDL_LogOutputFunction filled in with the current log
|
||||||
|
* callback.
|
||||||
|
* \param userdata a pointer filled in with the pointer that is passed to
|
||||||
|
* `callback`.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_LogSetOutputFunction
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replace the default log output function with one of your own.
|
||||||
|
*
|
||||||
|
* \param callback an SDL_LogOutputFunction to call instead of the default.
|
||||||
|
* \param userdata a pointer that is passed to `callback`.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_LogGetOutputFunction
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata);
|
||||||
|
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_log_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
282
enginecustom/include/Vulkan/Include/SDL2/SDL_main.h
Normal file
@ -0,0 +1,282 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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 SDL_main_h_
|
||||||
|
#define SDL_main_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryMain
|
||||||
|
*
|
||||||
|
* Redefine main() on some platforms so that it is called by SDL.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_MAIN_HANDLED
|
||||||
|
#if defined(__WIN32__)
|
||||||
|
/* On Windows SDL provides WinMain(), which parses the command line and passes
|
||||||
|
the arguments to your main function.
|
||||||
|
|
||||||
|
If you provide your own WinMain(), you may define SDL_MAIN_HANDLED
|
||||||
|
*/
|
||||||
|
#define SDL_MAIN_AVAILABLE
|
||||||
|
|
||||||
|
#elif defined(__WINRT__)
|
||||||
|
/* On WinRT, SDL provides a main function that initializes CoreApplication,
|
||||||
|
creating an instance of IFrameworkView in the process.
|
||||||
|
|
||||||
|
Please note that #include'ing SDL_main.h is not enough to get a main()
|
||||||
|
function working. In non-XAML apps, the file,
|
||||||
|
src/main/winrt/SDL_WinRT_main_NonXAML.cpp, or a copy of it, must be compiled
|
||||||
|
into the app itself. In XAML apps, the function, SDL_WinRTRunApp must be
|
||||||
|
called, with a pointer to the Direct3D-hosted XAML control passed in.
|
||||||
|
*/
|
||||||
|
#define SDL_MAIN_NEEDED
|
||||||
|
|
||||||
|
#elif defined(__GDK__)
|
||||||
|
/* On GDK, SDL provides a main function that initializes the game runtime.
|
||||||
|
|
||||||
|
Please note that #include'ing SDL_main.h is not enough to get a main()
|
||||||
|
function working. You must either link against SDL2main or, if not possible,
|
||||||
|
call the SDL_GDKRunApp function from your entry point.
|
||||||
|
*/
|
||||||
|
#define SDL_MAIN_NEEDED
|
||||||
|
|
||||||
|
#elif defined(__IPHONEOS__)
|
||||||
|
/* On iOS SDL provides a main function that creates an application delegate
|
||||||
|
and starts the iOS application run loop.
|
||||||
|
|
||||||
|
If you link with SDL dynamically on iOS, the main function can't be in a
|
||||||
|
shared library, so you need to link with libSDLmain.a, which includes a
|
||||||
|
stub main function that calls into the shared library to start execution.
|
||||||
|
|
||||||
|
See src/video/uikit/SDL_uikitappdelegate.m for more details.
|
||||||
|
*/
|
||||||
|
#define SDL_MAIN_NEEDED
|
||||||
|
|
||||||
|
#elif defined(__ANDROID__)
|
||||||
|
/* On Android SDL provides a Java class in SDLActivity.java that is the
|
||||||
|
main activity entry point.
|
||||||
|
|
||||||
|
See docs/README-android.md for more details on extending that class.
|
||||||
|
*/
|
||||||
|
#define SDL_MAIN_NEEDED
|
||||||
|
|
||||||
|
/* We need to export SDL_main so it can be launched from Java */
|
||||||
|
#define SDLMAIN_DECLSPEC DECLSPEC
|
||||||
|
|
||||||
|
#elif defined(__NACL__)
|
||||||
|
/* On NACL we use ppapi_simple to set up the application helper code,
|
||||||
|
then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before
|
||||||
|
starting the user main function.
|
||||||
|
All user code is run in a separate thread by ppapi_simple, thus
|
||||||
|
allowing for blocking io to take place via nacl_io
|
||||||
|
*/
|
||||||
|
#define SDL_MAIN_NEEDED
|
||||||
|
|
||||||
|
#elif defined(__PSP__)
|
||||||
|
/* On PSP SDL provides a main function that sets the module info,
|
||||||
|
activates the GPU and starts the thread required to be able to exit
|
||||||
|
the software.
|
||||||
|
|
||||||
|
If you provide this yourself, you may define SDL_MAIN_HANDLED
|
||||||
|
*/
|
||||||
|
#define SDL_MAIN_AVAILABLE
|
||||||
|
|
||||||
|
#elif defined(__PS2__)
|
||||||
|
#define SDL_MAIN_AVAILABLE
|
||||||
|
|
||||||
|
#define SDL_PS2_SKIP_IOP_RESET() \
|
||||||
|
void reset_IOP(); \
|
||||||
|
void reset_IOP() {}
|
||||||
|
|
||||||
|
#elif defined(__3DS__)
|
||||||
|
/*
|
||||||
|
On N3DS, SDL provides a main function that sets up the screens
|
||||||
|
and storage.
|
||||||
|
|
||||||
|
If you provide this yourself, you may define SDL_MAIN_HANDLED
|
||||||
|
*/
|
||||||
|
#define SDL_MAIN_AVAILABLE
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif /* SDL_MAIN_HANDLED */
|
||||||
|
|
||||||
|
#ifndef SDLMAIN_DECLSPEC
|
||||||
|
#define SDLMAIN_DECLSPEC
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file SDL_main.h
|
||||||
|
*
|
||||||
|
* The application's main() function must be called with C linkage,
|
||||||
|
* and should be declared like this:
|
||||||
|
* ```c
|
||||||
|
* #ifdef __cplusplus
|
||||||
|
* extern "C"
|
||||||
|
* #endif
|
||||||
|
* int main(int argc, char *argv[])
|
||||||
|
* {
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE)
|
||||||
|
#define main SDL_main
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The prototype for the application's main() function
|
||||||
|
*/
|
||||||
|
typedef int (*SDL_main_func)(int argc, char *argv[]);
|
||||||
|
extern SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Circumvent failure of SDL_Init() when not using SDL_main() as an entry
|
||||||
|
* point.
|
||||||
|
*
|
||||||
|
* This function is defined in SDL_main.h, along with the preprocessor rule to
|
||||||
|
* redefine main() as SDL_main(). Thus to ensure that your main() function
|
||||||
|
* will not be changed it is necessary to define SDL_MAIN_HANDLED before
|
||||||
|
* including SDL.h.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Init
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_SetMainReady(void);
|
||||||
|
|
||||||
|
#if defined(__WIN32__) || defined(__GDK__)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register a win32 window class for SDL's use.
|
||||||
|
*
|
||||||
|
* This can be called to set the application window class at startup. It is
|
||||||
|
* safe to call this multiple times, as long as every call is eventually
|
||||||
|
* paired with a call to SDL_UnregisterApp, but a second registration attempt
|
||||||
|
* while a previous registration is still active will be ignored, other than
|
||||||
|
* to increment a counter.
|
||||||
|
*
|
||||||
|
* Most applications do not need to, and should not, call this directly; SDL
|
||||||
|
* will call it when initializing the video subsystem.
|
||||||
|
*
|
||||||
|
* \param name the window class name, in UTF-8 encoding. If NULL, SDL
|
||||||
|
* currently uses "SDL_app" but this isn't guaranteed.
|
||||||
|
* \param style the value to use in WNDCLASSEX::style. If `name` is NULL, SDL
|
||||||
|
* currently uses `(CS_BYTEALIGNCLIENT | CS_OWNDC)` regardless of
|
||||||
|
* what is specified here.
|
||||||
|
* \param hInst the HINSTANCE to use in WNDCLASSEX::hInstance. If zero, SDL
|
||||||
|
* will use `GetModuleHandle(NULL)` instead.
|
||||||
|
* \returns 0 on success, -1 on error. SDL_GetError() may have details.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deregister the win32 window class from an SDL_RegisterApp call.
|
||||||
|
*
|
||||||
|
* This can be called to undo the effects of SDL_RegisterApp.
|
||||||
|
*
|
||||||
|
* Most applications do not need to, and should not, call this directly; SDL
|
||||||
|
* will call it when deinitializing the video subsystem.
|
||||||
|
*
|
||||||
|
* It is safe to call this multiple times, as long as every call is eventually
|
||||||
|
* paired with a prior call to SDL_RegisterApp. The window class will only be
|
||||||
|
* deregistered when the registration counter in SDL_RegisterApp decrements to
|
||||||
|
* zero through calls to this function.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
|
||||||
|
|
||||||
|
#endif /* defined(__WIN32__) || defined(__GDK__) */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __WINRT__
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize and launch an SDL/WinRT application.
|
||||||
|
*
|
||||||
|
* \param mainFunction the SDL app's C-style main(), an SDL_main_func.
|
||||||
|
* \param reserved reserved for future use; should be NULL.
|
||||||
|
* \returns 0 on success or -1 on failure; call SDL_GetError() to retrieve
|
||||||
|
* more information on the failure.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.3.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * reserved);
|
||||||
|
|
||||||
|
#endif /* __WINRT__ */
|
||||||
|
|
||||||
|
#if defined(__IPHONEOS__)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes and launches an SDL application.
|
||||||
|
*
|
||||||
|
* \param argc The argc parameter from the application's main() function.
|
||||||
|
* \param argv The argv parameter from the application's main() function.
|
||||||
|
* \param mainFunction The SDL app's C-style main(), an SDL_main_func.
|
||||||
|
* \return the return value from mainFunction.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.10.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction);
|
||||||
|
|
||||||
|
#endif /* __IPHONEOS__ */
|
||||||
|
|
||||||
|
#ifdef __GDK__
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize and launch an SDL GDK application.
|
||||||
|
*
|
||||||
|
* \param mainFunction the SDL app's C-style main(), an SDL_main_func.
|
||||||
|
* \param reserved reserved for future use; should be NULL.
|
||||||
|
* \returns 0 on success or -1 on failure; call SDL_GetError() to retrieve
|
||||||
|
* more information on the failure.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.24.0.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_GDKRunApp(SDL_main_func mainFunction, void *reserved);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback from the application to let the suspend continue.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.28.0.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
|
||||||
|
|
||||||
|
#endif /* __GDK__ */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_main_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
196
enginecustom/include/Vulkan/Include/SDL2/SDL_messagebox.h
Normal file
@ -0,0 +1,196 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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 SDL_messagebox_h_
|
||||||
|
#define SDL_messagebox_h_
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
#include "SDL_video.h" /* For SDL_Window */
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SDL_MessageBox flags.
|
||||||
|
*
|
||||||
|
* If supported will display warning icon, etc.
|
||||||
|
*/
|
||||||
|
typedef enum SDL_MessageBoxFlags
|
||||||
|
{
|
||||||
|
SDL_MESSAGEBOX_ERROR = 0x00000010, /**< error dialog */
|
||||||
|
SDL_MESSAGEBOX_WARNING = 0x00000020, /**< warning dialog */
|
||||||
|
SDL_MESSAGEBOX_INFORMATION = 0x00000040, /**< informational dialog */
|
||||||
|
SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT = 0x00000080, /**< buttons placed left to right */
|
||||||
|
SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100 /**< buttons placed right to left */
|
||||||
|
} SDL_MessageBoxFlags;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flags for SDL_MessageBoxButtonData.
|
||||||
|
*/
|
||||||
|
typedef enum SDL_MessageBoxButtonFlags
|
||||||
|
{
|
||||||
|
SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001, /**< Marks the default button when return is hit */
|
||||||
|
SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002 /**< Marks the default button when escape is hit */
|
||||||
|
} SDL_MessageBoxButtonFlags;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Individual button data.
|
||||||
|
*/
|
||||||
|
typedef struct SDL_MessageBoxButtonData
|
||||||
|
{
|
||||||
|
Uint32 flags; /**< SDL_MessageBoxButtonFlags */
|
||||||
|
int buttonid; /**< User defined button id (value returned via SDL_ShowMessageBox) */
|
||||||
|
const char * text; /**< The UTF-8 button text */
|
||||||
|
} SDL_MessageBoxButtonData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB value used in a message box color scheme
|
||||||
|
*/
|
||||||
|
typedef struct SDL_MessageBoxColor
|
||||||
|
{
|
||||||
|
Uint8 r, g, b;
|
||||||
|
} SDL_MessageBoxColor;
|
||||||
|
|
||||||
|
typedef enum SDL_MessageBoxColorType
|
||||||
|
{
|
||||||
|
SDL_MESSAGEBOX_COLOR_BACKGROUND,
|
||||||
|
SDL_MESSAGEBOX_COLOR_TEXT,
|
||||||
|
SDL_MESSAGEBOX_COLOR_BUTTON_BORDER,
|
||||||
|
SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND,
|
||||||
|
SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED,
|
||||||
|
SDL_MESSAGEBOX_COLOR_MAX
|
||||||
|
} SDL_MessageBoxColorType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A set of colors to use for message box dialogs
|
||||||
|
*/
|
||||||
|
typedef struct SDL_MessageBoxColorScheme
|
||||||
|
{
|
||||||
|
SDL_MessageBoxColor colors[SDL_MESSAGEBOX_COLOR_MAX];
|
||||||
|
} SDL_MessageBoxColorScheme;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MessageBox structure containing title, text, window, etc.
|
||||||
|
*/
|
||||||
|
typedef struct SDL_MessageBoxData
|
||||||
|
{
|
||||||
|
Uint32 flags; /**< SDL_MessageBoxFlags */
|
||||||
|
SDL_Window *window; /**< Parent window, can be NULL */
|
||||||
|
const char *title; /**< UTF-8 title */
|
||||||
|
const char *message; /**< UTF-8 message text */
|
||||||
|
|
||||||
|
int numbuttons;
|
||||||
|
const SDL_MessageBoxButtonData *buttons;
|
||||||
|
|
||||||
|
const SDL_MessageBoxColorScheme *colorScheme; /**< SDL_MessageBoxColorScheme, can be NULL to use system settings */
|
||||||
|
} SDL_MessageBoxData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a modal message box.
|
||||||
|
*
|
||||||
|
* If your needs aren't complex, it might be easier to use
|
||||||
|
* SDL_ShowSimpleMessageBox.
|
||||||
|
*
|
||||||
|
* This function should be called on the thread that created the parent
|
||||||
|
* window, or on the main thread if the messagebox has no parent. It will
|
||||||
|
* block execution of that thread until the user clicks a button or closes the
|
||||||
|
* messagebox.
|
||||||
|
*
|
||||||
|
* This function may be called at any time, even before SDL_Init(). This makes
|
||||||
|
* it useful for reporting errors like a failure to create a renderer or
|
||||||
|
* OpenGL context.
|
||||||
|
*
|
||||||
|
* On X11, SDL rolls its own dialog box with X11 primitives instead of a
|
||||||
|
* formal toolkit like GTK+ or Qt.
|
||||||
|
*
|
||||||
|
* Note that if SDL_Init() would fail because there isn't any available video
|
||||||
|
* target, this function is likely to fail for the same reasons. If this is a
|
||||||
|
* concern, check the return value from this function and fall back to writing
|
||||||
|
* to stderr if you can.
|
||||||
|
*
|
||||||
|
* \param messageboxdata the SDL_MessageBoxData structure with title, text and
|
||||||
|
* other options.
|
||||||
|
* \param buttonid the pointer to which user id of hit button should be
|
||||||
|
* copied.
|
||||||
|
* \returns 0 on success or a negative error code on failure; call
|
||||||
|
* SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_ShowSimpleMessageBox
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a simple modal message box.
|
||||||
|
*
|
||||||
|
* If your needs aren't complex, this function is preferred over
|
||||||
|
* SDL_ShowMessageBox.
|
||||||
|
*
|
||||||
|
* `flags` may be any of the following:
|
||||||
|
*
|
||||||
|
* - `SDL_MESSAGEBOX_ERROR`: error dialog
|
||||||
|
* - `SDL_MESSAGEBOX_WARNING`: warning dialog
|
||||||
|
* - `SDL_MESSAGEBOX_INFORMATION`: informational dialog
|
||||||
|
*
|
||||||
|
* This function should be called on the thread that created the parent
|
||||||
|
* window, or on the main thread if the messagebox has no parent. It will
|
||||||
|
* block execution of that thread until the user clicks a button or closes the
|
||||||
|
* messagebox.
|
||||||
|
*
|
||||||
|
* This function may be called at any time, even before SDL_Init(). This makes
|
||||||
|
* it useful for reporting errors like a failure to create a renderer or
|
||||||
|
* OpenGL context.
|
||||||
|
*
|
||||||
|
* On X11, SDL rolls its own dialog box with X11 primitives instead of a
|
||||||
|
* formal toolkit like GTK+ or Qt.
|
||||||
|
*
|
||||||
|
* Note that if SDL_Init() would fail because there isn't any available video
|
||||||
|
* target, this function is likely to fail for the same reasons. If this is a
|
||||||
|
* concern, check the return value from this function and fall back to writing
|
||||||
|
* to stderr if you can.
|
||||||
|
*
|
||||||
|
* \param flags an SDL_MessageBoxFlags value.
|
||||||
|
* \param title UTF-8 title text.
|
||||||
|
* \param message UTF-8 message text.
|
||||||
|
* \param window the parent window, or NULL for no parent.
|
||||||
|
* \returns 0 on success or a negative error code on failure; call
|
||||||
|
* SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_ShowMessageBox
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window);
|
||||||
|
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_messagebox_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
114
enginecustom/include/Vulkan/Include/SDL2/SDL_metal.h
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # CategoryMetal
|
||||||
|
*
|
||||||
|
* Header file for functions to creating Metal layers and views on SDL
|
||||||
|
* windows.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_metal_h_
|
||||||
|
#define SDL_metal_h_
|
||||||
|
|
||||||
|
#include "SDL_video.h"
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS).
|
||||||
|
*
|
||||||
|
* This can be cast directly to an NSView or UIView.
|
||||||
|
*/
|
||||||
|
typedef void *SDL_MetalView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \name Metal support functions
|
||||||
|
*/
|
||||||
|
/* @{ */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a CAMetalLayer-backed NSView/UIView and attach it to the specified
|
||||||
|
* window.
|
||||||
|
*
|
||||||
|
* On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on
|
||||||
|
* its own. It is up to user code to do that.
|
||||||
|
*
|
||||||
|
* The returned handle can be casted directly to a NSView or UIView. To access
|
||||||
|
* the backing CAMetalLayer, call SDL_Metal_GetLayer().
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.12.
|
||||||
|
*
|
||||||
|
* \sa SDL_Metal_DestroyView
|
||||||
|
* \sa SDL_Metal_GetLayer
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroy an existing SDL_MetalView object.
|
||||||
|
*
|
||||||
|
* This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was
|
||||||
|
* called after SDL_CreateWindow.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.12.
|
||||||
|
*
|
||||||
|
* \sa SDL_Metal_CreateView
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a pointer to the backing CAMetalLayer for the given view.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.14.
|
||||||
|
*
|
||||||
|
* \sa SDL_Metal_CreateView
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the size of a window's underlying drawable in pixels (for use with
|
||||||
|
* setting viewport, scissor & etc).
|
||||||
|
*
|
||||||
|
* \param window SDL_Window from which the drawable size should be queried.
|
||||||
|
* \param w Pointer to variable for storing the width in pixels, may be NULL.
|
||||||
|
* \param h Pointer to variable for storing the height in pixels, may be NULL.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.14.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetWindowSize
|
||||||
|
* \sa SDL_CreateWindow
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_Metal_GetDrawableSize(SDL_Window* window, int *w,
|
||||||
|
int *h);
|
||||||
|
|
||||||
|
/* @} *//* Metal support functions */
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* SDL_metal_h_ */
|