Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Font and Image rendering slow
Re: Font and Image rendering slow [message #59999 is a reply to message #59996] |
Mon, 03 July 2023 22:55   |
Oblivion
Messages: 1214 Registered: August 2007
|
Senior Contributor |
|
|
One cap is in the EventLoop(). By default it lets the gui sleep for 20 ms (in order to process (key, mouse, etc.) events.);
You can override the Run() method and implement your own. The other cap is in the backends. Compiling the code in NOGTK (X11) mode lets the app jumpt to 90+ fps on my machine (ryzen 5 5600g (no discrete gfx card), 16 GB ram, linux 6.3.9, GNOME 44.1)
Overriden Run example:
void frm_main::Run()
{
OpenMain();
while(IsOpen()) {
Ctrl::ProcessEvents();
Sleep(1); // can be dynamically set to adapt to workload...
}
}
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
|
|
|
Goto Forum:
Current Time: Wed Jul 02 17:29:24 CEST 2025
Total time taken to generate the page: 0.03963 seconds
|