View updates...

Hi !

(I use VC++ and MFC)

I have a number of different "cameras" in my application and when I switch from one to another I use SetEye() SetAt() and SetUp() to modifiy the view.

The problem is that the view flashes a lot when I do this, it looks like these commands update the view on their own before I have completed my changes (I have set the update mode to WAIT), is there any way to prevent this from happening ?

Also, when the view window is resized the window flashes a lot, I have the WM_ERASEBKGND returning one(1) to avoid unneeded repaints and I assume that a double buffer is set by default, is there any way to prevent this to, or am I doing something wrong ?

Mikael

Dmitry CHABROVSKY's picture

> The problem is that the view flashes a lot
> when I do this, it looks like these commands
> update the view on their own before I have
> completed my changes (I have set the update
> mode to WAIT), is there any way to prevent
> this from happening ?
Try one of these: 1) AISInteractiveContext::ImmediateModeOn()

AISInteractiveContext::ImmediateModeOff() I have not tried it myself :-)

2) V3d_View::SetImmediateUpdate (False);

// Modify the view

V3d_View::SetImmediateUpdate (True); It works in my app ...

arkoala's picture

Use this to avoid flickering. It works:

http://www.opencascade.org/org/forum/thread_8291/