DiscussionsIssue archiveOther usage issues

Archived discussion

Background image

Other usage issuesSun, 07/18/2004 - 17:143 replies

Browse this forum
QuestionAuthor

With the new 5.2 Release (5.1 has not been tested) the V3d_View::SetBackgroundImage function works not as supposed.

The Background image is only displayed, if the SetBackgroundImage function has been called, when there is no object display. If one object is displayed in the viewer (e.g. Trihedron), the background will be black.

Yesterday, I digged through the whole code of the OpenGL driver, but I couldn't find the reason.

Please help me - or at least - confirm that this is a bug !

Kind regards

Author

Discussion

3 archived replies

Posts are displayed in their archived order.

01Author

I have to add, that once you have the background image, you can display any object and the background is still correct.

Author

02Author

And my last addition: There is no way to "Unset" the background image - the only one is to restart your application. Or did I miss something ?

Author

03Commenter-1

Without having to restart an application, it is possible to "unset" a background image, i.e. replace by another image or switch to a simple colored background.

A solution is to rebuild the view :
Handle_AIS_InteractiveContext ais_context;
Handle_V3d_View view3d;
// ... initialized somewhere

// Now you want to swicth to another backround mode, image, etc.
view3d->Window ()->Destroy ();
view3d->Remove ();
view3d = ais_context->CurrentViewer ()->CreateView ();
// etc. juste recreate the view and set the new background.

Note : it works fine on Windows, I have not tested it on any other OS, but it should presumably work as well.