diff --git a/SHADE_Engine/src/Editor/SHEditor.cpp b/SHADE_Engine/src/Editor/SHEditor.cpp new file mode 100644 index 00000000..17b09291 --- /dev/null +++ b/SHADE_Engine/src/Editor/SHEditor.cpp @@ -0,0 +1,62 @@ +#include "SHpch.h" +#include "SHEditor.h" +#include "SHEditorBackend.h" + +namespace SHADE +{ + void SHEditor::Initialize() + { + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + + SetupWin32Backend(); + SetupVulkanBackend(); + + } + + void SHEditor::Update() + { + NewFrame(); + + //Add all windows to draw list, Perform necessary updates + + ImGui::Render(); + } + + void SHEditor::Render() + { + ImGui_ImplVulkan_RenderDrawData(ImGui::GetDrawData(), ) + } + + void SHEditor::Exit() + { + ShutdownVulkanBackend(); + ShutdownWin32Backend(); + ImGui::DestroyContext(); + } + + void SHEditor::SetupVulkanBackend() + { + ImGui_ImplVulkan_InitInfo initInfo; + + ImGui_ImplVulkan_Init(&initInfo, VK_NULL_HANDLE); + } + + void SHEditor::ShutdownVulkanBackend() + { + ImGui_ImplVulkan_Shutdown(); + } + + void SHEditor::NewFrame() + { + } + + void SHEditor::SetupWin32Backend() + { + //ImGui_ImplWin32_Init(/*hwnd*/); + } + + void SHEditor::ShutdownWin32Backend() + { + } +} diff --git a/SHADE_Engine/src/Editor/SHEditor.h b/SHADE_Engine/src/Editor/SHEditor.h new file mode 100644 index 00000000..a3b03421 --- /dev/null +++ b/SHADE_Engine/src/Editor/SHEditor.h @@ -0,0 +1,25 @@ +#pragma once + +namespace SHADE +{ + class SHEditor + { + public: + + static void Initialize(); + + static void Update(); + + static void Render(); + + static void Exit(); + + private: + static void SetupWin32Backend(); + static void ShutdownWin32Backend(); + static void SetupVulkanBackend(); + static void ShutdownVulkanBackend(); + + static void NewFrame(); + }; +} \ No newline at end of file diff --git a/SHADE_Engine/src/Editor/SHEditorBackend.h b/SHADE_Engine/src/Editor/SHEditorBackend.h new file mode 100644 index 00000000..29a19f86 --- /dev/null +++ b/SHADE_Engine/src/Editor/SHEditorBackend.h @@ -0,0 +1,3 @@ +#pragma once +#include +#include \ No newline at end of file