![]() |
Tilengine 2.15 supports variable refresh rate monitors - Printable Version +- Tilengine - The 2D retro graphics engine forum (http://tilengine.org/forum) +-- Forum: Tabloid (http://tilengine.org/forum/forumdisplay.php?fid=4) +--- Forum: News & Announcements (http://tilengine.org/forum/forumdisplay.php?fid=6) +--- Thread: Tilengine 2.15 supports variable refresh rate monitors (/showthread.php?tid=2292) |
Tilengine 2.15 supports variable refresh rate monitors - megamarc - 04-23-2023 I've uploaded a new release to GitHub and itch.io, that adds these features to the built-in window:
https://megamarc.itch.io/tilengine/devlog/520277/tilengine-215-released RE: Tilengine 2.15 supports variable refresh rate monitors - System64 - 04-23-2023 (04-23-2023, 04:24 AM)megamarc Wrote: I've uploaded a new release to GitHub and itch.io, that adds these features to the built-in window: This is very nice! It will solve problems for people that have non-60Hz screens! (Including me and people that have high end setup) Adjusting scaling factor is also a good idea, but I also suggest to add getters and setters to set the scaling through code. One use case example can be game settings. Most of games today have a setting that let you adjusting the size of the window. RE: Tilengine 2.15 supports variable refresh rate monitors - megamarc - 04-23-2023 Hi! No problem in adding getter/setter for new window scaling factor, thanks for suggesting it. As I don't have acces to a non-60 Hz display, I'd like you to validate the latest version on your display. I tested it on my 60 Hz display by disabling vsync and manually forcing other target fps like 144 or 240. The test sample runs at the same relative speed no matter what target fps I set, but using different amounts of cpu and gpu, of course. There's a new test file under test folder, called test_fps.c. I'd like you to build and run it with two configurations:
Let me know how does it run in your setup RE: Tilengine 2.15 supports variable refresh rate monitors - System64 - 04-24-2023 (04-23-2023, 03:44 PM)megamarc Wrote: Hi! Hi, I compiled the program, and once I disable the NOVSYNC flag, I have a black window. But when I enable it, Green Hill Zone displays properly. Here is the code : Code: #include "Tilengine.h" RE: Tilengine 2.15 supports variable refresh rate monitors - megamarc - 04-24-2023 Hi, Thanks for testing it. I don't know what's going on, as on my tests it runs well in both cases... (native and forced fps). However I don't hava access to a 144 Hz monitor, so I can't check if there's something funny going on with timings. Strangely, the tricky part is handling timing without vsync -that it's working for you-, as enabling vsync is the classic behavior so it should be harmless. I've pushed an update to GitHub with getter/setter for window scaling factor at runtime, and a new function to return actual fps at runtime. I've reworked a bit test_fps.c and now it prints actual fps to the console. What OS and graphics card are you using? I use Windows x64 with an Intel GMA500 chipset. RE: Tilengine 2.15 supports variable refresh rate monitors - System64 - 04-24-2023 (04-24-2023, 03:54 AM)megamarc Wrote: Hi, I use Windows 11, I also have the Intel Core i7 CPU graphics and an NVidia RTX 3050. I will try the new update and give you feedback. RE: Tilengine 2.15 supports variable refresh rate monitors - System64 - 04-24-2023 Alright so I tested and this is very weird Target FPS with no vsync works perfectly, but when I go to standard mode, the FPS counter is above 1000 (yes!). And even weirder, if I go to full screen, the picture is displayed, and when I go back to windowed mode, the picture is still here. But when I close the program and open it again, the bug is still here. RE: Tilengine 2.15 supports variable refresh rate monitors - megamarc - 04-24-2023 It seems that vsync is being ignored in windowed mode in this setup, so it's running at full throttle
RE: Tilengine 2.15 supports variable refresh rate monitors - System64 - 04-24-2023 (04-24-2023, 09:22 PM)megamarc Wrote: It seems that vsync is being ignored in windowed mode in this setup, so it's running at full throttle In previous releases (like Tilengine 2.14 for example), they ran faster because of 144Hz. But they displays properly in both full screen and windowed. When I meant that, I meant you can see the picture, it is not black. And it runs at 144 FPS. |