09-01-2015, 02:48 AM
Hello. I have a question regarding custom widget. Specifically, regarding rendering with OpenGL into it. I am getting a platform widget and use it to initialize context, to render into it later. Then I set up timer to render animation with 30 fps. And this is where my question rises. While I render at 30 fps, real fps is somewhere around 10, resulting in laggy animation. However, if I move my mouse around custom widget frame during animation, it gives me 30 fps. I can only assume that while I render at 30 fps, system window refreshes at much slower rate. And that moving mouse into widget triggers some callbacks that force window to refresh\redraw. Is there some way to force this system callback after my rendering function? I have tried redraw() and update() to no result, so I assume they do not trigger system refresh.