Submitted command buffer :D

This commit is contained in:
Brandon Mak 2022-09-16 17:28:27 +08:00
parent eb8cbaeebb
commit 2f2567044a
2 changed files with 8 additions and 1 deletions

View File

@ -33,7 +33,7 @@ namespace Sandbox
// Set working directory // Set working directory
SHADE::SHFileUtilities::SetWorkDirToExecDir(); SHADE::SHFileUtilities::SetWorkDirToExecDir();
SDL_Init(SDL_INIT_VIDEO); SDL_Init(SDL_INIT_EVERYTHING);
window.Create(hInstance, hPrevInstance, lpCmdLine, nCmdShow); window.Create(hInstance, hPrevInstance, lpCmdLine, nCmdShow);
SHADE::SHSystemManager::CreateSystem<SHADE::SHGraphicsSystem>(); SHADE::SHSystemManager::CreateSystem<SHADE::SHGraphicsSystem>();
SHADE::SHGraphicsSystem* graphicsSystem = static_cast<SHADE::SHGraphicsSystem*>(SHADE::SHSystemManager::GetSystem<SHADE::SHGraphicsSystem>()); SHADE::SHGraphicsSystem* graphicsSystem = static_cast<SHADE::SHGraphicsSystem*>(SHADE::SHSystemManager::GetSystem<SHADE::SHGraphicsSystem>());

View File

@ -49,6 +49,7 @@ namespace SHADE
imguiCommandBuffer->BeginRecording(); imguiCommandBuffer->BeginRecording();
ImGui_ImplVulkan_CreateFontsTexture(imguiCommandBuffer->GetVkCommandBuffer()); ImGui_ImplVulkan_CreateFontsTexture(imguiCommandBuffer->GetVkCommandBuffer());
imguiCommandBuffer->EndRecording(); imguiCommandBuffer->EndRecording();
gfxSystem->GetQueue()->SubmitCommandBuffer({imguiCommandBuffer}, {}, {}, vk::PipelineStageFlagBits::eNone, {});
ImGui_ImplVulkan_DestroyFontUploadObjects(); ImGui_ImplVulkan_DestroyFontUploadObjects();
@ -67,6 +68,12 @@ namespace SHADE
NewFrame(); NewFrame();
ImGui::ShowDemoWindow(); ImGui::ShowDemoWindow();
ImGui::Begin("Your mom");
if (ImGui::Button("OP"))
{
std::cout << "HEHEHEOHEIOHIEOH\n";
}
ImGui::End();
} }
void SHEditor::Render() void SHEditor::Render()