Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
63482923bb | |||
987ad6784e | |||
f2a8bb6b5b | |||
606aaa76e9 | |||
3930c5eff7 | |||
eea7b4c067 | |||
6583f74a5f | |||
7eb6ed72e6 | |||
8b9e860c00 |
@@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="RiderProjectSettingsUpdater">
|
<component name="RiderProjectSettingsUpdater">
|
||||||
<option name="singleClickDiffPreview" value="1" />
|
<option name="vcsConfiguration" value="2" />
|
||||||
<option name="vcsConfiguration" value="3" />
|
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
134
.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml
generated
134
.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml
generated
@@ -7,15 +7,8 @@
|
|||||||
<list default="true" id="e81d6e08-efc7-40a0-909d-ec4943d948e9" name="Changes" comment="">
|
<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$/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/imgui.ini" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/imgui.ini" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/enginecustom/imgui.ini" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/imgui.ini" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/shader-error.txt" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/shader-error.txt" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/hlsl/font.ps" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/hlsl/font.ps" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/hlsl/font.vs" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/hlsl/font.vs" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/inc/system/applicationclass.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/applicationclass.h" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/inc/system/imguiManager.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/imguiManager.h" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/src/shader/fontshaderclass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/shader/fontshaderclass.cpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/Systemclass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/Systemclass.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/Systemclass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/Systemclass.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/applicationclass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/applicationclass.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/inputclass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/inputclass.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/imguiManager.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/imguiManager.cpp" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -33,36 +26,7 @@
|
|||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
<setting file="cidr-memory-view://0" root0="FORCE_HIGHLIGHTING" />
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="cidr-memory-view://5" 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://$PROJECT_DIR$/enginecustom/src/src/shader/CelShadingShader.cpp" root0="FORCE_HIGHLIGHTING" />
|
<setting file="file://$PROJECT_DIR$/enginecustom/src/src/shader/CelShadingShader.cpp" root0="FORCE_HIGHLIGHTING" />
|
||||||
</component>
|
</component>
|
||||||
<component name="MetaFilesCheckinStateConfiguration" checkMetaFiles="true" />
|
<component name="MetaFilesCheckinStateConfiguration" checkMetaFiles="true" />
|
||||||
@@ -77,30 +41,38 @@
|
|||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent"><![CDATA[{
|
<component name="PropertiesComponent">{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||||
"C++ Project.enginecustom.executor": "Run",
|
"C++ Project.enginecustom.executor": "Run",
|
||||||
"C/C++ Project.enginecustom.executor": "Run",
|
"C/C++ Project.enginecustom.executor": "Run",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"RunOnceActivity.git.unshallow": "true",
|
"RunOnceActivity.git.unshallow": "true",
|
||||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||||
"git-widget-placeholder": "main",
|
"git-widget-placeholder": "main",
|
||||||
"ignore.virus.scanning.warn.message": "true",
|
"ignore.virus.scanning.warn.message": "true",
|
||||||
"node.js.detected.package.eslint": "true",
|
"node.js.detected.package.eslint": "true",
|
||||||
"node.js.detected.package.tslint": "true",
|
"node.js.detected.package.tslint": "true",
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
"nodejs_package_manager_path": "npm",
|
"nodejs_package_manager_path": "npm",
|
||||||
"settings.editor.selected.configurable": "preferences.keymap",
|
"settings.editor.selected.configurable": "preferences.pluginManager",
|
||||||
"vue.rearranger.settings.migration": "true"
|
"vue.rearranger.settings.migration": "true"
|
||||||
|
},
|
||||||
|
"keyToStringList": {
|
||||||
|
"rider.external.source.directories": [
|
||||||
|
"C:\\Users\\arivas\\AppData\\Roaming\\JetBrains\\Rider2024.1\\resharper-host\\DecompilerCache",
|
||||||
|
"C:\\Users\\arivas\\AppData\\Roaming\\JetBrains\\Rider2024.1\\resharper-host\\SourcesCache",
|
||||||
|
"C:\\Users\\arivas\\AppData\\Local\\Symbols\\src"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}]]></component>
|
}</component>
|
||||||
<component name="RunManager" selected="C/C++ Project.enginecustom">
|
<component name="RunManager" selected="C++ Project.enginecustom">
|
||||||
<configuration name="KhaoticDemo" type="CppProject" factoryName="C++ Project">
|
<configuration name="KhaoticDemo" type="CppProject" factoryName="C++ Project">
|
||||||
<configuration_1 setup="1">
|
<configuration_1>
|
||||||
<option name="CONFIGURATION" value="Debug" />
|
<option name="CONFIGURATION" value="Debug" />
|
||||||
<option name="PLATFORM" value="x64" />
|
<option name="PLATFORM" value="x64" />
|
||||||
|
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/KhaoticDemo/KhaoticDemo.vcxproj" />
|
||||||
<option name="CURRENT_LAUNCH_PROFILE" value="Local" />
|
<option name="CURRENT_LAUNCH_PROFILE" value="Local" />
|
||||||
<option name="EXE_PATH" value="$(LocalDebuggerCommand)" />
|
<option name="EXE_PATH" value="$(LocalDebuggerCommand)" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="$(LocalDebuggerCommandArguments)" />
|
<option name="PROGRAM_PARAMETERS" value="$(LocalDebuggerCommandArguments)" />
|
||||||
@@ -108,19 +80,18 @@
|
|||||||
<option name="PASS_PARENT_ENVS" value="1" />
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||||
<option name="TERMINAL_INTERACTION_BEHAVIOR" value="AUTO_DETECT" />
|
<option name="TERMINAL_INTERACTION_BEHAVIOR" value="AUTO_DETECT" />
|
||||||
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/KhaoticDemo/KhaoticDemo.vcxproj" />
|
|
||||||
</configuration_1>
|
</configuration_1>
|
||||||
<option name="DEFAULT_PROJECT_PATH" value="$PROJECT_DIR$/KhaoticDemo/KhaoticDemo.vcxproj" />
|
<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" />
|
<option name="AUTO_SELECT_PRIORITY" value="0" />
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="Build" />
|
<option name="Build" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration name="enginecustom" type="CppProject" factoryName="C++ Project">
|
<configuration name="enginecustom" type="CppProject" factoryName="C++ Project">
|
||||||
<configuration_1 setup="1">
|
<configuration_1>
|
||||||
<option name="CONFIGURATION" value="Debug" />
|
<option name="CONFIGURATION" value="Debug" />
|
||||||
<option name="PLATFORM" value="x64" />
|
<option name="PLATFORM" value="x64" />
|
||||||
|
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/enginecustom/enginecustom.vcxproj" />
|
||||||
<option name="CURRENT_LAUNCH_PROFILE" value="Local" />
|
<option name="CURRENT_LAUNCH_PROFILE" value="Local" />
|
||||||
<option name="EXE_PATH" value="$(LocalDebuggerCommand)" />
|
<option name="EXE_PATH" value="$(LocalDebuggerCommand)" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="$(LocalDebuggerCommandArguments)" />
|
<option name="PROGRAM_PARAMETERS" value="$(LocalDebuggerCommandArguments)" />
|
||||||
@@ -128,10 +99,20 @@
|
|||||||
<option name="PASS_PARENT_ENVS" value="1" />
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||||
<option name="TERMINAL_INTERACTION_BEHAVIOR" value="AUTO_DETECT" />
|
<option name="TERMINAL_INTERACTION_BEHAVIOR" value="AUTO_DETECT" />
|
||||||
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/enginecustom/enginecustom.vcxproj" />
|
|
||||||
</configuration_1>
|
</configuration_1>
|
||||||
|
<configuration_2>
|
||||||
|
<option name="CONFIGURATION" value="Release" />
|
||||||
|
<option name="PLATFORM" value="x64" />
|
||||||
|
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/enginecustom/enginecustom.vcxproj" />
|
||||||
|
<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" />
|
||||||
|
</configuration_2>
|
||||||
<option name="DEFAULT_PROJECT_PATH" value="$PROJECT_DIR$/enginecustom/enginecustom.vcxproj" />
|
<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" />
|
<option name="AUTO_SELECT_PRIORITY" value="0" />
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="Build" />
|
<option name="Build" />
|
||||||
@@ -161,6 +142,22 @@
|
|||||||
<workItem from="1738358091089" duration="6675000" />
|
<workItem from="1738358091089" duration="6675000" />
|
||||||
<workItem from="1738364887298" duration="2275000" />
|
<workItem from="1738364887298" duration="2275000" />
|
||||||
<workItem from="1738515031789" duration="14018000" />
|
<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" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="Minor update - viewport window tweak">
|
<task id="LOCAL-00001" summary="Minor update - viewport window tweak">
|
||||||
<option name="closed" value="true" />
|
<option name="closed" value="true" />
|
||||||
@@ -203,4 +200,15 @@
|
|||||||
<MESSAGE value="Patch update - add menu button" />
|
<MESSAGE value="Patch update - add menu button" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="Patch update - add menu button" />
|
<option name="LAST_COMMIT_MESSAGE" value="Patch update - add menu button" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="XDebuggerManager">
|
||||||
|
<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>
|
</project>
|
8
enginecustom/TODO.txt
Normal file
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
|
@@ -4,28 +4,28 @@ Size=400,400
|
|||||||
Collapsed=0
|
Collapsed=0
|
||||||
|
|
||||||
[Window][Khaotic Engine]
|
[Window][Khaotic Engine]
|
||||||
Pos=1180,27
|
Pos=1233,27
|
||||||
Size=396,826
|
Size=343,826
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000005,0
|
DockId=0x00000005,0
|
||||||
|
|
||||||
[Window][Objects]
|
[Window][Objects]
|
||||||
Pos=8,27
|
Pos=8,27
|
||||||
Size=290,826
|
Size=522,826
|
||||||
Collapsed=0
|
|
||||||
DockId=0x0000000A,0
|
|
||||||
|
|
||||||
[Window][Terrain]
|
|
||||||
Pos=8,27
|
|
||||||
Size=290,487
|
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000009,0
|
DockId=0x00000009,0
|
||||||
|
|
||||||
|
[Window][Terrain]
|
||||||
|
Pos=8,27
|
||||||
|
Size=250,974
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000007,0
|
||||||
|
|
||||||
[Window][Light]
|
[Window][Light]
|
||||||
Pos=8,27
|
Pos=8,27
|
||||||
Size=290,487
|
Size=290,866
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000009,1
|
DockId=0x00000007,1
|
||||||
|
|
||||||
[Window][Shader Manager]
|
[Window][Shader Manager]
|
||||||
Pos=8,27
|
Pos=8,27
|
||||||
@@ -34,20 +34,20 @@ Collapsed=0
|
|||||||
DockId=0x00000001,2
|
DockId=0x00000001,2
|
||||||
|
|
||||||
[Window][Engine Settings]
|
[Window][Engine Settings]
|
||||||
Pos=1516,27
|
Pos=8,27
|
||||||
Size=396,974
|
Size=289,974
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000005,1
|
DockId=0x00000009,0
|
||||||
|
|
||||||
[Window][DockSpace Demo]
|
[Window][DockSpace Demo]
|
||||||
Size=1584,861
|
Size=1584,861
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
|
|
||||||
[Window][Render Window]
|
[Window][Render Window]
|
||||||
Pos=300,27
|
Pos=8,27
|
||||||
Size=878,826
|
Size=1559,974
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000002,0
|
DockId=0x00000009,0
|
||||||
|
|
||||||
[Window][DockSpace]
|
[Window][DockSpace]
|
||||||
Pos=0,0
|
Pos=0,0
|
||||||
@@ -66,24 +66,24 @@ Collapsed=0
|
|||||||
DockId=0x0000000C,0
|
DockId=0x0000000C,0
|
||||||
|
|
||||||
[Window][Log Window]
|
[Window][Log Window]
|
||||||
Pos=8,775
|
Pos=8,627
|
||||||
Size=1904,226
|
Size=1568,226
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x0000000E,0
|
DockId=0x00000006,0
|
||||||
|
|
||||||
[Docking][Data]
|
[Docking][Data]
|
||||||
DockSpace ID=0xC0DFADC4 Pos=8,27 Size=1568,826 Split=X
|
DockSpace ID=0xC0DFADC4 Pos=8,27 Size=1568,826 Split=X
|
||||||
DockNode ID=0x00000001 Parent=0xC0DFADC4 SizeRef=330,1094 Selected=0x393905AB
|
DockNode ID=0x00000001 Parent=0xC0DFADC4 SizeRef=330,1094 Selected=0x393905AB
|
||||||
DockNode ID=0x00000003 Parent=0xC0DFADC4 SizeRef=1700,1094 CentralNode=1
|
DockNode ID=0x00000003 Parent=0xC0DFADC4 SizeRef=1700,1094 CentralNode=1
|
||||||
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=8,27 Size=1568,826 Split=Y
|
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=8,27 Size=1568,826 Split=X
|
||||||
DockNode ID=0x0000000D Parent=0xCCBD8CF7 SizeRef=1568,598 Split=Y
|
DockNode ID=0x00000009 Parent=0xCCBD8CF7 SizeRef=522,974 Selected=0x031DC75C
|
||||||
DockNode ID=0x0000000B Parent=0x0000000D SizeRef=1568,637 Split=X
|
DockNode ID=0x0000000D Parent=0xCCBD8CF7 SizeRef=1044,974 Split=X
|
||||||
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=290,826 Split=Y Selected=0x393905AB
|
DockNode ID=0x00000002 Parent=0x0000000D SizeRef=699,826 Split=Y
|
||||||
DockNode ID=0x00000009 Parent=0x00000007 SizeRef=395,413 Selected=0x393905AB
|
DockNode ID=0x00000004 Parent=0x00000002 SizeRef=2032,866 Split=Y
|
||||||
DockNode ID=0x0000000A Parent=0x00000007 SizeRef=395,411 Selected=0x031DC75C
|
DockNode ID=0x0000000B Parent=0x00000004 SizeRef=1568,637 Split=X
|
||||||
DockNode ID=0x00000008 Parent=0x0000000B SizeRef=1276,826 Split=X
|
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=250,826 Selected=0x393905AB
|
||||||
DockNode ID=0x00000002 Parent=0x00000008 SizeRef=878,826 CentralNode=1 Selected=0x9204953B
|
DockNode ID=0x00000008 Parent=0x0000000B SizeRef=971,826 CentralNode=1 Selected=0x031DC75C
|
||||||
DockNode ID=0x00000005 Parent=0x00000008 SizeRef=396,826 Selected=0x9F035453
|
DockNode ID=0x0000000C Parent=0x00000004 SizeRef=1568,335 Selected=0x139FDA3F
|
||||||
DockNode ID=0x0000000C Parent=0x0000000D SizeRef=1568,335 Selected=0x139FDA3F
|
DockNode ID=0x00000006 Parent=0x00000002 SizeRef=2032,226 Selected=0xAB74BEE9
|
||||||
DockNode ID=0x0000000E Parent=0xCCBD8CF7 SizeRef=1568,226 Selected=0xAB74BEE9
|
DockNode ID=0x00000005 Parent=0x0000000D SizeRef=343,826 Selected=0x9F035453
|
||||||
|
|
||||||
|
1
enginecustom/assets/empty.ker
Normal file
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
|
35
enginecustom/assets/imgui.ini
Normal file
35
enginecustom/assets/imgui.ini
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
[Window][DockSpace]
|
||||||
|
Pos=0,0
|
||||||
|
Size=1584,861
|
||||||
|
Collapsed=0
|
||||||
|
|
||||||
|
[Window][Debug##Default]
|
||||||
|
Pos=60,60
|
||||||
|
Size=400,400
|
||||||
|
Collapsed=0
|
||||||
|
|
||||||
|
[Window][Khaotic Engine]
|
||||||
|
Pos=1223,27
|
||||||
|
Size=353,826
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000002,0
|
||||||
|
|
||||||
|
[Window][Objects]
|
||||||
|
Pos=8,27
|
||||||
|
Size=345,826
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000003,0
|
||||||
|
|
||||||
|
[Window][Engine Settings]
|
||||||
|
Pos=1223,27
|
||||||
|
Size=353,826
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000002,1
|
||||||
|
|
||||||
|
[Docking][Data]
|
||||||
|
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=8,27 Size=1568,826 Split=X
|
||||||
|
DockNode ID=0x00000003 Parent=0xCCBD8CF7 SizeRef=345,826 Selected=0x031DC75C
|
||||||
|
DockNode ID=0x00000004 Parent=0xCCBD8CF7 SizeRef=1221,826 Split=X
|
||||||
|
DockNode ID=0x00000001 Parent=0x00000004 SizeRef=866,826 CentralNode=1
|
||||||
|
DockNode ID=0x00000002 Parent=0x00000004 SizeRef=353,826 Selected=0x0B098C4B
|
||||||
|
|
0
enginecustom/assets/scene.ker
Normal file
0
enginecustom/assets/scene.ker
Normal file
@@ -123,6 +123,7 @@
|
|||||||
<ClInclude Include="src\inc\system\physics.h" />
|
<ClInclude Include="src\inc\system\physics.h" />
|
||||||
<ClInclude Include="src\inc\system\Positionclass.h" />
|
<ClInclude Include="src\inc\system\Positionclass.h" />
|
||||||
<ClInclude Include="src\inc\system\rendertextureclass.h" />
|
<ClInclude Include="src\inc\system\rendertextureclass.h" />
|
||||||
|
<ClInclude Include="src\inc\system\sceneManager.h" />
|
||||||
<ClInclude Include="src\inc\system\Spriteclass.h" />
|
<ClInclude Include="src\inc\system\Spriteclass.h" />
|
||||||
<ClInclude Include="src\inc\system\systemclass.h" />
|
<ClInclude Include="src\inc\system\systemclass.h" />
|
||||||
<ClInclude Include="src\inc\system\textclass.h" />
|
<ClInclude Include="src\inc\system\textclass.h" />
|
||||||
@@ -133,130 +134,162 @@
|
|||||||
<CopyFileToFolders Include="src\hlsl\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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\celshading.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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\celshading.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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\Color.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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\Color.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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\font.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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\font.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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\light.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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\light.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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\lightmap.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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\lightmap.vs">
|
<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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\Multitexture.ps">
|
<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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\Multitexture.vs">
|
<CopyFileToFolders Include="src\hlsl\Multitexture.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\normalmap.ps">
|
<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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\normalmap.vs">
|
<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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\reflection.ps">
|
<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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\reflection.vs">
|
<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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\refraction.ps">
|
<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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\refraction.vs">
|
<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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\specmap.ps">
|
<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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\specmap.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)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\sunlight.ps">
|
<CopyFileToFolders Include="src\hlsl\sunlight.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\sunlight.vs">
|
<CopyFileToFolders Include="src\hlsl\sunlight.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\texture.ps">
|
<CopyFileToFolders Include="src\hlsl\texture.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\texture.vs">
|
<CopyFileToFolders Include="src\hlsl\texture.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\translate.ps">
|
<CopyFileToFolders Include="src\hlsl\translate.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\translate.vs">
|
<CopyFileToFolders Include="src\hlsl\translate.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\transparent.ps">
|
<CopyFileToFolders Include="src\hlsl\transparent.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\transparent.vs">
|
<CopyFileToFolders Include="src\hlsl\transparent.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\water.ps">
|
<CopyFileToFolders Include="src\hlsl\water.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\water.vs">
|
<CopyFileToFolders Include="src\hlsl\water.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
<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>
|
||||||
@@ -351,21 +384,27 @@
|
|||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Skybox\skybox_back.png">
|
<CopyFileToFolders Include="assets\Skybox\skybox_back.png">
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Skybox\</DestinationFolders>
|
<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\Skybox\skybox_bottom.png">
|
<CopyFileToFolders Include="assets\Skybox\skybox_bottom.png">
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Skybox\</DestinationFolders>
|
<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\Skybox\skybox_front.png">
|
<CopyFileToFolders Include="assets\Skybox\skybox_front.png">
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Skybox\</DestinationFolders>
|
<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\Skybox\skybox_left.png">
|
<CopyFileToFolders Include="assets\Skybox\skybox_left.png">
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Skybox\</DestinationFolders>
|
<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\Skybox\skybox_right.png">
|
<CopyFileToFolders Include="assets\Skybox\skybox_right.png">
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Skybox\</DestinationFolders>
|
<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\Skybox\skybox_top.png">
|
<CopyFileToFolders Include="assets\Skybox\skybox_top.png">
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Skybox\</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Skybox\</DestinationFolders>
|
||||||
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Skybox\</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<Image Include="KhaoticIcon.ico" />
|
<Image Include="KhaoticIcon.ico" />
|
||||||
<CopyFileToFolders Include="sprite01.tga" />
|
<CopyFileToFolders Include="sprite01.tga" />
|
||||||
@@ -455,6 +494,9 @@
|
|||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="TODO.txt" />
|
||||||
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<VCProjectVersion>17.0</VCProjectVersion>
|
<VCProjectVersion>17.0</VCProjectVersion>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
@@ -389,6 +389,9 @@
|
|||||||
<ClInclude Include="src\inc\system\Timerclass.h">
|
<ClInclude Include="src\inc\system\Timerclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête\System</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\inc\system\sceneManager.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Image Include="KhaoticIcon.ico">
|
<Image Include="KhaoticIcon.ico">
|
||||||
|
@@ -11,21 +11,21 @@ DockId=0x00000005,0
|
|||||||
|
|
||||||
[Window][Objects]
|
[Window][Objects]
|
||||||
Pos=8,27
|
Pos=8,27
|
||||||
Size=290,826
|
Size=289,826
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x0000000A,0
|
DockId=0x00000009,0
|
||||||
|
|
||||||
[Window][Terrain]
|
[Window][Terrain]
|
||||||
Pos=8,27
|
Pos=8,27
|
||||||
Size=290,866
|
Size=250,974
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000009,0
|
DockId=0x00000007,0
|
||||||
|
|
||||||
[Window][Light]
|
[Window][Light]
|
||||||
Pos=8,27
|
Pos=8,27
|
||||||
Size=290,866
|
Size=290,866
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000009,1
|
DockId=0x00000007,1
|
||||||
|
|
||||||
[Window][Shader Manager]
|
[Window][Shader Manager]
|
||||||
Pos=8,27
|
Pos=8,27
|
||||||
@@ -34,10 +34,10 @@ Collapsed=0
|
|||||||
DockId=0x00000001,2
|
DockId=0x00000001,2
|
||||||
|
|
||||||
[Window][Engine Settings]
|
[Window][Engine Settings]
|
||||||
Pos=1187,27
|
Pos=8,27
|
||||||
Size=389,826
|
Size=289,974
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000008,1
|
DockId=0x00000009,0
|
||||||
|
|
||||||
[Window][DockSpace Demo]
|
[Window][DockSpace Demo]
|
||||||
Size=1584,861
|
Size=1584,861
|
||||||
@@ -45,9 +45,9 @@ Collapsed=0
|
|||||||
|
|
||||||
[Window][Render Window]
|
[Window][Render Window]
|
||||||
Pos=8,27
|
Pos=8,27
|
||||||
Size=1223,826
|
Size=1559,974
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000008,0
|
DockId=0x00000009,0
|
||||||
|
|
||||||
[Window][DockSpace]
|
[Window][DockSpace]
|
||||||
Pos=0,0
|
Pos=0,0
|
||||||
@@ -75,15 +75,15 @@ DockId=0x00000006,0
|
|||||||
DockSpace ID=0xC0DFADC4 Pos=8,27 Size=1568,826 Split=X
|
DockSpace ID=0xC0DFADC4 Pos=8,27 Size=1568,826 Split=X
|
||||||
DockNode ID=0x00000001 Parent=0xC0DFADC4 SizeRef=330,1094 Selected=0x393905AB
|
DockNode ID=0x00000001 Parent=0xC0DFADC4 SizeRef=330,1094 Selected=0x393905AB
|
||||||
DockNode ID=0x00000003 Parent=0xC0DFADC4 SizeRef=1700,1094 CentralNode=1
|
DockNode ID=0x00000003 Parent=0xC0DFADC4 SizeRef=1700,1094 CentralNode=1
|
||||||
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=8,27 Size=1568,826 Split=X
|
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=8,27 Size=1568,826 Split=Y
|
||||||
DockNode ID=0x00000002 Parent=0xCCBD8CF7 SizeRef=1223,826 Split=Y
|
DockNode ID=0x00000004 Parent=0xCCBD8CF7 SizeRef=1568,598 Split=X
|
||||||
DockNode ID=0x00000004 Parent=0x00000002 SizeRef=2032,866 Split=Y
|
DockNode ID=0x00000009 Parent=0x00000004 SizeRef=289,974 Selected=0x031DC75C
|
||||||
DockNode ID=0x0000000B Parent=0x00000004 SizeRef=1568,637 Split=X
|
DockNode ID=0x0000000D Parent=0x00000004 SizeRef=1613,974 Split=X
|
||||||
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=290,826 Split=Y Selected=0x393905AB
|
DockNode ID=0x00000002 Parent=0x0000000D SizeRef=1268,826 Split=Y
|
||||||
DockNode ID=0x00000009 Parent=0x00000007 SizeRef=395,413 Selected=0x321620B2
|
DockNode ID=0x0000000B Parent=0x00000002 SizeRef=1568,637 Split=X
|
||||||
DockNode ID=0x0000000A Parent=0x00000007 SizeRef=395,411 Selected=0x031DC75C
|
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=250,826 Selected=0x393905AB
|
||||||
DockNode ID=0x00000008 Parent=0x0000000B SizeRef=1276,826 CentralNode=1 Selected=0x9204953B
|
DockNode ID=0x00000008 Parent=0x0000000B SizeRef=971,826 CentralNode=1 Selected=0x031DC75C
|
||||||
DockNode ID=0x0000000C Parent=0x00000004 SizeRef=1568,335 Selected=0x139FDA3F
|
DockNode ID=0x0000000C Parent=0x00000002 SizeRef=1568,335 Selected=0x139FDA3F
|
||||||
DockNode ID=0x00000006 Parent=0x00000002 SizeRef=2032,226 Selected=0xAB74BEE9
|
DockNode ID=0x00000005 Parent=0x0000000D SizeRef=343,826 Selected=0x9F035453
|
||||||
DockNode ID=0x00000005 Parent=0xCCBD8CF7 SizeRef=343,826 Selected=0x9F035453
|
DockNode ID=0x00000006 Parent=0xCCBD8CF7 SizeRef=1568,226 Selected=0xAB74BEE9
|
||||||
|
|
||||||
|
Binary file not shown.
@@ -28,10 +28,10 @@ float4 FontPixelShader(PixelInputType input) : SV_TARGET
|
|||||||
// Sample the texture pixel at this location.
|
// Sample the texture pixel at this location.
|
||||||
color = shaderTexture.Sample(SampleType, input.tex);
|
color = shaderTexture.Sample(SampleType, input.tex);
|
||||||
|
|
||||||
// If the color is black on the texture then treat this pixel as transparent.
|
// If the color is black on the texture then discard this pixel.
|
||||||
if (color.r == 0.0f && color.g == 0.0f && color.b == 0.0f)
|
if (color.r == 0.0f && color.g == 0.0f && color.b == 0.0f)
|
||||||
{
|
{
|
||||||
return color / color;
|
discard;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the color is other than black on the texture then this is a pixel in the font so draw it using the font pixel color.
|
// If the color is other than black on the texture then this is a pixel in the font so draw it using the font pixel color.
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
#include "reflectionshaderclass.h"
|
#include "reflectionshaderclass.h"
|
||||||
#include "physics.h"
|
#include "physics.h"
|
||||||
#include "frustum.h"
|
#include "frustum.h"
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
#include <WICTextureLoader.h>
|
#include <WICTextureLoader.h>
|
||||||
#include <comdef.h> // Pour _com_error
|
#include <comdef.h> // Pour _com_error
|
||||||
@@ -92,7 +93,7 @@ public:
|
|||||||
std::vector<Object*> GetCubes() const { return m_cubes; };
|
std::vector<Object*> GetCubes() const { return m_cubes; };
|
||||||
std::vector<Object*> GetTerrainCubes() const { return m_terrainChunk; };
|
std::vector<Object*> GetTerrainCubes() const { return m_terrainChunk; };
|
||||||
std::vector<Object*> GetKobjects() const { return m_object; };
|
std::vector<Object*> GetKobjects() const { return m_object; };
|
||||||
void AddKobject(WCHAR* filepath);
|
void AddKobject(std::wstring& filepath);
|
||||||
void SetPath(WCHAR* path) { m_path = path; };
|
void SetPath(WCHAR* path) { m_path = path; };
|
||||||
void SetWFolder(std::filesystem::path WFolder) { m_WFolder = WFolder; };
|
void SetWFolder(std::filesystem::path WFolder) { m_WFolder = WFolder; };
|
||||||
|
|
||||||
@@ -145,6 +146,15 @@ public:
|
|||||||
void SetCanFixedUpdate(bool canFixedUpdate) { CanFixedUpdate = canFixedUpdate; };
|
void SetCanFixedUpdate(bool canFixedUpdate) { CanFixedUpdate = canFixedUpdate; };
|
||||||
|
|
||||||
ID3D11ShaderResourceView* GetBackBufferSRV() const {return m_BackBufferSRV;};
|
ID3D11ShaderResourceView* GetBackBufferSRV() const {return m_BackBufferSRV;};
|
||||||
|
|
||||||
|
// Save and load scene
|
||||||
|
void SaveScene();
|
||||||
|
void LoadScene();
|
||||||
|
|
||||||
|
void SetScenePath(std::string path) { m_scenePath = path; };
|
||||||
|
std::wstring GetScenePath();
|
||||||
|
|
||||||
|
std::string ConvertWStringToString(const std::wstring& wstr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool Render(float, float, float, float, float);
|
bool Render(float, float, float, float, float);
|
||||||
@@ -160,7 +170,7 @@ private:
|
|||||||
void ConstructSkybox(); // Construct the skybox
|
void ConstructSkybox(); // Construct the skybox
|
||||||
void UpdateSkyboxPosition(); // Update the skybox position
|
void UpdateSkyboxPosition(); // Update the skybox position
|
||||||
bool RenderSkybox(XMMATRIX view, XMMATRIX projection); // Render the skybox
|
bool RenderSkybox(XMMATRIX view, XMMATRIX projection); // Render the skybox
|
||||||
|
|
||||||
public :
|
public :
|
||||||
std::vector<ID3D11ShaderResourceView*> textures;
|
std::vector<ID3D11ShaderResourceView*> textures;
|
||||||
std::vector<ID3D11ShaderResourceView*> m_SkyboxTextures;
|
std::vector<ID3D11ShaderResourceView*> m_SkyboxTextures;
|
||||||
@@ -180,6 +190,8 @@ private :
|
|||||||
HWND m_hwnd;
|
HWND m_hwnd;
|
||||||
bool m_windowed;
|
bool m_windowed;
|
||||||
|
|
||||||
|
std::string m_scenePath;
|
||||||
|
|
||||||
// ------------------------------------- //
|
// ------------------------------------- //
|
||||||
// ------------- RENDERING ------------- //
|
// ------------- RENDERING ------------- //
|
||||||
// ------------------------------------- //
|
// ------------------------------------- //
|
||||||
@@ -202,6 +214,7 @@ private :
|
|||||||
std::vector<Object*> m_terrainChunk;
|
std::vector<Object*> m_terrainChunk;
|
||||||
float m_speed = 0.1f; // speed for the demo spinning object
|
float m_speed = 0.1f; // speed for the demo spinning object
|
||||||
std::vector<Object*> m_object;
|
std::vector<Object*> m_object;
|
||||||
|
std::vector<Object*> m_ImportedObject;
|
||||||
int m_ObjectId = 0;
|
int m_ObjectId = 0;
|
||||||
std::vector<std::reference_wrapper<std::vector<Object*>>> m_RenderQueues;
|
std::vector<std::reference_wrapper<std::vector<Object*>>> m_RenderQueues;
|
||||||
std::vector<Object*> m_Skybox;
|
std::vector<Object*> m_Skybox;
|
||||||
|
@@ -2,7 +2,8 @@
|
|||||||
#ifndef _IMGUI_MANAGER_H_
|
#ifndef _IMGUI_MANAGER_H_
|
||||||
#define _IMGUI_MANAGER_H_
|
#define _IMGUI_MANAGER_H_
|
||||||
|
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
|
#include "sceneManager.h"
|
||||||
|
|
||||||
#include <imgui.h>
|
#include <imgui.h>
|
||||||
#include <imgui_impl_dx11.h>
|
#include <imgui_impl_dx11.h>
|
||||||
@@ -23,7 +24,7 @@ public:
|
|||||||
void Shutdown();
|
void Shutdown();
|
||||||
void Render(ApplicationClass* app);
|
void Render(ApplicationClass* app);
|
||||||
void NewFrame();
|
void NewFrame();
|
||||||
void SetupDockspace();
|
void SetupDockspace(ApplicationClass* app);
|
||||||
|
|
||||||
// Widgets
|
// Widgets
|
||||||
void WidgetSpeedSlider(float* speed);
|
void WidgetSpeedSlider(float* speed);
|
||||||
@@ -61,7 +62,7 @@ private:
|
|||||||
bool showObjectWindow;
|
bool showObjectWindow;
|
||||||
bool showTerrainWindow;
|
bool showTerrainWindow;
|
||||||
bool showLightWindow;
|
bool showLightWindow;
|
||||||
bool showShaderWindow;
|
bool showOldSceneWindow;
|
||||||
bool showEngineSettingsWindow;
|
bool showEngineSettingsWindow;
|
||||||
bool showLogWindow;
|
bool showLogWindow;
|
||||||
|
|
||||||
|
@@ -50,6 +50,8 @@ public:
|
|||||||
bool IsSPressed() const;
|
bool IsSPressed() const;
|
||||||
bool IsQPressed() const;
|
bool IsQPressed() const;
|
||||||
bool IsEPressed()const;
|
bool IsEPressed()const;
|
||||||
|
bool IsTildePressed() const;
|
||||||
|
bool IsTildeReleased() const;
|
||||||
|
|
||||||
bool IsKeyDown(unsigned int) const;
|
bool IsKeyDown(unsigned int) const;
|
||||||
|
|
||||||
@@ -69,6 +71,7 @@ private:
|
|||||||
DIMOUSESTATE m_mouseState;
|
DIMOUSESTATE m_mouseState;
|
||||||
|
|
||||||
int m_screenWidth, m_screenHeight, m_mouseX, m_mouseY;
|
int m_screenWidth, m_screenHeight, m_mouseX, m_mouseY;
|
||||||
|
bool m_previousTildeState;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -10,6 +10,20 @@ enum class ObjectType
|
|||||||
Unknown
|
Unknown
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class ShaderType
|
||||||
|
{
|
||||||
|
CEL_SHADING,
|
||||||
|
LIGHTING,
|
||||||
|
NORMAL_MAPPING,
|
||||||
|
SPECULAR_MAPPING,
|
||||||
|
REFLECTION,
|
||||||
|
REFRACTION,
|
||||||
|
TEXTURE,
|
||||||
|
SKYBOX,
|
||||||
|
SUNLIGHT,
|
||||||
|
ALPHA_MAPPING
|
||||||
|
};
|
||||||
|
|
||||||
class Object : public ModelClass
|
class Object : public ModelClass
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -63,27 +77,23 @@ public:
|
|||||||
void SetName(std::string name);
|
void SetName(std::string name);
|
||||||
int SetId(int id);
|
int SetId(int id);
|
||||||
int GetId() const;
|
int GetId() const;
|
||||||
void SetType(ObjectType type) { m_type = type; };
|
void SetType(ObjectType type);
|
||||||
ObjectType GetType() const { return m_type; };
|
ObjectType GetType() const { return m_type; };
|
||||||
|
|
||||||
|
|
||||||
enum ShaderType
|
|
||||||
{
|
|
||||||
CEL_SHADING,
|
|
||||||
LIGHTING,
|
|
||||||
NORMAL_MAPPING,
|
|
||||||
SPECULAR_MAPPING,
|
|
||||||
REFLECTION,
|
|
||||||
REFRACTION,
|
|
||||||
TEXTURE,
|
|
||||||
SKYBOX,
|
|
||||||
SUNLIGHT
|
|
||||||
};
|
|
||||||
|
|
||||||
ShaderType GetActiveShader() const { return m_activeShader; };
|
ShaderType GetActiveShader() const { return m_activeShader; };
|
||||||
void SetActiveShader(ShaderType activeShader) { m_activeShader = activeShader; };
|
void SetActiveShader(ShaderType activeShader) { m_activeShader = activeShader; };
|
||||||
|
|
||||||
float GetBoundingRadius() const;
|
float GetBoundingRadius() const;
|
||||||
|
void SetBoundingRadius(float radius) { m_boundingRadius = radius; }
|
||||||
|
|
||||||
|
void SetModelPath(std::wstring& path) { m_modelPath = path; }
|
||||||
|
std::wstring& GetModelPath() { return m_modelPath; }
|
||||||
|
|
||||||
|
ShaderType StringToShaderType(const std::string& shaderType);
|
||||||
|
std::string ShaderTypeToString(ShaderType shaderType);
|
||||||
|
|
||||||
|
ObjectType StringToObjectType(const std::string& objectType);
|
||||||
|
std::string ObjectTypeToString(ObjectType objectType);
|
||||||
|
|
||||||
public :
|
public :
|
||||||
bool m_demoSpinning = false;
|
bool m_demoSpinning = false;
|
||||||
@@ -105,8 +115,10 @@ private:
|
|||||||
|
|
||||||
std::string m_name;
|
std::string m_name;
|
||||||
ObjectType m_type = ObjectType::Unknown;
|
ObjectType m_type = ObjectType::Unknown;
|
||||||
|
|
||||||
|
|
||||||
ShaderType m_activeShader = LIGHTING;
|
ShaderType m_activeShader = ShaderType::LIGHTING;
|
||||||
|
|
||||||
float m_boundingRadius;
|
float m_boundingRadius;
|
||||||
|
std::wstring m_modelPath;
|
||||||
};
|
};
|
||||||
|
40
enginecustom/src/inc/system/sceneManager.h
Normal file
40
enginecustom/src/inc/system/sceneManager.h
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
class sceneManager
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static sceneManager& Get()
|
||||||
|
{
|
||||||
|
static sceneManager instance;
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
sceneManager(sceneManager const&) = delete;
|
||||||
|
void operator=(sceneManager const&) = delete;
|
||||||
|
|
||||||
|
void SetSceneFilePath(const std::string& path) { m_sceneFilePath = path; }
|
||||||
|
void SetSceneFileName(const std::string& name) { m_sceneFileName = name; }
|
||||||
|
|
||||||
|
bool SaveScene()
|
||||||
|
{
|
||||||
|
// Implement the save scene logic here
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool LoadScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
// Implement the load scene logic here
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
sceneManager() = default;
|
||||||
|
~sceneManager() = default;
|
||||||
|
|
||||||
|
// Scene file path
|
||||||
|
std::string m_sceneFilePath;
|
||||||
|
std::string m_sceneFileName;
|
||||||
|
};
|
@@ -3,12 +3,17 @@
|
|||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
|
||||||
|
static bool DEBUG_MODE = true;
|
||||||
|
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
|
|
||||||
#include "inputclass.h"
|
#include "inputclass.h"
|
||||||
#include "applicationclass.h"
|
#include "applicationclass.h"
|
||||||
#include "imguiManager.h"
|
#include "imguiManager.h"
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
#include <filesystem>
|
||||||
|
#include <commdlg.h>
|
||||||
|
|
||||||
#include "../resources.h"
|
#include "../resources.h"
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
@@ -27,7 +32,9 @@ public:
|
|||||||
|
|
||||||
void SendPath(wchar_t* path, std::filesystem::path WFolder);
|
void SendPath(wchar_t* path, std::filesystem::path WFolder);
|
||||||
|
|
||||||
private:
|
void GetScenePath();
|
||||||
|
|
||||||
|
protected:
|
||||||
bool Frame();
|
bool Frame();
|
||||||
void InitializeWindows(int&, int&);
|
void InitializeWindows(int&, int&);
|
||||||
void ShutdownWindows();
|
void ShutdownWindows();
|
||||||
@@ -45,6 +52,7 @@ private:
|
|||||||
int m_initialWindowHeight;
|
int m_initialWindowHeight;
|
||||||
bool m_isDirect3DInitialized;
|
bool m_isDirect3DInitialized;
|
||||||
bool m_isResizing = false;
|
bool m_isResizing = false;
|
||||||
|
bool m_IsDebugKeyPressed = false;
|
||||||
|
|
||||||
std::mutex renderMutex;
|
std::mutex renderMutex;
|
||||||
};
|
};
|
||||||
|
@@ -62,12 +62,16 @@ bool SystemClass::Initialize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize imgui
|
// Initialize imgui
|
||||||
m_imguiManager = new imguiManager;
|
if(DEBUG_MODE)
|
||||||
result = m_imguiManager->Initialize(m_hwnd, m_Application->GetDirect3D()->GetDevice(), m_Application->GetDirect3D()->GetDeviceContext());
|
|
||||||
if (!result)
|
|
||||||
{
|
{
|
||||||
return false;
|
m_imguiManager = new imguiManager;
|
||||||
|
result = m_imguiManager->Initialize(m_hwnd, m_Application->GetDirect3D()->GetDevice(), m_Application->GetDirect3D()->GetDeviceContext());
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (const std::exception& e)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
@@ -144,6 +148,64 @@ void SystemClass::Run()
|
|||||||
// Loop until there is a quit message from the window or the user.
|
// Loop until there is a quit message from the window or the user.
|
||||||
done = false;
|
done = false;
|
||||||
|
|
||||||
|
|
||||||
|
// Ask if the user wants to load a scene or create a new one
|
||||||
|
int result_scene = MessageBox(NULL, L"Do you want to load a saved scene?", L"Load Scene", MB_YESNO | MB_ICONQUESTION);
|
||||||
|
if (result_scene == IDYES)
|
||||||
|
{
|
||||||
|
m_Application->LoadScene();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OPENFILENAME ofn;
|
||||||
|
wchar_t szFile[260] = L"";
|
||||||
|
ZeroMemory(&ofn, sizeof(ofn));
|
||||||
|
ofn.lStructSize = sizeof(ofn);
|
||||||
|
ofn.hwndOwner = m_hwnd;
|
||||||
|
ofn.lpstrFile = szFile;
|
||||||
|
ofn.nMaxFile = sizeof(szFile);
|
||||||
|
// Allow multiple extensions
|
||||||
|
ofn.lpstrFilter = L"Ker Scene (*.ker)\0*.ker\0All Files (*.*)\0*.*\0";
|
||||||
|
ofn.nFilterIndex = 1;
|
||||||
|
ofn.lpstrFileTitle = NULL;
|
||||||
|
ofn.nMaxFileTitle = 0;
|
||||||
|
ofn.lpstrInitialDir = NULL;
|
||||||
|
ofn.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT;
|
||||||
|
|
||||||
|
if (GetSaveFileName(&ofn) == TRUE)
|
||||||
|
{
|
||||||
|
std::filesystem::path filepath = ofn.lpstrFile;
|
||||||
|
std::string path = filepath.string();
|
||||||
|
|
||||||
|
// Add the selected extension if not already present
|
||||||
|
switch (ofn.nFilterIndex)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
if (filepath.extension() != L".ker")
|
||||||
|
path += ".ker";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (filepath.extension() != L".txt")
|
||||||
|
path += ".txt";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_Application->SetScenePath(path);
|
||||||
|
// Create a new scene file
|
||||||
|
std::ofstream outFile(path);
|
||||||
|
if (outFile.is_open())
|
||||||
|
{
|
||||||
|
// Initialize the new scene file with default content if needed
|
||||||
|
outFile.close();
|
||||||
|
Logger::Get().Log("New scene file created successfully", __FILE__, __LINE__, Logger::LogLevel::Info);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger::Get().Log("Failed to create new scene file", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
while (!done)
|
while (!done)
|
||||||
{
|
{
|
||||||
// Handle the windows messages.
|
// Handle the windows messages.
|
||||||
@@ -206,13 +268,30 @@ bool SystemClass::Frame()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render ImGui
|
if(!m_Input->IsKeyDown(222))
|
||||||
result = m_imguiManager->ImGuiWidgetRenderer(m_Application);
|
|
||||||
if (!result)
|
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to render ImGui widgets", __FILE__, __LINE__, Logger::LogLevel::Error);
|
//log the key press
|
||||||
return false;
|
m_IsDebugKeyPressed = false;
|
||||||
}
|
}
|
||||||
|
else if (m_Input->IsKeyDown(222) && !m_IsDebugKeyPressed)
|
||||||
|
{
|
||||||
|
// Log the key release state
|
||||||
|
m_IsDebugKeyPressed = true;
|
||||||
|
DEBUG_MODE = !DEBUG_MODE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (DEBUG_MODE)
|
||||||
|
{
|
||||||
|
// Render ImGui
|
||||||
|
result = m_imguiManager->ImGuiWidgetRenderer(m_Application);
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
Logger::Get().Log("Failed to render ImGui widgets", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
m_Application->GetDirect3D()->EndScene();
|
m_Application->GetDirect3D()->EndScene();
|
||||||
|
|
||||||
@@ -291,7 +370,7 @@ LRESULT CALLBACK SystemClass::MessageHandler(HWND hwnd, UINT umsg, WPARAM wparam
|
|||||||
if (extension == L"txt" || extension == L"kobj") {
|
if (extension == L"txt" || extension == L"kobj") {
|
||||||
// Handle dropped files with valid extensions
|
// Handle dropped files with valid extensions
|
||||||
std::wcout << L"File dropped: " << filePath << std::endl;
|
std::wcout << L"File dropped: " << filePath << std::endl;
|
||||||
m_Application->AddKobject(filePath);
|
m_Application->AddKobject(fileName);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Handle files with invalid extensions (optional)
|
// Handle files with invalid extensions (optional)
|
||||||
@@ -466,5 +545,4 @@ void SystemClass::SendPath(wchar_t* path, std::filesystem::path WFolder)
|
|||||||
{
|
{
|
||||||
m_Application->SetPath(path);
|
m_Application->SetPath(path);
|
||||||
m_Application->SetWFolder(WFolder);
|
m_Application->SetWFolder(WFolder);
|
||||||
}
|
}
|
||||||
|
|
@@ -1,5 +1,7 @@
|
|||||||
#include "applicationclass.h"
|
#include "applicationclass.h"
|
||||||
|
|
||||||
|
#include "systemclass.h"
|
||||||
|
|
||||||
ApplicationClass::ApplicationClass() : m_ShouldQuit(false)
|
ApplicationClass::ApplicationClass() : m_ShouldQuit(false)
|
||||||
{
|
{
|
||||||
m_Direct3D = nullptr;
|
m_Direct3D = nullptr;
|
||||||
@@ -989,14 +991,23 @@ bool ApplicationClass::Render(float rotation, float x, float y, float z, float t
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Redimensionner la texture de rendu si n<>cessaire
|
// Redimensionner la texture de rendu si n<>cessaire
|
||||||
if ((float)m_SceneTexture->GetTextureWidth() != windowSize.x || (float)m_SceneTexture->GetTextureHeight() != windowSize.y)
|
if (DEBUG_MODE)
|
||||||
{
|
{
|
||||||
m_SceneTexture->Shutdown();
|
if ((float)m_SceneTexture->GetTextureWidth() != windowSize.x || (float)m_SceneTexture->GetTextureHeight() != windowSize.y)
|
||||||
m_SceneTexture->Initialize(m_Direct3D->GetDevice(), (int)windowSize.x, (int)windowSize.y, SCREEN_DEPTH, SCREEN_NEAR, 1);
|
{
|
||||||
}
|
m_SceneTexture->Shutdown();
|
||||||
|
m_SceneTexture->Initialize(m_Direct3D->GetDevice(), (int)windowSize.x, (int)windowSize.y, SCREEN_DEPTH, SCREEN_NEAR, 1);
|
||||||
|
}
|
||||||
|
|
||||||
m_SceneTexture->SetRenderTarget(m_Direct3D->GetDeviceContext());
|
m_Direct3D->SetBackBufferRenderTarget();
|
||||||
m_SceneTexture->ClearRenderTarget(m_Direct3D->GetDeviceContext(), 0.0f, 0.0f, 0.0f, 1.0f);
|
m_Direct3D->ResetViewport();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// CPT ALED C'EST ICI QUE CA SE PASSE ///
|
||||||
|
|
||||||
|
|
||||||
|
//m_SceneTexture->SetRenderTarget(m_Direct3D->GetDeviceContext());
|
||||||
|
//m_SceneTexture->ClearRenderTarget(m_Direct3D->GetDeviceContext(), 0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
|
|
||||||
scaleMatrix = XMMatrixScaling(0.5f, 0.5f, 0.5f); // Build the scaling matrix.
|
scaleMatrix = XMMatrixScaling(0.5f, 0.5f, 0.5f); // Build the scaling matrix.
|
||||||
rotateMatrix = XMMatrixRotationY(rotation); // Build the rotation matrix.
|
rotateMatrix = XMMatrixRotationY(rotation); // Build the rotation matrix.
|
||||||
@@ -1186,7 +1197,7 @@ bool ApplicationClass::Render(float rotation, float x, float y, float z, float t
|
|||||||
Logger::Get().Log("Could not render the model using the alpha map shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Could not render the model using the alpha map shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup matrices.
|
// Setup matrices.
|
||||||
rotateMatrix = XMMatrixRotationY(rotation);
|
rotateMatrix = XMMatrixRotationY(rotation);
|
||||||
translateMatrix = XMMatrixTranslation(-5.0f, -5.0f, -20.0f);
|
translateMatrix = XMMatrixTranslation(-5.0f, -5.0f, -20.0f);
|
||||||
@@ -1410,7 +1421,7 @@ void ApplicationClass::GenerateTerrain()
|
|||||||
newTerrain->SetTranslateMatrix(XMMatrixTranslation(i / 2 * scaleX , -12.0f, j * scaleZ));
|
newTerrain->SetTranslateMatrix(XMMatrixTranslation(i / 2 * scaleX , -12.0f, j * scaleZ));
|
||||||
newTerrain->SetName(filenameWithoutExtension);
|
newTerrain->SetName(filenameWithoutExtension);
|
||||||
newTerrain->SetType(ObjectType::Cube);
|
newTerrain->SetType(ObjectType::Cube);
|
||||||
newTerrain->SetActiveShader(Object::SUNLIGHT);
|
newTerrain->SetActiveShader(ShaderType::SUNLIGHT);
|
||||||
m_terrainChunk.push_back(newTerrain);
|
m_terrainChunk.push_back(newTerrain);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1418,9 +1429,8 @@ void ApplicationClass::GenerateTerrain()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApplicationClass::AddKobject(WCHAR* filepath)
|
void ApplicationClass::AddKobject(std::wstring& filepath)
|
||||||
{
|
{
|
||||||
|
|
||||||
Logger::Get().Log("Adding object", __FILE__, __LINE__);
|
Logger::Get().Log("Adding object", __FILE__, __LINE__);
|
||||||
|
|
||||||
char modelFilename[128];
|
char modelFilename[128];
|
||||||
@@ -1431,7 +1441,7 @@ void ApplicationClass::AddKobject(WCHAR* filepath)
|
|||||||
string filename = p.stem().string();
|
string filename = p.stem().string();
|
||||||
|
|
||||||
size_t convertedChars = 0;
|
size_t convertedChars = 0;
|
||||||
wcstombs_s(&convertedChars, modelFilename, sizeof(modelFilename), filepath, _TRUNCATE);
|
wcstombs_s(&convertedChars, modelFilename, sizeof(modelFilename), filepath.c_str(), _TRUNCATE);
|
||||||
|
|
||||||
filesystem::current_path(m_WFolder);
|
filesystem::current_path(m_WFolder);
|
||||||
|
|
||||||
@@ -1449,23 +1459,7 @@ void ApplicationClass::AddKobject(WCHAR* filepath)
|
|||||||
result = DirectX::CreateWICTextureFromFile(m_Direct3D->GetDevice(), m_Direct3D->GetDeviceContext(), textureFilename.c_str(), nullptr, &texture);
|
result = DirectX::CreateWICTextureFromFile(m_Direct3D->GetDevice(), m_Direct3D->GetDeviceContext(), textureFilename.c_str(), nullptr, &texture);
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
// Utiliser _com_error pour obtenir des informations d<>taill<6C>es sur l'erreur
|
// Handle error
|
||||||
_com_error err(result);
|
|
||||||
LPCTSTR errMsg = err.ErrorMessage();
|
|
||||||
|
|
||||||
//convertie errMessage en std::wstring
|
|
||||||
std::wstring ws(errMsg);
|
|
||||||
std::string str(ws.begin(), ws.end());
|
|
||||||
|
|
||||||
// Log the current working directory
|
|
||||||
std::filesystem::path cwd = std::filesystem::current_path();
|
|
||||||
Logger::Get().Log("Current working directory: " + cwd.string(), __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
|
|
||||||
Logger::Get().Log("Failed to load texture: " + std::string(textureFilename.begin(), textureFilename.end()) +
|
|
||||||
"\nError: " + std::to_string(result) +
|
|
||||||
"\nDescription: " + str,
|
|
||||||
__FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return; // Assurez-vous de retourner false ou de g<>rer l'erreur de mani<6E>re appropri<72>e
|
|
||||||
}
|
}
|
||||||
textures.push_back(texture);
|
textures.push_back(texture);
|
||||||
}
|
}
|
||||||
@@ -1476,12 +1470,12 @@ void ApplicationClass::AddKobject(WCHAR* filepath)
|
|||||||
newObject->SetTranslateMatrix(XMMatrixTranslation(0.0f, 50.0f, 0.0f));
|
newObject->SetTranslateMatrix(XMMatrixTranslation(0.0f, 50.0f, 0.0f));
|
||||||
newObject->SetName(filename);
|
newObject->SetName(filename);
|
||||||
newObject->SetId(m_ObjectId);
|
newObject->SetId(m_ObjectId);
|
||||||
|
newObject->SetModelPath(filepath); // Store the path as std::wstring
|
||||||
|
|
||||||
m_ObjectId++;
|
m_ObjectId++;
|
||||||
|
|
||||||
m_object.push_back(newObject);
|
m_object.push_back(newObject);
|
||||||
|
|
||||||
|
|
||||||
// V<>rifiez que l'objet a bien re<72>u les textures
|
// V<>rifiez que l'objet a bien re<72>u les textures
|
||||||
if (newObject->GetTexture(0) == nullptr)
|
if (newObject->GetTexture(0) == nullptr)
|
||||||
{
|
{
|
||||||
@@ -1848,7 +1842,32 @@ bool ApplicationClass::RenderPass(const std::vector<std::reference_wrapper<std::
|
|||||||
// Utiliser l'enum ShaderType pour d<>terminer quel shader utiliser
|
// Utiliser l'enum ShaderType pour d<>terminer quel shader utiliser
|
||||||
switch (object->GetActiveShader())
|
switch (object->GetActiveShader())
|
||||||
{
|
{
|
||||||
case Object::CEL_SHADING:
|
|
||||||
|
case ShaderType::ALPHA_MAPPING:
|
||||||
|
|
||||||
|
// Enable alpha blending for transparency.
|
||||||
|
m_Direct3D->EnableAlphaBlending();
|
||||||
|
|
||||||
|
result = m_ShaderManager->RenderAlphaMapShader(
|
||||||
|
m_Direct3D->GetDeviceContext(),
|
||||||
|
object->GetIndexCount(),
|
||||||
|
worldMatrix,
|
||||||
|
view,
|
||||||
|
projection,
|
||||||
|
object->GetTexture(0),
|
||||||
|
object->GetTexture(5),
|
||||||
|
object->GetTexture(3)
|
||||||
|
);
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
Logger::Get().Log("Could not render the model using the alpha map shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
|
m_Direct3D->DisableAlphaBlending();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
m_Direct3D->DisableAlphaBlending();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ShaderType::CEL_SHADING:
|
||||||
result = m_ShaderManager->RenderCelShadingShader(
|
result = m_ShaderManager->RenderCelShadingShader(
|
||||||
m_Direct3D->GetDeviceContext(),
|
m_Direct3D->GetDeviceContext(),
|
||||||
object->GetIndexCount(),
|
object->GetIndexCount(),
|
||||||
@@ -1868,7 +1887,7 @@ bool ApplicationClass::RenderPass(const std::vector<std::reference_wrapper<std::
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Object::NORMAL_MAPPING:
|
case ShaderType::NORMAL_MAPPING:
|
||||||
result = m_ShaderManager->RenderNormalMapShader(
|
result = m_ShaderManager->RenderNormalMapShader(
|
||||||
m_Direct3D->GetDeviceContext(),
|
m_Direct3D->GetDeviceContext(),
|
||||||
object->GetIndexCount(),
|
object->GetIndexCount(),
|
||||||
@@ -1887,16 +1906,37 @@ bool ApplicationClass::RenderPass(const std::vector<std::reference_wrapper<std::
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Object::SPECULAR_MAPPING:
|
case ShaderType::SPECULAR_MAPPING:
|
||||||
result = m_ShaderManager->RenderSpecMapShader(m_Direct3D->GetDeviceContext(), object->GetIndexCount(), worldMatrix, view, projection, object->GetTexture(0), object->GetTexture(1), object->GetTexture(2), m_Lights[0]->GetDirection(), m_Lights[0]->GetDiffuseColor(), m_Camera->GetPosition(), m_Lights[0]->GetSpecularColor(), m_Lights[0]->GetSpecularPower());
|
result = m_ShaderManager->RenderSpecMapShader(
|
||||||
|
m_Direct3D->GetDeviceContext(),
|
||||||
|
object->GetIndexCount(),
|
||||||
|
worldMatrix,
|
||||||
|
view,
|
||||||
|
projection,
|
||||||
|
object->GetTexture(0),
|
||||||
|
object->GetTexture(1),
|
||||||
|
object->GetTexture(2),
|
||||||
|
m_Lights[0]->GetDirection(),
|
||||||
|
m_Lights[0]->GetDiffuseColor(),
|
||||||
|
m_Camera->GetPosition(),
|
||||||
|
m_Lights[0]->GetSpecularColor(),
|
||||||
|
m_Lights[0]->GetSpecularPower()
|
||||||
|
);
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Could not render the model using the specular map shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Could not render the model using the specular map shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Object::TEXTURE:
|
case ShaderType::TEXTURE:
|
||||||
result = m_ShaderManager->RenderTextureShader(m_Direct3D->GetDeviceContext(), object->GetIndexCount(), worldMatrix, view, projection, object->GetTexture(0));
|
result = m_ShaderManager->RenderTextureShader(
|
||||||
|
m_Direct3D->GetDeviceContext(),
|
||||||
|
object->GetIndexCount(),
|
||||||
|
worldMatrix,
|
||||||
|
view,
|
||||||
|
projection,
|
||||||
|
object->GetTexture(0)
|
||||||
|
);
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Could not render the model using the texture shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Could not render the model using the texture shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
@@ -1904,9 +1944,18 @@ bool ApplicationClass::RenderPass(const std::vector<std::reference_wrapper<std::
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Object::LIGHTING:
|
case ShaderType::LIGHTING:
|
||||||
result = m_ShaderManager->RenderlightShader(m_Direct3D->GetDeviceContext(), object->GetIndexCount(), worldMatrix, view, projection,
|
result = m_ShaderManager->RenderlightShader(
|
||||||
object->GetTexture(0), diffuse, position, ambient);
|
m_Direct3D->GetDeviceContext(),
|
||||||
|
object->GetIndexCount(),
|
||||||
|
worldMatrix,
|
||||||
|
view,
|
||||||
|
projection,
|
||||||
|
object->GetTexture(0),
|
||||||
|
diffuse,
|
||||||
|
position,
|
||||||
|
ambient
|
||||||
|
);
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Could not render the object model using the light shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Could not render the object model using the light shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
@@ -1914,7 +1963,7 @@ bool ApplicationClass::RenderPass(const std::vector<std::reference_wrapper<std::
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Object::SUNLIGHT:
|
case ShaderType::SUNLIGHT:
|
||||||
result = m_ShaderManager->RenderSunlightShader(
|
result = m_ShaderManager->RenderSunlightShader(
|
||||||
m_Direct3D->GetDeviceContext(),
|
m_Direct3D->GetDeviceContext(),
|
||||||
object->GetIndexCount(),
|
object->GetIndexCount(),
|
||||||
@@ -1925,7 +1974,8 @@ bool ApplicationClass::RenderPass(const std::vector<std::reference_wrapper<std::
|
|||||||
m_SunLight->GetDiffuseColor(),
|
m_SunLight->GetDiffuseColor(),
|
||||||
m_SunLight->GetAmbientColor(),
|
m_SunLight->GetAmbientColor(),
|
||||||
m_SunLight->GetDirection(),
|
m_SunLight->GetDirection(),
|
||||||
m_SunLight->GetIntensity());
|
m_SunLight->GetIntensity()
|
||||||
|
);
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Could not render the object model using the sunlight shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Could not render the object model using the sunlight shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
@@ -1933,8 +1983,17 @@ bool ApplicationClass::RenderPass(const std::vector<std::reference_wrapper<std::
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
result = m_ShaderManager->RenderlightShader(m_Direct3D->GetDeviceContext(), object->GetIndexCount(), worldMatrix, view, projection,
|
result = m_ShaderManager->RenderlightShader(
|
||||||
object->GetTexture(0), diffuse, position, ambient);
|
m_Direct3D->GetDeviceContext(),
|
||||||
|
object->GetIndexCount(),
|
||||||
|
worldMatrix,
|
||||||
|
view,
|
||||||
|
projection,
|
||||||
|
object->GetTexture(0),
|
||||||
|
diffuse,
|
||||||
|
position,
|
||||||
|
ambient
|
||||||
|
);
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Could not render the object model using the light shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Could not render the object model using the light shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
@@ -2006,7 +2065,7 @@ void ApplicationClass::ConstructSkybox() {
|
|||||||
face->SetScaleMatrix(XMMatrixScaling(2.01f, 2.01f, 2.01f));
|
face->SetScaleMatrix(XMMatrixScaling(2.01f, 2.01f, 2.01f));
|
||||||
face->SetRotateMatrix(rotations[i]);
|
face->SetRotateMatrix(rotations[i]);
|
||||||
face->SetTranslateMatrix(translations[i]);
|
face->SetTranslateMatrix(translations[i]);
|
||||||
face->SetActiveShader(Object::SKYBOX);
|
face->SetActiveShader(ShaderType::SKYBOX);
|
||||||
m_Skybox.push_back(face);
|
m_Skybox.push_back(face);
|
||||||
m_SkyboxInitialTranslations.push_back(translations[i]);
|
m_SkyboxInitialTranslations.push_back(translations[i]);
|
||||||
}
|
}
|
||||||
@@ -2167,4 +2226,132 @@ bool ApplicationClass::RenderSkybox(XMMATRIX view, XMMATRIX projection) {
|
|||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ApplicationClass::ConvertWStringToString(const std::wstring& wstr)
|
||||||
|
{
|
||||||
|
if (wstr.empty()) return std::string();
|
||||||
|
|
||||||
|
int size_needed = WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), NULL, 0, NULL, NULL);
|
||||||
|
std::string str(size_needed, 0);
|
||||||
|
WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), &str[0], size_needed, NULL, NULL);
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ApplicationClass::SaveScene() {
|
||||||
|
if (m_scenePath.empty()) {
|
||||||
|
Logger::Get().Log("Scene path is empty. Cannot save scene.", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::ofstream outFile(m_scenePath);
|
||||||
|
if (!outFile.is_open()) {
|
||||||
|
Logger::Get().Log("Failed to open file for saving scene", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const auto& object : m_object) {
|
||||||
|
XMFLOAT3 position, scale, rotation;
|
||||||
|
XMStoreFloat3(&position, object->GetPosition());
|
||||||
|
XMStoreFloat3(&scale, object->GetScale());
|
||||||
|
XMStoreFloat3(&rotation, object->GetRotation());
|
||||||
|
|
||||||
|
outFile << object->GetId() << " "
|
||||||
|
<< object->GetName() << " "
|
||||||
|
<< position.x << " " << position.y << " " << position.z << " "
|
||||||
|
<< rotation.x << " " << rotation.y << " " << rotation.z << " "
|
||||||
|
<< scale.x << " " << scale.y << " " << scale.z << " "
|
||||||
|
<< ConvertWStringToString(object->GetModelPath()) << " "
|
||||||
|
<< object->ShaderTypeToString(object->GetActiveShader()) << " "
|
||||||
|
<< object->GetBoundingRadius() << " "
|
||||||
|
<< object->ObjectTypeToString(object->GetType()) << " "
|
||||||
|
<< object->GetMass() << " "
|
||||||
|
<< object->IsPhysicsEnabled() << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
outFile.close();
|
||||||
|
Logger::Get().Log("Scene saved successfully", __FILE__, __LINE__, Logger::LogLevel::Info);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ApplicationClass::LoadScene() {
|
||||||
|
|
||||||
|
std::wstring scenePath = GetScenePath();
|
||||||
|
if (!scenePath.empty())
|
||||||
|
{
|
||||||
|
SetScenePath(ConvertWStringToString(scenePath));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_scenePath.empty()) {
|
||||||
|
Logger::Get().Log("Scene path is empty. Cannot load scene.", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::ifstream inFile(m_scenePath);
|
||||||
|
if (!inFile.is_open()) {
|
||||||
|
Logger::Get().Log("Failed to open file for loading scene", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_object.clear();
|
||||||
|
|
||||||
|
int id;
|
||||||
|
std::string name;
|
||||||
|
float posX, posY, posZ;
|
||||||
|
float rotX, rotY, rotZ;
|
||||||
|
float scaleX, scaleY, scaleZ;
|
||||||
|
std::string modelPath;
|
||||||
|
std::string shaderTypeStr;
|
||||||
|
float boundingRadius;
|
||||||
|
std::string objectTypeStr;
|
||||||
|
float mass;
|
||||||
|
bool physicsEnabled;
|
||||||
|
|
||||||
|
while (inFile >> id >> name >> posX >> posY >> posZ >> rotX >> rotY >> rotZ >> scaleX >> scaleY >> scaleZ >> modelPath >> shaderTypeStr >> boundingRadius >> objectTypeStr >> mass >> physicsEnabled) {
|
||||||
|
int size_needed = MultiByteToWideChar(CP_UTF8, 0, modelPath.c_str(), (int)modelPath.size(), NULL, 0);
|
||||||
|
std::wstring wModelPath(size_needed, 0);
|
||||||
|
MultiByteToWideChar(CP_UTF8, 0, modelPath.c_str(), (int)modelPath.size(), &wModelPath[0], size_needed);
|
||||||
|
|
||||||
|
AddKobject(wModelPath);
|
||||||
|
|
||||||
|
Object* newObject = m_object.back();
|
||||||
|
newObject->SetId(id);
|
||||||
|
newObject->SetName(name);
|
||||||
|
newObject->SetPosition(XMVectorSet(posX, posY, posZ, 0.0f));
|
||||||
|
newObject->SetRotation(XMVectorSet(rotX, rotY, rotZ, 0.0f));
|
||||||
|
newObject->SetScale(XMVectorSet(scaleX, scaleY, scaleZ, 0.0f));
|
||||||
|
newObject->SetActiveShader(newObject->StringToShaderType(shaderTypeStr));
|
||||||
|
newObject->SetBoundingRadius(boundingRadius);
|
||||||
|
newObject->SetType(newObject->StringToObjectType(objectTypeStr));
|
||||||
|
newObject->SetMass(mass);
|
||||||
|
newObject->SetPhysicsEnabled(physicsEnabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
inFile.close();
|
||||||
|
Logger::Get().Log("Scene loaded successfully", __FILE__, __LINE__, Logger::LogLevel::Info);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::wstring ApplicationClass::GetScenePath()
|
||||||
|
{
|
||||||
|
OPENFILENAME ofn;
|
||||||
|
wchar_t szFile[260];
|
||||||
|
|
||||||
|
ZeroMemory(&ofn, sizeof(ofn));
|
||||||
|
ofn.lStructSize = sizeof(ofn);
|
||||||
|
ofn.hwndOwner = m_hwnd;
|
||||||
|
ofn.lpstrFile = szFile;
|
||||||
|
ofn.lpstrFile[0] = '\0';
|
||||||
|
ofn.nMaxFile = sizeof(szFile);
|
||||||
|
ofn.lpstrFilter = L"Ker Scene\0*.ker\0";
|
||||||
|
ofn.nFilterIndex = 1;
|
||||||
|
ofn.lpstrFileTitle = NULL;
|
||||||
|
ofn.nMaxFileTitle = 0;
|
||||||
|
ofn.lpstrInitialDir = NULL;
|
||||||
|
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
|
||||||
|
|
||||||
|
if (GetOpenFileName(&ofn) == TRUE)
|
||||||
|
{
|
||||||
|
std::filesystem::path filepath = ofn.lpstrFile;
|
||||||
|
return filepath.wstring();
|
||||||
|
}
|
||||||
|
return L"";
|
||||||
}
|
}
|
@@ -29,6 +29,11 @@ bool imguiManager::Initialize(HWND hwnd, ID3D11Device* device, ID3D11DeviceConte
|
|||||||
|
|
||||||
// Setup style
|
// Setup style
|
||||||
ImGui::StyleColorsDark();
|
ImGui::StyleColorsDark();
|
||||||
|
// Set the window background color to be a transparent black/gray
|
||||||
|
ImGui::GetStyle().Colors[ImGuiCol_WindowBg] = ImVec4(0, 0, 0, 0.5f);
|
||||||
|
// Set the menu bar background color to be a transparent black/gray
|
||||||
|
ImGui::GetStyle().Colors[ImGuiCol_MenuBarBg] = ImVec4(0, 0, 0, 0.5f);
|
||||||
|
|
||||||
|
|
||||||
Logger::Get().Log("imgui initialized", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
Logger::Get().Log("imgui initialized", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
||||||
|
|
||||||
@@ -48,13 +53,13 @@ void imguiManager::Render(ApplicationClass* app)
|
|||||||
{
|
{
|
||||||
ImGui::Render();
|
ImGui::Render();
|
||||||
|
|
||||||
app->GetDirect3D()->TurnZBufferOff();
|
//app->GetDirect3D()->TurnZBufferOff();
|
||||||
app->GetDirect3D()->EnableAlphaBlending();
|
//app->GetDirect3D()->EnableAlphaBlending();
|
||||||
|
|
||||||
ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData());
|
ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData());
|
||||||
|
|
||||||
app->GetDirect3D()->DisableAlphaBlending();
|
//app->GetDirect3D()->DisableAlphaBlending();
|
||||||
app->GetDirect3D()->TurnZBufferOn();
|
//app->GetDirect3D()->TurnZBufferOn();
|
||||||
}
|
}
|
||||||
|
|
||||||
void imguiManager::NewFrame()
|
void imguiManager::NewFrame()
|
||||||
@@ -64,7 +69,7 @@ void imguiManager::NewFrame()
|
|||||||
ImGui::NewFrame();
|
ImGui::NewFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
void imguiManager::SetupDockspace() {
|
void imguiManager::SetupDockspace(ApplicationClass* app) {
|
||||||
ImGuiWindowFlags window_flags = ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoDocking;
|
ImGuiWindowFlags window_flags = ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoDocking;
|
||||||
ImGuiViewport* viewport = ImGui::GetMainViewport();
|
ImGuiViewport* viewport = ImGui::GetMainViewport();
|
||||||
ImGui::SetNextWindowPos(viewport->Pos);
|
ImGui::SetNextWindowPos(viewport->Pos);
|
||||||
@@ -75,19 +80,37 @@ void imguiManager::SetupDockspace() {
|
|||||||
window_flags |= ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove;
|
window_flags |= ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove;
|
||||||
window_flags |= ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoNavFocus;
|
window_flags |= ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoNavFocus;
|
||||||
|
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0, 0, 0, 0));
|
||||||
|
|
||||||
ImGui::Begin("DockSpace", nullptr, window_flags);
|
ImGui::Begin("DockSpace", nullptr, window_flags);
|
||||||
ImGui::PopStyleVar(2);
|
ImGui::PopStyleVar(2);
|
||||||
|
ImGui::PopStyleColor();
|
||||||
|
|
||||||
|
|
||||||
if (ImGui::BeginMenuBar()) {
|
if (ImGui::BeginMenuBar()) {
|
||||||
if (ImGui::BeginMenu("Windows")) {
|
if (ImGui::BeginMenu("Windows")) {
|
||||||
ImGui::MenuItem("Object Window", NULL, &showObjectWindow);
|
ImGui::MenuItem("Object Window", NULL, &showObjectWindow);
|
||||||
ImGui::MenuItem("Terrain Window", NULL, &showTerrainWindow);
|
ImGui::MenuItem("Terrain Window", NULL, &showTerrainWindow);
|
||||||
ImGui::MenuItem("Light Window", NULL, &showLightWindow);
|
ImGui::MenuItem("Light Window", NULL, &showLightWindow);
|
||||||
ImGui::MenuItem("Shader Window", NULL, &showShaderWindow);
|
ImGui::MenuItem("Old Scene Window", NULL, &showOldSceneWindow);
|
||||||
ImGui::MenuItem("Engine Settings Window", NULL, &showEngineSettingsWindow);
|
ImGui::MenuItem("Engine Settings Window", NULL, &showEngineSettingsWindow);
|
||||||
ImGui::MenuItem("Log Window", NULL, &showLogWindow);
|
ImGui::MenuItem("Log Window", NULL, &showLogWindow);
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Scene file menu
|
||||||
|
if (ImGui::BeginMenu("Scene")) {
|
||||||
|
if (ImGui::MenuItem("Save Scene")) {
|
||||||
|
// Save the scene
|
||||||
|
app->SaveScene();
|
||||||
|
}
|
||||||
|
if (ImGui::MenuItem("Load Scene")) {
|
||||||
|
// Load the scene
|
||||||
|
app->LoadScene();
|
||||||
|
}
|
||||||
|
ImGui::EndMenu();
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::EndMenuBar();
|
ImGui::EndMenuBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,7 +169,66 @@ void imguiManager::WidgetAddObject(ApplicationClass* app)
|
|||||||
|
|
||||||
if (GetOpenFileName(&ofn))
|
if (GetOpenFileName(&ofn))
|
||||||
{
|
{
|
||||||
app->AddKobject(ofn.lpstrFile);
|
std::wstring filepath = ofn.lpstrFile;
|
||||||
|
|
||||||
|
WCHAR exePath[MAX_PATH];
|
||||||
|
GetModuleFileName(NULL,exePath,MAX_PATH);
|
||||||
|
std::wstring exeDir = exePath;
|
||||||
|
size_t pos = exeDir.find_last_of(L"\\/");
|
||||||
|
if(pos != std::wstring::npos)
|
||||||
|
{
|
||||||
|
exeDir = exeDir.substr(0, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::wstring targetDir = exeDir + L"\\Content\\Assets\\Kobject";
|
||||||
|
|
||||||
|
|
||||||
|
DWORD ftyp = GetFileAttributesW(targetDir.c_str());
|
||||||
|
if( ftyp == INVALID_FILE_ATTRIBUTES)
|
||||||
|
{
|
||||||
|
std::wstring contentDir = exeDir + L"\\Content";
|
||||||
|
if (GetFileAttributes(contentDir.c_str()) == INVALID_FILE_ATTRIBUTES)
|
||||||
|
{
|
||||||
|
CreateDirectory(contentDir.c_str(), NULL);
|
||||||
|
}
|
||||||
|
std::wstring assetsDir = contentDir + L"\\Assets";
|
||||||
|
if (GetFileAttributes(assetsDir.c_str()) == INVALID_FILE_ATTRIBUTES)
|
||||||
|
{
|
||||||
|
CreateDirectory(assetsDir.c_str(), NULL);
|
||||||
|
}
|
||||||
|
std::wstring kobjectDir = assetsDir + L"\\Kobject";
|
||||||
|
if (GetFileAttributes(kobjectDir.c_str()) == INVALID_FILE_ATTRIBUTES)
|
||||||
|
{
|
||||||
|
CreateDirectory(kobjectDir.c_str(), NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t posFile = filepath.find_last_of(L"\\/");
|
||||||
|
std::wstring filename = (posFile != std::wstring::npos) ? filepath.substr(posFile + 1) : filepath;
|
||||||
|
|
||||||
|
std::wstring targetPath = targetDir + L"\\" + filename;
|
||||||
|
|
||||||
|
if (!CopyFile(filepath.c_str(), targetPath.c_str(), FALSE))
|
||||||
|
{
|
||||||
|
// En cas d'erreur, vous pouvez g<>rer ici l'erreur (par exemple afficher un message)
|
||||||
|
MessageBox(NULL, L"Erreur lors de la copie du fichier.", L"Erreur", MB_OK);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// On r<>cup<75>re le chemin relatif par rapport <20> exeDir
|
||||||
|
std::wstring relativePath = targetPath.substr(exeDir.size());
|
||||||
|
|
||||||
|
// Suppression du premier caract<63>re s'il s'agit d'un antislash
|
||||||
|
if (!relativePath.empty() && (relativePath[0] == L'\\' || relativePath[0] == L'/'))
|
||||||
|
{
|
||||||
|
relativePath.erase(0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remplacer les antislashs par des slashs
|
||||||
|
std::replace(relativePath.begin(), relativePath.end(), L'\\', L'/');
|
||||||
|
app->AddKobject(relativePath);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -189,7 +271,7 @@ void imguiManager::WidgetObjectWindow(ApplicationClass* app)
|
|||||||
{
|
{
|
||||||
object->SetScale(XMVectorSet(scl[0], scl[1], scl[2], 0.0f));
|
object->SetScale(XMVectorSet(scl[0], scl[1], scl[2], 0.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
// Texture
|
// Texture
|
||||||
@@ -203,6 +285,7 @@ void imguiManager::WidgetObjectWindow(ApplicationClass* app)
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Display all images
|
// Display all images
|
||||||
|
ImGui::BeginChild("TextureChild", ImVec2(0, 100), false, ImGuiWindowFlags_HorizontalScrollbar);
|
||||||
for (int count = 0; count < textureCategories.size(); count++)
|
for (int count = 0; count < textureCategories.size(); count++)
|
||||||
{
|
{
|
||||||
std::string textureLabel = "Texture##" + std::to_string(index) + "##" + std::to_string(count);
|
std::string textureLabel = "Texture##" + std::to_string(index) + "##" + std::to_string(count);
|
||||||
@@ -222,7 +305,7 @@ void imguiManager::WidgetObjectWindow(ApplicationClass* app)
|
|||||||
ofn.lStructSize = sizeof(ofn);
|
ofn.lStructSize = sizeof(ofn);
|
||||||
ofn.hwndOwner = NULL;
|
ofn.hwndOwner = NULL;
|
||||||
ofn.lpstrFile = szFile;
|
ofn.lpstrFile = szFile;
|
||||||
ofn.lpstrFile[0] = '\0';
|
szFile[0] = '\0';
|
||||||
ofn.nMaxFile = sizeof(szFile);
|
ofn.nMaxFile = sizeof(szFile);
|
||||||
ofn.lpstrFilter = L"Texture\0*.png\0";
|
ofn.lpstrFilter = L"Texture\0*.png\0";
|
||||||
ofn.nFilterIndex = 1;
|
ofn.nFilterIndex = 1;
|
||||||
@@ -251,7 +334,7 @@ void imguiManager::WidgetObjectWindow(ApplicationClass* app)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ImGui::EndChild();
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
@@ -265,8 +348,23 @@ void imguiManager::WidgetObjectWindow(ApplicationClass* app)
|
|||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
// Liste des options
|
// Liste des options
|
||||||
const char* shaderOptions[] = { "Enable Global Lighting", "Enable Lighting", "Enable Cel Shading", "Enable Normal Mapping", "Enable Specular Mapping" };
|
const char* shaderOptions[] = {
|
||||||
Object::ShaderType shaderTypes[] = { Object::SUNLIGHT,Object::LIGHTING, Object::CEL_SHADING, Object::NORMAL_MAPPING, Object::SPECULAR_MAPPING };
|
"Enable Global Lighting",
|
||||||
|
"Enable Lighting",
|
||||||
|
"Enable Cel Shading",
|
||||||
|
"Enable Normal Mapping",
|
||||||
|
"Enable Specular Mapping",
|
||||||
|
"Enable Alpha Mapping"
|
||||||
|
};
|
||||||
|
|
||||||
|
ShaderType shaderTypes[] = {
|
||||||
|
ShaderType::SUNLIGHT,
|
||||||
|
ShaderType::LIGHTING,
|
||||||
|
ShaderType::CEL_SHADING,
|
||||||
|
ShaderType::NORMAL_MAPPING,
|
||||||
|
ShaderType::SPECULAR_MAPPING,
|
||||||
|
ShaderType::ALPHA_MAPPING
|
||||||
|
};
|
||||||
|
|
||||||
// Variable pour stocker l'option s<>lectionn<6E>e
|
// Variable pour stocker l'option s<>lectionn<6E>e
|
||||||
static int currentShader = 0; // Index de l'option actuellement s<>lectionn<6E>e
|
static int currentShader = 0; // Index de l'option actuellement s<>lectionn<6E>e
|
||||||
@@ -365,7 +463,7 @@ bool imguiManager::ImGuiWidgetRenderer(ApplicationClass* app)
|
|||||||
NewFrame();
|
NewFrame();
|
||||||
|
|
||||||
// Setup the dockspace
|
// Setup the dockspace
|
||||||
SetupDockspace();
|
SetupDockspace(app);
|
||||||
|
|
||||||
//ImGui Widget
|
//ImGui Widget
|
||||||
ImGui::Begin("Khaotic Engine", NULL);
|
ImGui::Begin("Khaotic Engine", NULL);
|
||||||
@@ -405,7 +503,11 @@ bool imguiManager::ImGuiWidgetRenderer(ApplicationClass* app)
|
|||||||
WidgetLogWindow(app);
|
WidgetLogWindow(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
WidgetRenderWindow(app, ImVec2(800, 600));
|
if (showOldSceneWindow)
|
||||||
|
{
|
||||||
|
WidgetRenderWindow(app, ImVec2(800, 600));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//render imgui
|
//render imgui
|
||||||
Render(app);
|
Render(app);
|
||||||
@@ -611,7 +713,6 @@ void imguiManager::WidgetLogWindow(ApplicationClass* app)
|
|||||||
|
|
||||||
void imguiManager::WidgetRenderWindow(ApplicationClass* app, ImVec2 availableSize)
|
void imguiManager::WidgetRenderWindow(ApplicationClass* app, ImVec2 availableSize)
|
||||||
{
|
{
|
||||||
|
|
||||||
ImGui::Begin("Render Window");
|
ImGui::Begin("Render Window");
|
||||||
|
|
||||||
ImVec2 oldWindowSize = windowSize;
|
ImVec2 oldWindowSize = windowSize;
|
||||||
@@ -640,7 +741,12 @@ void imguiManager::WidgetRenderWindow(ApplicationClass* app, ImVec2 availableSiz
|
|||||||
if (texture)
|
if (texture)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Affichez la texture dans une fen<65>tre ImGui
|
// Affichez la scenne projet<65> sur texture dans une fen<65>tre ImGui
|
||||||
|
// alpha blend is not enable to render the texture
|
||||||
|
|
||||||
|
app->GetDirect3D()->TurnZBufferOff();
|
||||||
|
app->GetDirect3D()->EnableAlphaBlending();
|
||||||
|
|
||||||
ImGui::Image((ImTextureID)texture, windowSize, ImVec2(0, 0), ImVec2(1, 1), ImVec4(1, 1, 1, 1));
|
ImGui::Image((ImTextureID)texture, windowSize, ImVec2(0, 0), ImVec2(1, 1), ImVec4(1, 1, 1, 1));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -6,6 +6,7 @@ InputClass::InputClass()
|
|||||||
m_directInput = 0;
|
m_directInput = 0;
|
||||||
m_keyboard = 0;
|
m_keyboard = 0;
|
||||||
m_mouse = 0;
|
m_mouse = 0;
|
||||||
|
m_previousTildeState = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -120,7 +121,7 @@ bool InputClass::Initialize(HINSTANCE hinstance, HWND hwnd, int screenWidth, int
|
|||||||
void InputClass::KeyDown(unsigned int input)
|
void InputClass::KeyDown(unsigned int input)
|
||||||
{
|
{
|
||||||
// If a key is pressed then save that state in the key array.
|
// If a key is pressed then save that state in the key array.
|
||||||
Logger::Get().Log("Key down", __FILE__, __LINE__, Logger::LogLevel::Input);
|
Logger::Get().Log("Key down: " + std::to_string(input), __FILE__, __LINE__, Logger::LogLevel::Input);
|
||||||
m_keys[input] = true;
|
m_keys[input] = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -129,7 +130,6 @@ void InputClass::KeyDown(unsigned int input)
|
|||||||
void InputClass::KeyUp(unsigned int input)
|
void InputClass::KeyUp(unsigned int input)
|
||||||
{
|
{
|
||||||
// If a key is released then clear that state in the key array.
|
// If a key is released then clear that state in the key array.
|
||||||
Logger::Get().Log("Key up", __FILE__, __LINE__, Logger::LogLevel::Input);
|
|
||||||
m_keys[input] = false;
|
m_keys[input] = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#include "object.h"
|
#include "object.h"
|
||||||
|
|
||||||
Object::Object() : ModelClass()
|
Object::Object()// Initialize the reference here
|
||||||
{
|
{
|
||||||
m_scaleMatrix = XMMatrixIdentity();
|
m_scaleMatrix = XMMatrixIdentity();
|
||||||
m_rotateMatrix = XMMatrixIdentity();
|
m_rotateMatrix = XMMatrixIdentity();
|
||||||
@@ -259,4 +259,51 @@ void Object::UpdatePosition(float deltaTime)
|
|||||||
XMVECTOR position = GetPosition();
|
XMVECTOR position = GetPosition();
|
||||||
position = position + GetVelocity() * deltaTime;
|
position = position + GetVelocity() * deltaTime;
|
||||||
SetPosition(position);
|
SetPosition(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Object::SetType(ObjectType type)
|
||||||
|
{
|
||||||
|
m_type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string Object::ObjectTypeToString(ObjectType type) {
|
||||||
|
switch (type) {
|
||||||
|
case ObjectType::Cube: return "Cube";
|
||||||
|
case ObjectType::Sphere: return "Sphere";
|
||||||
|
// Ajoutez d'autres cas si n<>cessaire
|
||||||
|
default: return "Unknown";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectType Object::StringToObjectType(const std::string& str) {
|
||||||
|
if (str == "Cube") return ObjectType::Cube;
|
||||||
|
if (str == "Sphere") return ObjectType::Sphere;
|
||||||
|
// Add other cases as needed
|
||||||
|
return ObjectType::Unknown;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string Object::ShaderTypeToString(ShaderType type) {
|
||||||
|
switch (type) {
|
||||||
|
case ShaderType::ALPHA_MAPPING: return "ALPHA_MAPPING";
|
||||||
|
case ShaderType::CEL_SHADING: return "CEL_SHADING";
|
||||||
|
case ShaderType::NORMAL_MAPPING: return "NORMAL_MAPPING";
|
||||||
|
case ShaderType::SPECULAR_MAPPING: return "SPECULAR_MAPPING";
|
||||||
|
case ShaderType::TEXTURE: return "TEXTURE";
|
||||||
|
case ShaderType::LIGHTING: return "LIGHTING";
|
||||||
|
case ShaderType::SUNLIGHT: return "SUNLIGHT";
|
||||||
|
// Ajoutez d'autres cas si n<>cessaire
|
||||||
|
default: return "Unknown";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ShaderType Object::StringToShaderType(const std::string& str) {
|
||||||
|
if (str == "ALPHA_MAPPING") return ShaderType::ALPHA_MAPPING;
|
||||||
|
if (str == "CEL_SHADING") return ShaderType::CEL_SHADING;
|
||||||
|
if (str == "NORMAL_MAPPING") return ShaderType::NORMAL_MAPPING;
|
||||||
|
if (str == "SPECULAR_MAPPING") return ShaderType::SPECULAR_MAPPING;
|
||||||
|
if (str == "TEXTURE") return ShaderType::TEXTURE;
|
||||||
|
if (str == "LIGHTING") return ShaderType::LIGHTING;
|
||||||
|
if (str == "SUNLIGHT") return ShaderType::SUNLIGHT;
|
||||||
|
// Add other cases as needed
|
||||||
|
return ShaderType::TEXTURE;
|
||||||
}
|
}
|
Reference in New Issue
Block a user