Big update

This commit is contained in:
2026-03-07 03:14:10 +03:00
parent f8f69d3b88
commit a998771486
33 changed files with 1788 additions and 577 deletions

View File

@@ -14,7 +14,7 @@
static GLuint g_VAO = 0;
static int g_NumModels = 0;
int g_NumModels = 0;
// TEMP
glm::vec3 g_viewOrigin;
@@ -77,7 +77,8 @@ Render::Render() :
m_pWindow(nullptr),
m_pGLContext(nullptr),
m_pStretchedPicVBuf(nullptr),
m_usingVAO(false)
m_usingVAO(false),
m_showStats(true)
{
m_viewMatrix = glm::identity<glm::mat4>();
m_projectionMatrix = glm::identity<glm::mat4>();
@@ -296,6 +297,9 @@ void Render::RenderScene() {
void Render::RenderStats()
{
if (!m_showStats)
return;
char buffer[256];
snprintf(buffer, sizeof(buffer), "FPS: %.1f", ImGui::GetIO().Framerate);
@@ -343,6 +347,11 @@ void Render::LoadSceneXML(const char* filename)
g_sceneManager->loadScene(filename);
}
void Render::ToggleShowStats()
{
m_showStats = !m_showStats;
}
//IRender* GetRender()
//{
// return g_render;