You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried setting the mailLoopMode to RepaintOnFrame, but get compile errors. Either RepaintOnFrame not defined or when I declare it as MainLoopMode (copied the type MainLoopMode enum to my code, otherwise it did not work at all) I get should be type MainLoopMode but is type MainLoopMode (??).
I went over the source code an finally I hardcoded RepaintOnFrame in openglbackend.nim to get it working.
For my project. I want to display a few parameters originating from a thread (vars residing in the main module which the thread alters by means of nim channels ). It works like expected, but with RepaintOnFrame my exe uses 12 to 19% of the processor because it updates the screen constantly (60 fps+), while an update 2 to 5 times a second would suffice for monitoring the parameters.
Does fidget have another way ? Like a time event that can be set ? So the gui is drawn when something happens (like the default RepaintOnEvent) or when a certain amount of time (in my case 200 to 500 ms) passed. I don't finde anything in the samples, nor in the fidget source code.
I managed to lower the processor use somewhat (to 4 - 9%) by adding a sleep in drawMain(), but obvioulsy that is not the way to solve the issue since it makes the user interface sluggish.
The text was updated successfully, but these errors were encountered:
Thank you for the reply. No indeed, I'm developing and quite new to Nim, so didn't compile with -d:release. If that makes the processor use go down drastically, I'm good. Otherwise I'll stick with RepaintOnEvent and add code to force a repaint after an elapsed time.
I tried setting the mailLoopMode to RepaintOnFrame, but get compile errors. Either RepaintOnFrame not defined or when I declare it as MainLoopMode (copied the type MainLoopMode enum to my code, otherwise it did not work at all) I get should be type MainLoopMode but is type MainLoopMode (??).
I went over the source code an finally I hardcoded RepaintOnFrame in openglbackend.nim to get it working.
For my project. I want to display a few parameters originating from a thread (vars residing in the main module which the thread alters by means of nim channels ). It works like expected, but with RepaintOnFrame my exe uses 12 to 19% of the processor because it updates the screen constantly (60 fps+), while an update 2 to 5 times a second would suffice for monitoring the parameters.
Does fidget have another way ? Like a time event that can be set ? So the gui is drawn when something happens (like the default RepaintOnEvent) or when a certain amount of time (in my case 200 to 500 ms) passed. I don't finde anything in the samples, nor in the fidget source code.
I managed to lower the processor use somewhat (to 4 - 9%) by adding a sleep in drawMain(), but obvioulsy that is not the way to solve the issue since it makes the user interface sluggish.
The text was updated successfully, but these errors were encountered: