Add ImGui
- Initial ImGui commit, add support for showing demo window in Copium Engine
This commit is contained in:
@@ -8,3 +8,4 @@ bin/
|
||||
.ycm_extra_conf.py
|
||||
.cache
|
||||
libs
|
||||
imgui.ini
|
||||
|
||||
@@ -16,3 +16,6 @@
|
||||
[submodule "ext/repos/shaderc"]
|
||||
path = ext/repos/shaderc
|
||||
url = git@github.com:google/shaderc.git
|
||||
[submodule "ext/repos/imgui"]
|
||||
path = ext/repos/imgui
|
||||
url = git@github.com:ocornut/imgui.git
|
||||
|
||||
+12
@@ -10,6 +10,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CopiumEngine", "CopiumEngin
|
||||
{837D2EA3-3E5B-41A2-B2D2-4DC8B5425490} = {837D2EA3-3E5B-41A2-B2D2-4DC8B5425490}
|
||||
{8887886E-367C-40E8-BDC2-901F4F21571E} = {8887886E-367C-40E8-BDC2-901F4F21571E}
|
||||
{B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C} = {B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C}
|
||||
{E9AB3B33-1F75-433A-A324-3F92017964F5} = {E9AB3B33-1F75-433A-A324-3F92017964F5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Extensions", "Extensions", "{6076C304-B981-471F-BDA0-57A33D9D6832}"
|
||||
@@ -24,6 +25,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msdf-atlas-gen", "ext\proje
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glfw3", "ext\projects\glfw3\glfw3.vcxproj", "{B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imgui", "ext\projects\imgui\imgui.vcxproj", "{E9AB3B33-1F75-433A-A324-3F92017964F5}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
@@ -80,6 +83,14 @@ Global
|
||||
{B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C}.Release|x64.Build.0 = Release|x64
|
||||
{B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C}.Release|x86.ActiveCfg = Release|Win32
|
||||
{B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C}.Release|x86.Build.0 = Release|Win32
|
||||
{E9AB3B33-1F75-433A-A324-3F92017964F5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E9AB3B33-1F75-433A-A324-3F92017964F5}.Debug|x64.Build.0 = Debug|x64
|
||||
{E9AB3B33-1F75-433A-A324-3F92017964F5}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{E9AB3B33-1F75-433A-A324-3F92017964F5}.Debug|x86.Build.0 = Debug|Win32
|
||||
{E9AB3B33-1F75-433A-A324-3F92017964F5}.Release|x64.ActiveCfg = Release|x64
|
||||
{E9AB3B33-1F75-433A-A324-3F92017964F5}.Release|x64.Build.0 = Release|x64
|
||||
{E9AB3B33-1F75-433A-A324-3F92017964F5}.Release|x86.ActiveCfg = Release|Win32
|
||||
{E9AB3B33-1F75-433A-A324-3F92017964F5}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -90,6 +101,7 @@ Global
|
||||
{837D2EA3-3E5B-41A2-B2D2-4DC8B5425490} = {6076C304-B981-471F-BDA0-57A33D9D6832}
|
||||
{8887886E-367C-40E8-BDC2-901F4F21571E} = {6076C304-B981-471F-BDA0-57A33D9D6832}
|
||||
{B1E43BD2-F22E-44C4-AEEB-3B0C0BC7947C} = {6076C304-B981-471F-BDA0-57A33D9D6832}
|
||||
{E9AB3B33-1F75-433A-A324-3F92017964F5} = {6076C304-B981-471F-BDA0-57A33D9D6832}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {8CA46360-3BB7-4DFC-8319-7D4372B4C851}
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions);GLM_FORCE_LEFT_HANDED;GLFW_INCLUDE_VULKAN;GLM_FORCE_RADIANS;GLM_FORCE_DEPTH_ZERO_TO_ONE;MSDF_ATLAS_PUBLIC=;MSDFGEN_PUBLIC=</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)ext/include/;$(ProjectDir)src/;$(SolutionDir)ext/repos/msdf-atlas-gen/;$(SolutionDir)ext/repos/msdf-atlas-gen/msdfgen/;$(SolutionDir)ext/repos/stb/;$(SolutionDir)ext/repos/glfw/include;$(ProjectDir)ext/repos/glm/;$(VULKAN_SDK)/Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)ext/include/;$(ProjectDir)src/;$(SolutionDir)ext/repos/msdf-atlas-gen/;$(SolutionDir)ext/repos/msdf-atlas-gen/msdfgen/;$(SolutionDir)ext/repos/stb/;$(SolutionDir)ext/repos/glfw/include;$(ProjectDir)ext/repos/glm/;$(VULKAN_SDK)/Include;$(SolutionDir)ext/repos/imgui/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
@@ -128,7 +128,7 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)libs\$(Platform)\$(Configuration)\;$(VULKAN_SDK)/Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>vulkan-1.lib;glfw3.lib;shaderc_combinedd.lib;msdfgen-core.lib;msdfgen-ext.lib;msdf-atlas-gen.lib;freetype.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>vulkan-1.lib;imgui.lib;glfw3.lib;shaderc_combinedd.lib;msdfgen-core.lib;msdfgen-ext.lib;msdf-atlas-gen.lib;freetype.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
@@ -147,7 +147,7 @@
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions);GLM_FORCE_LEFT_HANDED;GLFW_INCLUDE_VULKAN;GLM_FORCE_RADIANS;GLM_FORCE_DEPTH_ZERO_TO_ONE;MSDF_ATLAS_PUBLIC=;MSDFGEN_PUBLIC=</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)ext/include/;$(ProjectDir)src/;$(SolutionDir)ext/repos/msdf-atlas-gen/;$(SolutionDir)ext/repos/msdf-atlas-gen/msdfgen/;$(SolutionDir)ext/repos/stb/;$(SolutionDir)ext/repos/glfw/include;$(ProjectDir)ext/repos/glm/;$(VULKAN_SDK)/Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)ext/include/;$(ProjectDir)src/;$(SolutionDir)ext/repos/msdf-atlas-gen/;$(SolutionDir)ext/repos/msdf-atlas-gen/msdfgen/;$(SolutionDir)ext/repos/stb/;$(SolutionDir)ext/repos/glfw/include;$(ProjectDir)ext/repos/glm/;$(VULKAN_SDK)/Include;$(SolutionDir)ext/repos/imgui/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
@@ -157,7 +157,7 @@
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)libs\$(Platform)\$(Configuration)\;$(VULKAN_SDK)/Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>vulkan-1.lib;glfw3.lib;shaderc_combined.lib;msdfgen-core.lib;msdfgen-ext.lib;msdf-atlas-gen.lib;freetype.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>vulkan-1.lib;imgui.lib;glfw3.lib;shaderc_combined.lib;msdfgen-core.lib;msdfgen-ext.lib;msdf-atlas-gen.lib;freetype.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
@@ -177,6 +177,7 @@
|
||||
<ClCompile Include="src\copium\core\Application.cpp" />
|
||||
<ClCompile Include="src\copium\buffer\Buffer.cpp" />
|
||||
<ClCompile Include="src\copium\core\Device.cpp" />
|
||||
<ClCompile Include="src\copium\core\ImGuiInstance.cpp" />
|
||||
<ClCompile Include="src\copium\core\Scene.cpp" />
|
||||
<ClCompile Include="src\copium\core\Vulkan.cpp" />
|
||||
<ClCompile Include="src\copium\core\Window.cpp" />
|
||||
@@ -247,6 +248,7 @@
|
||||
<ClInclude Include="src\copium\asset\AssetRef.h" />
|
||||
<ClInclude Include="src\copium\buffer\RendererVertexBuffer.h" />
|
||||
<ClInclude Include="src\copium\core\Device.h" />
|
||||
<ClInclude Include="src\copium\core\ImGuiInstance.h" />
|
||||
<ClInclude Include="src\copium\core\Scene.h" />
|
||||
<ClInclude Include="src\copium\core\Vulkan.h" />
|
||||
<ClInclude Include="src\copium\core\Window.h" />
|
||||
|
||||
@@ -222,6 +222,9 @@
|
||||
<ClCompile Include="src\copium\sampler\SamplerCreator.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\copium\core\ImGuiInstance.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\copium\sampler\DepthAttachment.h">
|
||||
@@ -524,5 +527,8 @@
|
||||
<ClInclude Include="src\copium\example\LevelGeneratorComponentListener.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\copium\core\ImGuiInstance.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -18,6 +18,16 @@ namespace Copium
|
||||
vkDestroyDevice(device, nullptr);
|
||||
}
|
||||
|
||||
uint32_t Device::GetGraphicsQueueFamily() const
|
||||
{
|
||||
return graphicsQueueIndex;
|
||||
}
|
||||
|
||||
uint32_t Device::GetPresentQueueFamily() const
|
||||
{
|
||||
return presentQueueIndex;
|
||||
}
|
||||
|
||||
VkQueue Device::GetGraphicsQueue() const
|
||||
{
|
||||
return graphicsQueue;
|
||||
|
||||
@@ -27,6 +27,8 @@ namespace Copium
|
||||
Device();
|
||||
~Device();
|
||||
|
||||
uint32_t GetGraphicsQueueFamily() const;
|
||||
uint32_t GetPresentQueueFamily() const;
|
||||
VkQueue GetGraphicsQueue() const;
|
||||
VkQueue GetPresentQueue() const;
|
||||
VkCommandPool GetCommandPool() const;
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
#include "ImGuiInstance.h"
|
||||
|
||||
#include "copium/core/Vulkan.h"
|
||||
#include "copium/buffer/CommandBufferScoped.h"
|
||||
|
||||
#include <imgui.h>
|
||||
#include <backends/imgui_impl_glfw.h>
|
||||
#include <backends/imgui_impl_vulkan.h>
|
||||
|
||||
namespace Copium
|
||||
{
|
||||
ImGuiInstance::ImGuiInstance()
|
||||
: descriptorPool{std::make_unique<DescriptorPool>()}
|
||||
{
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
|
||||
|
||||
// Setup Dear ImGui style
|
||||
ImGui::StyleColorsDark();
|
||||
|
||||
ImGui_ImplGlfw_InitForVulkan(Vulkan::GetWindow().GetWindow(), true);
|
||||
ImGui_ImplVulkan_InitInfo init_info = {};
|
||||
init_info.Instance = Vulkan::GetInstance();
|
||||
init_info.PhysicalDevice = Vulkan::GetDevice().GetPhysicalDevice();
|
||||
init_info.Device = Vulkan::GetDevice();
|
||||
init_info.QueueFamily = Vulkan::GetDevice().GetGraphicsQueueFamily();
|
||||
init_info.Queue = Vulkan::GetDevice().GetGraphicsQueue();
|
||||
init_info.PipelineCache = VK_NULL_HANDLE;
|
||||
init_info.DescriptorPool = *descriptorPool.get();
|
||||
init_info.Subpass = 0;
|
||||
init_info.MinImageCount = SwapChain::MAX_FRAMES_IN_FLIGHT;
|
||||
init_info.ImageCount = Vulkan::GetSwapChain().GetImageCount();
|
||||
init_info.MSAASamples = VK_SAMPLE_COUNT_1_BIT;
|
||||
init_info.Allocator = nullptr;
|
||||
init_info.CheckVkResultFn = CheckVkResult;
|
||||
ImGui_ImplVulkan_Init(&init_info, Vulkan::GetSwapChain().GetRenderPass());
|
||||
{
|
||||
CommandBufferScoped commandBuffer;
|
||||
ImGui_ImplVulkan_CreateFontsTexture(commandBuffer);
|
||||
}
|
||||
ImGui_ImplVulkan_DestroyFontUploadObjects();
|
||||
}
|
||||
|
||||
ImGuiInstance::~ImGuiInstance()
|
||||
{
|
||||
ImGui_ImplVulkan_Shutdown();
|
||||
ImGui_ImplGlfw_Shutdown();
|
||||
ImGui::DestroyContext();
|
||||
}
|
||||
|
||||
void ImGuiInstance::Begin()
|
||||
{
|
||||
ImGui_ImplVulkan_NewFrame();
|
||||
ImGui_ImplGlfw_NewFrame();
|
||||
ImGui::NewFrame();
|
||||
}
|
||||
|
||||
void ImGuiInstance::End()
|
||||
{
|
||||
ImGui::EndFrame();
|
||||
}
|
||||
|
||||
void ImGuiInstance::Render(CommandBuffer& commandBuffer)
|
||||
{
|
||||
ImGui::Render();
|
||||
ImDrawData* draw_data = ImGui::GetDrawData();
|
||||
ImGui_ImplVulkan_RenderDrawData(draw_data, commandBuffer);
|
||||
}
|
||||
|
||||
void ImGuiInstance::CheckVkResult(VkResult err)
|
||||
{
|
||||
CP_VK_ASSERT(err, "Failed to initialize ImGui");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "copium/buffer/CommandBuffer.h"
|
||||
#include "copium/pipeline/DescriptorPool.h"
|
||||
|
||||
namespace Copium
|
||||
{
|
||||
class ImGuiInstance
|
||||
{
|
||||
CP_DELETE_COPY_AND_MOVE_CTOR(ImGuiInstance);
|
||||
|
||||
private:
|
||||
std::unique_ptr<DescriptorPool> descriptorPool;
|
||||
|
||||
public:
|
||||
ImGuiInstance();
|
||||
~ImGuiInstance();
|
||||
|
||||
void Begin();
|
||||
void End();
|
||||
void Render(CommandBuffer& commandBuffer);
|
||||
|
||||
private:
|
||||
static void CheckVkResult(VkResult err);
|
||||
};
|
||||
}
|
||||
@@ -194,6 +194,11 @@ namespace Copium
|
||||
return flightIndex;
|
||||
}
|
||||
|
||||
int SwapChain::GetImageCount() const
|
||||
{
|
||||
return images.size();
|
||||
}
|
||||
|
||||
void SwapChain::Initialize()
|
||||
{
|
||||
SwapChainSupportDetails swapChainSupport{Vulkan::GetWindow().GetSurface(), Vulkan::GetDevice().GetPhysicalDevice()};
|
||||
|
||||
@@ -59,6 +59,7 @@ namespace Copium
|
||||
void Recreate();
|
||||
|
||||
int GetFlightIndex() const;
|
||||
int GetImageCount() const;
|
||||
|
||||
private:
|
||||
void Initialize();
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace Copium
|
||||
std::unique_ptr<Window> Vulkan::window;
|
||||
std::unique_ptr<Device> Vulkan::device;
|
||||
std::unique_ptr<SwapChain> Vulkan::swapChain;
|
||||
std::unique_ptr<ImGuiInstance> Vulkan::imGuiInstance;
|
||||
AssetHandle Vulkan::emptyTexture2D;
|
||||
|
||||
void Vulkan::Initialize()
|
||||
@@ -21,6 +22,7 @@ namespace Copium
|
||||
window = std::make_unique<Window>("Copium Engine", 1440, 810, WindowMode::Windowed);
|
||||
device = std::make_unique<Device>();
|
||||
swapChain = std::make_unique<SwapChain>();
|
||||
imGuiInstance = std::make_unique<ImGuiInstance>();
|
||||
|
||||
AssetManager::RegisterAssetType<Texture2D>("Texture2D");
|
||||
AssetManager::RegisterAssetType<ColorAttachment>("RenderTexture");
|
||||
@@ -39,6 +41,7 @@ namespace Copium
|
||||
AssetManager::UnloadAsset(emptyTexture2D);
|
||||
AssetManager::UnregisterAssetDir("assets/");
|
||||
AssetManager::Cleanup();
|
||||
imGuiInstance.reset();
|
||||
swapChain.reset();
|
||||
device.reset();
|
||||
window.reset();
|
||||
@@ -65,6 +68,11 @@ namespace Copium
|
||||
return *swapChain;
|
||||
}
|
||||
|
||||
ImGuiInstance& Vulkan::GetImGuiInstance()
|
||||
{
|
||||
return *imGuiInstance;
|
||||
}
|
||||
|
||||
AssetHandle Vulkan::GetEmptyTexture2D()
|
||||
{
|
||||
return emptyTexture2D;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "copium/core/Instance.h"
|
||||
#include "copium/core/SwapChain.h"
|
||||
#include "copium/core/Window.h"
|
||||
#include "copium/core/ImGuiInstance.h"
|
||||
#include "copium/util/Common.h"
|
||||
|
||||
#include <memory>
|
||||
@@ -18,6 +19,7 @@ namespace Copium
|
||||
static std::unique_ptr<Window> window;
|
||||
static std::unique_ptr<Device> device;
|
||||
static std::unique_ptr<SwapChain> swapChain;
|
||||
static std::unique_ptr<ImGuiInstance> imGuiInstance;
|
||||
|
||||
static AssetHandle emptyTexture2D;
|
||||
public:
|
||||
@@ -27,6 +29,7 @@ namespace Copium
|
||||
static Window& GetWindow();
|
||||
static Device& GetDevice();
|
||||
static SwapChain& GetSwapChain();
|
||||
static ImGuiInstance& GetImGuiInstance();
|
||||
static bool Valid();
|
||||
static AssetHandle GetEmptyTexture2D();
|
||||
};
|
||||
|
||||
@@ -47,4 +47,9 @@ namespace Copium
|
||||
{
|
||||
vkFreeDescriptorSets(Vulkan::GetDevice(), descriptorPool, descriptorSets.size(), descriptorSets.data());
|
||||
}
|
||||
|
||||
DescriptorPool::operator VkDescriptorPool() const
|
||||
{
|
||||
return descriptorPool;
|
||||
}
|
||||
}
|
||||
@@ -18,5 +18,7 @@ namespace Copium
|
||||
|
||||
std::vector<VkDescriptorSet> AllocateDescriptorSets(VkDescriptorSetLayout descriptorSetLayout);
|
||||
void FreeDescriptorSets(const std::vector<VkDescriptorSet>& descriptorSets);
|
||||
|
||||
operator VkDescriptorPool() const;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<ShowAllFiles>true</ShowAllFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,153 @@
|
||||
<?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>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\repos\imgui\backends\imgui_impl_glfw.cpp" />
|
||||
<ClCompile Include="..\..\repos\imgui\backends\imgui_impl_vulkan.cpp" />
|
||||
<ClCompile Include="..\..\repos\imgui\imgui.cpp" />
|
||||
<ClCompile Include="..\..\repos\imgui\imgui_demo.cpp" />
|
||||
<ClCompile Include="..\..\repos\imgui\imgui_draw.cpp" />
|
||||
<ClCompile Include="..\..\repos\imgui\imgui_tables.cpp" />
|
||||
<ClCompile Include="..\..\repos\imgui\imgui_widgets.cpp" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{e9ab3b33-1f75-433a-a324-3f92017964f5}</ProjectGuid>
|
||||
<RootNamespace>imgui</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>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</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" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)libs\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)ext/repos/imgui;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)libs\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)ext/repos/imgui;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<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>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)ext/repos/glfw/include;$(VULKAN_SDK)/Include</AdditionalIncludeDirectories>
|
||||
</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>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)ext/repos/glfw/include;$(VULKAN_SDK)/Include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<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="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<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="..\..\repos\imgui\backends\imgui_impl_glfw.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\repos\imgui\backends\imgui_impl_vulkan.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\repos\imgui\imgui.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\repos\imgui\imgui_demo.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\repos\imgui\imgui_draw.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\repos\imgui\imgui_tables.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\repos\imgui\imgui_widgets.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ShowAllFiles>false</ShowAllFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Submodule
+1
Submodule ext/repos/imgui added at 77eba4d0d1
Reference in New Issue
Block a user