Add ImGui

- Initial ImGui commit, add support for showing demo window in Copium
  Engine
This commit is contained in:
Thraix
2023-07-13 18:18:52 +02:00
parent 4a1a149a68
commit cb120ef731
21 changed files with 381 additions and 6 deletions
@@ -15,6 +15,8 @@
#include <glm/gtc/matrix_transform.hpp>
#include <imgui.h>
namespace Copium
{
const std::vector<Vertex> vertices = {
@@ -74,6 +76,7 @@ namespace Copium
return true;
RecordCommandBuffer();
Vulkan::GetSwapChain().SubmitToGraphicsQueue(*commandBuffer);
Vulkan::GetSwapChain().EndPresent();
@@ -164,6 +167,8 @@ namespace Copium
void Application::RecordCommandBuffer()
{
Vulkan::GetImGuiInstance().Begin();
ImGui::ShowDemoWindow();
commandBuffer->Begin();
Framebuffer& fb = AssetManager::GetAsset<Framebuffer>(framebuffer);
@@ -193,6 +198,9 @@ namespace Copium
meshPassthrough->Bind(*commandBuffer);
meshPassthrough->Render(*commandBuffer);
Vulkan::GetImGuiInstance().End();
Vulkan::GetImGuiInstance().Render(*commandBuffer);
Vulkan::GetSwapChain().EndFrameBuffer(*commandBuffer);
commandBuffer->End();
}