Добавлен Frustum Culling, требующий отладки

This commit is contained in:
2025-07-25 19:22:15 +06:00
parent 2933465f84
commit 824b7f2f80
6 changed files with 321 additions and 68 deletions

View File

@@ -148,10 +148,14 @@ void Vulkan::run()
double prevTime = glfwGetTime();
while(!NeedShutdown)
{
float dTime = glfwGetTime()-prevTime;
prevTime += dTime;
Screen.State = DrawState::Begin;
if(Game.RSession)
Game.RSession->pushStage(EnumRenderStage::ComposingCommandBuffer);
{
std::lock_guard lock(Screen.BeforeDrawMtx);
while(!Screen.BeforeDraw.empty())
@@ -452,7 +456,8 @@ void Vulkan::run()
// vkCmdBeginRenderPass(Graphics.CommandBufferRender, &rp_begin, VK_SUBPASS_CONTENTS_INLINE);
// }
if(Game.RSession)
Game.RSession->pushStage(EnumRenderStage::Render);
#ifdef HAS_IMGUI
ImGui_ImplVulkan_NewFrame();
@@ -539,6 +544,9 @@ void Vulkan::run()
vkAssert(err == VK_TIMEOUT);
if(Game.Session) {
if(Game.RSession)
Game.RSession->pushStage(EnumRenderStage::WorldUpdate);
Game.Session->atFreeDrawTime(gTime, dTime);
}