From d80ee75aeae25f26fb9af84b1539c4c38e8a28d8 Mon Sep 17 00:00:00 2001 From: Huseyn Ismayilov Date: Sat, 24 Aug 2024 20:50:58 +0400 Subject: [PATCH] fix(close #13): Fix glitchy behavior --- engine/src/Renderer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/Renderer.cpp b/engine/src/Renderer.cpp index aa726d3..718f9a0 100644 --- a/engine/src/Renderer.cpp +++ b/engine/src/Renderer.cpp @@ -71,14 +71,14 @@ void Renderer::SetupBuffers() } void Renderer::Render() { + s_Data.m_FBO->Bind(); + glfwPollEvents(); glClearColor(0.0f, 0.1f, 0.2f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); UI::Run(); - s_Data.m_FBO->Bind(); - s_Data.m_Shader->Use(); auto transform = glm::mat4(1.0f); transform = glm::translate(transform, glm::vec3(UI::GetData().m_Position[0], UI::GetData().m_Position[1], UI::GetData().m_Position[2]));