[Closed] Disabling scene redraw
For some reason, I can’t seem to disable the scene redraw.
It looks like I am turning it off…
disableSceneRedraw()
OK
isSceneRedrawDisabled()
true
Yet, the scene keeps redrawing itself! I don’t notice any difference at all, I can keep on creaing objects etc and the OpenGL ports continue to show my changes.
Not sure if it solves your specific problem, but it’s easier to use this
with redraw off
(
…
)
This way, scene redraw is automatically enabled again outside this scope (so you won’t need enableSceneRedraw()). Another annoying thing with disable/enableSceneRedraw is that when you accidently execute disableSceneRedraw() twice, you also need to execute enableSceneRedraw() twice.
- Martijn
stuh505,
In my opinion redraw context is better because it is safer. When using disableSceneRedraw fn, if the execution is interrupted, you will need to manually enable it or use try/catch.
Light
Thanks for the advice.
I agree with you both – I accidentally had the disaable function in a loop and that made it quite a pain to re-enable it!
However, it is necessary to do it the way that I am doing it, because it must be turned on and off in different callback functions. If I were to simply disable it in the code for both callbacks, it would have a chance to redraw in the downtime between the callbacks! That completely defeats the purpose.
I still am really confused why this has no effect! Why doesn’t it disable screen redraw? Could you please test it out and see if you get the same results?
Now I have tried and it worked fine. It might be because of your graphics drivers.
Light