Compare commits

...

47 Commits

Author SHA1 Message Date
2c005592f0 Patch - TODO : Serialized / Deserialized Component DATA - V12.7.1 2025-06-26 21:44:28 +02:00
763ecff93d Minor - ECS use when loading scene - V12.7.0 2025-06-24 18:58:53 +02:00
e527e85b9c Minor - ECS use in save - V12.6.0 2025-06-24 18:41:13 +02:00
9d0d2d1dfd Minor - ECS use in stats - V12.5.0 2025-06-24 17:15:58 +02:00
7755150ae8 Patch - ADD TODO comment - V12.4.1 2025-06-24 17:01:05 +02:00
ddf5ea30a6 Minor - ImGui Use ECS - V12.4.0 2025-06-24 16:44:29 +02:00
8f0e583c62 Minor - ECS implementation pt.2 - V12.3.0 2025-06-24 16:25:03 +02:00
bf1b5d78e5 Minor - ECS use in other method pt.1 - V12.2.0 2025-06-24 16:13:56 +02:00
3adfddf44f Minor - ECS use for import object - V12.1.0 2025-06-24 15:36:45 +02:00
039b034175 Major - ECS - V12.0.0 2025-06-24 14:24:14 +02:00
688fe7ff1c Minor - Optimisation stats - V11.5.0 2025-06-23 22:39:58 +02:00
de16b97f8e Minor - bigcube generation + using shared model - V11.4.0 2025-06-19 22:19:33 +02:00
f5331444cb Minor - Smart pointer and switch from composition to aggregation for object relation with modelclass - V11.3.0 2025-06-19 17:15:27 +02:00
ae3fc21ffc Patch - Fix release and debug config - V11.2.1 2025-06-03 19:58:01 +02:00
315d259acd Minor - Stats Update - V11.2.0 2025-06-03 18:35:51 +02:00
2a1b474df0 Minor - architecture rework pt.2 - V11.1.0 2025-06-03 17:01:18 +02:00
d364517633 Major - Architecture Rework - 11.0.0 2025-06-03 16:29:44 +02:00
ce51c11b31 Minor - Add Unitest environment - V10.7.0 2025-06-02 14:15:18 +02:00
0e11ead55b Patch - Deth Shader integration for shadow map - V10.6.1 2025-05-28 15:02:43 +02:00
1af71960c3 Minor - Depth shader - V10.6.0 2025-05-28 13:24:53 +02:00
f20adee22f Patch - Sun camera Depth experiment - V10.5.3 2025-05-26 16:03:51 +02:00
eb2cd17ec3 Patch - Sun Camera - V10.5.2 2025-05-26 13:52:00 +02:00
dbd27d1fe7 Revert "Minor - Start Shadow Map - V10.5.0"
This reverts commit d6b7626446e965d3cf4567f5cd787511c9bbe4f3.
2025-05-25 16:12:39 +02:00
d6b7626446 Minor - Start Shadow Map - V10.5.0 2025-05-22 17:28:29 +02:00
f9d4523f09 Minor - Refactor name - V10.5.0 2025-05-21 16:40:27 +02:00
24203060be Actualiser README.md 2025-05-13 21:18:50 +00:00
8b77b189a8 Merge branch 'main' of http://gitea-ui.shiba-server.fr:19000/ShibaGit/khaotic-engine-Reborn 2025-05-13 21:50:17 +02:00
e5ee8fdad3 Patch Update - BigCube Is Back - V10.4.2 2025-05-13 21:50:05 +02:00
3a2d19dff4 Actualiser README.md 2025-05-13 13:01:35 +00:00
dbc7003569 Patch Update - Remove The """Instancing""" due to unwanted behavior - V10.4.1 2025-05-12 16:14:38 +02:00
c5bfa2e621 Minor Update - Loading Obj Model is now faster than f1 - V10.4.0 2025-05-12 14:18:43 +02:00
32b71ac97f Patch Update - UI Text No Blur - V10.3.1 2025-05-08 17:35:41 +02:00
5c3c6d944c Minor Update - UI Update - V10.3.0 2025-05-08 17:28:06 +02:00
8d32f51e8c Patch Update - Clean Render Pass - V10.2.3 2025-05-08 17:07:45 +02:00
644fc57762 Patch Update - Frustum Culling Thread Independant - V10.2.2 2025-05-08 16:28:27 +02:00
f8bfb62e98 Patch Update - WIP Async Cube Generation - V10.2.1 2025-05-07 17:48:02 +02:00
94fd900ce8 Minor Update - Stats Widget + BigCube Generation WIP - V10.2.0 2025-05-07 17:15:11 +02:00
2744c809d3 Actualiser README.md 2025-05-06 16:28:06 +00:00
b80f66fec3 Merge branch 'main' of http://gitea-ui.shiba-server.fr:19000/ShibaGit/khaotic-engine-Reborn 2025-05-06 18:09:31 +02:00
8bcd3eed48 Patch Update - Fix Memory Leak From terrain genneration and use Instancing to generate big terrain - V10.1.3 2025-05-06 18:09:28 +02:00
2b1e64ffbd Actualiser README.md 2025-05-06 16:08:35 +00:00
96aa41f649 Actualiser README.md 2025-05-06 15:11:14 +00:00
00e6749d01 Patch Update - IDE File - V10.1.2 2025-05-06 17:08:18 +02:00
5a3a4f73a8 Patch Update - Fix the loading and saving of the texture - V10.1.1 2025-05-06 17:07:45 +02:00
c442a87883 Minor Update - Texture Are Saved - V10.1.0 2025-05-06 15:29:23 +02:00
e681943aa8 Patch Update - workspace.xml - V10.0.2 2025-05-05 16:13:44 +02:00
e68f1d5dd0 Patch Update - LoadTexture Tweak - V10.0.1 2025-05-05 16:12:38 +02:00
151 changed files with 10876 additions and 7732 deletions
.idea/.idea.KhaoticEngineReborn/.idea
KhaoticDemo
KhaoticEngineReborn.slnREADME.md
enginecustom
DemoScene_V12.6.0.ker
assets
demo.kerenginecustom.vcxprojenginecustom.vcxproj.filtersimgui.ini
include
packages.configshader-error.txt
src

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="Encoding"> <component name="Encoding">
<file url="file://$PROJECT_DIR$/enginecustom/src/src/system/applicationclass.cpp" charset="windows-1252" /> <file url="file://$PROJECT_DIR$/enginecustom/src/src/system/application_class.cpp" charset="windows-1252" />
<file url="file://$PROJECT_DIR$/enginecustom/src/src/system/imguiManager.cpp" charset="windows-1252" /> <file url="file://$PROJECT_DIR$/enginecustom/src/src/system/imguiManager.cpp" charset="windows-1252" />
<file url="PROJECT" charset="windows-1252" /> <file url="PROJECT" charset="windows-1252" />
</component> </component>

@ -1,6 +1,7 @@
<component name="InspectionProjectProfileManager"> <component name="InspectionProjectProfileManager">
<profile version="1.0"> <profile version="1.0">
<option name="myName" value="Project Default" /> <option name="myName" value="Project Default" />
<inspection_tool class="LanguageDetectionInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="ReassignedToPlainText" enabled="false" level="WARNING" enabled_by_default="false" /> <inspection_tool class="ReassignedToPlainText" enabled="false" level="WARNING" enabled_by_default="false" />
</profile> </profile>
</component> </component>

@ -5,15 +5,11 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<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/projectSettingsUpdater.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.KhaoticEngineReborn/.idea/projectSettingsUpdater.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$/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/enginecustom/assets/Texture/imgui.ini" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/assets/Texture/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/imgui.ini" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/imgui.ini" afterDir="false" />
<change beforePath="$PROJECT_DIR$/enginecustom/src/inc/system/modelclass.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/modelclass.h" afterDir="false" /> <change beforePath="$PROJECT_DIR$/enginecustom/src/inc/system/ecs/component.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/ecs/component.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/Skybox.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/Skybox.cpp" afterDir="false" /> <change beforePath="$PROJECT_DIR$/enginecustom/src/inc/system/ecs/components/identity_component.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/ecs/components/identity_component.h" 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/scene_manager.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/scene_manager.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" />
<change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/modelclass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/modelclass.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" />
@ -27,25 +23,27 @@
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component> </component>
<component name="HighlightingSettingsPerFile"> <component name="HighlightingSettingsPerFile">
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" /> <setting file="file://C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um/d3d11.h" root0="SKIP_HIGHLIGHTING" />
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" /> <setting file="file://C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um/dinput.h" root0="SKIP_HIGHLIGHTING" />
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" /> <setting file="file://C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/include/memory" root0="SKIP_HIGHLIGHTING" />
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/enginecustom/include/Inc/VertexTypes.h" 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://0" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/enginecustom/include/Vulkan/Include/vulkan/vulkan_core.h" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/enginecustom/include/Vulkan/Include/vulkan/vulkan_core.h" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/enginecustom/src/src/shader/CelShadingShader.cpp" root0="FORCE_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/enginecustom/src/inc/system/ecs/component.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/enginecustom/src/inc/system/ecs/components/identity_component.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/enginecustom/src/inc/system/ecs/components/model_path_component.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/enginecustom/src/inc/system/ecs/components/physics_component.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/enginecustom/src/inc/system/ecs/components/render_component.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/enginecustom/src/inc/system/ecs/components/shader_component.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/enginecustom/src/inc/system/ecs/components/transform_component.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/enginecustom/src/inc/system/ecs/entity.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/enginecustom/src/inc/system/ecs/entity_manager.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/enginecustom/src/inc/system/ecs/systems/render_system.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/../../IDE_VS/VC/Tools/MSVC/14.38.33130/include/type_traits" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/../../IDE_VS/VC/Tools/MSVC/14.38.33130/include/type_traits" root0="SKIP_HIGHLIGHTING" />
</component> </component>
<component name="KubernetesApiPersistence">{}</component>
<component name="KubernetesApiProvider">{
&quot;isMigrated&quot;: true
}</component>
<component name="MetaFilesCheckinStateConfiguration" checkMetaFiles="true" /> <component name="MetaFilesCheckinStateConfiguration" checkMetaFiles="true" />
<component name="ProblemsViewState"> <component name="ProblemsViewState">
<option name="selectedTabId" value="CurrentFile" /> <option name="selectedTabId" value="CurrentFile" />
@ -54,29 +52,33 @@
&quot;associatedIndex&quot;: 6 &quot;associatedIndex&quot;: 6
}</component> }</component>
<component name="ProjectId" id="2sGIWDeT5ixyzDQ0he4A3RFpG9W" /> <component name="ProjectId" id="2sGIWDeT5ixyzDQ0he4A3RFpG9W" />
<component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="2" id="Add" />
</component>
<component name="ProjectViewState"> <component name="ProjectViewState">
<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": { &quot;keyToString&quot;: {
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true", &quot;ASKED_SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
"C++ Project.enginecustom.executor": "Run", &quot;C++ Project.enginecustom.executor&quot;: &quot;Run&quot;,
"C/C++ Project.enginecustom.executor": "Run", &quot;C/C++ Project.KhaoticDemo.executor&quot;: &quot;Run&quot;,
"RunOnceActivity.ShowReadmeOnStart": "true", &quot;C/C++ Project.enginecustom.executor&quot;: &quot;Run&quot;,
"RunOnceActivity.git.unshallow": "true", &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
"SHARE_PROJECT_CONFIGURATION_FILES": "true", &quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
"git-widget-placeholder": "main", &quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
"ignore.virus.scanning.warn.message": "true", &quot;git-widget-placeholder&quot;: &quot;main&quot;,
"node.js.detected.package.eslint": "true", &quot;ignore.virus.scanning.warn.message&quot;: &quot;true&quot;,
"node.js.detected.package.tslint": "true", &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
"node.js.selected.package.eslint": "(autodetect)", &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
"node.js.selected.package.tslint": "(autodetect)", &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
"nodejs_package_manager_path": "npm", &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
"settings.editor.selected.configurable": "preferences.build.unityPlugin", &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
"vue.rearranger.settings.migration": "true" &quot;settings.editor.selected.configurable&quot;: &quot;preferences.environmentSetup&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
} }
}]]></component> }</component>
<component name="RunManager" selected="C/C++ Project.enginecustom"> <component name="RunManager" selected="C/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 setup="1">
@ -190,6 +192,47 @@
<workItem from="1746188920194" duration="1870000" /> <workItem from="1746188920194" duration="1870000" />
<workItem from="1746274246641" duration="89000" /> <workItem from="1746274246641" duration="89000" />
<workItem from="1746274352144" duration="8039000" /> <workItem from="1746274352144" duration="8039000" />
<workItem from="1746444660572" duration="7742000" />
<workItem from="1746456965664" duration="13000" />
<workItem from="1746469494034" duration="799000" />
<workItem from="1746526901276" duration="2023000" />
<workItem from="1746536290167" duration="1908000" />
<workItem from="1746538260893" duration="5781000" />
<workItem from="1746546014271" duration="1814000" />
<workItem from="1746619988287" duration="12282000" />
<workItem from="1746711806997" duration="6736000" />
<workItem from="1746719840054" duration="991000" />
<workItem from="1746795732153" duration="33000" />
<workItem from="1746795828588" duration="592000" />
<workItem from="1747049871967" duration="9350000" />
<workItem from="1747136509645" duration="3939000" />
<workItem from="1747258663152" duration="835000" />
<workItem from="1747826758888" duration="3587000" />
<workItem from="1747830379222" duration="7954000" />
<workItem from="1748254142068" duration="10499000" />
<workItem from="1748267553700" duration="654000" />
<workItem from="1748429087202" duration="7421000" />
<workItem from="1748521606678" duration="5300000" />
<workItem from="1748859894056" duration="1431000" />
<workItem from="1748861785837" duration="357000" />
<workItem from="1748865625274" duration="797000" />
<workItem from="1748869642637" duration="3049000" />
<workItem from="1748954607174" duration="14202000" />
<workItem from="1748969487337" duration="402000" />
<workItem from="1750187491423" duration="4397000" />
<workItem from="1750191969842" duration="162000" />
<workItem from="1750248915365" duration="442000" />
<workItem from="1750335650897" duration="2051000" />
<workItem from="1750344288223" duration="1751000" />
<workItem from="1750351735497" duration="9648000" />
<workItem from="1750417484899" duration="2384000" />
<workItem from="1750420267631" duration="148000" />
<workItem from="1750592598277" duration="332000" />
<workItem from="1750699146323" duration="10385000" />
<workItem from="1750763086646" duration="4874000" />
<workItem from="1750770680795" duration="13425000" />
<workItem from="1750964683511" duration="27000" />
<workItem from="1750964770914" duration="2126000" />
</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" />

@ -1,140 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{9e5ef415-5337-4eed-ae23-edc4b1fff455}</ProjectGuid>
<RootNamespace>KhaoticDemo</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectReference Include="..\enginecustom\enginecustom.vcxproj">
<Project>{92cf56c4-76bb-40d4-8fe5-36c15f5f127a}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Fichiers sources">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Fichiers d%27en-tête">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Fichiers de ressources">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
</ItemGroup>
</Project>

@ -1,4 +0,0 @@
int main()
{
return 0;
}

@ -1,72 +0,0 @@
/////////////
// GLOBALS //
/////////////
SamplerState SampleType : register(s0);
Texture2D reflectionTexture : register(t0);
Texture2D refractionTexture : register(t1);
Texture2D normalTexture : register(t2);
cbuffer WaterBuffer
{
float waterTranslation;
float reflectRefractScale;
float2 padding;
};
//////////////
// TYPEDEFS //
//////////////
struct PixelInputType
{
float4 position : SV_POSITION;
float2 tex : TEXCOORD0;
float4 reflectionPosition : TEXCOORD1;
float4 refractionPosition : TEXCOORD2;
};
////////////////////////////////////////////////////////////////////////////////
// Pixel Shader
////////////////////////////////////////////////////////////////////////////////
float4 WaterPixelShader(PixelInputType input) : SV_TARGET
{
float2 reflectTexCoord;
float2 refractTexCoord;
float4 normalMap;
float3 normal;
float4 reflectionColor;
float4 refractionColor;
float4 color;
// Move the position the water normal is sampled from to simulate moving water.
input.tex.y += waterTranslation;
// Calculate the projected reflection texture coordinates.
reflectTexCoord.x = input.reflectionPosition.x / input.reflectionPosition.w / 2.0f + 0.5f;
reflectTexCoord.y = -input.reflectionPosition.y / input.reflectionPosition.w / 2.0f + 0.5f;
// Calculate the projected refraction texture coordinates.
refractTexCoord.x = input.refractionPosition.x / input.refractionPosition.w / 2.0f + 0.5f;
refractTexCoord.y = -input.refractionPosition.y / input.refractionPosition.w / 2.0f + 0.5f;
// Sample the normal from the normal map texture.
normalMap = normalTexture.Sample(SampleType, input.tex);
// Expand the range of the normal from (0,1) to (-1,+1).
normal = (normalMap.xyz * 2.0f) - 1.0f;
// Re-position the texture coordinate sampling position by the normal map value to simulate the rippling wave effect.
reflectTexCoord = reflectTexCoord + (normal.xy * reflectRefractScale);
refractTexCoord = refractTexCoord + (normal.xy * reflectRefractScale);
// Sample the texture pixels from the textures using the updated texture coordinates.
reflectionColor = reflectionTexture.Sample(SampleType, reflectTexCoord);
refractionColor = refractionTexture.Sample(SampleType, refractTexCoord);
// Combine the reflection and refraction results for the final color.
color = lerp(reflectionColor, refractionColor, 0.6f);
return color;
}

@ -3,9 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.9.34607.119 VisualStudioVersion = 17.9.34607.119
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "enginecustom", "enginecustom\enginecustom.vcxproj", "{92CF56C4-76BB-40D4-8FE5-36C15F5F127A}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KhaoticCore", "enginecustom\enginecustom.vcxproj", "{92CF56C4-76BB-40D4-8FE5-36C15F5F127A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KhaoticDemo", "KhaoticDemo\KhaoticDemo.vcxproj", "{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -23,14 +21,6 @@ Global
{92CF56C4-76BB-40D4-8FE5-36C15F5F127A}.Release|x64.Build.0 = Release|x64 {92CF56C4-76BB-40D4-8FE5-36C15F5F127A}.Release|x64.Build.0 = Release|x64
{92CF56C4-76BB-40D4-8FE5-36C15F5F127A}.Release|x86.ActiveCfg = Release|Win32 {92CF56C4-76BB-40D4-8FE5-36C15F5F127A}.Release|x86.ActiveCfg = Release|Win32
{92CF56C4-76BB-40D4-8FE5-36C15F5F127A}.Release|x86.Build.0 = Release|Win32 {92CF56C4-76BB-40D4-8FE5-36C15F5F127A}.Release|x86.Build.0 = Release|Win32
{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}.Debug|x64.ActiveCfg = Debug|x64
{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}.Debug|x64.Build.0 = Debug|x64
{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}.Debug|x86.ActiveCfg = Debug|Win32
{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}.Debug|x86.Build.0 = Debug|Win32
{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}.Release|x64.ActiveCfg = Release|x64
{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}.Release|x64.Build.0 = Release|x64
{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}.Release|x86.ActiveCfg = Release|Win32
{9E5EF415-5337-4EED-AE23-EDC4B1FFF455}.Release|x86.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

@ -2,13 +2,13 @@
Khaotic Engine Reborn reprend comme base le moteur Khaotic Engine pour lui ajouter plus de fonctionalité. Khaotic Engine Reborn reprend comme base le moteur Khaotic Engine pour lui ajouter plus de fonctionalité.
Ce moteur est basé sur **DirectX11** utilise **ImGui** avec une couche d'abstraction pour permetre son usage avec d'autres API. Ce moteur est basé sur **DirectX11** et utilise **ImGui** pour son interface graphique.
--- ---
Khaotic Engine is a rendering engine made in **C++** by a small team with the aim of learning how to use rendering APIs (OpenGL, DirectX 11/12 and Vulkan). Khaotic Engine is a rendering engine made in **C++** by a small team with the aim of learning how to use rendering APIs (OpenGL, DirectX 11/12 and Vulkan).
This **DirectX11** based engine uses **ImGui** with an abstraction layer to enable its use with other APIs. This **DirectX11** based engine uses **ImGui** for the user interface.
## Installation ## Installation
@ -36,13 +36,20 @@ This **DirectX11** based engine uses **ImGui** with an abstraction layer to enab
**SHADER** : **SHADER** :
+ Sunlight shader + Sunlight shader
+ Cel Shading (Work In Progress) + Cel Shading
+ Skysphere
**Interface Graphique** : **Interface Graphique** :
+ Console link to the Logger object + Console link to the Logger object
+ Shader Manager + Shader Manager
+ Engine Settings + Engine Settings
+ Sunlight Settings
**Save And Load of a Scene** :
+ Save All Custom object
+ Save All Custom Texture for Custom Object
**Texture File** : **Texture File** :
@ -53,10 +60,11 @@ This **DirectX11** based engine uses **ImGui** with an abstraction layer to enab
- Shader rendering - Shader rendering
- Frustum culling - Frustum culling
- Object rendering - Object rendering
- Terrain Instancing
## Demo : ## Demo :
[![Demo Video](https://img.youtube.com/vi/qCOCTyB_97c/0.jpg)](https://www.youtube.com/watch?v=qCOCTyB_97c) [![Demo Video](https://img.youtube.com/vi/CbK1a0Ar94Q/0.jpg)](https://youtu.be/CbK1a0Ar94Q)
## Engine Build by : ## Engine Build by :

@ -0,0 +1 @@
1 CubePart_0_0_0 0 0 0 0 -0 0 1 1 1 LIGHTING 0 Terrain 0 0 1 assets/Texture/Bricks2K.png 1 assets/Texture/BricksNRM2K.png 1 assets/Texture/BricksGLOSS2K.png 0

@ -1,89 +0,0 @@
[Window][Debug##Default]
Pos=60,60
Size=400,400
Collapsed=0
[Window][Khaotic Engine]
Pos=1233,27
Size=343,826
Collapsed=0
DockId=0x00000005,0
[Window][Objects]
Pos=8,27
Size=289,826
Collapsed=0
DockId=0x00000009,0
[Window][Terrain]
Pos=299,27
Size=250,826
Collapsed=0
DockId=0x00000007,0
[Window][Light]
Pos=8,27
Size=290,866
Collapsed=0
DockId=0x00000007,1
[Window][Shader Manager]
Pos=8,27
Size=330,487
Collapsed=0
DockId=0x00000001,2
[Window][Engine Settings]
Pos=8,27
Size=289,826
Collapsed=0
DockId=0x00000009,0
[Window][DockSpace Demo]
Size=1584,861
Collapsed=0
[Window][Render Window]
Pos=8,27
Size=1559,974
Collapsed=0
DockId=0x00000009,0
[Window][DockSpace]
Pos=0,0
Size=1584,861
Collapsed=0
[Window][Add Object]
Pos=1188,0
Size=396,430
Collapsed=0
[Window][Log]
Pos=8,518
Size=1568,335
Collapsed=0
DockId=0x0000000C,0
[Window][Log Window]
Pos=8,627
Size=1568,226
Collapsed=0
DockId=0x00000006,0
[Docking][Data]
DockSpace ID=0xC0DFADC4 Pos=8,27 Size=1568,826 Split=X
DockNode ID=0x00000001 Parent=0xC0DFADC4 SizeRef=330,1094 Selected=0x393905AB
DockNode ID=0x00000003 Parent=0xC0DFADC4 SizeRef=1700,1094 CentralNode=1
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=8,27 Size=1568,826 Split=Y
DockNode ID=0x00000004 Parent=0xCCBD8CF7 SizeRef=1568,598 Split=X
DockNode ID=0x00000009 Parent=0x00000004 SizeRef=289,974 Selected=0x031DC75C
DockNode ID=0x0000000D Parent=0x00000004 SizeRef=1613,974 Split=X
DockNode ID=0x00000002 Parent=0x0000000D SizeRef=1268,826 Split=Y
DockNode ID=0x0000000B Parent=0x00000002 SizeRef=1568,637 Split=X
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=250,826 Selected=0x393905AB
DockNode ID=0x00000008 Parent=0x0000000B SizeRef=971,826 CentralNode=1 Selected=0x031DC75C
DockNode ID=0x0000000C Parent=0x00000002 SizeRef=1568,335 Selected=0x139FDA3F
DockNode ID=0x00000005 Parent=0x0000000D SizeRef=343,826 Selected=0x9F035453
DockNode ID=0x00000006 Parent=0xCCBD8CF7 SizeRef=1568,226 Selected=0xAB74BEE9

@ -1,89 +0,0 @@
[Window][Debug##Default]
Pos=60,60
Size=400,400
Collapsed=0
[Window][Khaotic Engine]
Pos=1233,27
Size=343,826
Collapsed=0
DockId=0x00000005,0
[Window][Objects]
Pos=8,27
Size=289,413
Collapsed=0
DockId=0x00000007,0
[Window][Terrain]
Pos=8,442
Size=289,411
Collapsed=0
DockId=0x00000008,0
[Window][Light]
Pos=8,27
Size=290,866
Collapsed=0
DockId=0x00000004,1
[Window][Shader Manager]
Pos=8,27
Size=330,487
Collapsed=0
DockId=0x00000001,2
[Window][Engine Settings]
Pos=1233,27
Size=343,826
Collapsed=0
DockId=0x00000005,1
[Window][DockSpace Demo]
Size=1584,861
Collapsed=0
[Window][Render Window]
Pos=8,27
Size=1559,974
Collapsed=0
DockId=0x00000007,0
[Window][DockSpace]
Pos=0,0
Size=1584,861
Collapsed=0
[Window][Add Object]
Pos=1188,0
Size=396,430
Collapsed=0
[Window][Log]
Pos=8,518
Size=1568,335
Collapsed=0
DockId=0x0000000C,0
[Window][Log Window]
Pos=299,627
Size=932,226
Collapsed=0
DockId=0x00000006,0
[Docking][Data]
DockSpace ID=0xC0DFADC4 Pos=8,27 Size=1568,826 Split=X
DockNode ID=0x00000001 Parent=0xC0DFADC4 SizeRef=330,1094 Selected=0x393905AB
DockNode ID=0x00000003 Parent=0xC0DFADC4 SizeRef=1700,1094 CentralNode=1
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=8,27 Size=1568,826 Split=X
DockNode ID=0x00000009 Parent=0xCCBD8CF7 SizeRef=289,974 Split=Y Selected=0x031DC75C
DockNode ID=0x00000007 Parent=0x00000009 SizeRef=289,299 Selected=0x031DC75C
DockNode ID=0x00000008 Parent=0x00000009 SizeRef=289,297 Selected=0x393905AB
DockNode ID=0x0000000D Parent=0xCCBD8CF7 SizeRef=1613,974 Split=X
DockNode ID=0x00000002 Parent=0x0000000D SizeRef=1268,826 Split=Y
DockNode ID=0x0000000B Parent=0x00000002 SizeRef=1568,637 Split=Y
DockNode ID=0x00000004 Parent=0x0000000B SizeRef=932,598 CentralNode=1
DockNode ID=0x00000006 Parent=0x0000000B SizeRef=932,226 Selected=0xAB74BEE9
DockNode ID=0x0000000C Parent=0x00000002 SizeRef=1568,335 Selected=0x139FDA3F
DockNode ID=0x00000005 Parent=0x0000000D SizeRef=343,826 Selected=0x0B098C4B

@ -1 +1 @@
0 86 111.063 12.7056 0 0 -0 0 1 1 1 Content/Assets/Kobject/86.obj CEL_SHADING 1 Cube 1 1 1 isosphere 0 10 0 0 0 -0 1 1 1 F:\Github_Repo\khaotic-engine-Reborn\x64\Debug\Content/Assets/Kobject/isosphere.obj SUNLIGHT 1 Unknown 1 0 2 F:\Github_Repo\khaotic-engine-Reborn\enginecustom\assets\Texture\ground01.png F:\Github_Repo\khaotic-engine-Reborn\enginecustom\assets\Texture\dirt01.png 1 assets/Texture/BricksNRM2K.png 1 assets/Texture/BricksGLOSS2K.png 1 F:\Github_Repo\khaotic-engine-Reborn\enginecustom\assets\Texture\alpha01.png

@ -30,49 +30,54 @@
<ClCompile Include="include\Src\pch.cpp" /> <ClCompile Include="include\Src\pch.cpp" />
<ClCompile Include="include\Src\SimpleMath.cpp" /> <ClCompile Include="include\Src\SimpleMath.cpp" />
<ClCompile Include="include\Src\WICTextureLoader.cpp" /> <ClCompile Include="include\Src\WICTextureLoader.cpp" />
<ClCompile Include="src\src\shader\alphamapshaderclass.cpp" /> <ClCompile Include="src\src\shader\alpha_map_shader_class.cpp" />
<ClCompile Include="src\src\shader\CelShadingShader.cpp" /> <ClCompile Include="src\src\shader\celshade_class.cpp" />
<ClCompile Include="src\src\shader\Colorshaderclass.cpp" /> <ClCompile Include="src\src\shader\color_shader_class.cpp" />
<ClCompile Include="src\src\shader\fontshaderclass.cpp" /> <ClCompile Include="src\src\shader\depth_shader_class.cpp" />
<ClCompile Include="src\src\shader\lightmapshaderclass.cpp" /> <ClCompile Include="src\src\shader\font_shader_class.cpp" />
<ClCompile Include="src\src\shader\lightshaderclass.cpp" /> <ClCompile Include="src\src\shader\light_map_shader_class.cpp" />
<ClCompile Include="src\src\shader\Multitextureshaderclass.cpp" /> <ClCompile Include="src\src\shader\light_shader_class.cpp" />
<ClCompile Include="src\src\shader\normalmapshaderclass.cpp" /> <ClCompile Include="src\src\shader\master_shader.cpp" />
<ClCompile Include="src\src\shader\reflectionshaderclass.cpp" /> <ClCompile Include="src\src\shader\multi_texture_shader_class.cpp" />
<ClCompile Include="src\src\shader\refractionshaderclass.cpp" /> <ClCompile Include="src\src\shader\normal_map_shader_class.cpp" />
<ClCompile Include="src\src\shader\shadermanagerclass.cpp" /> <ClCompile Include="src\src\shader\reflection_shader_class.cpp" />
<ClCompile Include="src\src\shader\SkyboxShaderClass.cpp" /> <ClCompile Include="src\src\shader\refraction_shader_class.cpp" />
<ClCompile Include="src\src\shader\specmapshaderclass.cpp" /> <ClCompile Include="src\src\shader\shader_manager_class.cpp" />
<ClCompile Include="src\src\shader\sunlightshaderclass.cpp" /> <ClCompile Include="src\src\shader\skybox_shader_class.cpp" />
<ClCompile Include="src\src\shader\textureshaderclass.cpp" /> <ClCompile Include="src\src\shader\spec_map_shader_class.cpp" />
<ClCompile Include="src\src\shader\translateshaderclass.cpp" /> <ClCompile Include="src\src\shader\sunlight_shader_class.cpp" />
<ClCompile Include="src\src\shader\transparentshaderclass.cpp" /> <ClCompile Include="src\src\shader\texture_shader_class.cpp" />
<ClCompile Include="src\src\shader\watershaderclass.cpp" /> <ClCompile Include="src\src\shader\translate_shader_class.cpp" />
<ClCompile Include="src\src\system\applicationclass.cpp" /> <ClCompile Include="src\src\shader\transparent_shader_class.cpp" />
<ClCompile Include="src\src\system\bitmapclass.cpp" /> <ClCompile Include="src\src\shader\water_shader_class.cpp" />
<ClCompile Include="src\src\system\Cameraclass.cpp" /> <ClCompile Include="src\src\system\application_class.cpp" />
<ClCompile Include="src\src\system\d3dclass.cpp" /> <ClCompile Include="src\src\system\bitmap_class.cpp" />
<ClCompile Include="src\src\system\displayplaneclass.cpp" /> <ClCompile Include="src\src\system\camera_class.cpp" />
<ClCompile Include="src\src\system\fontclass.cpp" /> <ClCompile Include="src\src\system\d_3d_class.cpp" />
<ClCompile Include="src\src\system\fpsclass.cpp" /> <ClCompile Include="src\src\system\display_plane_class.cpp" />
<ClCompile Include="src\src\system\font_class.cpp" />
<ClCompile Include="src\src\system\fps_class.cpp" />
<ClCompile Include="src\src\system\frustum.cpp" /> <ClCompile Include="src\src\system\frustum.cpp" />
<ClCompile Include="src\src\system\frustumclass.cpp" /> <ClCompile Include="src\src\system\frustumclass.cpp" />
<ClCompile Include="src\src\system\imguiManager.cpp" /> <ClCompile Include="src\src\system\imguiManager.cpp" />
<ClCompile Include="src\src\system\inputclass.cpp" /> <ClCompile Include="src\src\system\input_class.cpp" />
<ClCompile Include="src\src\system\lightclass.cpp" /> <ClCompile Include="src\src\system\light_class.cpp" />
<ClCompile Include="src\src\system\Main.cpp" /> <ClCompile Include="src\src\system\Main.cpp" />
<ClCompile Include="src\src\system\modelclass.cpp" /> <ClCompile Include="src\src\system\model_class.cpp" />
<ClCompile Include="src\src\system\Modellistclass.cpp" /> <ClCompile Include="src\src\system\Modellistclass.cpp" />
<ClCompile Include="src\src\system\object.cpp" /> <ClCompile Include="src\src\system\object.cpp" />
<ClCompile Include="src\src\system\physics.cpp" /> <ClCompile Include="src\src\system\physics.cpp" />
<ClCompile Include="src\src\system\Positionclass.cpp" /> <ClCompile Include="src\src\system\position_class.cpp" />
<ClCompile Include="src\src\system\rendertextureclass.cpp" /> <ClCompile Include="src\src\system\render_texture_class.cpp" />
<ClCompile Include="src\src\system\scene_manager.cpp" />
<ClCompile Include="src\src\system\shadow_map.cpp" />
<ClCompile Include="src\src\system\Skybox.cpp" /> <ClCompile Include="src\src\system\Skybox.cpp" />
<ClCompile Include="src\src\system\Spriteclass.cpp" /> <ClCompile Include="src\src\system\sprite_class.cpp" />
<ClCompile Include="src\src\system\Systemclass.cpp" /> <ClCompile Include="src\src\system\stats.cpp" />
<ClCompile Include="src\src\system\textclass.cpp" /> <ClCompile Include="src\src\system\system_class.cpp" />
<ClCompile Include="src\src\system\textureclass.cpp" /> <ClCompile Include="src\src\system\text_class.cpp" />
<ClCompile Include="src\src\system\Timerclass.cpp" /> <ClCompile Include="src\src\system\texture_class.cpp" />
<ClCompile Include="src\src\system\timer_class.cpp" />
<ClCompile Include="src\src\system\vulkan.cpp" /> <ClCompile Include="src\src\system\vulkan.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -89,51 +94,65 @@
<ClInclude Include="include\Src\LoaderHelpers.h" /> <ClInclude Include="include\Src\LoaderHelpers.h" />
<ClInclude Include="include\Src\pch.h" /> <ClInclude Include="include\Src\pch.h" />
<ClInclude Include="include\Src\PlatformHelpers.h" /> <ClInclude Include="include\Src\PlatformHelpers.h" />
<ClInclude Include="src\inc\shader\alphamapshaderclass.h" /> <ClInclude Include="src\inc\shader\alpha_map_shader_class.h" />
<ClInclude Include="src\inc\shader\CelShadingShader.h" /> <ClInclude Include="src\inc\shader\celshade_class.h" />
<ClInclude Include="src\inc\shader\Colorshaderclass.h" /> <ClInclude Include="src\inc\shader\color_shader_class.h" />
<ClInclude Include="src\inc\shader\fontshaderclass.h" /> <ClInclude Include="src\inc\shader\depth_shader_class.h" />
<ClInclude Include="src\inc\shader\lightmapshaderclass.h" /> <ClInclude Include="src\inc\shader\font_shader_class.h" />
<ClInclude Include="src\inc\shader\lightshaderclass.h" /> <ClInclude Include="src\inc\shader\light_map_shader_class.h" />
<ClInclude Include="src\inc\shader\lightshaderwaterclass.h" /> <ClInclude Include="src\inc\shader\light_shader_class.h" />
<ClInclude Include="src\inc\shader\Multitextureshaderclass.h" /> <ClInclude Include="src\inc\shader\master_shader.h" />
<ClInclude Include="src\inc\shader\normalmapshaderclass.h" /> <ClInclude Include="src\inc\shader\multi_texture_shader_class.h" />
<ClInclude Include="src\inc\shader\reflectionshaderclass.h" /> <ClInclude Include="src\inc\shader\normal_map_shader_class.h" />
<ClInclude Include="src\inc\shader\refractionshaderclass.h" /> <ClInclude Include="src\inc\shader\reflection_shader_class.h" />
<ClInclude Include="src\inc\shader\shadermanagerclass.h" /> <ClInclude Include="src\inc\shader\refraction_shader_class.h" />
<ClInclude Include="src\inc\shader\SkyboxShaderClass.h" /> <ClInclude Include="src\inc\shader\shader_manager_class.h" />
<ClInclude Include="src\inc\shader\specmapshaderclass.h" /> <ClInclude Include="src\inc\shader\skybox_shader_class.h" />
<ClInclude Include="src\inc\shader\sunlightshaderclass.h" /> <ClInclude Include="src\inc\shader\spec_map_shader_class.h" />
<ClInclude Include="src\inc\shader\textureshaderclass.h" /> <ClInclude Include="src\inc\shader\sunlight_shader_class.h" />
<ClInclude Include="src\inc\shader\translateshaderclass.h" /> <ClInclude Include="src\inc\shader\texture_shader_class.h" />
<ClInclude Include="src\inc\shader\transparentshaderclass.h" /> <ClInclude Include="src\inc\shader\translate_shader_class.h" />
<ClInclude Include="src\inc\shader\watershaderclass.h" /> <ClInclude Include="src\inc\shader\transparent_shader_class.h" />
<ClInclude Include="src\inc\system\applicationclass.h" /> <ClInclude Include="src\inc\shader\water_shader_class.h" />
<ClInclude Include="src\inc\system\bitmapclass.h" /> <ClInclude Include="src\inc\system\application_class.h" />
<ClInclude Include="src\inc\system\Cameraclass.h" /> <ClInclude Include="src\inc\system\bitmap_class.h" />
<ClInclude Include="src\inc\system\d3dclass.h" /> <ClInclude Include="src\inc\system\camera_class.h" />
<ClInclude Include="src\inc\system\displayplaneclass.h" /> <ClInclude Include="src\inc\system\d_3d_class.h" />
<ClInclude Include="src\inc\system\fontclass.h" /> <ClInclude Include="src\inc\system\display_plane_class.h" />
<ClInclude Include="src\inc\system\fpsclass.h" /> <ClInclude Include="src\inc\system\ecs\component.h" />
<ClInclude Include="src\inc\system\ecs\components\identity_component.h" />
<ClInclude Include="src\inc\system\ecs\components\model_path_component.h" />
<ClInclude Include="src\inc\system\ecs\components\physics_component.h" />
<ClInclude Include="src\inc\system\ecs\components\render_component.h" />
<ClInclude Include="src\inc\system\ecs\components\shader_component.h" />
<ClInclude Include="src\inc\system\ecs\components\transform_component.h" />
<ClInclude Include="src\inc\system\ecs\entity.h" />
<ClInclude Include="src\inc\system\ecs\entity_manager.h" />
<ClInclude Include="src\inc\system\ecs\systems\render_system.h" />
<ClInclude Include="src\inc\system\font_class.h" />
<ClInclude Include="src\inc\system\fps_class.h" />
<ClInclude Include="src\inc\system\fps_limiter.h" />
<ClInclude Include="src\inc\system\frustum.h" /> <ClInclude Include="src\inc\system\frustum.h" />
<ClInclude Include="src\inc\system\frustumclass.h" /> <ClInclude Include="src\inc\system\frustumclass.h" />
<ClInclude Include="src\inc\system\imguiManager.h" /> <ClInclude Include="src\inc\system\imguiManager.h" />
<ClInclude Include="src\inc\system\inputclass.h" /> <ClInclude Include="src\inc\system\input_class.h" />
<ClInclude Include="src\inc\system\lightclass.h" /> <ClInclude Include="src\inc\system\light_class.h" />
<ClInclude Include="src\inc\system\Logger.h" /> <ClInclude Include="src\inc\system\Logger.h" />
<ClInclude Include="src\inc\system\modelclass.h" /> <ClInclude Include="src\inc\system\model_class.h" />
<ClInclude Include="src\inc\system\Modellistclass.h" /> <ClInclude Include="src\inc\system\Modellistclass.h" />
<ClInclude Include="src\inc\system\object.h" /> <ClInclude Include="src\inc\system\object.h" />
<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\position_class.h" />
<ClInclude Include="src\inc\system\rendertextureclass.h" /> <ClInclude Include="src\inc\system\render_texture_class.h" />
<ClInclude Include="src\inc\system\sceneManager.h" /> <ClInclude Include="src\inc\system\scene_manager.h" />
<ClInclude Include="src\inc\system\shadow_map.h" />
<ClInclude Include="src\inc\system\Skybox.h" /> <ClInclude Include="src\inc\system\Skybox.h" />
<ClInclude Include="src\inc\system\Spriteclass.h" /> <ClInclude Include="src\inc\system\sprite_class.h" />
<ClInclude Include="src\inc\system\systemclass.h" /> <ClInclude Include="src\inc\system\stats.h" />
<ClInclude Include="src\inc\system\textclass.h" /> <ClInclude Include="src\inc\system\system_class.h" />
<ClInclude Include="src\inc\system\textureclass.h" /> <ClInclude Include="src\inc\system\text_class.h" />
<ClInclude Include="src\inc\system\Timerclass.h" /> <ClInclude Include="src\inc\system\texture_class.h" />
<ClInclude Include="src\inc\system\timer_class.h" />
<ClInclude Include="src\inc\system\vulkan.h" /> <ClInclude Include="src\inc\system\vulkan.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -167,6 +186,20 @@
<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> <DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders> </CopyFileToFolders>
<CopyFileToFolders Include="src\hlsl\depth.ps">
<DestinationFolders>F:\Github_Repo\khaotic-engine-Reborn\x64\Debug\\src\hlsl</DestinationFolders>
<DestinationFileName>%(Filename)%(Extension)</DestinationFileName>
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="src\hlsl\depth.vs">
<DestinationFolders>F:\Github_Repo\khaotic-engine-Reborn\x64\Debug\\src\hlsl</DestinationFolders>
<DestinationFileName>%(Filename)%(Extension)</DestinationFileName>
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="src\hlsl\font.ps"> <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>
@ -241,11 +274,15 @@
<DestinationFolders>F:\Github_Repo\khaotic-engine-Reborn\x64\Debug\\src\hlsl</DestinationFolders> <DestinationFolders>F:\Github_Repo\khaotic-engine-Reborn\x64\Debug\\src\hlsl</DestinationFolders>
<DestinationFileName>%(Filename)%(Extension)</DestinationFileName> <DestinationFileName>%(Filename)%(Extension)</DestinationFileName>
<FileType>Document</FileType> <FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders> </CopyFileToFolders>
<CopyFileToFolders Include="src\hlsl\skybox.vs"> <CopyFileToFolders Include="src\hlsl\skybox.vs">
<DestinationFolders>F:\Github_Repo\khaotic-engine-Reborn\x64\Debug\\src\hlsl</DestinationFolders> <DestinationFolders>F:\Github_Repo\khaotic-engine-Reborn\x64\Debug\\src\hlsl</DestinationFolders>
<DestinationFileName>%(Filename)%(Extension)</DestinationFileName> <DestinationFileName>%(Filename)%(Extension)</DestinationFileName>
<FileType>Document</FileType> <FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders> </CopyFileToFolders>
<CopyFileToFolders Include="src\hlsl\specmap.ps"> <CopyFileToFolders Include="src\hlsl\specmap.ps">
<FileType>Document</FileType> <FileType>Document</FileType>
@ -326,6 +363,82 @@
<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> <DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Skybox</DestinationFolders>
</CopyFileToFolders> </CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\dirt01.png">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\EmptyTexture.png">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\font01.png">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\ground01.png">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\light01.png">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\marble01.png">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\moss01.png">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</ExcludedFromBuild>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\normal01.png">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\spec02.png">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\sprite01.png">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\sprite02.png">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\sprite03.png">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\sprite04.png">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\stone01.png">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\stone01.tga">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\wall.png">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\wall01.png">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\water01.png">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture</DestinationFolders>
</CopyFileToFolders>
<Image Include="KhaoticIcon.ico" /> <Image Include="KhaoticIcon.ico" />
<CopyFileToFolders Include="sprite01.tga" /> <CopyFileToFolders Include="sprite01.tga" />
<CopyFileToFolders Include="sprite02.tga" /> <CopyFileToFolders Include="sprite02.tga" />
@ -342,6 +455,42 @@
<CopyFileToFolders Include="sprite_data_01.txt" /> <CopyFileToFolders Include="sprite_data_01.txt" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="assets\Model\OBJ\86.obj" />
<Content Include="assets\Model\OBJ\cone.obj" />
<Content Include="assets\Model\OBJ\invertcube.obj" />
<Content Include="assets\Model\OBJ\isosphere.obj" />
<Content Include="assets\Model\OBJ\monke.obj" />
<Content Include="assets\Model\OBJ\plane.obj" />
<Content Include="assets\Model\OBJ\vaisseautri.obj" />
<Content Include="assets\Model\TXT\bath.txt" />
<Content Include="assets\Model\TXT\chunk.txt" />
<Content Include="assets\Model\TXT\cube.txt" />
<Content Include="assets\Model\TXT\ground.txt" />
<Content Include="assets\Model\TXT\plane.txt" />
<Content Include="assets\Model\TXT\sphere.txt" />
<Content Include="assets\Model\TXT\square.txt" />
<Content Include="assets\Model\TXT\wall.txt" />
<Content Include="assets\Model\TXT\water.txt" />
<CopyFileToFolders Include="assets\Texture\alpha01.png" />
<Content Include="assets\Texture\dirt01.png" />
<Content Include="assets\Texture\EmptyTexture.png" />
<Content Include="assets\Texture\font01.png" />
<Content Include="assets\Texture\ground01.png" />
<Content Include="assets\Texture\imgui.ini" />
<Content Include="assets\Texture\light01.png" />
<Content Include="assets\Texture\marble01.png" />
<Content Include="assets\Texture\moss01.png" />
<Content Include="assets\Texture\normal01.png" />
<Content Include="assets\Texture\spec02.png" />
<Content Include="assets\Texture\sprite01.png" />
<Content Include="assets\Texture\sprite02.png" />
<Content Include="assets\Texture\sprite03.png" />
<Content Include="assets\Texture\sprite04.png" />
<Content Include="assets\Texture\stone01.png" />
<Content Include="assets\Texture\stone01.tga" />
<Content Include="assets\Texture\wall.png" />
<Content Include="assets\Texture\wall01.png" />
<Content Include="assets\Texture\water01.png" />
<Content Include="TODO.txt" /> <Content Include="TODO.txt" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -351,6 +500,90 @@
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders> <DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
</CopyFileToFolders> </CopyFileToFolders>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="assets\Texture\imgui.ini" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="assets\Model\OBJ\86.obj">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\OBJ\cone.obj">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\OBJ\invertcube.obj">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\OBJ\isosphere.obj">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\OBJ\monke.obj">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\OBJ\plane.obj">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\OBJ\vaisseau.obj">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\OBJ\vaisseautri.obj">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ</DestinationFolders>
</CopyFileToFolders>
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="assets\Model\TXT\bath.txt">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\chunk.txt">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\cube.txt">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\ground.txt">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\plane.txt">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\sphere.txt">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\square.txt">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\wall.txt">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\water.txt">
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT</DestinationFolders>
</CopyFileToFolders>
</ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion> <VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>

@ -99,75 +99,6 @@
<ClCompile Include="include\Src\WICTextureLoader.cpp"> <ClCompile Include="include\Src\WICTextureLoader.cpp">
<Filter>Fichiers sources\DirectX Tool Kit</Filter> <Filter>Fichiers sources\DirectX Tool Kit</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\src\shader\alphamapshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\CelShadingShader.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\Colorshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\lightmapshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\lightshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\Multitextureshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\normalmapshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\reflectionshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\refractionshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\shadermanagerclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\specmapshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\sunlightshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\textureshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\translateshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\transparentshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\watershaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\system\applicationclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\bitmapclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\Cameraclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\d3dclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\displayplaneclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\fontclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\fpsclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\frustum.cpp"> <ClCompile Include="src\src\system\frustum.cpp">
<Filter>Fichiers sources\System</Filter> <Filter>Fichiers sources\System</Filter>
</ClCompile> </ClCompile>
@ -177,18 +108,9 @@
<ClCompile Include="src\src\system\imguiManager.cpp"> <ClCompile Include="src\src\system\imguiManager.cpp">
<Filter>Fichiers sources\System</Filter> <Filter>Fichiers sources\System</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\src\system\inputclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\lightclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\Main.cpp"> <ClCompile Include="src\src\system\Main.cpp">
<Filter>Fichiers sources\System</Filter> <Filter>Fichiers sources\System</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\src\system\modelclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\Modellistclass.cpp"> <ClCompile Include="src\src\system\Modellistclass.cpp">
<Filter>Fichiers sources\System</Filter> <Filter>Fichiers sources\System</Filter>
</ClCompile> </ClCompile>
@ -198,37 +120,130 @@
<ClCompile Include="src\src\system\physics.cpp"> <ClCompile Include="src\src\system\physics.cpp">
<Filter>Fichiers sources\System</Filter> <Filter>Fichiers sources\System</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\src\system\Positionclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\rendertextureclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\Spriteclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\Systemclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\textclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\textureclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\Timerclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\fontshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="src\src\system\vulkan.cpp"> <ClCompile Include="src\src\system\vulkan.cpp">
<Filter>Fichiers sources</Filter> <Filter>Fichiers sources</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\src\shader\SkyboxShaderClass.cpp"> <ClCompile Include="src\src\system\Skybox.cpp">
<Filter>Fichiers sources</Filter> <Filter>Fichiers sources</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\src\system\Skybox.cpp"> <ClCompile Include="src\src\shader\alpha_map_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\celshade_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\color_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\depth_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\font_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\light_map_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\light_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\master_shader.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\multi_texture_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\normal_map_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\reflection_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\refraction_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\shader_manager_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\skybox_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\spec_map_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\sunlight_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\texture_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\translate_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\transparent_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\water_shader_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\application_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\bitmap_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\camera_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\d_3d_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\display_plane_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\font_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\fps_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\input_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\light_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\model_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\position_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\render_texture_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\shadow_map.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\sprite_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\system_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\text_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\texture_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\timer_class.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\scene_manager.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="src\src\system\stats.cpp">
<Filter>Fichiers sources</Filter> <Filter>Fichiers sources</Filter>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
@ -272,81 +287,6 @@
<ClInclude Include="include\Src\PlatformHelpers.h"> <ClInclude Include="include\Src\PlatformHelpers.h">
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter> <Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\inc\shader\alphamapshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\CelShadingShader.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\Colorshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\fontshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\lightmapshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\lightshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\lightshaderwaterclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\Multitextureshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\normalmapshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\reflectionshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\refractionshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\shadermanagerclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\specmapshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\sunlightshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\textureshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\translateshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\transparentshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\watershaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\applicationclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\bitmapclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\Cameraclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\d3dclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\displayplaneclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\fontclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\fpsclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\frustum.h"> <ClInclude Include="src\inc\system\frustum.h">
<Filter>Fichiers d%27en-tête\System</Filter> <Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude> </ClInclude>
@ -356,18 +296,9 @@
<ClInclude Include="src\inc\system\imguiManager.h"> <ClInclude Include="src\inc\system\imguiManager.h">
<Filter>Fichiers d%27en-tête\System</Filter> <Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\inc\system\inputclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\lightclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\Logger.h"> <ClInclude Include="src\inc\system\Logger.h">
<Filter>Fichiers d%27en-tête\System</Filter> <Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\inc\system\modelclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\Modellistclass.h"> <ClInclude Include="src\inc\system\Modellistclass.h">
<Filter>Fichiers d%27en-tête\System</Filter> <Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude> </ClInclude>
@ -377,37 +308,136 @@
<ClInclude Include="src\inc\system\physics.h"> <ClInclude Include="src\inc\system\physics.h">
<Filter>Fichiers d%27en-tête\System</Filter> <Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\inc\system\Positionclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\rendertextureclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\Spriteclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\systemclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\textclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\textureclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\Timerclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\sceneManager.h"> <ClInclude Include="src\inc\system\sceneManager.h">
<Filter>Fichiers d%27en-tête</Filter> <Filter>Fichiers d%27en-tête</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\inc\system\vulkan.h"> <ClInclude Include="src\inc\system\vulkan.h">
<Filter>Fichiers d%27en-tête</Filter> <Filter>Fichiers d%27en-tête</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\inc\shader\SkyboxShaderClass.h"> <ClInclude Include="src\inc\system\Skybox.h">
<Filter>Fichiers d%27en-tête</Filter> <Filter>Fichiers d%27en-tête</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\inc\system\Skybox.h"> <ClInclude Include="src\inc\shader\alpha_map_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\celshade_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\color_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\depth_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\font_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\light_map_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\light_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\master_shader.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\multi_texture_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\normal_map_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\reflection_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\refraction_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\shader_manager_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\skybox_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\spec_map_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\sunlight_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\texture_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\translate_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\transparent_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\water_shader_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\application_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\bitmap_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\camera_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\d_3d_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\display_plane_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\font_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\fps_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\fps_limiter.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\input_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\light_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\model_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\position_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\render_texture_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\shadow_map.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\sprite_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\system_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\text_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\texture_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\timer_class.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\scene_manager.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\stats.h">
<Filter>Fichiers d%27en-tête</Filter> <Filter>Fichiers d%27en-tête</Filter>
</ClInclude> </ClInclude>
</ItemGroup> </ItemGroup>
@ -492,5 +522,121 @@
<CopyFileToFolders Include="assets\Skybox\skybox.png"> <CopyFileToFolders Include="assets\Skybox\skybox.png">
<Filter>Assets\Skybox</Filter> <Filter>Assets\Skybox</Filter>
</CopyFileToFolders> </CopyFileToFolders>
<CopyFileToFolders Include="src\hlsl\depth.ps" />
<CopyFileToFolders Include="src\hlsl\depth.vs" />
<CopyFileToFolders Include="assets\Texture\alpha01.png">
<Filter>Fichiers de ressources</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\dirt01.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\EmptyTexture.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\font01.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\ground01.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\light01.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\marble01.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\moss01.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\normal01.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\spec02.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\sprite01.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\sprite02.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\sprite03.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\sprite04.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\stone01.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\stone01.tga">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\wall.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\wall01.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Texture\water01.png">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\OBJ\vaisseautri.obj">
<Filter>Assets\Model\OBJ</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\OBJ\vaisseau.obj">
<Filter>Assets\Model\OBJ</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\OBJ\plane.obj">
<Filter>Assets\Model\OBJ</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\OBJ\monke.obj">
<Filter>Assets\Model\OBJ</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\OBJ\isosphere.obj">
<Filter>Assets\Model\OBJ</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\OBJ\invertcube.obj">
<Filter>Assets\Model\OBJ</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\OBJ\cone.obj">
<Filter>Assets\Model\OBJ</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\OBJ\86.obj">
<Filter>Assets\Model\OBJ</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\bath.txt">
<Filter>Assets\Model\TXT</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\chunk.txt">
<Filter>Assets\Model\TXT</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\cube.txt">
<Filter>Assets\Model\TXT</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\ground.txt">
<Filter>Assets\Model\TXT</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\plane.txt">
<Filter>Assets\Model\TXT</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\sphere.txt">
<Filter>Assets\Model\TXT</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\square.txt">
<Filter>Assets\Model\TXT</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\wall.txt">
<Filter>Assets\Model\TXT</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\water.txt">
<Filter>Assets\Model\TXT</Filter>
</CopyFileToFolders>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="assets\Texture\imgui.ini">
<Filter>Texture</Filter>
</None>
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -1,89 +1,67 @@
[Window][DockSpace]
Pos=0,0
Size=1584,861
Collapsed=0
[Window][Debug##Default] [Window][Debug##Default]
Pos=60,60 Pos=60,60
Size=400,400 Size=400,400
Collapsed=0 Collapsed=0
[Window][Khaotic Engine] [Window][Khaotic Engine]
Pos=1233,27 Pos=1267,19
Size=343,826 Size=317,842
Collapsed=0 Collapsed=0
DockId=0x00000005,0 DockId=0x00000005,0
[Window][Objects] [Window][render Stats]
Pos=8,27 Pos=0,630
Size=289,826 Size=792,231
Collapsed=0 Collapsed=0
DockId=0x00000009,0 DockId=0x00000009,0
[Window][Objects]
Pos=0,19
Size=234,609
Collapsed=0
DockId=0x0000000B,0
[Window][Terrain] [Window][Terrain]
Pos=8,27 Pos=236,19
Size=250,826 Size=266,609
Collapsed=0 Collapsed=0
DockId=0x00000007,0 DockId=0x00000007,0
[Window][Light] [Window][Log Window]
Pos=8,27 Pos=794,630
Size=290,866 Size=790,231
Collapsed=0 Collapsed=0
DockId=0x00000007,1 DockId=0x0000000A,0
[Window][Shader Manager] [Window][Light]
Pos=8,27 Pos=0,19
Size=330,487 Size=234,609
Collapsed=0 Collapsed=0
DockId=0x00000001,2 DockId=0x0000000B,1
[Window][Engine Settings] [Window][Engine Settings]
Pos=8,27 Pos=1267,462
Size=289,826 Size=317,166
Collapsed=0
DockId=0x00000009,0
[Window][DockSpace Demo]
Size=1584,861
Collapsed=0
[Window][Render Window]
Pos=8,27
Size=1559,974
Collapsed=0
DockId=0x00000009,0
[Window][DockSpace]
Pos=0,0
Size=1584,861
Collapsed=0
[Window][Add Object]
Pos=1188,0
Size=396,430
Collapsed=0
[Window][Log]
Pos=8,518
Size=1568,335
Collapsed=0
DockId=0x0000000C,0
[Window][Log Window]
Pos=8,627
Size=1568,226
Collapsed=0 Collapsed=0
DockId=0x00000006,0 DockId=0x00000006,0
[Docking][Data] [Docking][Data]
DockSpace ID=0xC0DFADC4 Pos=8,27 Size=1568,826 Split=X DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=0,19 Size=1584,842 Split=Y
DockNode ID=0x00000001 Parent=0xC0DFADC4 SizeRef=330,1094 Selected=0x393905AB DockNode ID=0x00000003 Parent=0xCCBD8CF7 SizeRef=1584,609 Split=X
DockNode ID=0x00000003 Parent=0xC0DFADC4 SizeRef=1700,1094 CentralNode=1 DockNode ID=0x0000000B Parent=0x00000003 SizeRef=234,842 Selected=0x321620B2
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=8,27 Size=1568,826 Split=Y DockNode ID=0x0000000C Parent=0x00000003 SizeRef=1348,842 Split=X
DockNode ID=0x00000004 Parent=0xCCBD8CF7 SizeRef=1568,598 Split=X DockNode ID=0x00000007 Parent=0x0000000C SizeRef=266,842 Selected=0x393905AB
DockNode ID=0x00000009 Parent=0x00000004 SizeRef=289,974 Selected=0x031DC75C DockNode ID=0x00000008 Parent=0x0000000C SizeRef=1316,842 Split=X
DockNode ID=0x0000000D Parent=0x00000004 SizeRef=1613,974 Split=X DockNode ID=0x00000001 Parent=0x00000008 SizeRef=1265,842 CentralNode=1
DockNode ID=0x00000002 Parent=0x0000000D SizeRef=1268,826 Split=Y DockNode ID=0x00000002 Parent=0x00000008 SizeRef=317,842 Split=Y Selected=0x9F035453
DockNode ID=0x0000000B Parent=0x00000002 SizeRef=1568,637 Split=X DockNode ID=0x00000005 Parent=0x00000002 SizeRef=317,441 Selected=0x9F035453
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=250,826 Selected=0x393905AB DockNode ID=0x00000006 Parent=0x00000002 SizeRef=317,166 Selected=0x0B098C4B
DockNode ID=0x00000008 Parent=0x0000000B SizeRef=971,826 CentralNode=1 Selected=0x031DC75C DockNode ID=0x00000004 Parent=0xCCBD8CF7 SizeRef=1584,231 Split=X Selected=0xF5D1BB37
DockNode ID=0x0000000C Parent=0x00000002 SizeRef=1568,335 Selected=0x139FDA3F DockNode ID=0x00000009 Parent=0x00000004 SizeRef=792,231 Selected=0xF5D1BB37
DockNode ID=0x00000005 Parent=0x0000000D SizeRef=343,826 Selected=0x9F035453 DockNode ID=0x0000000A Parent=0x00000004 SizeRef=790,231 Selected=0xAB74BEE9
DockNode ID=0x00000006 Parent=0xCCBD8CF7 SizeRef=1568,226 Selected=0xAB74BEE9

@ -340,10 +340,10 @@ namespace ImGui
IMGUI_API ImGuiIO& GetIO(); // access the ImGuiIO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags) IMGUI_API ImGuiIO& GetIO(); // access the ImGuiIO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)
IMGUI_API ImGuiPlatformIO& GetPlatformIO(); // access the ImGuiPlatformIO structure (mostly hooks/functions to connect to platform/renderer and OS Clipboard, IME etc.) IMGUI_API ImGuiPlatformIO& GetPlatformIO(); // access the ImGuiPlatformIO structure (mostly hooks/functions to connect to platform/renderer and OS Clipboard, IME etc.)
IMGUI_API ImGuiStyle& GetStyle(); // access the Style structure (colors, sizes). Always use PushStyleColor(), PushStyleVar() to modify style mid-frame! IMGUI_API ImGuiStyle& GetStyle(); // access the Style structure (colors, sizes). Always use PushStyleColor(), PushStyleVar() to modify style mid-frame!
IMGUI_API void NewFrame(); // start a new Dear ImGui frame, you can submit any command from this point until Render()/EndFrame(). IMGUI_API void NewFrame(); // start a new Dear ImGui frame, you can submit any command from this point until render()/EndFrame().
IMGUI_API void EndFrame(); // ends the Dear ImGui frame. automatically called by Render(). If you don't need to render data (skipping rendering) you may call EndFrame() without Render()... but you'll have wasted CPU already! If you don't need to render, better to not create any windows and not call NewFrame() at all! IMGUI_API void EndFrame(); // ends the Dear ImGui frame. automatically called by render(). If you don't need to render data (skipping rendering) you may call EndFrame() without render()... but you'll have wasted CPU already! If you don't need to render, better to not create any windows and not call NewFrame() at all!
IMGUI_API void Render(); // ends the Dear ImGui frame, finalize the draw data. You can then get call GetDrawData(). IMGUI_API void Render(); // ends the Dear ImGui frame, finalize the draw data. You can then get call GetDrawData().
IMGUI_API ImDrawData* GetDrawData(); // valid after Render() and until the next call to NewFrame(). this is what you have to render. IMGUI_API ImDrawData* GetDrawData(); // valid after render() and until the next call to NewFrame(). this is what you have to render.
// Demo, Debug, Information // Demo, Debug, Information
IMGUI_API void ShowDemoWindow(bool* p_open = NULL); // create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application! IMGUI_API void ShowDemoWindow(bool* p_open = NULL); // create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!
@ -409,8 +409,8 @@ namespace ImGui
IMGUI_API float GetWindowDpiScale(); // get DPI scale currently associated to the current window's viewport. IMGUI_API float GetWindowDpiScale(); // get DPI scale currently associated to the current window's viewport.
IMGUI_API ImVec2 GetWindowPos(); // get current window position in screen space (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always using GetCursorScreenPos() and GetContentRegionAvail() instead) IMGUI_API ImVec2 GetWindowPos(); // get current window position in screen space (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always using GetCursorScreenPos() and GetContentRegionAvail() instead)
IMGUI_API ImVec2 GetWindowSize(); // get current window size (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always using GetCursorScreenPos() and GetContentRegionAvail() instead) IMGUI_API ImVec2 GetWindowSize(); // get current window size (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always using GetCursorScreenPos() and GetContentRegionAvail() instead)
IMGUI_API float GetWindowWidth(); // get current window width (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().x. IMGUI_API float GetWindowWidth(); // get current window width (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for get_window_size().x.
IMGUI_API float GetWindowHeight(); // get current window height (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().y. IMGUI_API float GetWindowHeight(); // get current window height (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for get_window_size().y.
IMGUI_API ImGuiViewport*GetWindowViewport(); // get viewport currently associated to the current window. IMGUI_API ImGuiViewport*GetWindowViewport(); // get viewport currently associated to the current window.
// Window manipulation // Window manipulation
@ -1048,7 +1048,7 @@ namespace ImGui
IMGUI_API bool IsMouseDragging(ImGuiMouseButton button, float lock_threshold = -1.0f); // is mouse dragging? (uses io.MouseDraggingThreshold if lock_threshold < 0.0f) IMGUI_API bool IsMouseDragging(ImGuiMouseButton button, float lock_threshold = -1.0f); // is mouse dragging? (uses io.MouseDraggingThreshold if lock_threshold < 0.0f)
IMGUI_API ImVec2 GetMouseDragDelta(ImGuiMouseButton button = 0, float lock_threshold = -1.0f); // return the delta from the initial clicking position while the mouse button is pressed or was just released. This is locked and return 0.0f until the mouse moves past a distance threshold at least once (uses io.MouseDraggingThreshold if lock_threshold < 0.0f) IMGUI_API ImVec2 GetMouseDragDelta(ImGuiMouseButton button = 0, float lock_threshold = -1.0f); // return the delta from the initial clicking position while the mouse button is pressed or was just released. This is locked and return 0.0f until the mouse moves past a distance threshold at least once (uses io.MouseDraggingThreshold if lock_threshold < 0.0f)
IMGUI_API void ResetMouseDragDelta(ImGuiMouseButton button = 0); // IMGUI_API void ResetMouseDragDelta(ImGuiMouseButton button = 0); //
IMGUI_API ImGuiMouseCursor GetMouseCursor(); // get desired mouse cursor shape. Important: reset in ImGui::NewFrame(), this is updated during the frame. valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you IMGUI_API ImGuiMouseCursor GetMouseCursor(); // get desired mouse cursor shape. Important: reset in ImGui::NewFrame(), this is updated during the frame. valid before render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you
IMGUI_API void SetMouseCursor(ImGuiMouseCursor cursor_type); // set desired mouse cursor shape IMGUI_API void SetMouseCursor(ImGuiMouseCursor cursor_type); // set desired mouse cursor shape
IMGUI_API void SetNextFrameWantCaptureMouse(bool want_capture_mouse); // Override io.WantCaptureMouse flag next frame (said flag is left for your application to handle, typical when true it instucts your app to ignore inputs). This is equivalent to setting "io.WantCaptureMouse = want_capture_mouse;" after the next NewFrame() call. IMGUI_API void SetNextFrameWantCaptureMouse(bool want_capture_mouse); // Override io.WantCaptureMouse flag next frame (said flag is left for your application to handle, typical when true it instucts your app to ignore inputs). This is equivalent to setting "io.WantCaptureMouse = want_capture_mouse;" after the next NewFrame() call.
@ -1091,7 +1091,7 @@ namespace ImGui
// Note: You may use GetWindowViewport() to get the current viewport of the current window. // Note: You may use GetWindowViewport() to get the current viewport of the current window.
IMGUI_API void UpdatePlatformWindows(); // call in main loop. will call CreateWindow/ResizeWindow/etc. platform functions for each secondary viewport, and DestroyWindow for each inactive viewport. IMGUI_API void UpdatePlatformWindows(); // call in main loop. will call CreateWindow/ResizeWindow/etc. platform functions for each secondary viewport, and DestroyWindow for each inactive viewport.
IMGUI_API void RenderPlatformWindowsDefault(void* platform_render_arg = NULL, void* renderer_render_arg = NULL); // call in main loop. will call RenderWindow/SwapBuffers platform functions for each secondary viewport which doesn't have the ImGuiViewportFlags_Minimized flag set. May be reimplemented by user for custom rendering needs. IMGUI_API void RenderPlatformWindowsDefault(void* platform_render_arg = NULL, void* renderer_render_arg = NULL); // call in main loop. will call RenderWindow/SwapBuffers platform functions for each secondary viewport which doesn't have the ImGuiViewportFlags_Minimized flag set. May be reimplemented by user for custom rendering needs.
IMGUI_API void DestroyPlatformWindows(); // call DestroyWindow platform functions for all viewports. call from backend Shutdown() if you need to close platform windows before imgui shutdown. otherwise will be called by DestroyContext(). IMGUI_API void DestroyPlatformWindows(); // call DestroyWindow platform functions for all viewports. call from backend shutdown() if you need to close platform windows before imgui shutdown. otherwise will be called by DestroyContext().
IMGUI_API ImGuiViewport* FindViewportByID(ImGuiID id); // this is a helper for backends. IMGUI_API ImGuiViewport* FindViewportByID(ImGuiID id); // this is a helper for backends.
IMGUI_API ImGuiViewport* FindViewportByPlatformHandle(void* platform_handle); // this is a helper for backends. the type platform_handle is decided by the backend (e.g. HWND, MyWindow*, GLFWwindow* etc.) IMGUI_API ImGuiViewport* FindViewportByPlatformHandle(void* platform_handle); // this is a helper for backends. the type platform_handle is decided by the backend (e.g. HWND, MyWindow*, GLFWwindow* etc.)
@ -1247,7 +1247,7 @@ enum ImGuiTreeNodeFlags_
ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11, // Extend hit box to the right-most edge, even if not framed. This is not the default in order to allow adding other items on the same line without using AllowOverlap mode. ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11, // Extend hit box to the right-most edge, even if not framed. This is not the default in order to allow adding other items on the same line without using AllowOverlap mode.
ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12, // Extend hit box to the left-most and right-most edges (cover the indent area). ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12, // Extend hit box to the left-most and right-most edges (cover the indent area).
ImGuiTreeNodeFlags_SpanLabelWidth = 1 << 13, // Narrow hit box + narrow hovering highlight, will only cover the label text. ImGuiTreeNodeFlags_SpanLabelWidth = 1 << 13, // Narrow hit box + narrow hovering highlight, will only cover the label text.
ImGuiTreeNodeFlags_SpanAllColumns = 1 << 14, // Frame will span all columns of its container table (label will still fit in current column) ImGuiTreeNodeFlags_SpanAllColumns = 1 << 14, // frame will span all columns of its container table (label will still fit in current column)
ImGuiTreeNodeFlags_LabelSpanAllColumns = 1 << 15, // Label will span all columns of its container table ImGuiTreeNodeFlags_LabelSpanAllColumns = 1 << 15, // Label will span all columns of its container table
//ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 16, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible //ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 16, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible
ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 17, // (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop) ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 17, // (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)
@ -1289,7 +1289,7 @@ enum ImGuiSelectableFlags_
{ {
ImGuiSelectableFlags_None = 0, ImGuiSelectableFlags_None = 0,
ImGuiSelectableFlags_NoAutoClosePopups = 1 << 0, // Clicking this doesn't close parent popup window (overrides ImGuiItemFlags_AutoClosePopups) ImGuiSelectableFlags_NoAutoClosePopups = 1 << 0, // Clicking this doesn't close parent popup window (overrides ImGuiItemFlags_AutoClosePopups)
ImGuiSelectableFlags_SpanAllColumns = 1 << 1, // Frame will span all columns of its container table (text will still fit in current column) ImGuiSelectableFlags_SpanAllColumns = 1 << 1, // frame will span all columns of its container table (text will still fit in current column)
ImGuiSelectableFlags_AllowDoubleClick = 1 << 2, // Generate press events on double clicks too ImGuiSelectableFlags_AllowDoubleClick = 1 << 2, // Generate press events on double clicks too
ImGuiSelectableFlags_Disabled = 1 << 3, // Cannot be selected, display grayed out text ImGuiSelectableFlags_Disabled = 1 << 3, // Cannot be selected, display grayed out text
ImGuiSelectableFlags_AllowOverlap = 1 << 4, // (WIP) Hit testing to allow subsequent widgets to overlap this one ImGuiSelectableFlags_AllowOverlap = 1 << 4, // (WIP) Hit testing to allow subsequent widgets to overlap this one
@ -2251,7 +2251,7 @@ struct ImGuiStyle
float DockingSeparatorSize; // Thickness of resizing border between docked windows float DockingSeparatorSize; // Thickness of resizing border between docked windows
float MouseCursorScale; // Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). We apply per-monitor DPI scaling over this scale. May be removed later. float MouseCursorScale; // Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). We apply per-monitor DPI scaling over this scale. May be removed later.
bool AntiAliasedLines; // Enable anti-aliased lines/borders. Disable if you are really tight on CPU/GPU. Latched at the beginning of the frame (copied to ImDrawList). bool AntiAliasedLines; // Enable anti-aliased lines/borders. Disable if you are really tight on CPU/GPU. Latched at the beginning of the frame (copied to ImDrawList).
bool AntiAliasedLinesUseTex; // Enable anti-aliased lines/borders using textures where possible. Require backend to render with bilinear filtering (NOT point/nearest filtering). Latched at the beginning of the frame (copied to ImDrawList). bool AntiAliasedLinesUseTex; // Enable anti-aliased lines/borders using textures_ where possible. Require backend to render with bilinear filtering (NOT point/nearest filtering). Latched at the beginning of the frame (copied to ImDrawList).
bool AntiAliasedFill; // Enable anti-aliased edges around filled shapes (rounded rectangles, circles, etc.). Disable if you are really tight on CPU/GPU. Latched at the beginning of the frame (copied to ImDrawList). bool AntiAliasedFill; // Enable anti-aliased edges around filled shapes (rounded rectangles, circles, etc.). Disable if you are really tight on CPU/GPU. Latched at the beginning of the frame (copied to ImDrawList).
float CurveTessellationTol; // Tessellation tolerance when using PathBezierCurveTo() without a specific number of segments. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality. float CurveTessellationTol; // Tessellation tolerance when using PathBezierCurveTo() without a specific number of segments. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality.
float CircleTessellationMaxError; // Maximum error (in pixels) allowed when using AddCircle()/AddCircleFilled() or drawing rounded corner rectangles with no explicit segment count specified. Decrease for higher quality but more geometry. float CircleTessellationMaxError; // Maximum error (in pixels) allowed when using AddCircle()/AddCircleFilled() or drawing rounded corner rectangles with no explicit segment count specified. Decrease for higher quality but more geometry.
@ -2446,7 +2446,7 @@ struct ImGuiIO
#endif #endif
//------------------------------------------------------------------ //------------------------------------------------------------------
// Output - Updated by NewFrame() or EndFrame()/Render() // Output - Updated by NewFrame() or EndFrame()/render()
// (when reading from the io.WantCaptureMouse, io.WantCaptureKeyboard flags to dispatch your inputs, it is // (when reading from the io.WantCaptureMouse, io.WantCaptureKeyboard flags to dispatch your inputs, it is
// generally easier and more correct to use their state BEFORE calling NewFrame(). See FAQ for details!) // generally easier and more correct to use their state BEFORE calling NewFrame(). See FAQ for details!)
//------------------------------------------------------------------ //------------------------------------------------------------------
@ -2459,8 +2459,8 @@ struct ImGuiIO
bool NavActive; // Keyboard/Gamepad navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag. bool NavActive; // Keyboard/Gamepad navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag.
bool NavVisible; // Keyboard/Gamepad navigation highlight is visible and allowed (will handle ImGuiKey_NavXXX events). bool NavVisible; // Keyboard/Gamepad navigation highlight is visible and allowed (will handle ImGuiKey_NavXXX events).
float Framerate; // Estimate of application framerate (rolling average over 60 frames, based on io.DeltaTime), in frame per second. Solely for convenience. Slow applications may not want to use a moving average or may want to reset underlying buffers occasionally. float Framerate; // Estimate of application framerate (rolling average over 60 frames, based on io.DeltaTime), in frame per second. Solely for convenience. Slow applications may not want to use a moving average or may want to reset underlying buffers occasionally.
int MetricsRenderVertices; // Vertices output during last call to Render() int MetricsRenderVertices; // Vertices output during last call to render()
int MetricsRenderIndices; // Indices output during last call to Render() = number of triangles * 3 int MetricsRenderIndices; // Indices output during last call to render() = number of triangles * 3
int MetricsRenderWindows; // Number of visible windows int MetricsRenderWindows; // Number of visible windows
int MetricsActiveWindows; // Number of active windows int MetricsActiveWindows; // Number of active windows
ImVec2 MouseDelta; // Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta. ImVec2 MouseDelta; // Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta.
@ -3038,7 +3038,7 @@ struct ImGuiSelectionExternalStorage
// Hold a series of drawing commands. The user provides a renderer for ImDrawData which essentially contains an array of ImDrawList. // Hold a series of drawing commands. The user provides a renderer for ImDrawData which essentially contains an array of ImDrawList.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// The maximum line width to bake anti-aliased textures for. Build atlas with ImFontAtlasFlags_NoBakedLines to disable baking. // The maximum line width to bake anti-aliased textures_ for. Build atlas with ImFontAtlasFlags_NoBakedLines to disable baking.
#ifndef IM_DRAWLIST_TEX_LINES_WIDTH_MAX #ifndef IM_DRAWLIST_TEX_LINES_WIDTH_MAX
#define IM_DRAWLIST_TEX_LINES_WIDTH_MAX (32) #define IM_DRAWLIST_TEX_LINES_WIDTH_MAX (32)
#endif #endif
@ -3057,7 +3057,7 @@ typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* c
// Special Draw callback value to request renderer backend to reset the graphics/render state. // Special Draw callback value to request renderer backend to reset the graphics/render state.
// The renderer backend needs to handle this special value, otherwise it will crash trying to call a function at this address. // The renderer backend needs to handle this special value, otherwise it will crash trying to call a function at this address.
// This is useful, for example, if you submitted callbacks which you know have altered the render state and you want it to be restored. // This is useful, for example, if you submitted callbacks which you know have altered the render state and you want it to be restored.
// Render state is not reset by default because they are many perfectly useful way of altering render state (e.g. changing shader/blending settings before an Image call). // render state is not reset by default because they are many perfectly useful way of altering render state (e.g. changing shader/blending settings before an Image call).
#define ImDrawCallback_ResetRenderState (ImDrawCallback)(-8) #define ImDrawCallback_ResetRenderState (ImDrawCallback)(-8)
// Typically, 1 command = 1 GPU draw call (unless command is a callback) // Typically, 1 command = 1 GPU draw call (unless command is a callback)
@ -3156,8 +3156,8 @@ enum ImDrawFlags_
enum ImDrawListFlags_ enum ImDrawListFlags_
{ {
ImDrawListFlags_None = 0, ImDrawListFlags_None = 0,
ImDrawListFlags_AntiAliasedLines = 1 << 0, // Enable anti-aliased lines/borders (*2 the number of triangles for 1.0f wide line or lines thin enough to be drawn using textures, otherwise *3 the number of triangles) ImDrawListFlags_AntiAliasedLines = 1 << 0, // Enable anti-aliased lines/borders (*2 the number of triangles for 1.0f wide line or lines thin enough to be drawn using textures_, otherwise *3 the number of triangles)
ImDrawListFlags_AntiAliasedLinesUseTex = 1 << 1, // Enable anti-aliased lines/borders using textures when possible. Require backend to render with bilinear filtering (NOT point/nearest filtering). ImDrawListFlags_AntiAliasedLinesUseTex = 1 << 1, // Enable anti-aliased lines/borders using textures_ when possible. Require backend to render with bilinear filtering (NOT point/nearest filtering).
ImDrawListFlags_AntiAliasedFill = 1 << 2, // Enable anti-aliased edge around filled shapes (rounded rectangles, circles). ImDrawListFlags_AntiAliasedFill = 1 << 2, // Enable anti-aliased edge around filled shapes (rounded rectangles, circles).
ImDrawListFlags_AllowVtxOffset = 1 << 3, // Can emit 'VtxOffset > 0' to allow large meshes. Set when 'ImGuiBackendFlags_RendererHasVtxOffset' is enabled. ImDrawListFlags_AllowVtxOffset = 1 << 3, // Can emit 'VtxOffset > 0' to allow large meshes. Set when 'ImGuiBackendFlags_RendererHasVtxOffset' is enabled.
}; };
@ -3198,7 +3198,7 @@ struct ImDrawList
IMGUI_API ImDrawList(ImDrawListSharedData* shared_data); IMGUI_API ImDrawList(ImDrawListSharedData* shared_data);
IMGUI_API ~ImDrawList(); IMGUI_API ~ImDrawList();
IMGUI_API void PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect = false); // Render-level scissoring. This is passed down to your render function but not used for CPU-side coarse clipping. Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and widget culling) IMGUI_API void PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect = false); // render-level scissoring. This is passed down to your render function but not used for CPU-side coarse clipping. Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and widget culling)
IMGUI_API void PushClipRectFullScreen(); IMGUI_API void PushClipRectFullScreen();
IMGUI_API void PopClipRect(); IMGUI_API void PopClipRect();
IMGUI_API void PushTextureID(ImTextureID texture_id); IMGUI_API void PushTextureID(ImTextureID texture_id);
@ -3211,7 +3211,7 @@ struct ImDrawList
// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. // - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners.
// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). // - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred).
// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. // In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12.
// In future versions we will use textures to provide cheaper and higher-quality circles. // In future versions we will use textures_ to provide cheaper and higher-quality circles.
// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. // Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides.
IMGUI_API void AddLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float thickness = 1.0f); IMGUI_API void AddLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float thickness = 1.0f);
IMGUI_API void AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawFlags flags = 0, float thickness = 1.0f); // a: upper-left, b: lower-right (== upper-left + size) IMGUI_API void AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawFlags flags = 0, float thickness = 1.0f); // a: upper-left, b: lower-right (== upper-left + size)
@ -3326,7 +3326,7 @@ struct ImDrawList
// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) // as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList)
struct ImDrawData struct ImDrawData
{ {
bool Valid; // Only valid after Render() is called and before the next NewFrame() is called. bool Valid; // Only valid after render() is called and before the next NewFrame() is called.
int CmdListsCount; // Number of ImDrawList* to render int CmdListsCount; // Number of ImDrawList* to render
int TotalIdxCount; // For convenience, sum of all ImDrawList's IdxBuffer.Size int TotalIdxCount; // For convenience, sum of all ImDrawList's IdxBuffer.Size
int TotalVtxCount; // For convenience, sum of all ImDrawList's VtxBuffer.Size int TotalVtxCount; // For convenience, sum of all ImDrawList's VtxBuffer.Size
@ -3426,7 +3426,7 @@ enum ImFontAtlasFlags_
ImFontAtlasFlags_None = 0, ImFontAtlasFlags_None = 0,
ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0, // Don't round the height to next power of two ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0, // Don't round the height to next power of two
ImFontAtlasFlags_NoMouseCursors = 1 << 1, // Don't build software mouse cursors into the atlas (save a little texture memory) ImFontAtlasFlags_NoMouseCursors = 1 << 1, // Don't build software mouse cursors into the atlas (save a little texture memory)
ImFontAtlasFlags_NoBakedLines = 1 << 2, // Don't build thick line textures into the atlas (save a little texture memory, allow support for point/nearest filtering). The AntiAliasedLinesUseTex features uses them, otherwise they will be rendered using polygons (more expensive for CPU/GPU). ImFontAtlasFlags_NoBakedLines = 1 << 2, // Don't build thick line textures_ into the atlas (save a little texture memory, allow support for point/nearest filtering). The AntiAliasedLinesUseTex features uses them, otherwise they will be rendered using polygons (more expensive for CPU/GPU).
}; };
// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: // Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding:
@ -3647,7 +3647,7 @@ struct ImGuiViewport
ImVec2 WorkSize; // Work Area: Size of the viewport minus task bars, menu bars, status bars (<= Size) ImVec2 WorkSize; // Work Area: Size of the viewport minus task bars, menu bars, status bars (<= Size)
float DpiScale; // 1.0f = 96 DPI = No extra scale. float DpiScale; // 1.0f = 96 DPI = No extra scale.
ImGuiID ParentViewportId; // (Advanced) 0: no parent. Instruct the platform backend to setup a parent/child relationship between platform windows. ImGuiID ParentViewportId; // (Advanced) 0: no parent. Instruct the platform backend to setup a parent/child relationship between platform windows.
ImDrawData* DrawData; // The ImDrawData corresponding to this viewport. Valid after Render() and until the next call to NewFrame(). ImDrawData* DrawData; // The ImDrawData corresponding to this viewport. Valid after render() and until the next call to NewFrame().
// Platform/Backend Dependent Data // Platform/Backend Dependent Data
// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. // Our design separate the Renderer and Platform backends to facilitate combining default backends with each others.
@ -3693,7 +3693,7 @@ struct ImGuiViewport
// Steps to use multi-viewports in your application, when using a default backend from the examples/ folder: // Steps to use multi-viewports in your application, when using a default backend from the examples/ folder:
// - Application: Enable feature with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'. // - Application: Enable feature with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'.
// - Backend: The backend initialization will setup all necessary ImGuiPlatformIO's functions and update monitors info every frame. // - Backend: The backend initialization will setup all necessary ImGuiPlatformIO's functions and update monitors info every frame.
// - Application: In your main loop, call ImGui::UpdatePlatformWindows(), ImGui::RenderPlatformWindowsDefault() after EndFrame() or Render(). // - Application: In your main loop, call ImGui::UpdatePlatformWindows(), ImGui::RenderPlatformWindowsDefault() after EndFrame() or render().
// - Application: Fix absolute coordinates used in ImGui::SetWindowPos() or ImGui::SetNextWindowPos() calls. // - Application: Fix absolute coordinates used in ImGui::SetWindowPos() or ImGui::SetNextWindowPos() calls.
// //
// Steps to use multi-viewports in your application, when using a custom backend: // Steps to use multi-viewports in your application, when using a custom backend:
@ -3705,7 +3705,7 @@ struct ImGuiViewport
// Set 'io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports' and 'io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports'. // Set 'io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports' and 'io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports'.
// Update ImGuiPlatformIO's Monitors list every frame. // Update ImGuiPlatformIO's Monitors list every frame.
// Update MousePos every frame, in absolute coordinates. // Update MousePos every frame, in absolute coordinates.
// - Application: In your main loop, call ImGui::UpdatePlatformWindows(), ImGui::RenderPlatformWindowsDefault() after EndFrame() or Render(). // - Application: In your main loop, call ImGui::UpdatePlatformWindows(), ImGui::RenderPlatformWindowsDefault() after EndFrame() or render().
// You may skip calling RenderPlatformWindowsDefault() if its API is not convenient for your needs. Read comments below. // You may skip calling RenderPlatformWindowsDefault() if its API is not convenient for your needs. Read comments below.
// - Application: Fix absolute coordinates used in ImGui::SetWindowPos() or ImGui::SetNextWindowPos() calls. // - Application: Fix absolute coordinates used in ImGui::SetWindowPos() or ImGui::SetNextWindowPos() calls.
// //
@ -3811,7 +3811,7 @@ struct ImGuiPlatformIO
// Output - List of viewports to render into platform windows // Output - List of viewports to render into platform windows
//------------------------------------------------------------------ //------------------------------------------------------------------
// Viewports list (the list is updated by calling ImGui::EndFrame or ImGui::Render) // Viewports list (the list is updated by calling ImGui::EndFrame or ImGui::render)
// (in the future we will attempt to organize this feature to remove the need for a "main viewport") // (in the future we will attempt to organize this feature to remove the need for a "main viewport")
ImVector<ImGuiViewport*> Viewports; // Main viewports, followed by all secondary viewports. ImVector<ImGuiViewport*> Viewports; // Main viewports, followed by all secondary viewports.
}; };

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="GoogleTestAdapter" version="0.18.0" targetFramework="native" developmentDependency="true" />
</packages>

Binary file not shown.

@ -0,0 +1,24 @@
/////////////
// GLOBALS //
/////////////
Texture2D shaderTexture : register(t0);
SamplerState SampleType : register(s0);
//////////////
// TYPEDEFS //
//////////////
struct PixelInputType
{
float4 position : SV_POSITION;
float2 tex : TEXCOORD0;
};
////////////////////////////////////////////////////////////////////////////////
// Pixel Shader
////////////////////////////////////////////////////////////////////////////////
float4 DepthPixelShader(PixelInputType input) : SV_TARGET
{
float depth = input.position.z / input.position.w;
depth = 1.0f - depth;
return float4(depth, depth, depth, 1.0f);
}

@ -0,0 +1,47 @@
/////////////
// GLOBALS //
/////////////
cbuffer MatrixBuffer
{
matrix worldMatrix;
matrix viewMatrix;
matrix projectionMatrix;
};
//////////////
// TYPEDEFS //
//////////////
struct VertexInputType
{
float4 position : POSITION;
float2 tex : TEXCOORD0;
};
struct PixelInputType
{
float4 position : SV_POSITION;
float2 tex : TEXCOORD0;
};
////////////////////////////////////////////////////////////////////////////////
// Vertex Shader
////////////////////////////////////////////////////////////////////////////////
PixelInputType DepthVertexShader(VertexInputType input)
{
PixelInputType output;
// Change the position vector to be 4 units for proper matrix calculations.
input.position.w = 1.0f;
// Calculate the position of the vertex against the world, view, and projection matrices.
output.position = mul(input.position, worldMatrix);
output.position = mul(output.position, viewMatrix);
output.position = mul(output.position, projectionMatrix);
// Store the texture coordinates for the pixel shader.
output.tex = input.tex;
return output;
}

@ -1,64 +0,0 @@
#pragma once
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
class CelshadeClass
{
private :
struct MatrixBufferType
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct CameraBufferType
{
XMFLOAT3 cameraPosition;
float padding;
};
struct SunLightBufferType
{
XMFLOAT4 diffuseColor;
XMFLOAT4 ambientColor;
XMFLOAT3 sunDirection;
float intensity;
};
public :
CelshadeClass();
CelshadeClass(const CelshadeClass&);
~CelshadeClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool Render(ID3D11DeviceContext* deviceContex, int indexCount, XMMATRIX worldMatrix, XMMATRIX viewMatrix, XMMATRIX projectionMatrix, ID3D11ShaderResourceView* texture, XMFLOAT4 diffuseColor, XMFLOAT4 ambientColor, XMFLOAT3 sunDirection,float intensity);
private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext* deviceContext, XMMATRIX worldMatrix, XMMATRIX viewMatrix, XMMATRIX projectionMatrix, ID3D11ShaderResourceView* texture, XMFLOAT4 ambientColor, XMFLOAT4 diffuseColor, XMFLOAT3 lightDirection, float sunIntensity);
void RenderShader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* m_vertexShader;
ID3D11PixelShader* m_pixelShader;
ID3D11InputLayout* m_layout;
ID3D11SamplerState* m_sampleState;
ID3D11Buffer* m_matrixBuffer;
ID3D11Buffer* m_cameraBuffer;
ID3D11Buffer* m_sunlightBuffer;
ID3D11Buffer* m_sunlightColorBuffer;
ID3D11Buffer* m_sunlightPositionBuffer;
};

@ -1,59 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
// Filename: multitextureshaderclass.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _MULTITEXTURESHADERCLASS_H_
#define _MULTITEXTURESHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: MultiTextureShaderClass
////////////////////////////////////////////////////////////////////////////////
class MultiTextureShaderClass
{
private:
struct MatrixBufferType
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
public:
MultiTextureShaderClass();
MultiTextureShaderClass(const MultiTextureShaderClass&);
~MultiTextureShaderClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
void RenderShader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* m_vertexShader;
ID3D11PixelShader* m_pixelShader;
ID3D11InputLayout* m_layout;
ID3D11Buffer* m_matrixBuffer;
ID3D11SamplerState* m_sampleState;
};
#endif

@ -0,0 +1,55 @@
#ifndef _ALPHAMAPSHADERCLASS_H_
#define _ALPHAMAPSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: alpha_map_shader_class
////////////////////////////////////////////////////////////////////////////////
class alpha_map_shader_class
{
private:
struct matrix_buffer_type
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
public:
alpha_map_shader_class();
alpha_map_shader_class(const alpha_map_shader_class&);
~alpha_map_shader_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
private:
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void shutdown_shader();
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
void render_shader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* layout_;
ID3D11Buffer* matrix_buffer_;
ID3D11SamplerState* sample_state_;
};
#endif

@ -1,55 +0,0 @@
#ifndef _ALPHAMAPSHADERCLASS_H_
#define _ALPHAMAPSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: AlphaMapShaderClass
////////////////////////////////////////////////////////////////////////////////
class AlphaMapShaderClass
{
private:
struct MatrixBufferType
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
public:
AlphaMapShaderClass();
AlphaMapShaderClass(const AlphaMapShaderClass&);
~AlphaMapShaderClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
void RenderShader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* m_vertexShader;
ID3D11PixelShader* m_pixelShader;
ID3D11InputLayout* m_layout;
ID3D11Buffer* m_matrixBuffer;
ID3D11SamplerState* m_sampleState;
};
#endif

@ -0,0 +1,85 @@
#pragma once
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
class celshade_class
{
private :
struct matrix_buffer_type
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct camera_buffer_type
{
XMFLOAT3 cameraPosition;
float padding;
};
struct sun_light_buffer_type
{
XMFLOAT4 diffuse_color;
XMFLOAT4 ambient_color;
XMFLOAT3 sun_direction;
float intensity;
};
public :
celshade_class();
celshade_class(const celshade_class&);
~celshade_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render(
ID3D11DeviceContext* device_context,
int index_count,
XMMATRIX world_matrix,
XMMATRIX view_matrix, XMMATRIX
projection_matrix,
ID3D11ShaderResourceView* texture,
XMFLOAT4 diffuse_color,
XMFLOAT4 ambient_color,
XMFLOAT3 sun_direction,
float intensity
);
private:
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void shutdown_shader();
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool set_shader_parameters(
ID3D11DeviceContext* device_context,
XMMATRIX world_matrix,
XMMATRIX view_matrix,
XMMATRIX projection_matrix,
ID3D11ShaderResourceView* texture,
XMFLOAT4 ambient_color,
XMFLOAT4 diffuse_color,
XMFLOAT3 light_direction,
float sun_intensity
);
void render_shader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* layout_;
ID3D11SamplerState* sample_state_;
ID3D11Buffer* matrix_buffer_;
ID3D11Buffer* camera_buffer_;
ID3D11Buffer* sunlight_buffer_;
ID3D11Buffer* sunlight_color_buffer_;
ID3D11Buffer* sunlight_position_buffer_;
};

@ -18,12 +18,12 @@ using namespace std;
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Class name: ColorShaderClass // Class name: color_shader_class
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
class ColorShaderClass class color_shader_class
{ {
private: private:
struct MatrixBufferType struct matrix_buffer_type
{ {
XMMATRIX world; XMMATRIX world;
XMMATRIX view; XMMATRIX view;
@ -31,27 +31,27 @@ private:
}; };
public: public:
ColorShaderClass(); color_shader_class();
ColorShaderClass(const ColorShaderClass&); color_shader_class(const color_shader_class&);
~ColorShaderClass(); ~color_shader_class();
bool Initialize(ID3D11Device*, HWND); bool initialize(ID3D11Device*, HWND);
void Shutdown(); void shutdown();
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX); bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX);
private: private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*); bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader(); void shutdown_shader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*); void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX); bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX);
void RenderShader(ID3D11DeviceContext*, int); void render_shader(ID3D11DeviceContext*, int);
private: private:
ID3D11VertexShader* m_vertexShader; ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* m_pixelShader; ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* m_layout; ID3D11InputLayout* layout_;
ID3D11Buffer* m_matrixBuffer; ID3D11Buffer* matrix_buffer_;
}; };
#endif #endif

@ -0,0 +1,56 @@
#ifndef _DEPTH_SHADER_CLASS_H_
#define _DEPTH_SHADER_CLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: depth_shader_class
////////////////////////////////////////////////////////////////////////////////
class depth_shader_class
{
private:
struct matrix_buffer_type
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
public:
depth_shader_class();
depth_shader_class(const depth_shader_class&);
~depth_shader_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*);
private:
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void shutdown_shader();
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*);
void render_shader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* layout_;
ID3D11Buffer* matrix_buffer_;
ID3D11SamplerState* sample_state_;
};
#endif

@ -0,0 +1,62 @@
#ifndef _FONTSHADERCLASS_H_
#define _FONTSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: font_shader_class
////////////////////////////////////////////////////////////////////////////////
class font_shader_class
{
private:
struct matrix_buffer_type
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct pixel_buffer_type
{
XMFLOAT4 pixelColor;
};
public:
font_shader_class();
font_shader_class(const font_shader_class&);
~font_shader_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4);
private:
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void shutdown_shader();
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4);
void render_shader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* layout_;
ID3D11Buffer* matrix_buffer_;
ID3D11SamplerState* sample_state_;
ID3D11Buffer* pixel_buffer_;
};
#endif

@ -1,62 +0,0 @@
#ifndef _FONTSHADERCLASS_H_
#define _FONTSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: FontShaderClass
////////////////////////////////////////////////////////////////////////////////
class FontShaderClass
{
private:
struct MatrixBufferType
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct PixelBufferType
{
XMFLOAT4 pixelColor;
};
public:
FontShaderClass();
FontShaderClass(const FontShaderClass&);
~FontShaderClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4);
private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4);
void RenderShader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* m_vertexShader;
ID3D11PixelShader* m_pixelShader;
ID3D11InputLayout* m_layout;
ID3D11Buffer* m_matrixBuffer;
ID3D11SamplerState* m_sampleState;
ID3D11Buffer* m_pixelBuffer;
};
#endif

@ -0,0 +1,57 @@
////////////////////////////////////////////////////////////////////////////////
#ifndef _LIGHTMAPSHADERCLASS_H_
#define _LIGHTMAPSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: light_map_shader_class
////////////////////////////////////////////////////////////////////////////////
class light_map_shader_class
{
private:
struct matrix_buffer_type
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
public:
light_map_shader_class();
light_map_shader_class(const light_map_shader_class&);
~light_map_shader_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
private:
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void shutdown_shader();
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
void render_shader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* layout_;
ID3D11Buffer* matrix_buffer_;
ID3D11SamplerState* sample_state_;
};
#endif

@ -0,0 +1,92 @@
////////////////////////////////////////////////////////////////////////////////
// Filename: lightshaderclass.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _LIGHTSHADERCLASS_H_
#define _LIGHTSHADERCLASS_H_
#pragma once
/////////////
// GLOBALS //
/////////////
constexpr int num_lights = 4;
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: light_shader_class
////////////////////////////////////////////////////////////////////////////////
class light_shader_class
{
private:
struct matrix_buffer_type
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct camera_buffer_type
{
XMFLOAT3 cameraPosition;
float padding;
};
struct light_buffer_type
{
XMFLOAT4 ambientColor;
XMFLOAT4 diffuseColor;
XMFLOAT3 lightDirection;
float padding; // Added extra padding so structure is a multiple of 16 for CreateBuffer function requirements.
float specularPower;
XMFLOAT4 specularColor;
};
struct light_color_buffer_type
{
XMFLOAT4 diffuseColor[num_lights];
};
struct light_position_buffer_type
{
XMFLOAT4 lightPosition[num_lights];
};
public:
light_shader_class();
light_shader_class(const light_shader_class&);
~light_shader_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4[], XMFLOAT4[], XMFLOAT4[]);
private:
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void shutdown_shader();
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4[], XMFLOAT4[], XMFLOAT4[]);
void render_shader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* layout_;
ID3D11SamplerState* sample_state_;
ID3D11Buffer* matrix_buffer_;
ID3D11Buffer* camera_buffer_;
ID3D11Buffer* light_buffer_;
ID3D11Buffer* light_color_buffer_;
ID3D11Buffer* light_position_buffer_;
};
#endif

@ -1,57 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
#ifndef _LIGHTMAPSHADERCLASS_H_
#define _LIGHTMAPSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: LightMapShaderClass
////////////////////////////////////////////////////////////////////////////////
class LightMapShaderClass
{
private:
struct MatrixBufferType
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
public:
LightMapShaderClass();
LightMapShaderClass(const LightMapShaderClass&);
~LightMapShaderClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
void RenderShader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* m_vertexShader;
ID3D11PixelShader* m_pixelShader;
ID3D11InputLayout* m_layout;
ID3D11Buffer* m_matrixBuffer;
ID3D11SamplerState* m_sampleState;
};
#endif

@ -1,92 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
// Filename: lightshaderclass.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _LIGHTSHADERCLASS_H_
#define _LIGHTSHADERCLASS_H_
#pragma once
/////////////
// GLOBALS //
/////////////
const int NUM_LIGHTS = 4;
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: LightShaderClass
////////////////////////////////////////////////////////////////////////////////
class LightShaderClass
{
private:
struct MatrixBufferType
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct CameraBufferType
{
XMFLOAT3 cameraPosition;
float padding;
};
struct LightBufferType
{
XMFLOAT4 ambientColor;
XMFLOAT4 diffuseColor;
XMFLOAT3 lightDirection;
float padding; // Added extra padding so structure is a multiple of 16 for CreateBuffer function requirements.
float specularPower;
XMFLOAT4 specularColor;
};
struct LightColorBufferType
{
XMFLOAT4 diffuseColor[NUM_LIGHTS];
};
struct LightPositionBufferType
{
XMFLOAT4 lightPosition[NUM_LIGHTS];
};
public:
LightShaderClass();
LightShaderClass(const LightShaderClass&);
~LightShaderClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4[], XMFLOAT4[], XMFLOAT4[]);
private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4[], XMFLOAT4[], XMFLOAT4[]);
void RenderShader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* m_vertexShader;
ID3D11PixelShader* m_pixelShader;
ID3D11InputLayout* m_layout;
ID3D11SamplerState* m_sampleState;
ID3D11Buffer* m_matrixBuffer;
ID3D11Buffer* m_cameraBuffer;
ID3D11Buffer* m_lightBuffer;
ID3D11Buffer* m_lightColorBuffer;
ID3D11Buffer* m_lightPositionBuffer;
};
#endif

@ -0,0 +1,25 @@
#pragma once
#include <d3d11.h>
#include <DirectXMath.h>
#include <string>
class master_shader
{
public :
master_shader();
master_shader(const master_shader& other) = delete;
virtual ~master_shader();
virtual bool initialize(ID3D11Device* device, HWND hwnd) = 0;
protected:
wchar_t vs_filename_[128], ps_filename_[128];
wchar_t const* vs_name_ = L"";
wchar_t const* ps_name_ = L"";
};

@ -0,0 +1,59 @@
////////////////////////////////////////////////////////////////////////////////
// Filename: multitextureshaderclass.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _MULTITEXTURESHADERCLASS_H_
#define _MULTITEXTURESHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: multi_texture_shader_class
////////////////////////////////////////////////////////////////////////////////
class multi_texture_shader_class
{
private:
struct matrix_buffer_type
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
public:
multi_texture_shader_class();
multi_texture_shader_class(const multi_texture_shader_class&);
~multi_texture_shader_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
private:
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void shutdown_shader();
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
void render_shader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* layout_;
ID3D11Buffer* matrix_buffer_;
ID3D11SamplerState* sample_state_;
};
#endif

@ -0,0 +1,64 @@
#ifndef _NORMALMAPSHADERCLASS_H_
#define _NORMALMAPSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: normal_map_shader_class
////////////////////////////////////////////////////////////////////////////////
class normal_map_shader_class
{
private:
struct matrix_buffer_type
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct light_buffer_type
{
XMFLOAT4 diffuse_color;
XMFLOAT3 light_direction;
float padding;
};
public:
normal_map_shader_class();
normal_map_shader_class(const normal_map_shader_class&);
~normal_map_shader_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, XMFLOAT3, XMFLOAT4);
private:
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void shutdown_shader();
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, XMFLOAT3, XMFLOAT4);
void render_shader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* layout_;
ID3D11Buffer* matrix_buffer_;
ID3D11SamplerState* sample_state_;
ID3D11Buffer* light_buffer_;
};
#endif

@ -1,64 +0,0 @@
#ifndef _NORMALMAPSHADERCLASS_H_
#define _NORMALMAPSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: NormalMapShaderClass
////////////////////////////////////////////////////////////////////////////////
class NormalMapShaderClass
{
private:
struct MatrixBufferType
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct LightBufferType
{
XMFLOAT4 diffuseColor;
XMFLOAT3 lightDirection;
float padding;
};
public:
NormalMapShaderClass();
NormalMapShaderClass(const NormalMapShaderClass&);
~NormalMapShaderClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, XMFLOAT3, XMFLOAT4);
private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, XMFLOAT3, XMFLOAT4);
void RenderShader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* m_vertexShader;
ID3D11PixelShader* m_pixelShader;
ID3D11InputLayout* m_layout;
ID3D11Buffer* m_matrixBuffer;
ID3D11SamplerState* m_sampleState;
ID3D11Buffer* m_lightBuffer;
};
#endif

@ -0,0 +1,65 @@
////////////////////////////////////////////////////////////////////////////////
// Filename: reflectionshaderclass.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _REFLECTIONSHADERCLASS_H_
#define _REFLECTIONSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: reflection_shader_class
////////////////////////////////////////////////////////////////////////////////
class reflection_shader_class
{
private:
struct matrix_buffer_type
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct reflection_buffer_type
{
XMMATRIX reflection_matrix;
};
public:
reflection_shader_class();
reflection_shader_class(const reflection_shader_class&);
~reflection_shader_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, XMMATRIX);
private:
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void shutdown_shader();
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, XMMATRIX);
void render_shader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* layout_;
ID3D11Buffer* matrix_buffer_;
ID3D11SamplerState* sample_state_;
ID3D11Buffer* reflection_buffer_;
};
#endif

@ -1,65 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
// Filename: reflectionshaderclass.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _REFLECTIONSHADERCLASS_H_
#define _REFLECTIONSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: ReflectionShaderClass
////////////////////////////////////////////////////////////////////////////////
class ReflectionShaderClass
{
private:
struct MatrixBufferType
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct ReflectionBufferType
{
XMMATRIX reflectionMatrix;
};
public:
ReflectionShaderClass();
ReflectionShaderClass(const ReflectionShaderClass&);
~ReflectionShaderClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, XMMATRIX);
private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, XMMATRIX);
void RenderShader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* m_vertexShader;
ID3D11PixelShader* m_pixelShader;
ID3D11InputLayout* m_layout;
ID3D11Buffer* m_matrixBuffer;
ID3D11SamplerState* m_sampleState;
ID3D11Buffer* m_reflectionBuffer;
};
#endif

@ -0,0 +1,72 @@
#ifndef _REFRACTIONSHADERCLASS_H_
#define _REFRACTIONSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: refraction_shader_class
////////////////////////////////////////////////////////////////////////////////
class refraction_shader_class
{
private:
struct matrix_buffer_type
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct light_buffer_type
{
XMFLOAT4 ambient_color;
XMFLOAT4 diffuse_color;
XMFLOAT4 light_position;
XMFLOAT3 light_direction;
float padding;
};
struct clip_plane_buffer_type
{
XMFLOAT4 clip_plane;
};
public:
refraction_shader_class();
refraction_shader_class(const refraction_shader_class&);
~refraction_shader_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*,
XMFLOAT3, XMFLOAT4[], XMFLOAT4[], XMFLOAT4[], XMFLOAT4);
private:
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void shutdown_shader();
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*,
XMFLOAT3, XMFLOAT4[], XMFLOAT4[], XMFLOAT4[], XMFLOAT4);
void render_shader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* layout_;
ID3D11SamplerState* sample_state_;
ID3D11Buffer* matrix_buffer_;
ID3D11Buffer* light_buffer_;
ID3D11Buffer* clip_plane_buffer_;
};
#endif

@ -1,72 +0,0 @@
#ifndef _REFRACTIONSHADERCLASS_H_
#define _REFRACTIONSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: RefractionShaderClass
////////////////////////////////////////////////////////////////////////////////
class RefractionShaderClass
{
private:
struct MatrixBufferType
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct LightBufferType
{
XMFLOAT4 ambientColor;
XMFLOAT4 diffuseColor;
XMFLOAT4 lightPosition;
XMFLOAT3 lightDirection;
float padding;
};
struct ClipPlaneBufferType
{
XMFLOAT4 clipPlane;
};
public:
RefractionShaderClass();
RefractionShaderClass(const RefractionShaderClass&);
~RefractionShaderClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*,
XMFLOAT3, XMFLOAT4[], XMFLOAT4[], XMFLOAT4[], XMFLOAT4);
private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*,
XMFLOAT3, XMFLOAT4[], XMFLOAT4[], XMFLOAT4[], XMFLOAT4);
void RenderShader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* m_vertexShader;
ID3D11PixelShader* m_pixelShader;
ID3D11InputLayout* m_layout;
ID3D11SamplerState* m_sampleState;
ID3D11Buffer* m_matrixBuffer;
ID3D11Buffer* m_lightBuffer;
ID3D11Buffer* m_clipPlaneBuffer;
};
#endif

@ -0,0 +1,78 @@
#ifndef _SHADERMANAGERCLASS_H_
#define _SHADERMANAGERCLASS_H_
// Inclure les en-têtes nécessaires
#include <d3d11.h>
#include <DirectXMath.h>
#include <vector>
#include "texture_shader_class.h"
#include "normal_map_shader_class.h"
#include "multi_texture_shader_class.h"
#include "translate_shader_class.h"
#include "alpha_map_shader_class.h"
#include "spec_map_shader_class.h"
#include "transparent_shader_class.h"
#include "light_shader_class.h"
#include "light_map_shader_class.h"
#include "refraction_shader_class.h"
#include "water_shader_class.h"
#include "celshade_class.h"
#include "depth_shader_class.h"
#include "skybox_shader_class.h"
#include "sunlight_shader_class.h"
#include "depth_shader_class.h"
using namespace DirectX;
class shader_manager_class
{
public:
shader_manager_class();
shader_manager_class(const shader_manager_class&);
~shader_manager_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render_texture_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*);
bool render_normal_map_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, XMFLOAT3, XMFLOAT4);
bool render_multitexture_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
bool render_translate_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, float);
bool render_alpha_map_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
bool render_spec_map_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, XMFLOAT3, XMFLOAT4, XMFLOAT3, XMFLOAT4, float);
bool render_transparent_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, float);
bool renderlight_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4[], XMFLOAT4[], XMFLOAT4[]);
bool renderlight_map_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
bool render_refraction_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT3, XMFLOAT4[], XMFLOAT4[], XMFLOAT4[], XMFLOAT4);
bool render_water_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, float, float);
bool render_cel_shading_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3, float);
bool render_sunlight_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3, float);
bool render_skybox_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3, float);
bool render_depth_shader(
ID3D11DeviceContext* context,
int indexCount,
XMMATRIX worldMatrix,
XMMATRIX viewMatrix,
XMMATRIX projectionMatrix,
ID3D11ShaderResourceView* texture
);
private:
texture_shader_class* texture_shader_;
normal_map_shader_class* normal_map_shader_;
multi_texture_shader_class* multitexture_shader_;
translate_shader_class* translate_shader_;
alpha_map_shader_class* alpha_map_shader_;
spec_map_shader_class* spec_map_shader_;
transparent_shader_class* transparent_shader_;
light_shader_class* light_shader_;
light_map_shader_class* light_map_shader_;
refraction_shader_class* refraction_shader_;
water_shader_class* water_shader_;
celshade_class* cel_shading_shader_;
sunlight_shader_class* sunlight_shader_;
skybox_shader_class* skybox_shader_;
depth_shader_class* depth_shader_;
};
#endif

@ -1,67 +0,0 @@
#ifndef _SHADERMANAGERCLASS_H_
#define _SHADERMANAGERCLASS_H_
// Inclure les en-têtes nécessaires
#include <d3d11.h>
#include <DirectXMath.h>
#include <vector>
#include "textureshaderclass.h"
#include "normalmapshaderclass.h"
#include "multitextureshaderclass.h"
#include "translateshaderclass.h"
#include "alphamapshaderclass.h"
#include "specmapshaderclass.h"
#include "transparentshaderclass.h"
#include "lightshaderclass.h"
#include "lightmapshaderclass.h"
#include "refractionshaderclass.h"
#include "watershaderclass.h"
#include "celshadingshader.h"
#include "SkyboxShaderClass.h"
#include "sunlightshaderclass.h"
using namespace DirectX;
class ShaderManagerClass
{
public:
ShaderManagerClass();
ShaderManagerClass(const ShaderManagerClass&);
~ShaderManagerClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool RenderTextureShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*);
bool RenderNormalMapShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, XMFLOAT3, XMFLOAT4);
bool RenderMultitextureShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
bool RenderTranslateShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, float);
bool RenderAlphaMapShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
bool RenderSpecMapShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, XMFLOAT3, XMFLOAT4, XMFLOAT3, XMFLOAT4, float);
bool RenderTransparentShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, float);
bool RenderlightShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4[], XMFLOAT4[], XMFLOAT4[]);
bool RenderlightMapShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*);
bool RenderRefractionShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT3, XMFLOAT4[], XMFLOAT4[], XMFLOAT4[], XMFLOAT4);
bool RenderWaterShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, float, float);
bool RenderCelShadingShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3, float);
bool RenderSunlightShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3, float);
bool RenderSkyboxShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3, float);
private:
TextureShaderClass* m_TextureShader;
NormalMapShaderClass* m_NormalMapShader;
MultiTextureShaderClass* m_MultitextureShader;
TranslateShaderClass* m_TranslateShader;
AlphaMapShaderClass* m_AlphaMapShader;
SpecMapShaderClass* m_SpecMapShader;
TransparentShaderClass* m_TransparentShader;
LightShaderClass* m_LightShader;
LightMapShaderClass* m_LightMapShader;
RefractionShaderClass* m_RefractionShader;
WaterShaderClass* m_WaterShader;
CelshadeClass* m_CelShadingShader;
SunlightShaderClass* m_SunlightShader;
SkyboxShaderClass* m_SkyboxShader;
};
#endif

@ -8,7 +8,7 @@
using namespace DirectX; using namespace DirectX;
using namespace std; using namespace std;
class SkyboxShaderClass class skybox_shader_class
{ {
private : private :
@ -39,9 +39,9 @@ class SkyboxShaderClass
}; };
public : public :
SkyboxShaderClass(); skybox_shader_class();
SkyboxShaderClass(const SkyboxShaderClass&); skybox_shader_class(const skybox_shader_class&);
~SkyboxShaderClass(); ~skybox_shader_class();
bool Initialize(ID3D11Device*, HWND); bool Initialize(ID3D11Device*, HWND);
void Shutdown(); void Shutdown();

@ -0,0 +1,72 @@
#ifndef _SPECMAPSHADERCLASS_H_
#define _SPECMAPSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: spec_map_shader_class
////////////////////////////////////////////////////////////////////////////////
class spec_map_shader_class
{
private:
struct matrix_buffer_type
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct light_buffer_type
{
XMFLOAT4 diffuse_color;
XMFLOAT4 specular_color;
float specular_power;
XMFLOAT3 light_direction;
};
struct camera_buffer_type
{
XMFLOAT3 camera_position;
float padding;
};
public:
spec_map_shader_class();
spec_map_shader_class(const spec_map_shader_class&);
~spec_map_shader_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*,
XMFLOAT3, XMFLOAT4, XMFLOAT3, XMFLOAT4, float);
private:
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void shutdown_shader();
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*,
XMFLOAT3, XMFLOAT4, XMFLOAT3, XMFLOAT4, float);
void render_shader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* layout_;
ID3D11Buffer* matrix_buffer_;
ID3D11SamplerState* sample_state_;
ID3D11Buffer* light_buffer_;
ID3D11Buffer* camera_buffer_;
};
#endif

@ -1,72 +0,0 @@
#ifndef _SPECMAPSHADERCLASS_H_
#define _SPECMAPSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: SpecMapShaderClass
////////////////////////////////////////////////////////////////////////////////
class SpecMapShaderClass
{
private:
struct MatrixBufferType
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct LightBufferType
{
XMFLOAT4 diffuseColor;
XMFLOAT4 specularColor;
float specularPower;
XMFLOAT3 lightDirection;
};
struct CameraBufferType
{
XMFLOAT3 cameraPosition;
float padding;
};
public:
SpecMapShaderClass();
SpecMapShaderClass(const SpecMapShaderClass&);
~SpecMapShaderClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*,
XMFLOAT3, XMFLOAT4, XMFLOAT3, XMFLOAT4, float);
private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*,
XMFLOAT3, XMFLOAT4, XMFLOAT3, XMFLOAT4, float);
void RenderShader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* m_vertexShader;
ID3D11PixelShader* m_pixelShader;
ID3D11InputLayout* m_layout;
ID3D11Buffer* m_matrixBuffer;
ID3D11SamplerState* m_sampleState;
ID3D11Buffer* m_lightBuffer;
ID3D11Buffer* m_cameraBuffer;
};
#endif

@ -0,0 +1,68 @@
#pragma once
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
class sunlight_shader_class
{
private :
struct matrix_buffer_type
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct camera_buffer_type
{
XMFLOAT3 camera_position;
float padding;
};
struct sun_light_buffer_type
{
XMFLOAT4 diffuse_color;
XMFLOAT4 ambient_color;
XMFLOAT3 sun_direction;
float intensity;
};
struct sun_light_color_buffer_type
{
XMFLOAT4 sun_color;
};
public :
sunlight_shader_class();
sunlight_shader_class(const sunlight_shader_class&);
~sunlight_shader_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3,float);
private:
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void shutdown_shader();
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3, float);
void render_shader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* layout_;
ID3D11SamplerState* sample_state_;
ID3D11Buffer* matrix_buffer_;
ID3D11Buffer* camera_buffer_;
ID3D11Buffer* sunlight_buffer_;
ID3D11Buffer* sunlight_color_buffer_;
ID3D11Buffer* sunlight_position_buffer_;
};

@ -1,68 +0,0 @@
#pragma once
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
class SunlightShaderClass
{
private :
struct MatrixBufferType
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct CameraBufferType
{
XMFLOAT3 cameraPosition;
float padding;
};
struct SunLightBufferType
{
XMFLOAT4 diffuseColor;
XMFLOAT4 ambientColor;
XMFLOAT3 sunDirection;
float intensity;
};
struct SunLightColorBufferType
{
XMFLOAT4 sunColor;
};
public :
SunlightShaderClass();
SunlightShaderClass(const SunlightShaderClass&);
~SunlightShaderClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3,float);
private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3, float);
void RenderShader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* m_vertexShader;
ID3D11PixelShader* m_pixelShader;
ID3D11InputLayout* m_layout;
ID3D11SamplerState* m_sampleState;
ID3D11Buffer* m_matrixBuffer;
ID3D11Buffer* m_cameraBuffer;
ID3D11Buffer* m_sunlightBuffer;
ID3D11Buffer* m_sunlightColorBuffer;
ID3D11Buffer* m_sunlightPositionBuffer;
};

@ -0,0 +1,56 @@
#ifndef _TEXTURESHADERCLASS_H_
#define _TEXTURESHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: texture_shader_class
////////////////////////////////////////////////////////////////////////////////
class texture_shader_class
{
private:
struct matrix_buffer_type
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
public:
texture_shader_class();
texture_shader_class(const texture_shader_class&);
~texture_shader_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*);
private:
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void shutdown_shader();
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*);
void render_shader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* layout_;
ID3D11Buffer* matrix_buffer_;
ID3D11SamplerState* sample_state_;
};
#endif

@ -1,56 +0,0 @@
#ifndef _TEXTURESHADERCLASS_H_
#define _TEXTURESHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: TextureShaderClass
////////////////////////////////////////////////////////////////////////////////
class TextureShaderClass
{
private:
struct MatrixBufferType
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
public:
TextureShaderClass();
TextureShaderClass(const TextureShaderClass&);
~TextureShaderClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*);
private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*);
void RenderShader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* m_vertexShader;
ID3D11PixelShader* m_pixelShader;
ID3D11InputLayout* m_layout;
ID3D11Buffer* m_matrixBuffer;
ID3D11SamplerState* m_sampleState;
};
#endif

@ -0,0 +1,63 @@
#ifndef _TRANSLATESHADERCLASS_H_
#define _TRANSLATESHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: translate_shader_class
////////////////////////////////////////////////////////////////////////////////
class translate_shader_class
{
private:
struct matrix_buffer_type
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct translate_buffer_type
{
float translation;
XMFLOAT3 padding;
};
public:
translate_shader_class();
translate_shader_class(const translate_shader_class&);
~translate_shader_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, float);
private:
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void shutdown_shader();
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, float);
void render_shader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* layout_;
ID3D11Buffer* matrix_buffer_;
ID3D11SamplerState* sample_state_;
ID3D11Buffer* translate_buffer_;
};
#endif

@ -1,63 +0,0 @@
#ifndef _TRANSLATESHADERCLASS_H_
#define _TRANSLATESHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: TranslateShaderClass
////////////////////////////////////////////////////////////////////////////////
class TranslateShaderClass
{
private:
struct MatrixBufferType
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct TranslateBufferType
{
float translation;
XMFLOAT3 padding;
};
public:
TranslateShaderClass();
TranslateShaderClass(const TranslateShaderClass&);
~TranslateShaderClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, float);
private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, float);
void RenderShader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* m_vertexShader;
ID3D11PixelShader* m_pixelShader;
ID3D11InputLayout* m_layout;
ID3D11Buffer* m_matrixBuffer;
ID3D11SamplerState* m_sampleState;
ID3D11Buffer* m_translateBuffer;
};
#endif

@ -0,0 +1,63 @@
#ifndef _TRANSPARENTSHADERCLASS_H_
#define _TRANSPARENTSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: transparent_shader_class
////////////////////////////////////////////////////////////////////////////////
class transparent_shader_class
{
private:
struct matrix_buffer_type
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct transparent_buffer_type
{
float blend_amount;
XMFLOAT3 padding;
};
public:
transparent_shader_class();
transparent_shader_class(const transparent_shader_class&);
~transparent_shader_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, float);
private:
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void shutdown_shader();
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, float);
void render_shader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* layout_;
ID3D11Buffer* matrix_buffer_;
ID3D11SamplerState* sample_state_;
ID3D11Buffer* transparent_buffer_;
};
#endif

@ -1,63 +0,0 @@
#ifndef _TRANSPARENTSHADERCLASS_H_
#define _TRANSPARENTSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: TransparentShaderClass
////////////////////////////////////////////////////////////////////////////////
class TransparentShaderClass
{
private:
struct MatrixBufferType
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct TransparentBufferType
{
float blendAmount;
XMFLOAT3 padding;
};
public:
TransparentShaderClass();
TransparentShaderClass(const TransparentShaderClass&);
~TransparentShaderClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, float);
private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, float);
void RenderShader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* m_vertexShader;
ID3D11PixelShader* m_pixelShader;
ID3D11InputLayout* m_layout;
ID3D11Buffer* m_matrixBuffer;
ID3D11SamplerState* m_sampleState;
ID3D11Buffer* m_transparentBuffer;
};
#endif

@ -0,0 +1,70 @@
#ifndef _WATERSHADERCLASS_H_
#define _WATERSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: water_shader_class
////////////////////////////////////////////////////////////////////////////////
class water_shader_class
{
private:
struct matrix_buffer_type
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct reflection_buffer_type
{
XMMATRIX reflection;
};
struct water_buffer_type
{
float water_translation;
float reflect_refract_scale;
XMFLOAT2 padding;
};
public:
water_shader_class();
water_shader_class(const water_shader_class&);
~water_shader_class();
bool initialize(ID3D11Device*, HWND);
void shutdown();
bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*,
ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, float, float);
private:
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void shutdown_shader();
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*,
ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, float, float);
void render_shader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* vertex_shader_;
ID3D11PixelShader* pixel_shader_;
ID3D11InputLayout* layout_;
ID3D11Buffer* matrix_buffer_;
ID3D11SamplerState* sample_state_;
ID3D11Buffer* reflection_buffer_;
ID3D11Buffer* water_buffer_;
};
#endif

@ -1,70 +0,0 @@
#ifndef _WATERSHADERCLASS_H_
#define _WATERSHADERCLASS_H_
//////////////
// INCLUDES //
//////////////
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: WaterShaderClass
////////////////////////////////////////////////////////////////////////////////
class WaterShaderClass
{
private:
struct MatrixBufferType
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct ReflectionBufferType
{
XMMATRIX reflection;
};
struct WaterBufferType
{
float waterTranslation;
float reflectRefractScale;
XMFLOAT2 padding;
};
public:
WaterShaderClass();
WaterShaderClass(const WaterShaderClass&);
~WaterShaderClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*,
ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, float, float);
private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*,
ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, float, float);
void RenderShader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* m_vertexShader;
ID3D11PixelShader* m_pixelShader;
ID3D11InputLayout* m_layout;
ID3D11Buffer* m_matrixBuffer;
ID3D11SamplerState* m_sampleState;
ID3D11Buffer* m_reflectionBuffer;
ID3D11Buffer* m_waterBuffer;
};
#endif

@ -1,46 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
// Filename: cameraclass.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _CAMERACLASS_H_
#define _CAMERACLASS_H_
//////////////
// INCLUDES //
//////////////
#include <directxmath.h>
using namespace DirectX;
////////////////////////////////////////////////////////////////////////////////
// Class name: CameraClass
////////////////////////////////////////////////////////////////////////////////
class CameraClass
{
public:
CameraClass();
CameraClass(const CameraClass&);
~CameraClass();
void SetPosition(float, float, float);
void SetRotation(float, float, float);
XMFLOAT3 GetPosition();
XMFLOAT3 GetRotation();
void Render();
XMMATRIX GetViewMatrix(XMMATRIX& viewMatrix) const;
void RenderReflection(float);
void GetReflectionViewMatrix(XMMATRIX&) const;
private:
float m_positionX, m_positionY, m_positionZ;
float m_rotationX, m_rotationY, m_rotationZ;
XMMATRIX m_viewMatrix;
XMMATRIX m_reflectionViewMatrix;
};
#endif

@ -67,12 +67,12 @@ public:
case LogLevel::Info: return LogLevelInfo{ "Info", 0, ImVec4(0.0f, 1.0f, 0.0f, 1.0f) }; case LogLevel::Info: return LogLevelInfo{ "Info", 0, ImVec4(0.0f, 1.0f, 0.0f, 1.0f) };
case LogLevel::Warning: return LogLevelInfo{ "Warning", 1, ImVec4(1.0f, 1.0f, 0.0f, 1.0f) }; case LogLevel::Warning: return LogLevelInfo{ "Warning", 1, ImVec4(1.0f, 1.0f, 0.0f, 1.0f) };
case LogLevel::Error: return LogLevelInfo{ "Error", 2, ImVec4(1.0f, 0.0f, 0.0f, 1.0f) }; case LogLevel::Error: return LogLevelInfo{ "Error", 2, ImVec4(1.0f, 0.0f, 0.0f, 1.0f) };
case LogLevel::Shutdown: return LogLevelInfo{ "Shutdown", 3, ImVec4(0.5f, 0.0f, 0.0f, 1.0f) }; case LogLevel::Shutdown: return LogLevelInfo{ "shutdown", 3, ImVec4(0.5f, 0.0f, 0.0f, 1.0f) };
case LogLevel::Initialize: return LogLevelInfo{ "Initialize", 4, ImVec4(0.0f, 1.0f, 1.0f, 1.0f) }; case LogLevel::Initialize: return LogLevelInfo{ "initialize", 4, ImVec4(0.0f, 1.0f, 1.0f, 1.0f) };
case LogLevel::Update: return LogLevelInfo{ "Update", 5, ImVec4(1.0f, 0.0f, 1.0f, 1.0f) }; case LogLevel::Update: return LogLevelInfo{ "Update", 5, ImVec4(1.0f, 0.0f, 1.0f, 1.0f) };
case LogLevel::Render: return LogLevelInfo{ "Render", 6, ImVec4(1.0f, 1.0f, 1.0f, 1.0f) }; case LogLevel::Render: return LogLevelInfo{ "render", 6, ImVec4(1.0f, 1.0f, 1.0f, 1.0f) };
case LogLevel::Input: return LogLevelInfo{ "Input", 7, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) }; case LogLevel::Input: return LogLevelInfo{ "Input", 7, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) };
case LogLevel::Physics: return LogLevelInfo{ "Physics", 8, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) }; case LogLevel::Physics: return LogLevelInfo{ "physics", 8, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) };
case LogLevel::Audio: return LogLevelInfo{ "Audio", 9, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) }; case LogLevel::Audio: return LogLevelInfo{ "Audio", 9, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) };
case LogLevel::Network: return LogLevelInfo{ "Network", 10, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) }; case LogLevel::Network: return LogLevelInfo{ "Network", 10, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) };
case LogLevel::Scripting: return LogLevelInfo{ "Scripting", 11, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) }; case LogLevel::Scripting: return LogLevelInfo{ "Scripting", 11, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) };

@ -1,7 +1,7 @@
#pragma once #pragma once
#include <vector> #include <vector>
#include "d3dclass.h" #include "d_3d_class.h"
#include "object.h" #include "object.h"
class Skybox class Skybox
@ -11,9 +11,9 @@ public:
Skybox(); Skybox();
~Skybox(); ~Skybox();
void Initialize(D3DClass* d3dClassRef); // Get all the required references void Initialize(d_3d_class* d3dClassRef); // Get all the required references
Object* ConstructSkybox(); object* ConstructSkybox(application_class* app);
// Variables // Variables
@ -23,8 +23,8 @@ public:
private: private:
D3DClass* m_d3dClassRef; // Reference to the D3DClass instance d_3d_class* m_d3dClassRef; // Reference to the d_3d_class instance
Object* m_Skybox; object* m_Skybox;
}; };

@ -0,0 +1,327 @@
#ifndef _APPLICATIONCLASS_H_
#define _APPLICATIONCLASS_H_
///////////////////////
// MY CLASS INCLUDES //
///////////////////////
#include "d_3d_class.h"
#include "camera_class.h"
#include "light_class.h"
#include "bitmap_class.h"
#include "sprite_class.h"
#include "timer_class.h"
#include "font_shader_class.h"
#include "font_class.h"
#include "text_class.h"
#include "fps_class.h"
#include "input_class.h"
#include "shader_manager_class.h"
#include "modellistclass.h"
#include "position_class.h"
#include "frustumclass.h"
#include "render_texture_class.h"
#include "display_plane_class.h"
#include "translate_shader_class.h"
#include "reflection_shader_class.h"
#include "physics.h"
#include "frustum.h"
#include "skybox.h"
#include "shadow_map.h"
#include "stats.h"
#include "ecs/components/identity_component.h"
#include "ecs/components/render_component.h"
#include "ecs/components/transform_component.h"
#include "ecs/components/physics_component.h"
#include "ecs/components/shader_component.h"
#include "ecs/systems/render_system.h"
#include "ecs/components/model_path_component.h"
#include <fstream>
#include <WICTextureLoader.h>
#include <comdef.h> // Pour _com_error
#include <chrono>
#include <thread>
#include <map>
#include <algorithm>
#include <DirectXMath.h>
#include <mutex>
#include <memory>
#include <vector>
#include <filesystem>
#include "ecs/entity_manager.h"
/////////////
// GLOBALS //
/////////////
constexpr bool full_screen = false;
constexpr float screen_depth = 1000.0f;
constexpr float screen_near = 0.3f;
static std::map<std::string, std::shared_ptr<model_class>> g_model_cache;
struct input
{
bool key_left = false;
bool key_right = false;
bool key_up = false;
bool key_down = false;
};
////////////////////////////////////////////////////////////////////////////////
// Class name: application_class
////////////////////////////////////////////////////////////////////////////////
class application_class
{
public:
application_class();
~application_class();
virtual d_3d_class* get_direct_3d();
void set_direct_3d(d_3d_class* direct_3d) { direct_3d_ = direct_3d; };
render_texture_class* get_scene_texture() const { return scene_texture_; };
render_texture_class* get_render_texture() const { return render_texture_; };
render_texture_class* get_refraction_texture() const { return refraction_texture_; };
render_texture_class* get_reflection_texture() const { return reflection_texture_; };
bool create_big_cube(int side_count);
virtual bool initialize(int, int, HWND, bool is_vulkan);
void shutdown();
virtual bool frame(input_class*);
void physics_thread_function();
int get_physics_tick_rate() const { return physics_tick_rate_; };
void set_physics_tick_rate(int physics_tick_rate) { physics_tick_rate_ = physics_tick_rate; };
int get_screen_width() const;
void set_screen_width(int screen_width);
int get_screen_height() const;
void set_screen_height(int screen_height);
float get_speed() const { return speed_; };
void set_speed(const float speed) { this->speed_ = speed; };
void add_cube();
void delete_entity_by_id(int entity_id);
void add_kobject(std::wstring& filepath);
void set_path(WCHAR* path) { path_ = path; };
void set_w_folder(const std::filesystem::path& w_folder) { w_folder_ = w_folder; };
std::filesystem::path get_w_folder() const { return w_folder_; };
int get_terrain_entity_count();
int get_object_id() const { return object_id_; };
void set_object_id(int object_id) { object_id_ = object_id; };
void generate_terrain();
void delete_terrain();
XMVECTOR get_light_position(int index);
XMVECTOR get_light_color(int index);
void set_light_position(int index, XMVECTOR position);
void set_light_color(int index, XMVECTOR color);
std::vector<light_class*> get_lights() const { return lights_; };
light_class* get_sun_light() const { return sun_light_; };
bool get_should_quit() const { return should_quit_; };
void set_should_quit(const bool should_quit) { should_quit_ = should_quit; };
void set_cel_shading(const bool enable) { enable_cel_shading_ = enable; };
void set_vsync(bool vsync) {
vsync_enabled_ = vsync;
if (direct_3d_) {
direct_3d_->set_vsync(vsync);
Logger::Get().Log("Setting Vsync to " + std::to_string(vsync), __FILE__, __LINE__);
}
};
bool get_vsync() const { return vsync_enabled_; };
HWND get_hwnd() const { return hwnd_; };
void set_hwnd(HWND hwnd) { hwnd_ = hwnd; };
bool is_windowed() const { return windowed_; };
void set_windowed(bool windowed) { windowed_ = windowed; };
void set_window_size(const ImVec2 size) { window_size_ = size; };
ImVec2 get_window_size() const { return window_size_; };
float get_aspect_ratio() const { return static_cast<float>(screen_width_) / static_cast<float>(screen_height_); };
physics* get_physics() const { return physics_; };
// ----------------------------------- //
// ------------- Culling ------------- //
// ----------------------------------- //
frustum get_frustum() const { return frustum_culling_; };
void set_frustum(const frustum& frustum) { frustum_culling_ = frustum; };
void construct_frustum();
int get_render_count() const { return render_count_; };
void set_render_count(const int render_count) { render_count_ = render_count; };
float get_frustum_tolerance() const { return frustum_culling_tolerance_; };
void set_frustum_tolerance(const float frustum_tolerance) { frustum_culling_tolerance_ = frustum_tolerance; };
bool get_can_fixed_update() const { return can_fixed_update_; };
void set_can_fixed_update(bool can_fixed_update) { can_fixed_update_ = can_fixed_update; };
ID3D11ShaderResourceView* get_back_buffer_srv() const {return back_buffer_srv_;};
stats* get_stats() const { return stats_; };
fps_class* get_fps() const { return fps_; };
ecs::EntityManager* get_entity_manager() const { return entity_manager_.get(); };
void update_stats_after_modification();
std::map<std::string, std::shared_ptr<model_class>>& get_model_cache() { return g_model_cache; }
private:
bool render(float, float, float, float, float);
bool render_physics(float delta_time);
bool update_mouse_strings(int, int, bool);
bool update_fps();
bool update_render_count_string(int);
bool render_scene_to_texture(float);
bool render_refraction_to_texture();
bool render_reflection_to_texture();
bool render_pass(XMFLOAT4* diffuse, XMFLOAT4* position, XMFLOAT4* ambient, XMMATRIX view, XMMATRIX projection);
void update_skybox_position();
void culling_thread_function();
public :
std::vector<ID3D11ShaderResourceView*> textures;
private :
// Thread de culling
std::thread culling_thread_;
std::atomic<bool> culling_active_;
std::mutex objects_mutex_;
std::mutex terrain_mutex_;
std::vector<std::tuple<float, float, float, std::string, int>> terrain_generation_data_;
bool terrain_generation_ready_;
int next_terrain_object_id_;
// ------------------------------------- //
// ------------- DIRECT3D -------------- //
// ------------------------------------- //
d_3d_class* direct_3d_;
IDXGISwapChain* swap_chain_;
model_class* model_,* ground_model_, * wall_model_, * bath_model_, * water_model_;
ModelListClass* model_list_;
bool vsync_enabled_ = true;
HWND hwnd_;
bool windowed_;
// ------------------------------------- //
// ------------- RENDERING ------------- //
// ------------------------------------- //
XMMATRIX base_view_matrix_;
render_texture_class* render_texture_, * refraction_texture_, * reflection_texture_;
render_texture_class* scene_texture_;
display_plane_class* display_plane_;
int screen_width_, screen_height_;
camera_class* camera_;
camera_class* sun_camera_;
camera_class* active_camera_;
position_class* position_;
shadow_map* shadow_map_;
ID3D11ShaderResourceView* shadow_map_srv_;
// ------------------------------------ //
// ------------- OBJECTS -------------- //
// ------------------------------------ //
std::unique_ptr<ecs::EntityManager> entity_manager_;
object* selected_object_;
float speed_ = 0.1f; // speed for the demo spinning object
std::vector<object*> imported_object_;
int object_id_ = 0;
std::vector<object*> skybox_;
// ----------------------------------- //
// ------------- LIGHTS -------------- //
// ----------------------------------- //
light_class* m_light_;
std::vector<light_class*> lights_;
int num_lights_;
light_class* sun_light_;
XMFLOAT3 true_light_position_;
model_class* light_model_;
// ----------------------------------- //
// ------------- SHADERS ------------- //
// ----------------------------------- //
shader_manager_class* shader_manager_;
font_shader_class* font_shader_;
bitmap_class* bitmap_;
sprite_class* sprite_;
bool enable_cel_shading_;
// ----------------------------------- //
// ------------ VARIABLES ------------ //
// ----------------------------------- //
float water_height_, water_translation_;
wchar_t* path_;
std::filesystem::path w_folder_;
// ------------------------------------------------- //
// ------------- FPS AND INFO ON SCREEN ------------ //
// ------------------------------------------------- //
timer_class* timer_;
text_class* mouse_strings_;
text_class* render_count_string_;
font_class* font_;
fps_class* fps_;
text_class* fps_string_;
int previous_fps_;
// ------------------------------------------------- //
// ------------------- OTHER ----------------------- //
// ------------------------------------------------- //
bool should_quit_;
physics* physics_;
float gravity_;
XMVECTOR previous_position_;
ImVec2 window_size_;
int physics_tick_rate_ = 50;
bool can_fixed_update_ = false;
std::thread physics_thread_;
ID3D11Texture2D* back_buffer_texture_;
ID3D11ShaderResourceView* back_buffer_srv_;
stats* stats_;
// ------------------------------------------------- //
// ------------------- Culling --------------------- //
// ------------------------------------------------- //
frustum frustum_culling_;
int render_count_;
float frustum_culling_tolerance_ = 5.f;
// ------------------------------------------------- //
// -------------------- Input ---------------------- //
// ------------------------------------------------- //
input inputs_;
bool tab_was_pressed_;
};
#endif

@ -1,294 +0,0 @@
#ifndef _APPLICATIONCLASS_H_
#define _APPLICATIONCLASS_H_
///////////////////////
// MY CLASS INCLUDES //
///////////////////////
#include "d3dclass.h"
#include "cameraclass.h"
#include "object.h"
#include "lightclass.h"
#include <vector>
#include <filesystem>
#include "bitmapclass.h"
#include "spriteclass.h"
#include "timerclass.h"
#include "fontshaderclass.h"
#include "fontclass.h"
#include "textclass.h"
#include "fpsclass.h"
#include "inputclass.h"
#include "shadermanagerclass.h"
#include "modellistclass.h"
#include "positionclass.h"
#include "frustumclass.h"
#include "rendertextureclass.h"
#include "displayplaneclass.h"
#include "translateshaderclass.h"
#include "reflectionshaderclass.h"
#include "physics.h"
#include "frustum.h"
#include "skybox.h"
#include <fstream>
#include <WICTextureLoader.h>
#include <comdef.h> // Pour _com_error
#include <chrono>
#include <thread>
#include <map>
#include <algorithm>
#include <DirectXMath.h>
/////////////
// GLOBALS //
/////////////
const bool FULL_SCREEN = false;
const float SCREEN_DEPTH = 1000.0f;
const float SCREEN_NEAR = 0.3f;
struct Input
{
bool m_KeyLeft = false;
bool m_KeyRight = false;
bool m_KeyUp = false;
bool m_KeyDown = false;
};
////////////////////////////////////////////////////////////////////////////////
// Class name: ApplicationClass
////////////////////////////////////////////////////////////////////////////////
class ApplicationClass
{
public:
ApplicationClass();
~ApplicationClass();
D3DClass* GetDirect3D();
RenderTextureClass* GetSceneTexture() const { return m_SceneTexture; };
RenderTextureClass* GetRenderTexture() const { return m_RenderTexture; };
RenderTextureClass* GetRefractionTexture() const { return m_RefractionTexture; };
RenderTextureClass* GetReflectionTexture() const { return m_ReflectionTexture; };
bool Initialize(int, int, HWND, bool IsVulkan);
void Shutdown();
bool Frame(InputClass*);
void PhysicsThreadFunction();
int GetPhysicsTickRate() const { return m_PhysicsTickRate; };
void SetPhysicsTickRate(int physicsTickRate) { m_PhysicsTickRate = physicsTickRate; };
int GetScreenWidth() const;
void SetScreenWidth(int screenWidth);
int GetScreenHeight() const;
void SetScreenHeight(int screenHeight);
float GetSpeed() const { return m_speed; };
void SetSpeed(float speed) { this->m_speed = speed; };
void AddCube();
void DeleteKobject(int index);
size_t GetCubeCount() const { return m_cubes.size(); };
size_t GetTerrainCubeCount() const { return m_terrainChunk.size(); };
std::vector<Object*> GetCubes() const { return m_cubes; };
std::vector<Object*> GetTerrainCubes() const { return m_terrainChunk; };
std::vector<Object*> GetKobjects() const { return m_object; };
void AddKobject(std::wstring& filepath);
void SetPath(WCHAR* path) { m_path = path; };
void SetWFolder(std::filesystem::path WFolder) { m_WFolder = WFolder; };
void GenerateTerrain();
void DeleteTerrain();
XMVECTOR GetLightPosition(int index);
XMVECTOR GetLightColor(int index);
void SetLightPosition(int index, XMVECTOR color);
void SetLightColor(int index, XMVECTOR color);
void DeleteLight(int index);
void AddLight();
std::vector<LightClass*> GetLights() const { return m_Lights; };
LightClass* GetSunLight() const { return m_SunLight; };
bool GetShouldQuit() const { return m_ShouldQuit; };
void SetShouldQuit(bool shouldQuit) { m_ShouldQuit = shouldQuit; };
void SetCelShading(bool enable) { m_enableCelShading = enable; };
void SetVsync(bool vsync);
bool GetVsync() const { return VSYNC_ENABLED; };
HWND GetHwnd() const;
void SetHwnd(HWND hwnd);
bool IsWindowed() const;
void SetWindowed(bool windowed);
void SetWindowSize(ImVec2 size) { windowSize = size; };
ImVec2 GetWindowSize() const { return windowSize; };
float GetAspectRatio() const { return (float)m_screenWidth / (float)m_screenHeight; };
Physics* GetPhysics() const { return m_Physics; };
// ----------------------------------- //
// ------------- Culling ------------- //
// ----------------------------------- //
Frustum GetFrustum() const { return m_FrustumCulling; };
void SetFrustum(Frustum frustum) { m_FrustumCulling = frustum; };
void ConstructFrustum();
int GetRenderCount() const { return m_renderCount; };
void SetRenderCount(int renderCount) { m_renderCount = renderCount; };
float GetFrustumTolerance() const { return m_FrustumCullingTolerance; };
void SetFrustumTolerance(float frustumTolerance) { m_FrustumCullingTolerance = frustumTolerance; };
bool GetCanFixedUpdate() const { return CanFixedUpdate; };
void SetCanFixedUpdate(bool canFixedUpdate) { CanFixedUpdate = canFixedUpdate; };
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:
bool Render(float, float, float, float, float);
bool RenderPhysics(bool keyLeft, bool keyRight, bool keyUp, bool keyDown, float deltaTime);
bool UpdateMouseStrings(int, int, bool);
bool UpdateFps();
bool UpdateRenderCountString(int);
bool RenderSceneToTexture(float);
bool RenderRefractionToTexture();
bool RenderReflectionToTexture();
bool RenderPass(const std::vector<std::reference_wrapper<std::vector<Object*>>>& RenderQueues, XMFLOAT4* diffuse, XMFLOAT4* position, XMFLOAT4* ambient, XMMATRIX view, XMMATRIX projection);
void UpdateSkyboxPosition();
public :
std::vector<ID3D11ShaderResourceView*> textures;
private :
// ------------------------------------- //
// ------------- DIRECT3D -------------- //
// ------------------------------------- //
D3DClass* m_Direct3D;
IDXGISwapChain* m_swapChain;
ModelClass* m_Model,* m_GroundModel, * m_WallModel, * m_BathModel, * m_WaterModel;
ModelListClass* m_ModelList;
bool VSYNC_ENABLED = true;
HWND m_hwnd;
bool m_windowed;
std::string m_scenePath;
// ------------------------------------- //
// ------------- RENDERING ------------- //
// ------------------------------------- //
XMMATRIX m_baseViewMatrix;
RenderTextureClass* m_RenderTexture, * m_RefractionTexture, * m_ReflectionTexture;
RenderTextureClass* m_SceneTexture;
DisplayPlaneClass* m_DisplayPlane;
int m_screenWidth, m_screenHeight;
CameraClass* m_Camera;
PositionClass* m_Position;
// ------------------------------------ //
// ------------- OBJECTS -------------- //
// ------------------------------------ //
Object* m_SelectedObject;
std::vector<Object*> m_cubes;
std::vector<Object*> m_terrainChunk;
float m_speed = 0.1f; // speed for the demo spinning object
std::vector<Object*> m_object;
std::vector<Object*> m_ImportedObject;
int m_ObjectId = 0;
std::vector<std::reference_wrapper<std::vector<Object*>>> m_RenderQueues;
std::vector<Object*> m_Skybox;
// ----------------------------------- //
// ------------- LIGHTS -------------- //
// ----------------------------------- //
LightClass* m_Light;
std::vector<LightClass*> m_Lights;
int m_numLights;
LightClass* m_SunLight;
XMFLOAT3 TrueLightPosition;
ModelClass* m_LightModel;
// ----------------------------------- //
// ------------- SHADERS ------------- //
// ----------------------------------- //
ShaderManagerClass* m_ShaderManager;
FontShaderClass* m_FontShader;
BitmapClass* m_Bitmap;
SpriteClass* m_Sprite;
bool m_enableCelShading;
// ----------------------------------- //
// ------------ VARIABLES ------------ //
// ----------------------------------- //
float m_waterHeight, m_waterTranslation;
wchar_t* m_path;
std::filesystem::path m_WFolder;
// ------------------------------------------------- //
// ------------- FPS AND INFO ON SCREEN ------------ //
// ------------------------------------------------- //
TimerClass* m_Timer;
TextClass* m_MouseStrings;
TextClass* m_RenderCountString;
FontClass* m_Font;
FpsClass* m_Fps;
TextClass* m_FpsString;
int m_previousFps;
// ------------------------------------------------- //
// ------------------- OTHER ----------------------- //
// ------------------------------------------------- //
bool m_ShouldQuit;
Physics* m_Physics;
float m_gravity;
XMVECTOR m_previousPosition;
ImVec2 windowSize;
int m_PhysicsTickRate = 50;
bool CanFixedUpdate = false;
std::thread m_PhysicsThread;
ID3D11Texture2D* m_BackBufferTexture;
ID3D11ShaderResourceView* m_BackBufferSRV;
// ------------------------------------------------- //
// ------------------- Culling --------------------- //
// ------------------------------------------------- //
Frustum m_FrustumCulling;
int m_renderCount;
float m_FrustumCullingTolerance = 5.f;
// ------------------------------------------------- //
// -------------------- Input ---------------------- //
// ------------------------------------------------- //
Input m_Inputs;
};
#endif

@ -0,0 +1,59 @@
#ifndef _BITMAPCLASS_H_
#define _BITMAPCLASS_H_
//////////////
// INCLUDES //
//////////////
#include <directxmath.h>
using namespace DirectX;
///////////////////////
// MY CLASS INCLUDES //
///////////////////////
#include "texture_class.h"
////////////////////////////////////////////////////////////////////////////////
// Class name: bitmap_class
////////////////////////////////////////////////////////////////////////////////
class bitmap_class
{
private:
struct vertex_type
{
XMFLOAT3 position;
XMFLOAT2 texture;
};
public:
bitmap_class();
bitmap_class(const bitmap_class&);
~bitmap_class();
bool initialize(ID3D11Device*, ID3D11DeviceContext*, int, int, char*, int, int);
void shutdown();
bool render(ID3D11DeviceContext*);
int get_index_count();
ID3D11ShaderResourceView* get_texture();
void set_render_location(int, int);
private:
bool initialize_buffers(ID3D11Device*);
void shutdown_buffers();
bool update_buffers(ID3D11DeviceContext*);
void render_buffers(ID3D11DeviceContext*);
bool load_texture(ID3D11Device*, ID3D11DeviceContext*, char*);
void release_texture();
private:
ID3D11Buffer* vertex_buffer_, * index_buffer_;
int vertex_count_, index_count_, screen_width_, screen_height_, bitmap_width_, bitmap_height_, render_x_, render_y_, prev_pos_x_, prev_pos_y_;
texture_class* texture_;
};
#endif

@ -1,59 +0,0 @@
#ifndef _BITMAPCLASS_H_
#define _BITMAPCLASS_H_
//////////////
// INCLUDES //
//////////////
#include <directxmath.h>
using namespace DirectX;
///////////////////////
// MY CLASS INCLUDES //
///////////////////////
#include "textureclass.h"
////////////////////////////////////////////////////////////////////////////////
// Class name: BitmapClass
////////////////////////////////////////////////////////////////////////////////
class BitmapClass
{
private:
struct VertexType
{
XMFLOAT3 position;
XMFLOAT2 texture;
};
public:
BitmapClass();
BitmapClass(const BitmapClass&);
~BitmapClass();
bool Initialize(ID3D11Device*, ID3D11DeviceContext*, int, int, char*, int, int);
void Shutdown();
bool Render(ID3D11DeviceContext*);
int GetIndexCount();
ID3D11ShaderResourceView* GetTexture();
void SetRenderLocation(int, int);
private:
bool InitializeBuffers(ID3D11Device*);
void ShutdownBuffers();
bool UpdateBuffers(ID3D11DeviceContext*);
void RenderBuffers(ID3D11DeviceContext*);
bool LoadTexture(ID3D11Device*, ID3D11DeviceContext*, char*);
void ReleaseTexture();
private:
ID3D11Buffer* m_vertexBuffer, * m_indexBuffer;
int m_vertexCount, m_indexCount, m_screenWidth, m_screenHeight, m_bitmapWidth, m_bitmapHeight, m_renderX, m_renderY, m_prevPosX, m_prevPosY;
TextureClass* m_Texture;
};
#endif

@ -0,0 +1,46 @@
////////////////////////////////////////////////////////////////////////////////
// Filename: cameraclass.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _CAMERACLASS_H_
#define _CAMERACLASS_H_
//////////////
// INCLUDES //
//////////////
#include <directxmath.h>
using namespace DirectX;
////////////////////////////////////////////////////////////////////////////////
// Class name: camera_class
////////////////////////////////////////////////////////////////////////////////
class camera_class
{
public:
camera_class();
camera_class(const camera_class&);
~camera_class();
void set_position(float, float, float);
void set_rotation(float, float, float);
XMFLOAT3 get_position();
XMFLOAT3 get_rotation();
void render();
XMMATRIX get_view_matrix(XMMATRIX& view_matrix) const;
void render_reflection(float);
void get_reflection_view_matrix(XMMATRIX&) const;
private:
float position_x_, position_y_, position_z_;
float rotation_x_, rotation_y_, rotation_z_;
XMMATRIX view_matrix_;
XMMATRIX reflection_view_matrix_;
};
#endif

@ -1,90 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
// Filename: d3dclass.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _D3DCLASS_H_
#define _D3DCLASS_H_
/////////////
// LINKING //
/////////////
#pragma comment(lib, "d3d11.lib")
#pragma comment(lib, "dxgi.lib")
#pragma comment(lib, "d3dcompiler.lib")
//////////////
// INCLUDES //
//////////////
#include "imguiManager.h"
#include "d3d11.h"
#include "fontshaderclass.h"
#include "fontclass.h"
#include "textclass.h"
using namespace DirectX;
////////////////////////////////////////////////////////////////////////////////
// Class name: D3DClass
////////////////////////////////////////////////////////////////////////////////
class D3DClass
{
public:
D3DClass();
D3DClass(const D3DClass&);
~D3DClass();
bool Initialize(int, int, bool, HWND, bool, float, float);
void Shutdown();
void BeginScene(float, float, float, float);
void EndScene();
ID3D11Device* GetDevice();
ID3D11DeviceContext* GetDeviceContext();
//XMMATRIX GetProjectionMatrix(XMMATRIX& projectionMatrix);
IDXGISwapChain* m_swapChain;
IDXGISwapChain* GetSwapChain();
void ResizeSwapChain(int, int);
void SetVsync(bool vsync);
XMMATRIX GetProjectionMatrix() const { return m_projectionMatrix; };
XMMATRIX GetWorldMatrix() const { return m_worldMatrix;};
XMMATRIX GetOrthoMatrix() const { return m_orthoMatrix; };
void GetVideoCardInfo(char*, int&);
void SetBackBufferRenderTarget();
void ResetViewport();
void ReleaseResources();
void ResetResources(int newWidth, int newHeight);
void TurnZBufferOn();
void TurnZBufferOff();
void EnableAlphaBlending();
void DisableAlphaBlending();
private:
bool m_vsync_enabled;
int m_videoCardMemory;
char m_videoCardDescription[128];
ID3D11Device* m_device;
ID3D11DeviceContext* m_deviceContext;
ID3D11RenderTargetView* m_renderTargetView;
ID3D11Texture2D* m_depthStencilBuffer;
ID3D11DepthStencilState* m_depthStencilState;
ID3D11DepthStencilView* m_depthStencilView;
ID3D11RasterizerState* m_rasterState;
XMMATRIX m_projectionMatrix;
XMMATRIX m_worldMatrix;
XMMATRIX m_orthoMatrix;
D3D11_VIEWPORT m_viewport;
ID3D11DepthStencilState* m_depthDisabledStencilState;
ID3D11BlendState* m_alphaEnableBlendingState;
ID3D11BlendState* m_alphaDisableBlendingState;
};
#endif

@ -0,0 +1,90 @@
////////////////////////////////////////////////////////////////////////////////
// Filename: d3dclass.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _D3DCLASS_H_
#define _D3DCLASS_H_
/////////////
// LINKING //
/////////////
#pragma comment(lib, "d3d11.lib")
#pragma comment(lib, "dxgi.lib")
#pragma comment(lib, "d3dcompiler.lib")
//////////////
// INCLUDES //
//////////////
#include "imguiManager.h"
#include "d3d11.h"
#include "font_shader_class.h"
#include "font_class.h"
#include "text_class.h"
using namespace DirectX;
////////////////////////////////////////////////////////////////////////////////
// Class name: d_3d_class
////////////////////////////////////////////////////////////////////////////////
class d_3d_class
{
public:
d_3d_class();
d_3d_class(const d_3d_class&);
~d_3d_class();
virtual bool initialize(int, int, bool, HWND, bool, float, float);
void shutdown();
virtual void begin_scene(float, float, float, float);
virtual void end_scene();
ID3D11Device* get_device();
ID3D11DeviceContext* get_device_context();
//XMMATRIX get_projection_matrix(XMMATRIX& projectionMatrix);
IDXGISwapChain* swap_chain;
IDXGISwapChain* get_swap_chain();
void resize_swap_chain(int, int);
void set_vsync(bool vsync);
XMMATRIX get_projection_matrix() const { return projection_matrix_; };
XMMATRIX get_world_matrix() const { return world_matrix_;};
XMMATRIX get_ortho_matrix() const { return ortho_matrix_; };
void get_video_card_info(char*, int&);
void set_back_buffer_render_target();
void reset_viewport();
void release_resources();
void reset_resources(int newWidth, int newHeight);
void turn_z_buffer_on();
void turn_z_buffer_off();
void enable_alpha_blending();
void disable_alpha_blending();
private:
bool vsync_enabled_;
int video_card_memory_;
char video_card_description_[128];
ID3D11Device* device_;
ID3D11DeviceContext* device_context_;
ID3D11RenderTargetView* render_target_view_;
ID3D11Texture2D* depth_stencil_buffer_;
ID3D11DepthStencilState* depth_stencil_state_;
ID3D11DepthStencilView* depth_stencil_view_;
ID3D11RasterizerState* raster_state_;
XMMATRIX projection_matrix_;
XMMATRIX world_matrix_;
XMMATRIX ortho_matrix_;
D3D11_VIEWPORT viewport_;
ID3D11DepthStencilState* depth_disabled_stencil_state_;
ID3D11BlendState* alpha_enable_blending_state_;
ID3D11BlendState* alpha_disable_blending_state_;
};
#endif

@ -5,13 +5,13 @@
/////////////////////// ///////////////////////
// MY CLASS INCLUDES // // MY CLASS INCLUDES //
/////////////////////// ///////////////////////
#include "d3dclass.h" #include "d_3d_class.h"
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Class name: DisplayPlaneClass // Class name: display_plane_class
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
class DisplayPlaneClass class display_plane_class
{ {
private: private:
struct VertexType struct VertexType
@ -21,9 +21,9 @@ private:
}; };
public: public:
DisplayPlaneClass(); display_plane_class();
DisplayPlaneClass(const DisplayPlaneClass&); display_plane_class(const display_plane_class&);
~DisplayPlaneClass(); ~display_plane_class();
bool Initialize(ID3D11Device*, float, float); bool Initialize(ID3D11Device*, float, float);
void Shutdown(); void Shutdown();

@ -0,0 +1,43 @@
#pragma once
#include <memory>
#include <typeindex>
#include <typeinfo>
namespace ecs {
// Classe de base pour tous les composants
class Component {
public:
Component() = default;
virtual ~Component() = default;
// Empêcher la copie
Component(const Component&) = delete;
Component& operator=(const Component&) = delete;
// Permettre le déplacement
Component(Component&&) = default;
Component& operator=(Component&&) = default;
// Fonction virtuelle pour initialiser le composant
virtual void Initialize() {}
// Fonction virtuelle pour la mise à jour du composant
virtual void Update(float deltaTime) {}
// virtual std::string Serialize() {}
// virtual void Deserialize(const std::string& data) {}
};
// Alias utiles
using ComponentPtr = std::shared_ptr<Component>;
using ComponentTypeID = std::type_index;
// Fonction pour obtenir l'ID de type d'un composant
template<typename T>
ComponentTypeID GetComponentTypeID() {
static_assert(std::is_base_of<Component, T>::value, "T must derive from Component");
return std::type_index(typeid(T));
}
} // namespace ecs

@ -0,0 +1,58 @@
#pragma once
#include "../component.h"
#include <string>
namespace ecs {
enum class ObjectType
{
Sphere,
Cube,
Terrain,
Unknown
};
class IdentityComponent : public Component {
public:
IdentityComponent() : m_id(0), m_type(ObjectType::Unknown) {}
explicit IdentityComponent(int id) : m_id(id), m_type(ObjectType::Unknown) {}
IdentityComponent(int id, const std::string& name) : m_id(id), m_name(name), m_type(ObjectType::Unknown) {}
~IdentityComponent() = default;
void Initialize() override {}
//void Update(float deltaTime) override {}
// Getters et setters
int GetId() const { return m_id; }
void SetId(int id) { m_id = id; }
const std::string& GetName() const { return m_name; }
void SetName(const std::string& name) { m_name = name; }
ObjectType GetType() const { return m_type; }
void SetType(ObjectType type) { m_type = type; }
// Conversions utiles
static std::string ObjectTypeToString(ObjectType type) {
switch (type) {
case ObjectType::Cube: return "Cube";
case ObjectType::Sphere: return "Sphere";
case ObjectType::Terrain: return "Terrain";
default: return "Unknown";
}
}
static ObjectType StringToObjectType(const std::string& str) {
if (str == "Cube") return ObjectType::Cube;
if (str == "Sphere") return ObjectType::Sphere;
if (str == "Terrain") return ObjectType::Terrain;
return ObjectType::Unknown;
}
private:
int m_id;
std::string m_name;
ObjectType m_type;
};
} // namespace ecs

@ -0,0 +1,24 @@
#pragma once
#include "../component.h"
#include <string>
namespace ecs {
class ModelPathComponent : public Component {
public:
ModelPathComponent() = default;
explicit ModelPathComponent(const std::wstring& path) : m_path(path) {}
~ModelPathComponent() = default;
void Initialize() override {}
void Update(float deltaTime) override {}
// Getters et setters
const std::wstring& GetPath() const { return m_path; }
void SetPath(const std::wstring& path) { m_path = path; }
private:
std::wstring m_path;
};
} // namespace ecs

@ -0,0 +1,110 @@
#pragma once
#include "../component.h"
#include <DirectXMath.h>
using namespace DirectX;
namespace ecs {
class PhysicsComponent : public Component {
public:
PhysicsComponent() {
m_Velocity = XMVectorZero();
m_Acceleration = XMVectorZero();
m_PreviousPosition = XMVectorZero();
m_Mass = 1.0f;
m_BoundingRadius = 1.0f;
m_IsGrounded = false;
m_IsPhysicsEnabled = false;
m_GravityEnabled = true;
}
~PhysicsComponent() = default;
void Initialize() override {
// Initialisation du composant physique
}
void Update(float deltaTime) override {
if (!m_IsPhysicsEnabled) return;
// Mise à jour de la vélocité basée sur l'accélération
m_Velocity = m_Velocity + m_Acceleration * deltaTime;
// Si la physique est activée et qu'une fonction de mise à jour de position est définie
if (m_UpdatePositionCallback) {
m_UpdatePositionCallback(m_Velocity * deltaTime);
}
}
// Lancement d'un objet
void LaunchObject(float alpha, float initialStretch, float springConstant) {
// Constants
const float gravity = -9.81f;
// Convert alpha from degrees to radians if needed
float alphaRadians = alpha * (XM_PI / 180.0f);
// Scale factors to make the physics simulation more visible
float scaleFactor = 200.0f; // Adjust this based on your world scale
// Calculate initial velocity magnitude
float velocityMagnitude = initialStretch * sqrtf(springConstant / m_Mass) *
sqrtf(1.0f - powf((m_Mass * gravity * sinf(alphaRadians) /
(springConstant * initialStretch)), 2.0f));
// Apply scale factor
velocityMagnitude *= scaleFactor;
// Calculate velocity components
XMVECTOR velocity = XMVectorSet(
velocityMagnitude * cosf(alphaRadians), // vx = v0 * cos(alpha)
velocityMagnitude * sinf(alphaRadians), // vy = v0 * sin(alpha)
0.0f, // z-component (0 for 2D trajectory)
0.0f
);
// Apply velocity
SetVelocity(velocity);
// Enable physics and reset grounded state
SetPhysicsEnabled(true);
SetGrounded(false);
}
// Setters
void SetVelocity(XMVECTOR velocity) { m_Velocity = velocity; }
void SetAcceleration(XMVECTOR acceleration) { m_Acceleration = acceleration; }
void SetMass(float mass) { m_Mass = mass; }
void SetGrounded(bool isGrounded) { m_IsGrounded = isGrounded; }
void SetPhysicsEnabled(bool enabled) { m_IsPhysicsEnabled = enabled; }
void SetBoundingRadius(float radius) { m_BoundingRadius = radius; }
void SetPreviousPosition(XMVECTOR position) { m_PreviousPosition = position; }
void SetGravityEnabled(bool enabled) { m_GravityEnabled = enabled; }
void SetUpdatePositionCallback(std::function<void(XMVECTOR)> callback) { m_UpdatePositionCallback = callback; }
// Getters
XMVECTOR GetVelocity() const { return m_Velocity; }
XMVECTOR GetAcceleration() const { return m_Acceleration; }
float GetMass() const { return m_Mass; }
bool IsGrounded() const { return m_IsGrounded; }
bool IsPhysicsEnabled() const { return m_IsPhysicsEnabled; }
float GetBoundingRadius() const { return m_BoundingRadius; }
XMVECTOR GetPreviousPosition() const { return m_PreviousPosition; }
bool IsGravityEnabled() const { return m_GravityEnabled; }
private:
XMVECTOR m_Velocity;
XMVECTOR m_Acceleration;
XMVECTOR m_PreviousPosition;
float m_Mass;
float m_BoundingRadius;
bool m_IsGrounded;
bool m_IsPhysicsEnabled;
bool m_GravityEnabled;
// Callback pour mettre à jour la position (sera connecté au TransformComponent)
std::function<void(XMVECTOR)> m_UpdatePositionCallback;
};
} // namespace ecs

@ -0,0 +1,124 @@
#pragma once
#include "../component.h"
#include "model_class.h"
#include <memory>
#include <string>
#include <map>
#include <WICTextureLoader.h>
// Déclaration externe de la variable globale définie dans application_class.h
extern std::map<std::string, std::shared_ptr<model_class>> g_model_cache;
namespace ecs {
enum class TextureType
{
Diffuse,
Normal,
Specular,
Alpha,
Reflection
};
class RenderComponent : public Component {
public:
RenderComponent() : m_model(nullptr), m_isVisible(true) {}
~RenderComponent() = default;
void Initialize() override {}
void Update(float deltaTime) override {}
// Initialisation avec un modèle existant
bool InitializeWithModel(std::shared_ptr<model_class> model) {
if (!model) return false;
m_model = model;
return true;
}
// Initialisation avec un chemin de fichier
bool InitializeFromFile(ID3D11Device* device, ID3D11DeviceContext* deviceContext,
const char* modelFilename, TextureContainer& textureContainer) {
// Vérifier si le modèle existe déjà dans le cache
std::string filename(modelFilename);
auto it = g_model_cache.find(filename);
if (it != g_model_cache.end()) {
m_model = it->second;
} else {
// Créer un nouveau modèle
auto new_model = std::make_shared<model_class>();
if (!new_model->Initialize(device, deviceContext, const_cast<char*>(modelFilename), textureContainer)) {
return false;
}
g_model_cache[filename] = new_model;
m_model = new_model;
}
m_modelFilePath = modelFilename;
return true;
}
// Charger des textures depuis un chemin
bool LoadTexturesFromPath(std::vector<std::wstring>& texturePaths, TextureContainer& texturesContainer,
ID3D11Device* device, ID3D11DeviceContext* deviceContext) {
HRESULT result;
int i = 0;
for (const auto& texturePath : texturePaths) {
ID3D11ShaderResourceView* texture = nullptr;
result = DirectX::CreateWICTextureFromFile(device, deviceContext, texturePath.c_str(), nullptr, &texture);
if (FAILED(result)) {
return false;
}
texturesContainer.AssignTexture(texturesContainer, texture, texturePath, i);
i++;
}
return true;
}
// Getters et setters
std::shared_ptr<model_class> GetModel() const { return m_model; }
void SetModel(std::shared_ptr<model_class> model) { m_model = model; }
const std::string& GetModelFilePath() const { return m_modelFilePath; }
void SetModelFilePath(const std::string& path) { m_modelFilePath = path; }
bool IsVisible() const { return m_isVisible; }
void SetVisible(bool visible) { m_isVisible = visible; }
// Accès aux textures
ID3D11ShaderResourceView* GetTexture(TextureType type, int index = 0) {
if (!m_model) return nullptr;
switch (type) {
case TextureType::Diffuse:
return m_model->GetTexture(::TextureType::Diffuse, index);
case TextureType::Normal:
return m_model->GetTexture(::TextureType::Normal, index);
case TextureType::Specular:
return m_model->GetTexture(::TextureType::Specular, index);
case TextureType::Alpha:
return m_model->GetTexture(::TextureType::Alpha, index);
default:
return nullptr;
}
}
// Pour le rendu
int GetIndexCount() const {
return m_model ? m_model->GetIndexCount() : 0;
}
void Render(ID3D11DeviceContext* deviceContext) {
if (m_model && m_isVisible) {
m_model->Render(deviceContext);
}
}
private:
std::shared_ptr<model_class> m_model;
std::string m_modelFilePath;
bool m_isVisible;
};
} // namespace ecs

@ -0,0 +1,67 @@
#pragma once
#include "../component.h"
namespace ecs {
enum class ShaderType
{
CEL_SHADING,
LIGHTING,
NORMAL_MAPPING,
SPECULAR_MAPPING,
REFLECTION,
REFRACTION,
TEXTURE,
SKYBOX,
SUNLIGHT,
ALPHA_MAPPING
};
class ShaderComponent : public Component {
public:
ShaderComponent() : m_activeShader(ShaderType::LIGHTING) {}
~ShaderComponent() = default;
void Initialize() override {}
void Update(float deltaTime) override {}
// Getters et setters
ShaderType GetActiveShader() const { return m_activeShader; }
void SetActiveShader(ShaderType shader) { m_activeShader = shader; }
// Conversions utiles
static ShaderType 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;
if (str == "SKYBOX") return ShaderType::SKYBOX;
if (str == "REFLECTION") return ShaderType::REFLECTION;
if (str == "REFRACTION") return ShaderType::REFRACTION;
return ShaderType::TEXTURE;
}
static std::string 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";
case ShaderType::SKYBOX: return "SKYBOX";
case ShaderType::REFLECTION: return "REFLECTION";
case ShaderType::REFRACTION: return "REFRACTION";
default: return "TEXTURE";
}
}
private:
ShaderType m_activeShader;
};
} // namespace ecs

@ -0,0 +1,101 @@
#pragma once
#include "../component.h"
#include <DirectXMath.h>
using namespace DirectX;
namespace ecs {
class TransformComponent : public Component {
public:
TransformComponent() {
m_ScaleMatrix = XMMatrixIdentity();
m_RotateMatrix = XMMatrixIdentity();
m_TranslateMatrix = XMMatrixIdentity();
m_WorldMatrix = XMMatrixIdentity();
}
~TransformComponent() = default;
// Méthodes pour les matrices
void SetPosition(XMVECTOR position) {
XMFLOAT4X4 matrix;
XMStoreFloat4x4(&matrix, m_TranslateMatrix);
matrix._41 = XMVectorGetX(position);
matrix._42 = XMVectorGetY(position);
matrix._43 = XMVectorGetZ(position);
m_TranslateMatrix = XMLoadFloat4x4(&matrix);
UpdateWorldMatrix();
}
void SetRotation(XMVECTOR rotation) {
m_RotateMatrix = XMMatrixRotationRollPitchYawFromVector(rotation);
UpdateWorldMatrix();
}
void SetScale(XMVECTOR scale) {
XMFLOAT4X4 matrix;
XMStoreFloat4x4(&matrix, m_ScaleMatrix);
matrix._11 = XMVectorGetX(scale);
matrix._22 = XMVectorGetY(scale);
matrix._33 = XMVectorGetZ(scale);
m_ScaleMatrix = XMLoadFloat4x4(&matrix);
UpdateWorldMatrix();
}
XMVECTOR GetPosition() const {
XMFLOAT4X4 matrix;
XMStoreFloat4x4(&matrix, m_TranslateMatrix);
return XMVectorSet(matrix._41, matrix._42, matrix._43, 0.0f);
}
XMVECTOR GetRotation() const {
XMFLOAT4X4 matrix;
XMStoreFloat4x4(&matrix, m_RotateMatrix);
float rotationX = atan2f(matrix._32, matrix._33);
float rotationY = atan2f(-matrix._31, sqrtf(matrix._32 * matrix._32 + matrix._33 * matrix._33));
float rotationZ = atan2f(matrix._21, matrix._11);
return XMVectorSet(rotationX, rotationY, rotationZ, 0.0f);
}
XMVECTOR GetScale() const {
XMFLOAT4X4 matrix;
XMStoreFloat4x4(&matrix, m_ScaleMatrix);
XMVECTOR row1 = XMLoadFloat3(reinterpret_cast<XMFLOAT3*>(&matrix._11));
XMVECTOR row2 = XMLoadFloat3(reinterpret_cast<XMFLOAT3*>(&matrix._21));
XMVECTOR row3 = XMLoadFloat3(reinterpret_cast<XMFLOAT3*>(&matrix._31));
XMVECTOR scale = XMVectorSet(
XMVectorGetX(XMVector3Length(row1)),
XMVectorGetX(XMVector3Length(row2)),
XMVectorGetX(XMVector3Length(row3)),
0.0f
);
return scale;
}
void UpdateWorldMatrix() {
m_WorldMatrix = m_ScaleMatrix * m_RotateMatrix * m_TranslateMatrix;
}
// Getters pour les matrices
XMMATRIX GetScaleMatrix() const { return m_ScaleMatrix; }
XMMATRIX GetRotateMatrix() const { return m_RotateMatrix; }
XMMATRIX GetTranslateMatrix() const { return m_TranslateMatrix; }
XMMATRIX GetWorldMatrix() const { return m_WorldMatrix; }
// Setters pour les matrices
void SetScaleMatrix(XMMATRIX matrix) { m_ScaleMatrix = matrix; UpdateWorldMatrix(); }
void SetRotateMatrix(XMMATRIX matrix) { m_RotateMatrix = matrix; UpdateWorldMatrix(); }
void SetTranslateMatrix(XMMATRIX matrix) { m_TranslateMatrix = matrix; UpdateWorldMatrix(); }
private:
XMMATRIX m_ScaleMatrix;
XMMATRIX m_RotateMatrix;
XMMATRIX m_TranslateMatrix;
XMMATRIX m_WorldMatrix;
};
} // namespace ecs

@ -0,0 +1,101 @@
#pragma once
#include "component.h"
#include <unordered_map>
#include <vector>
#include <memory>
#include <algorithm>
#include <cassert>
namespace ecs {
// Identifiant unique pour les entités
using EntityID = uint32_t;
class Entity {
public:
explicit Entity(EntityID id) : m_ID(id) {}
~Entity() = default;
// Empêcher la copie
Entity(const Entity&) = delete;
Entity& operator=(const Entity&) = delete;
// Permettre le déplacement
Entity(Entity&&) = default;
Entity& operator=(Entity&&) = default;
// Getter pour l'ID
EntityID GetID() const { return m_ID; }
// Ajouter un composant
template<typename T, typename... Args>
std::shared_ptr<T> AddComponent(Args&&... args) {
static_assert(std::is_base_of<Component, T>::value, "T must derive from Component");
ComponentTypeID typeID = GetComponentTypeID<T>();
// Vérifier si le composant existe déjà
if (m_Components.find(typeID) != m_Components.end()) {
return std::static_pointer_cast<T>(m_Components[typeID]);
}
// Créer et ajouter le composant
auto component = std::make_shared<T>(std::forward<Args>(args)...);
m_Components[typeID] = component;
// Initialiser le composant
component->Initialize();
return component;
}
// Récupérer un composant
template<typename T>
std::shared_ptr<T> GetComponent() {
static_assert(std::is_base_of<Component, T>::value, "T must derive from Component");
ComponentTypeID typeID = GetComponentTypeID<T>();
auto it = m_Components.find(typeID);
if (it != m_Components.end()) {
return std::static_pointer_cast<T>(it->second);
}
return nullptr;
}
// Vérifier si l'entité possède un composant
template<typename T>
bool HasComponent() const {
static_assert(std::is_base_of<Component, T>::value, "T must derive from Component");
ComponentTypeID typeID = GetComponentTypeID<T>();
return m_Components.find(typeID) != m_Components.end();
}
// Supprimer un composant
template<typename T>
void RemoveComponent() {
static_assert(std::is_base_of<Component, T>::value, "T must derive from Component");
ComponentTypeID typeID = GetComponentTypeID<T>();
auto it = m_Components.find(typeID);
if (it != m_Components.end()) {
m_Components.erase(it);
}
}
// Mettre à jour tous les composants
void UpdateComponents(float deltaTime) {
for (auto& [typeID, component] : m_Components) {
component->Update(deltaTime);
}
}
private:
EntityID m_ID;
std::unordered_map<ComponentTypeID, ComponentPtr> m_Components;
};
} // namespace ecs

@ -0,0 +1,107 @@
#pragma once
#include "entity.h"
#include <vector>
#include <unordered_map>
#include <queue>
namespace ecs {
class EntityManager {
public:
EntityManager() : m_NextEntityID(0) {}
~EntityManager() = default;
// Créer une nouvelle entité
std::shared_ptr<Entity> CreateEntity() {
EntityID id;
// Réutiliser les IDs des entités supprimées si possible
if (!m_FreeIDs.empty()) {
id = m_FreeIDs.front();
m_FreeIDs.pop();
} else {
id = m_NextEntityID++;
}
auto entity = std::make_shared<Entity>(id);
m_Entities[id] = entity;
return entity;
}
// Supprimer une entité
void DestroyEntity(EntityID id) {
auto it = m_Entities.find(id);
if (it != m_Entities.end()) {
m_Entities.erase(it);
m_FreeIDs.push(id); // Recycler l'ID
}
}
// Obtenir une entité par son ID
std::shared_ptr<Entity> GetEntity(EntityID id) {
auto it = m_Entities.find(id);
if (it != m_Entities.end()) {
return it->second;
}
return nullptr;
}
// Mettre à jour toutes les entités
void UpdateEntities(float deltaTime) {
for (auto& [id, entity] : m_Entities) {
entity->UpdateComponents(deltaTime);
}
}
// Obtenir toutes les entités
std::vector<std::shared_ptr<Entity>> GetAllEntities() {
std::vector<std::shared_ptr<Entity>> result;
result.reserve(m_Entities.size());
for (const auto& [id, entity] : m_Entities) {
result.push_back(entity);
}
return result;
}
// Obtenir toutes les entités qui ont un composant spécifique
template<typename T>
std::vector<std::shared_ptr<Entity>> GetEntitiesWithComponent() {
static_assert(std::is_base_of<Component, T>::value, "T must derive from Component");
std::vector<std::shared_ptr<Entity>> result;
for (auto& [id, entity] : m_Entities) {
if (entity->HasComponent<T>()) {
result.push_back(entity);
}
}
return result;
}
// Obtenir le nombre d'entités
size_t GetEntityCount() const {
return m_Entities.size();
}
// Vider toutes les entités
void Clear() {
m_Entities.clear();
// Vider la file des IDs libres
std::queue<EntityID> empty;
std::swap(m_FreeIDs, empty);
m_NextEntityID = 0;
}
private:
EntityID m_NextEntityID;
std::unordered_map<EntityID, std::shared_ptr<Entity>> m_Entities;
std::queue<EntityID> m_FreeIDs; // IDs à réutiliser
};
} // namespace ecs

@ -0,0 +1,222 @@
#pragma once
#include "../entity_manager.h"
#include "../components/render_component.h"
#include "../components/transform_component.h"
#include "../components/shader_component.h"
#include "shader_manager_class.h"
#include <DirectXMath.h>
namespace ecs {
class RenderSystem {
public:
RenderSystem(ID3D11DeviceContext* deviceContext, shader_manager_class* shaderManager)
: m_deviceContext(deviceContext), m_shaderManager(shaderManager) {}
// Rendu d'une entité spécifique
bool RenderEntity(std::shared_ptr<Entity> entity,
const DirectX::XMMATRIX& viewMatrix,
const DirectX::XMMATRIX& projectionMatrix,
const DirectX::XMFLOAT4* diffuseColors,
const DirectX::XMFLOAT4* lightPositions,
const DirectX::XMFLOAT4* ambientColors,
const DirectX::XMFLOAT3& cameraPosition,
const DirectX::XMFLOAT4& sunlightDiffuse,
const DirectX::XMFLOAT4& sunlightAmbient,
const DirectX::XMFLOAT3& sunlightDirection,
float sunlightIntensity) {
// Vérifier si l'entité a tous les composants nécessaires
auto transform = entity->GetComponent<TransformComponent>();
auto render = entity->GetComponent<RenderComponent>();
auto shader = entity->GetComponent<ShaderComponent>();
if (!transform || !render || !shader || !render->GetModel())
return false;
// Calculer la matrice monde
XMMATRIX scaleMatrix = transform->GetScaleMatrix();
XMMATRIX rotateMatrix = transform->GetRotateMatrix();
XMMATRIX translateMatrix = transform->GetTranslateMatrix();
XMMATRIX worldMatrix = XMMatrixMultiply(
XMMatrixMultiply(scaleMatrix, rotateMatrix),
translateMatrix
);
// Rendre le modèle
render->Render(m_deviceContext);
// Sélectionner le shader approprié
switch (shader->GetActiveShader()) {
case ShaderType::ALPHA_MAPPING:
return m_shaderManager->render_alpha_map_shader(
m_deviceContext,
render->GetIndexCount(),
worldMatrix,
viewMatrix,
projectionMatrix,
render->GetTexture(TextureType::Diffuse, 0),
render->GetTexture(TextureType::Diffuse, 1),
render->GetTexture(TextureType::Alpha, 0)
);
case ShaderType::CEL_SHADING:
return m_shaderManager->render_cel_shading_shader(
m_deviceContext,
render->GetIndexCount(),
worldMatrix,
viewMatrix,
projectionMatrix,
render->GetTexture(TextureType::Diffuse, 0),
sunlightDiffuse,
sunlightAmbient,
sunlightDirection,
sunlightIntensity
);
case ShaderType::NORMAL_MAPPING:
return m_shaderManager->render_normal_map_shader(
m_deviceContext,
render->GetIndexCount(),
worldMatrix,
viewMatrix,
projectionMatrix,
render->GetTexture(TextureType::Diffuse, 0),
render->GetTexture(TextureType::Normal, 0),
sunlightDirection,
sunlightDiffuse
);
case ShaderType::SPECULAR_MAPPING:
return m_shaderManager->render_spec_map_shader(
m_deviceContext,
render->GetIndexCount(),
worldMatrix,
viewMatrix,
projectionMatrix,
render->GetTexture(TextureType::Diffuse, 0),
render->GetTexture(TextureType::Normal, 0),
render->GetTexture(TextureType::Specular, 0),
sunlightDirection,
sunlightDiffuse,
cameraPosition,
sunlightDiffuse, // Couleur speculaire (à ajuster)
16.0f // Puissance speculaire (à ajuster)
);
case ShaderType::LIGHTING:
{
// Créer des copies locales non constantes des tableaux
DirectX::XMFLOAT4 localDiffuseColors[4];
DirectX::XMFLOAT4 localLightPositions[4];
DirectX::XMFLOAT4 localAmbientColors[4];
// Copier les données
for (int i = 0; i < 4; i++) {
localDiffuseColors[i] = diffuseColors[i];
localLightPositions[i] = lightPositions[i];
localAmbientColors[i] = ambientColors[i];
}
return m_shaderManager->renderlight_shader(
m_deviceContext,
render->GetIndexCount(),
worldMatrix,
viewMatrix,
projectionMatrix,
render->GetTexture(TextureType::Diffuse, 0),
localDiffuseColors,
localLightPositions,
localAmbientColors
);
}
case ShaderType::SUNLIGHT:
return m_shaderManager->render_sunlight_shader(
m_deviceContext,
render->GetIndexCount(),
worldMatrix,
viewMatrix,
projectionMatrix,
render->GetTexture(TextureType::Diffuse, 0),
sunlightDiffuse,
sunlightAmbient,
sunlightDirection,
sunlightIntensity
);
case ShaderType::SKYBOX:
return m_shaderManager->render_skybox_shader(
m_deviceContext,
render->GetIndexCount(),
worldMatrix,
viewMatrix,
projectionMatrix,
render->GetTexture(TextureType::Diffuse, 0),
sunlightDiffuse,
sunlightAmbient,
sunlightDirection,
sunlightIntensity
);
case ShaderType::TEXTURE:
default:
return m_shaderManager->render_texture_shader(
m_deviceContext,
render->GetIndexCount(),
worldMatrix,
viewMatrix,
projectionMatrix,
render->GetTexture(TextureType::Diffuse, 0)
);
}
}
// Rendu de toutes les entités avec les composants nécessaires
int RenderAllEntities(EntityManager* entityManager,
const DirectX::XMMATRIX& viewMatrix,
const DirectX::XMMATRIX& projectionMatrix,
const DirectX::XMFLOAT4* diffuseColors,
const DirectX::XMFLOAT4* lightPositions,
const DirectX::XMFLOAT4* ambientColors,
const DirectX::XMFLOAT3& cameraPos,
const DirectX::XMFLOAT4& sunlightDiffuse,
const DirectX::XMFLOAT4& sunlightAmbient,
const DirectX::XMFLOAT3& sunlightDirection,
float sunlightIntensity) {
int renderCount = 0;
// Récupérer toutes les entités qui ont les composants RenderComponent et TransformComponent
auto entities = entityManager->GetEntitiesWithComponent<RenderComponent>();
for (auto& entity : entities) {
auto render = entity->GetComponent<RenderComponent>();
// Vérifier si l'entité a un TransformComponent
auto transform = entity->GetComponent<TransformComponent>();
if (!transform) continue;
// Vérifier si le modèle est visible
if (!render->IsVisible()) continue;
// Effectuer le rendu
if (RenderEntity(entity, viewMatrix, projectionMatrix,
diffuseColors, lightPositions, ambientColors,cameraPos,
sunlightDiffuse, sunlightAmbient, sunlightDirection,
sunlightIntensity)) {
renderCount++;
}
}
return renderCount;
}
private:
ID3D11DeviceContext* m_deviceContext;
shader_manager_class* m_shaderManager;
};
} // namespace ecs

@ -13,13 +13,13 @@ using namespace DirectX;
/////////////////////// ///////////////////////
// MY CLASS INCLUDES // // MY CLASS INCLUDES //
/////////////////////// ///////////////////////
#include "textureclass.h" #include "texture_class.h"
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Class name: FontClass // Class name: font_class
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
class FontClass class font_class
{ {
private: private:
struct FontType struct FontType
@ -35,9 +35,9 @@ private:
}; };
public: public:
FontClass(); font_class();
FontClass(const FontClass&); font_class(const font_class&);
~FontClass(); ~font_class();
bool Initialize(ID3D11Device*, ID3D11DeviceContext*, int); bool Initialize(ID3D11Device*, ID3D11DeviceContext*, int);
void Shutdown(); void Shutdown();
@ -56,7 +56,7 @@ private:
private: private:
FontType* m_Font; FontType* m_Font;
TextureClass* m_Texture; texture_class* m_Texture;
float m_fontHeight; float m_fontHeight;
int m_spaceSize; int m_spaceSize;
}; };

@ -15,22 +15,32 @@
#include <mmsystem.h> #include <mmsystem.h>
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Class name: FpsClass // Class name: fps_class
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
class FpsClass class fps_class
{ {
public: public:
FpsClass(); fps_class();
FpsClass(const FpsClass&); fps_class(const fps_class&);
~FpsClass(); ~fps_class();
void Initialize(); void Initialize();
void Frame(); void Frame();
int GetFps(); int GetFps();
int GetMinFps() const;
int GetMaxFps() const;
float GetFrameTime() const;
void ResetStats();
private: private:
int m_fps, m_count; int m_fps, m_count;
unsigned long m_startTime; unsigned long m_startTime;
int m_minFps;
int m_maxFps;
float m_frameTime;
unsigned long m_previousTime;
}; };
#endif #endif

@ -0,0 +1,22 @@
#pragma once
#include <chrono>
class fps_limiter {
public:
explicit fps_limiter(const float target_fps = 60.0f)
: min_delta_(1.0f / target_fps), last_time_(std::chrono::high_resolution_clock::now()) {}
// Retourne true si la fonction peut etre executee
bool should_run() {
const auto now = std::chrono::high_resolution_clock::now();
if (const float elapsed = std::chrono::duration<float>(now - last_time_).count(); elapsed >= min_delta_) {
last_time_ = now;
return true;
}
return false;
}
private:
float min_delta_;
std::chrono::high_resolution_clock::time_point last_time_;
};

@ -1,7 +1,7 @@
#include <DirectXMath.h> #include <DirectXMath.h>
using namespace DirectX; using namespace DirectX;
class Frustum class frustum
{ {
public: public:
void ConstructFrustum(float screenDepth, XMMATRIX projectionMatrix, XMMATRIX viewMatrix); void ConstructFrustum(float screenDepth, XMMATRIX projectionMatrix, XMMATRIX viewMatrix);

@ -4,15 +4,26 @@
#include "Logger.h" #include "Logger.h"
#include "sceneManager.h" #include "sceneManager.h"
#include "fps_limiter.h"
#include <imgui.h> #include <imgui.h>
#include <imgui_impl_dx11.h> #include <imgui_impl_dx11.h>
#include <imgui_impl_win32.h> #include <imgui_impl_win32.h>
#include <windows.h> #include <windows.h>
#include <deque> #include <deque>
#include "rendertextureclass.h" #include <functional>
class ApplicationClass; #include "render_texture_class.h"
#include "scene_manager.h"
class application_class;
class stats;
struct widget_entry
{
bool* show;
std::function<void()> func;
};
class imguiManager class imguiManager
{ {
@ -22,28 +33,32 @@ public:
bool Initialize(HWND hwnd, ID3D11Device* device, ID3D11DeviceContext* deviceContext); bool Initialize(HWND hwnd, ID3D11Device* device, ID3D11DeviceContext* deviceContext);
void Shutdown(); void Shutdown();
void Render(ApplicationClass* app); void Render();
void NewFrame(); void NewFrame();
void SetupDockspace(ApplicationClass* app); void SetupDockspace();
// Widgets // Widgets
void WidgetSpeedSlider(float* speed); void WidgetSpeedSlider(float* speed);
void WidgetButton(); void WidgetButton();
void WidgetFPS(); void WidgetFPS();
void WidgetAddObject(ApplicationClass* app); void WidgetAddObject();
void WidgetObjectWindow(ApplicationClass* app); void WidgetObjectWindow();
void WidgetTerrainWindow(ApplicationClass* app); void WidgetTerrainWindow();
void WidgetLightWindow(ApplicationClass* app); void WidgetLightWindow();
void WidgetEngineSettingsWindow(ApplicationClass* app); void WidgetEngineSettingsWindow();
void WidgetRenderWindow(ApplicationClass* app, ImVec2 availableSize); void WidgetRenderWindow(ImVec2 availableSize);
void WidgetLogWindow(ApplicationClass* app); void WidgetLogWindow();
void WidgetRenderStats();
bool ImGuiWidgetRenderer(ApplicationClass* app); bool ImGuiWidgetRenderer();
void SetWindowSize(ImVec2 size) { windowSize = size; } void SetWindowSize(ImVec2 size) { windowSize = size; }
ImVec2 GetWindowSize() const { return windowSize; } ImVec2 GetWindowSize() const { return windowSize; }
// Getters
void SetApp(std::shared_ptr<application_class> app) { app_ = app; }
// Shader toggles // Shader toggles
bool m_EnableCelShading; bool m_EnableCelShading;
@ -58,6 +73,11 @@ private:
// ----------------- Variables ----------------- // // ----------------- Variables ----------------- //
// --------------------------------------------- // // --------------------------------------------- //
std::vector<widget_entry> widgets_;
std::shared_ptr<application_class> app_;
scene_manager* scene_manager_;
stats* stats_;
bool showObjectWindow; bool showObjectWindow;
bool showTerrainWindow; bool showTerrainWindow;
@ -65,6 +85,13 @@ private:
bool showOldSceneWindow; bool showOldSceneWindow;
bool showEngineSettingsWindow; bool showEngineSettingsWindow;
bool showLogWindow; bool showLogWindow;
bool showStatsWindow;
int m_SideCount = 0;
static const int FRAME_HISTORY_COUNT = 3600; // 1min secondes à 60 FPS
float m_frameTimeHistory[FRAME_HISTORY_COUNT] = {};
int m_frameTimeHistoryIndex = 0;
bool m_isPhyiscsEnabled = false; bool m_isPhyiscsEnabled = false;
bool m_isGravityEnabled = false; bool m_isGravityEnabled = false;
@ -75,9 +102,23 @@ private:
ID3D11DeviceContext* m_deviceContext; ID3D11DeviceContext* m_deviceContext;
ImVec2 windowSize; ImVec2 windowSize;
RenderTextureClass* m_renderTexture; render_texture_class* m_renderTexture;
const std::deque<Logger::LogEntry>& logBuffer = Logger::Get().GetLogBuffer(); const std::deque<Logger::LogEntry>& logBuffer = Logger::Get().GetLogBuffer();
int current_fps_, min_fps_, max_fps_, draw_calls_, visible_triangle_count_;
float current_frame_time_, min_frame_time_, max_frame_time_ ;
std::shared_ptr<int> total_vertex_count_;
std::shared_ptr<int> total_triangle_count_;
// gpu information
char card_name_[128];
int video_memory_ = 0;
// cpu information
std::string cpu_name_;
std::string version_driver_;
}; };
#endif #endif

@ -19,18 +19,18 @@
#include <dinput.h> #include <dinput.h>
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Class name: InputClass // Class name: input_class
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
class InputClass class input_class
{ {
public: public:
InputClass(); input_class();
InputClass(const InputClass&); input_class(const input_class&);
~InputClass(); ~input_class();
bool Initialize(HINSTANCE, HWND, int, int); virtual bool Initialize(HINSTANCE, HWND, int, int);
void Shutdown(); virtual void Shutdown();
bool Frame(); virtual bool Frame();
bool IsEscapePressed() const; bool IsEscapePressed() const;
void GetMouseLocation(int&, int&) const; void GetMouseLocation(int&, int&) const;
@ -50,10 +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;
bool is_key_pressed(const unsigned int);
private: private:
bool m_keys[256]; bool m_keys[256];

@ -14,14 +14,14 @@ using namespace DirectX;
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Class name: LightClass // Class name: light_class
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
class LightClass class light_class
{ {
public: public:
LightClass(); light_class();
LightClass(const LightClass&); light_class(const light_class&);
~LightClass(); ~light_class();
void SetAmbientColor(float, float, float, float); void SetAmbientColor(float, float, float, float);
void SetDiffuseColor(float, float, float, float); void SetDiffuseColor(float, float, float, float);

@ -20,7 +20,7 @@ using namespace std;
/////////////////////// ///////////////////////
// MY CLASS INCLUDES // // MY CLASS INCLUDES //
/////////////////////// ///////////////////////
#include "textureclass.h" #include "texture_class.h"
enum class TextureType enum class TextureType
{ {
@ -32,11 +32,21 @@ enum class TextureType
struct TextureContainer struct TextureContainer
{ {
// Textures
std::vector<ID3D11ShaderResourceView*> diffuse; std::vector<ID3D11ShaderResourceView*> diffuse;
std::vector<ID3D11ShaderResourceView*> normal; std::vector<ID3D11ShaderResourceView*> normal;
std::vector<ID3D11ShaderResourceView*> specular; std::vector<ID3D11ShaderResourceView*> specular;
std::vector<ID3D11ShaderResourceView*> alpha; std::vector<ID3D11ShaderResourceView*> alpha;
// Textures Paths
std::vector<std::wstring> diffusePaths;
std::vector<std::wstring> normalPaths;
std::vector<std::wstring> specularPaths;
std::vector<std::wstring> alphaPaths;
// Get the vector of textures_ based on the type
std::vector<ID3D11ShaderResourceView*>& Get(TextureType type) const { std::vector<ID3D11ShaderResourceView*>& Get(TextureType type) const {
switch (type) { switch (type) {
case TextureType::Diffuse: return const_cast<std::vector<ID3D11ShaderResourceView*>&>(diffuse); case TextureType::Diffuse: return const_cast<std::vector<ID3D11ShaderResourceView*>&>(diffuse);
@ -47,6 +57,20 @@ struct TextureContainer
} }
} }
// Get the vector of textures_ paths based on the type
std::vector<std::wstring> GetPaths(TextureType type) const {
switch (type)
{
case TextureType::Diffuse: return std::vector<std::wstring>(diffusePaths);
case TextureType::Normal: return std::vector<std::wstring>(normalPaths);
case TextureType::Specular: return std::vector<std::wstring>(specularPaths);
case TextureType::Alpha: return std::vector<std::wstring>(alphaPaths);
default: return std::vector<std::wstring>(diffusePaths);
}
}
// Get The texture based on the type and index
ID3D11ShaderResourceView* GetTexture(TextureType type, int index) const { ID3D11ShaderResourceView* GetTexture(TextureType type, int index) const {
auto& vec = Get(type); auto& vec = Get(type);
if (index >= 0 && index < vec.size()) if (index >= 0 && index < vec.size())
@ -54,31 +78,53 @@ struct TextureContainer
return nullptr; return nullptr;
} }
// Get The texture path based on the type and index
std::wstring GetTexturePath(TextureType type, int index) const
{
std::vector<std::wstring> path = GetPaths(type);
if (index >= 0 && index < path.size())
return path[index];
return L"";
}
// Release all textures_ and textures_ paths
void ReleaseAll() { void ReleaseAll() {
ReleaseVector(diffuse); ReleaseVector(diffuse);
ReleaseVector(normal); ReleaseVector(normal);
ReleaseVector(specular); ReleaseVector(specular);
ReleaseVector(alpha); ReleaseVector(alpha);
ReleaseVector(diffusePaths);
ReleaseVector(normalPaths);
ReleaseVector(specularPaths);
ReleaseVector(alphaPaths);
} }
void AssignTexture(TextureContainer& textContainer, ID3D11ShaderResourceView* texture, int index) // Assign a texture and its path to the appropriate vector based on the index
void AssignTexture(TextureContainer& textContainer, ID3D11ShaderResourceView* texture , const std::wstring paths, int index)
{ {
switch (index) switch (index)
{ {
case 0: case 0:
textContainer.diffuse.push_back(texture); textContainer.diffuse.push_back(texture);
textContainer.diffusePaths.push_back(paths);
break; break;
case 1: case 1:
textContainer.normal.push_back(texture); textContainer.normal.push_back(texture);
textContainer.normalPaths.push_back(paths);
break; break;
case 2: case 2:
textContainer.specular.push_back(texture); textContainer.specular.push_back(texture);
textContainer.specularPaths.push_back(paths);
break; break;
case 3: case 3:
textContainer.alpha.push_back(texture); textContainer.alpha.push_back(texture);
textContainer.alphaPaths.push_back(paths);
break; break;
default: default:
textContainer.diffuse.push_back(texture); textContainer.diffuse.push_back(texture);
textContainer.diffusePaths.push_back(paths);
break; break;
} }
} }
@ -93,11 +139,15 @@ private:
} }
vec.clear(); vec.clear();
} }
void ReleaseVector(std::vector<std::wstring>& vec) {
vec.clear();
}
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Class name: ModelClass // Class name: model_class
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
class ModelClass class model_class
{ {
protected: protected:
@ -150,20 +200,25 @@ protected:
}; };
public: public:
ModelClass(); model_class();
ModelClass(const ModelClass&); model_class(const model_class&) = delete;
~ModelClass(); model_class& operator=(const model_class&) = delete;
~model_class();
//bool Initialize(ID3D11Device*, ID3D11DeviceContext*, char*, std::vector<ID3D11ShaderResourceView*>); //bool initialize(ID3D11Device*, ID3D11DeviceContext*, char*, std::vector<ID3D11ShaderResourceView*>);
// Nouvelle surcharge avec TextureContainer // Nouvelle surcharge avec TextureContainer
bool Initialize(ID3D11Device*, ID3D11DeviceContext*, char*, const TextureContainer&); bool Initialize(ID3D11Device*, ID3D11DeviceContext*, char*, const TextureContainer&);
// Nouvelle méthode - initialisation sans textures // Nouvelle méthode - initialisation sans textures_
bool Initialize(ID3D11Device*, ID3D11DeviceContext*, char*); bool Initialize(ID3D11Device*, ID3D11DeviceContext*, char*);
void Shutdown(); void Shutdown();
void Render(ID3D11DeviceContext*); void Render(ID3D11DeviceContext*);
int GetIndexCount(); int GetIndexCount();
//ID3D11ShaderResourceView* GetTexture(int index) const; int GetVertexCount() const { return m_vertexCount; }
// TEXTURE //
//ID3D11ShaderResourceView* get_texture(int index) const;
ID3D11ShaderResourceView* GetTexture(TextureType type, int index) const; ID3D11ShaderResourceView* GetTexture(TextureType type, int index) const;
//bool ChangeTexture(ID3D11Device* device, ID3D11DeviceContext* deviceContext, std::wstring filename, int index); //bool ChangeTexture(ID3D11Device* device, ID3D11DeviceContext* deviceContext, std::wstring filename, int index);
@ -173,11 +228,19 @@ public:
bool AddTexture(ID3D11Device* device, ID3D11DeviceContext* deviceContext,std::wstring filename, TextureType type); bool AddTexture(ID3D11Device* device, ID3D11DeviceContext* deviceContext,std::wstring filename, TextureType type);
bool AddTexture(ID3D11ShaderResourceView* texture, TextureType type); bool AddTexture(ID3D11ShaderResourceView* texture, TextureType type);
void SetTextureContainer (TextureContainer& texturesContainer) { m_Textures = texturesContainer; }
TextureContainer GetTextureContainer() const { return m_Textures; }
bool PreloadTextures(ID3D11Device* device, ID3D11DeviceContext* deviceContext, TextureContainer& textureContainer);
protected:
int m_vertexCount, m_indexCount;
ID3D11Buffer* m_vertexBuffer, * m_indexBuffer;
private: private:
bool InitializeBuffers(ID3D11Device*); bool InitializeBuffers(ID3D11Device*);
void ShutdownBuffers(); void ShutdownBuffers();
void RenderBuffers(ID3D11DeviceContext*); void RenderBuffers(ID3D11DeviceContext*);
bool LoadTextures(ID3D11Device*, ID3D11DeviceContext*, vector<string> filename);
void ReleaseTextures(); void ReleaseTextures();
bool LoadModel(char*); bool LoadModel(char*);
@ -188,8 +251,6 @@ private:
void CalculateModelVectors(); void CalculateModelVectors();
void CalculateTangentBinormal(TempVertexType, TempVertexType, TempVertexType, VectorType&, VectorType&); void CalculateTangentBinormal(TempVertexType, TempVertexType, TempVertexType, VectorType&, VectorType&);
ID3D11Buffer* m_vertexBuffer, * m_indexBuffer;
int m_vertexCount, m_indexCount;
TextureContainer m_Textures; TextureContainer m_Textures;
ModelType* m_model; ModelType* m_model;
}; };

@ -1,8 +1,10 @@
#pragma once #pragma once
#include "modelclass.h" #include "model_class.h"
#include <WICTextureLoader.h> #include <WICTextureLoader.h>
#include <SimpleMath.h> #include <SimpleMath.h>
#include "d_3d_class.h"
enum class ObjectType enum class ObjectType
{ {
Sphere, Sphere,
@ -24,11 +26,22 @@ enum class ShaderType
ALPHA_MAPPING ALPHA_MAPPING
}; };
class Object : public ModelClass class object
{ {
public: public:
Object(); object(application_class& app);
~Object(); object();
~object();
object(const object&) = delete;
object& operator=(const object&) = delete;
bool Initialize(
ID3D11Device* device,
ID3D11DeviceContext* deviceContext,
char* modelFilename,
TextureContainer& texturesContainer
);
void SetScaleMatrix(XMMATRIX scaleMatrix); void SetScaleMatrix(XMMATRIX scaleMatrix);
void SetRotateMatrix(XMMATRIX rotateMatrix); void SetRotateMatrix(XMMATRIX rotateMatrix);
@ -61,7 +74,8 @@ public:
bool IsGrounded() const; bool IsGrounded() const;
bool IsPhysicsEnabled() const; bool IsPhysicsEnabled() const;
void SetPhysicsEnabled(bool state); void SetPhysicsEnabled(bool state);
void SetVisible (bool state) { m_isVisible = state; }
bool IsVisible() const { return m_isVisible; }
void UpdateWorldMatrix(); void UpdateWorldMatrix();
void UpdateSRMatrix(); void UpdateSRMatrix();
@ -96,6 +110,13 @@ public:
std::string ObjectTypeToString(ObjectType objectType); std::string ObjectTypeToString(ObjectType objectType);
void LaunchObject(); void LaunchObject();
bool LoadTexturesFromPath(std::vector<std::wstring>& texturePaths, TextureContainer& texturesContainer,d_3d_class* m_Direct3D);
bool SetupInstancing(ID3D11Device* device, const std::vector<XMMATRIX>& instanceTransforms);
void EnableInstancing(bool enabled);
void SetInstanceCount(int count);
bool IsInstancingEnabled() const;
int GetInstanceCount() const;
ID3D11Buffer* GetInstanceBuffer() const;
void SetAlpha(float alpha) { m_alpha = alpha; } void SetAlpha(float alpha) { m_alpha = alpha; }
float GetAlpha() const { return m_alpha; } float GetAlpha() const { return m_alpha; }
void SetInitialStretch(float initialStretch) { m_initialStretch = initialStretch; } void SetInitialStretch(float initialStretch) { m_initialStretch = initialStretch; }
@ -106,6 +127,9 @@ public:
bool IsGravityEnabled() const { return m_gravityEnabled; } bool IsGravityEnabled() const { return m_gravityEnabled; }
void SetGravityEnabled(bool state) { m_gravityEnabled = state; } void SetGravityEnabled(bool state) { m_gravityEnabled = state; }
std::shared_ptr<model_class> get_model() const { return m_model_; }
void SetModel(std::shared_ptr<model_class> model) { m_model_ = model; }
public : public :
bool m_demoSpinning = false; bool m_demoSpinning = false;
XMVECTOR m_previousPosition; XMVECTOR m_previousPosition;
@ -114,6 +138,9 @@ public :
bool m_gravityEnabled = true; bool m_gravityEnabled = true;
private: private:
application_class& m_Application;
XMMATRIX m_scaleMatrix; XMMATRIX m_scaleMatrix;
XMMATRIX m_rotateMatrix; XMMATRIX m_rotateMatrix;
XMMATRIX m_translateMatrix; XMMATRIX m_translateMatrix;
@ -124,18 +151,19 @@ private:
float m_mass; float m_mass;
bool m_isGrounded; bool m_isGrounded;
bool m_isPhysicsEnabled; bool m_isPhysicsEnabled;
bool m_isVisible;
std::string m_name; std::string m_name;
ObjectType m_type = ObjectType::Unknown; ObjectType m_type = ObjectType::Unknown;
ShaderType m_activeShader = ShaderType::LIGHTING; ShaderType m_activeShader = ShaderType::LIGHTING;
float m_boundingRadius; float m_boundingRadius;
std::wstring m_modelPath; std::wstring m_modelPath;
TextureContainer m_texturesContainer;
float m_alpha = 0.0f; float m_alpha = 0.0f;
float m_initialStretch = 0.0f; float m_initialStretch = 0.0f;
float m_springConstant = 10.0f; float m_springConstant = 10.0f;
std::shared_ptr<model_class> m_model_;
}; };

@ -4,21 +4,21 @@
#include "object.h" #include "object.h"
#include "math.h" #include "math.h"
class Physics : public Object class physics : public object
{ {
public: public:
Physics(); physics();
explicit Physics(const Physics&); // Use explicit to avoid implicit conversion explicit physics(const physics&); // Use explicit to avoid implicit conversion
~Physics(); ~physics();
XMVECTOR GetGravity() const; // Get the gravity value XMVECTOR GetGravity() const; // Get the gravity value
void SetGravity(XMVECTOR gravity); // Define the gravity value void SetGravity(XMVECTOR gravity); // Define the gravity value
void ApplyGravity(Object*, float); // Apply gravity to an object void ApplyGravity(object*, float); // Apply gravity to an object
void AddForce(Object*, XMVECTOR); void AddForce(object*, XMVECTOR);
bool IsColliding(Object*, Object*); bool IsColliding(object*, object*);
bool CubesOverlap(Object*, Object*); bool CubesOverlap(object*, object*);
bool SpheresOverlap(Object*, Object*); bool SpheresOverlap(object*, object*);
bool SphereCubeOverlap(Object*, Object*); bool SphereCubeOverlap(object*, object*);
private: private:
XMVECTOR m_gravity; XMVECTOR m_gravity;

@ -9,14 +9,14 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Class name: PositionClass // Class name: position_class
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
class PositionClass class position_class
{ {
public: public:
PositionClass(); position_class();
PositionClass(const PositionClass&); position_class(const position_class&);
~PositionClass(); ~position_class();
void SetFrameTime(float); void SetFrameTime(float);
void GetRotation(float&, float&) const; void GetRotation(float&, float&) const;

@ -15,14 +15,14 @@ using namespace DirectX;
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Class name: RenderTextureClass // Class name: render_texture_class
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
class RenderTextureClass class render_texture_class
{ {
public: public:
RenderTextureClass(); render_texture_class();
RenderTextureClass(const RenderTextureClass&); render_texture_class(const render_texture_class&);
~RenderTextureClass(); ~render_texture_class();
bool Initialize(ID3D11Device*, int, int, float, float, int); bool Initialize(ID3D11Device*, int, int, float, float, int);
void Shutdown(); void Shutdown();

@ -0,0 +1,39 @@
#pragma once
#include <filesystem>
#include <string>
#include <vector>
#include "ecs/entity.h"
class d_3d_class;
class object;
class application_class;
class scene_manager
{
public:
scene_manager();
~scene_manager();
bool initialize(application_class* app);
bool shutdown();
bool save_scene_as();
bool save_scene();
bool load_scene();
std::wstring get_scene_path();
std::string convert_w_string_to_string(const std::wstring& w_str);
private:
std::vector<std::shared_ptr<ecs::Entity>> entity_;
application_class* app_;
std::string scene_path_;
std::vector<object*> object_vec_;
int object_id_;
std::filesystem::path w_folder_;
d_3d_class* direct_3d_;
};

@ -0,0 +1,25 @@
#pragma once
#include <d3d11.h>
#include <directxmath.h>
class shadow_map {
public:
shadow_map();
~shadow_map();
bool initialize(ID3D11Device* device, int width, int height);
void shutdown();
void set_render_target(ID3D11DeviceContext* context);
void clear_render_target(ID3D11DeviceContext* context, float depth = 1.0f);
ID3D11ShaderResourceView* get_shader_resource_view();
private:
ID3D11Texture2D* depth_texture_;
ID3D11DepthStencilView* depth_stencil_view_;
ID3D11ShaderResourceView* shader_resource_view_;
int width_, height_;
};

@ -13,13 +13,13 @@ using namespace DirectX;
/////////////////////// ///////////////////////
// MY CLASS INCLUDES // // MY CLASS INCLUDES //
/////////////////////// ///////////////////////
#include "textureclass.h" #include "texture_class.h"
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Class name: SpriteClass // Class name: sprite_class
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
class SpriteClass class sprite_class
{ {
private: private:
struct VertexType struct VertexType
@ -29,9 +29,9 @@ private:
}; };
public: public:
SpriteClass(); sprite_class();
SpriteClass(const SpriteClass&); sprite_class(const sprite_class&);
~SpriteClass(); ~sprite_class();
bool Initialize(ID3D11Device*, ID3D11DeviceContext*, int, int, char*, int, int); bool Initialize(ID3D11Device*, ID3D11DeviceContext*, int, int, char*, int, int);
void Shutdown(); void Shutdown();
@ -55,7 +55,7 @@ private:
private: private:
ID3D11Buffer* m_vertexBuffer, * m_indexBuffer; ID3D11Buffer* m_vertexBuffer, * m_indexBuffer;
int m_vertexCount, m_indexCount, m_screenWidth, m_screenHeight, m_bitmapWidth, m_bitmapHeight, m_renderX, m_renderY, m_prevPosX, m_prevPosY; int m_vertexCount, m_indexCount, m_screenWidth, m_screenHeight, m_bitmapWidth, m_bitmapHeight, m_renderX, m_renderY, m_prevPosX, m_prevPosY;
TextureClass* m_Textures; texture_class* m_Textures;
float m_frameTime, m_cycleTime; float m_frameTime, m_cycleTime;
int m_currentTexture, m_textureCount; int m_currentTexture, m_textureCount;
}; };

@ -0,0 +1,64 @@
#pragma once
#include <thread>
#include <vector>
#include "fps_class.h"
#include "object.h"
#include <intrin.h> // Pour __cpuid
#include <dxgi.h> // Pour DXGI
#include <mutex>
#pragma comment(lib, "dxgi.lib")
class stats
{
public:
stats();
~stats();
bool initialize(application_class* app);
void update_geometric_stats();
void update_visible_count();
void update_display_stats();
int get_total_vertex_count() const;
int get_total_triangle_count() const;
int get_visible_triangle_count() const;
int get_current_fps() const { return current_fps_; };
int get_min_fps() const { return min_fps_; };
int get_max_fps() const { return max_fps_; };
float get_frame_time() const { return current_frame_time_;};
int get_draw_calls() const { return drawcalls_; };
void increment_draw_call_count() { drawcalls_++; };
void reset_draw_call_count() { drawcalls_ = 0; };
std::string get_cpu_name();
std::string get_gpu_driver_version(ID3D11Device* device);
std::shared_ptr<int>& get_vertex_count_ptr() { return total_vertex_count_; }
std::shared_ptr<int>& get_triangle_count_ptr() { return total_triangle_count_; }
private:
std::thread update_display_thread_;
fps_class* fps_;
int drawcalls_;
application_class* app_;
std::vector<object*> object_vec_;
std::vector<object*> cubes_vec_;
std::vector<object*> terrain_chunk_vec_;
std::shared_ptr<int> total_vertex_count_;
std::shared_ptr<int> total_triangle_count_;
int visible_triangle_count_ = 0;
int current_fps_ = 0;
int min_fps_ = 0;
int max_fps_ = 0;
float current_frame_time_ = 0.0f;
};

@ -0,0 +1,83 @@
#ifndef _SYSTEMCLASS_H_
#define _SYSTEMCLASS_H_
#define WIN32_LEAN_AND_MEAN
static bool DEBUG_MODE = true;
#include "Logger.h"
#include "input_class.h"
#include "application_class.h"
#include "imguiManager.h"
#include <mutex>
#include <filesystem>
#include <commdlg.h>
#include "../resources.h"
#include <chrono>
class system_class
{
public:
system_class();
system_class(const system_class&);
~system_class();
bool initialize();
void shutdown();
void run();
LRESULT CALLBACK message_handler(HWND, UINT, WPARAM, LPARAM);
void send_path(wchar_t* path, std::filesystem::path w_folder);
std::shared_ptr<application_class> get_application_class() const { return application_; }
void set_application_class(std::shared_ptr<application_class> application) { application_ = std::move(application); }
std::shared_ptr<input_class> get_input_class() const { return input_; }
void set_input(std::shared_ptr<input_class> input) { input_ = std::move(input); }
HWND get_hwnd() const { return hwnd_; }
void set_d_3D_mock(d_3d_class* mock) {application_->set_direct_3d(mock);}
protected:
bool frame();
void initialize_windows(int&, int&);
void shutdown_windows();
private:
LPCWSTR application_name_;
HINSTANCE hinstance_;
HWND hwnd_;
std::shared_ptr<input_class> input_;
std::shared_ptr<application_class> application_;
std::shared_ptr<imguiManager> imgui_manager_;
int initial_window_width_;
int initial_window_height_;
bool is_direct_3d_initialized_;
bool is_resizing_ = false;
bool is_debug_key_pressed_ = false;
std::mutex render_mutex_;
};
/////////////////////////
// FUNCTION PROTOTYPES //
/////////////////////////
static LRESULT CALLBACK wnd_proc(HWND, UINT, WPARAM, LPARAM);
/////////////
// GLOBALS //
/////////////
static system_class* application_handle = 0;
#endif

@ -1,73 +0,0 @@
#ifndef _SYSTEMCLASS_H_
#define _SYSTEMCLASS_H_
#define WIN32_LEAN_AND_MEAN
static bool DEBUG_MODE = true;
#include "Logger.h"
#include "inputclass.h"
#include "applicationclass.h"
#include "imguiManager.h"
#include <mutex>
#include <filesystem>
#include <commdlg.h>
#include "../resources.h"
#include <chrono>
class SystemClass
{
public:
SystemClass();
SystemClass(const SystemClass&);
~SystemClass();
bool Initialize();
void Shutdown();
void Run();
LRESULT CALLBACK MessageHandler(HWND, UINT, WPARAM, LPARAM);
void SendPath(wchar_t* path, std::filesystem::path WFolder);
void GetScenePath();
protected:
bool Frame();
void InitializeWindows(int&, int&);
void ShutdownWindows();
private:
LPCWSTR m_applicationName;
HINSTANCE m_hinstance;
HWND m_hwnd;
InputClass* m_Input;
ApplicationClass* m_Application;
imguiManager* m_imguiManager;
int m_initialWindowWidth;
int m_initialWindowHeight;
bool m_isDirect3DInitialized;
bool m_isResizing = false;
bool m_IsDebugKeyPressed = false;
std::mutex renderMutex;
};
/////////////////////////
// FUNCTION PROTOTYPES //
/////////////////////////
static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
/////////////
// GLOBALS //
/////////////
static SystemClass* ApplicationHandle = 0;
#endif

@ -5,11 +5,11 @@
/////////////////////// ///////////////////////
// MY CLASS INCLUDES // // MY CLASS INCLUDES //
/////////////////////// ///////////////////////
#include "fontclass.h" #include "font_class.h"
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Class name: TextClass // Class name: text_class
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
class TextClass class text_class
{ {
private: private:
struct VertexType struct VertexType
@ -19,21 +19,21 @@ private:
}; };
public: public:
TextClass(); text_class();
TextClass(const TextClass&); text_class(const text_class&);
~TextClass(); ~text_class();
bool Initialize(ID3D11Device*, ID3D11DeviceContext*, int, int, int, FontClass*, char*, int, int, float, float, float); bool Initialize(ID3D11Device*, ID3D11DeviceContext*, int, int, int, font_class*, char*, int, int, float, float, float);
void Shutdown(); void Shutdown();
void Render(ID3D11DeviceContext*); void Render(ID3D11DeviceContext*);
int GetIndexCount(); int GetIndexCount();
bool UpdateText(ID3D11DeviceContext*, FontClass*, char*, int, int, float, float, float); bool UpdateText(ID3D11DeviceContext*, font_class*, char*, int, int, float, float, float);
XMFLOAT4 GetPixelColor(); XMFLOAT4 GetPixelColor();
private: private:
bool InitializeBuffers(ID3D11Device*, ID3D11DeviceContext*, FontClass*, char*, int, int, float, float, float); bool InitializeBuffers(ID3D11Device*, ID3D11DeviceContext*, font_class*, char*, int, int, float, float, float);
void ShutdownBuffers(); void ShutdownBuffers();
void RenderBuffers(ID3D11DeviceContext*); void RenderBuffers(ID3D11DeviceContext*);

@ -11,9 +11,9 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Class name: TextureClass // Class name: texture_class
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
class TextureClass class texture_class
{ {
private: private:
struct TargaHeader struct TargaHeader
@ -26,9 +26,9 @@ private:
}; };
public: public:
TextureClass(); texture_class();
TextureClass(const TextureClass&); texture_class(const texture_class&);
~TextureClass(); ~texture_class();
bool Initialize(ID3D11Device*, ID3D11DeviceContext*, std::string); bool Initialize(ID3D11Device*, ID3D11DeviceContext*, std::string);
void Shutdown(); void Shutdown();

@ -10,14 +10,14 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Class name: TimerClass // Class name: timer_class
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
class TimerClass class timer_class
{ {
public: public:
TimerClass(); timer_class();
TimerClass(const TimerClass&); timer_class(const timer_class&);
~TimerClass(); ~timer_class();
bool Initialize(); bool Initialize();
void Frame(); void Frame();

Some files were not shown because too many files have changed in this diff Show More