switched to imgui docked, docks, but no viewport, to fix
This commit is contained in:
parent
50c0e866cf
commit
f1159d111b
1
.gitmodules
vendored
1
.gitmodules
vendored
@ -1,3 +1,4 @@
|
|||||||
[submodule "src/imgui"]
|
[submodule "src/imgui"]
|
||||||
path = src/imgui
|
path = src/imgui
|
||||||
url = https://github.com/ocornut/imgui.git
|
url = https://github.com/ocornut/imgui.git
|
||||||
|
branch = docking
|
||||||
|
|||||||
@ -1068,6 +1068,9 @@ void Engine::initImgui() {
|
|||||||
|
|
||||||
ImGui_ImplVulkan_Init(&initInfo);
|
ImGui_ImplVulkan_Init(&initInfo);
|
||||||
|
|
||||||
|
// Config ImGui
|
||||||
|
ImGui::GetIO().ConfigFlags |= ImGuiConfigFlags_DockingEnable;
|
||||||
|
|
||||||
_mainDeletionQueue.pushFunction([this, imguiPool]() {
|
_mainDeletionQueue.pushFunction([this, imguiPool]() {
|
||||||
ImGui_ImplVulkan_Shutdown();
|
ImGui_ImplVulkan_Shutdown();
|
||||||
vkDestroyDescriptorPool(
|
vkDestroyDescriptorPool(
|
||||||
@ -1132,10 +1135,16 @@ void Engine::buildImgui() {
|
|||||||
ImGui_ImplVulkan_NewFrame();
|
ImGui_ImplVulkan_NewFrame();
|
||||||
ImGui_ImplGlfw_NewFrame();
|
ImGui_ImplGlfw_NewFrame();
|
||||||
ImGui::NewFrame();
|
ImGui::NewFrame();
|
||||||
|
// Docking
|
||||||
|
ImGui::DockSpaceOverViewport();
|
||||||
|
|
||||||
// Main ImGui things
|
// Main ImGui things
|
||||||
ImGui::ShowDemoWindow();
|
ImGui::ShowDemoWindow();
|
||||||
|
|
||||||
|
//if(ImGui::Begin("Viewport")) {
|
||||||
|
|
||||||
|
//}
|
||||||
|
|
||||||
if(ImGui::Begin("Background Shader control")) {
|
if(ImGui::Begin("Background Shader control")) {
|
||||||
ComputeEffect& selected = backgroundEffects[currentBackgroundEffect];
|
ComputeEffect& selected = backgroundEffects[currentBackgroundEffect];
|
||||||
|
|
||||||
@ -1151,7 +1160,6 @@ void Engine::buildImgui() {
|
|||||||
backgroundEffects.size() - 1
|
backgroundEffects.size() - 1
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
ImGui::InputFloat4(
|
ImGui::InputFloat4(
|
||||||
"data1",
|
"data1",
|
||||||
(float*)& selected.data.data1
|
(float*)& selected.data.data1
|
||||||
@ -1169,6 +1177,7 @@ void Engine::buildImgui() {
|
|||||||
(float*)& selected.data.data4
|
(float*)& selected.data.data4
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
||||||
// Finish everything
|
// Finish everything
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit 5220a3f48d39c000da8b46fb0fccf3dd62695c51
|
Subproject commit b48d1afbe8ee8b238e2961dc363a949dd7304e23
|
||||||
Loading…
x
Reference in New Issue
Block a user