summaryrefslogtreecommitdiff
path: root/src/Fl_Scroll.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2024-12-01 15:07:12 +0100
committerAlbrecht Schlosser <fltk@aljus.de>2024-12-01 16:43:31 +0100
commit5160567728be407ef83445601f4da19b4e5b5bee (patch)
tree8e777a5b4f69b823c242cfdfad791926660eec0e /src/Fl_Scroll.cxx
parent12ea6a02880cb5ba0e20aba6d853cd642e0f0552 (diff)
Use a constant frame rate (25 fps) in test/cube demo
The old version was "synchronized" by calling Fl::check() in a loop which resulted in the highest speed possible on any platform. It turned out that this was way too fast on the Wayland platform as `valerius` posted on IRC/Matrix on Nov 30, 2024. Citation: "anyone else notice the cube demo on Wayland is mega ultra hyper speed?". I took the opportunity to change the demo to use a timer with a given frame rate (see constant 'FPS') to synchronize drawing. Note: the 'speed' slider is independent of the drawing frequency. Finally this commit adds statistics output when the 'Stats / Exit' button is pressed like Iterations = 304, runtime = 12.167 sec, fps = 24.99, requested: 25 with the requested frame rate (default = 25) and allows the user to continue to see more statistics. To do (very likely not in 1.4.x): 1. integrate running statistics in the display 2. make the desired frame rate variable at runtime (new slider)
Diffstat (limited to 'src/Fl_Scroll.cxx')
0 files changed, 0 insertions, 0 deletions