3 Commits

7 changed files with 52 additions and 46 deletions

View File

@@ -6,10 +6,10 @@
<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/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/src/inc/system/applicationclass.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/applicationclass.h" 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/imguiManager.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/imguiManager.h" 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/modelclass.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/modelclass.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/enginecustom/src/inc/system/object.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/object.h" 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/applicationclass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/applicationclass.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" /> <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" />
@@ -150,7 +150,6 @@
<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://23" root0="FORCE_HIGHLIGHTING" />
<setting file="file://C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um/d3d11.h" root0="SKIP_HIGHLIGHTING" /> <setting file="file://C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um/d3d11.h" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/enginecustom/include/Inc/VertexTypes.h" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/enginecustom/include/Inc/VertexTypes.h" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/enginecustom/include/Vulkan/Include/vulkan/vulkan_core.h" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/enginecustom/include/Vulkan/Include/vulkan/vulkan_core.h" root0="SKIP_HIGHLIGHTING" />
@@ -169,25 +168,25 @@
<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": "Debug", &quot;C/C++ Project.enginecustom.executor&quot;: &quot;Run&quot;,
"RunOnceActivity.ShowReadmeOnStart": "true", &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
"RunOnceActivity.git.unshallow": "true", &quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
"SHARE_PROJECT_CONFIGURATION_FILES": "true", &quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
"git-widget-placeholder": "main", &quot;git-widget-placeholder&quot;: &quot;main&quot;,
"ignore.virus.scanning.warn.message": "true", &quot;ignore.virus.scanning.warn.message&quot;: &quot;true&quot;,
"node.js.detected.package.eslint": "true", &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
"node.js.detected.package.tslint": "true", &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
"node.js.selected.package.eslint": "(autodetect)", &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
"node.js.selected.package.tslint": "(autodetect)", &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
"nodejs_package_manager_path": "npm", &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
"settings.editor.selected.configurable": "preferences.build.unityPlugin", &quot;settings.editor.selected.configurable&quot;: &quot;preferences.build.unityPlugin&quot;,
"vue.rearranger.settings.migration": "true" &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">
@@ -313,7 +312,8 @@
<workItem from="1746719840054" duration="991000" /> <workItem from="1746719840054" duration="991000" />
<workItem from="1746795732153" duration="33000" /> <workItem from="1746795732153" duration="33000" />
<workItem from="1746795828588" duration="592000" /> <workItem from="1746795828588" duration="592000" />
<workItem from="1747049871967" duration="8976000" /> <workItem from="1747049871967" duration="9350000" />
<workItem from="1747136509645" duration="3939000" />
</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" />

View File

@@ -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

View File

@@ -16,8 +16,8 @@ Collapsed=0
DockId=0x00000007,0 DockId=0x00000007,0
[Window][Terrain] [Window][Terrain]
Pos=0,328 Pos=0,19
Size=281,306 Size=281,615
Collapsed=0 Collapsed=0
DockId=0x00000008,0 DockId=0x00000008,0
@@ -73,7 +73,7 @@ DockId=0x00000006,0
[Window][Render Stats] [Window][Render Stats]
Pos=0,636 Pos=0,636
Size=639,225 Size=1279,225
Collapsed=0 Collapsed=0
DockId=0x00000004,0 DockId=0x00000004,0

View File

@@ -68,6 +68,8 @@ private:
bool showLogWindow; bool showLogWindow;
bool showStatsWindow; bool showStatsWindow;
int m_SideCount = 0;
static const int FRAME_HISTORY_COUNT = 3600; // 1min secondes <20> 60 FPS static const int FRAME_HISTORY_COUNT = 3600; // 1min secondes <20> 60 FPS
float m_frameTimeHistory[FRAME_HISTORY_COUNT] = {}; float m_frameTimeHistory[FRAME_HISTORY_COUNT] = {};
int m_frameTimeHistoryIndex = 0; int m_frameTimeHistoryIndex = 0;

View File

@@ -241,7 +241,6 @@ 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*);

View File

@@ -644,6 +644,24 @@ void imguiManager::WidgetTerrainWindow(ApplicationClass* app)
ImGui::Separator(); ImGui::Separator();
// Input for the number of cubes on each side
ImGui::Text("Number of cubes on each side: ");
ImGui::SameLine();
ImGui::InputInt("##SideCount", &m_SideCount);
if (m_SideCount < 1)
{
m_SideCount = 1;
}
ImGui::Separator();
if (ImGui::Button("Generate BigCube Terrain"))
{
app->CreateBigCube(m_SideCount);
}
ImGui::Separator();
if (ImGui::Button("Delete All Terrain Cubes")) if (ImGui::Button("Delete All Terrain Cubes"))
{ {
app->DeleteTerrain(); app->DeleteTerrain();

View File

@@ -176,23 +176,10 @@ bool ModelClass::InitializeBuffers(ID3D11Device* device)
void ModelClass::ShutdownBuffers() void ModelClass::ShutdownBuffers()
{ {
// Release the index buffer. if (m_indexBuffer) { m_indexBuffer->Release(); m_indexBuffer = nullptr; }
if (m_indexBuffer) if (m_vertexBuffer) { m_vertexBuffer->Release(); m_vertexBuffer = nullptr; }
{
m_indexBuffer->Release();
m_indexBuffer = 0;
}
// Release the vertex buffer.
if (m_vertexBuffer)
{
m_vertexBuffer->Release();
m_vertexBuffer = 0;
}
} }
void ModelClass::RenderBuffers(ID3D11DeviceContext* deviceContext) void ModelClass::RenderBuffers(ID3D11DeviceContext* deviceContext)
{ {
unsigned int stride; unsigned int stride;