PDA

View Full Version : Disabling scene redraw


stuh505
09-05-2005, 12:37 AM
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.

magicm
09-05-2005, 12:48 AM
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

Light
09-05-2005, 01:52 AM
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

stuh505
09-05-2005, 02:31 AM
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?

Light
09-05-2005, 03:23 AM
Now I have tried and it worked fine. It might be because of your graphics drivers.




Light

CGTalk Moderation
09-05-2005, 03:23 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.