@@ -769,6 +769,7 @@ class RacingEngine {
769769 int fpsFrameCount = 0 ;
770770 float currentFPS = 0 .0f ;
771771 float frameTimeMs = 0 .0f ;
772+ float titleUpdateTimer = 0 .0f ;
772773
773774 // Initialize temporal accumulation tracking
774775 lastCameraPos = camera.getPosition ();
@@ -838,14 +839,18 @@ class RacingEngine {
838839 acceleration.prepareInstanceData (device, transforms);
839840 }
840841
841- // Update window title with stats every frame
842- glm::vec3 pos = camera.getPosition ();
843- char title[256 ];
844- uint32_t totalSamples = accumulationFrames * 8 ; // 8 SPP per frame
845- snprintf (title, sizeof (title),
846- " IZTAPALAPA PATH TRACER | FPS: %.0f | %.2fms | %u samples | Pos: (%.1f, %.1f, %.1f)" ,
847- currentFPS, frameTimeMs, totalSamples, pos.x , pos.y , pos.z );
848- glfwSetWindowTitle (window, title);
842+ // Update window title with stats every 0.25s
843+ titleUpdateTimer += deltaTime;
844+ if (titleUpdateTimer >= 0 .25f ) {
845+ glm::vec3 pos = camera.getPosition ();
846+ char title[256 ];
847+ uint32_t totalSamples = accumulationFrames * 8 ; // 8 SPP per frame
848+ snprintf (title, sizeof (title),
849+ " IZTAPALAPA PATH TRACER | FPS: %.0f | %.2fms | %u samples | Pos: (%.1f, %.1f, %.1f)" ,
850+ currentFPS, frameTimeMs, totalSamples, pos.x , pos.y , pos.z );
851+ glfwSetWindowTitle (window, title);
852+ titleUpdateTimer = 0 .0f ;
853+ }
849854
850855#if ENABLE_RENDER_LOOP_LOGGING
851856 // Print detailed status to console periodically
0 commit comments