This commit is contained in:
2026-03-07 07:48:16 +03:00
parent a998771486
commit 95daf12fc5
48 changed files with 4613 additions and 66 deletions

View File

@@ -67,7 +67,7 @@ void APIENTRY GL_DebugOutput(GLenum source,
if (type == GL_DEBUG_TYPE_ERROR_ARB)
{
bool debug = true;
__debugbreak();
//__debugbreak();
}
}
@@ -78,7 +78,7 @@ Render::Render() :
m_pGLContext(nullptr),
m_pStretchedPicVBuf(nullptr),
m_usingVAO(false),
m_showStats(true)
m_showStats(false)
{
m_viewMatrix = glm::identity<glm::mat4>();
m_projectionMatrix = glm::identity<glm::mat4>();
@@ -310,6 +310,13 @@ void Render::RenderStats()
snprintf(buffer, sizeof(buffer), "numModels: %d", g_NumModels);
ImGui::GetForegroundDrawList()->AddText(ImVec2(0.0f, 30.0f), 0xffffffff, buffer);
Camera* camera = g_cameraManager.GetActiveCamera();
if (camera)
{
snprintf(buffer, sizeof(buffer), "cam pos: %.2f %.2f %.2f", camera->GetPosition().x, camera->GetPosition().y, camera->GetPosition().z);
ImGui::GetForegroundDrawList()->AddText(ImVec2(0.0f, 45.0f), 0xffffffff, buffer);
}
}
void Render::Present(bool vsync)
@@ -319,6 +326,8 @@ void Render::Present(bool vsync)
SDL_GL_SwapWindow(m_pWindow);
// reset stats
ResetStates();
g_NumModels = 0;
}