Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
 

Why isn't it allowed to reassign a window to a V3d_View?

Why isn't it allowed to reassign a window to a V3d_View?
Timo 2012/06/06 17:32
When V3d_View::SetWindow (const Handle< Aspect_Window > &IdWin) is called a second time on a view, an exception is thrown.

Documentation says:

Activates the view in the window specified and Map the Window to the screen.
//! Warning! raises MultiplyDefined from Standard if the view is already activated in a window.

Is there a way to disconnect the window from the view?
If not, I would like to understand more the reason behind it.

In my case, I'm using the view with docking. When the window is docked or undocked, the window handle changes. So, I have to create a new window and I would like to assign it to the existing V3d_View.
I know, I can create a new V3d_View instead and assign the window to it, but I don't understand why this is necessary and I had also some problems with it because the default view mapping changes if the view was scaled.

Regards,
Timo
Timo 2015/04/14 10:27
I saw that in OCC 6.8.0 there is the following change:

0025422: Visualization, TKOpenGl - support re-assignment of new window to existing View

Does this work only for Android or also on MS Windows?

Regards,
Timo
Forum supervisor 2015/04/14 14:37
Dear Timo,
The API modification itself has been done in general-purpose manner.
The bug title highlights Android because the problem comes critical for this platform due to design specificities of OS,
while on other platforms there is usually no need for such manipulations at all.

Re-assignment should work well on other systems, but has not been tested.
It should be noted, that new window should be really new (to assign Pixel Format and create new OpenGL context) or with externally managed OpenGL context (using appropriate V3d_View methods).
Best regards
FSR
 
 
Latest news
  • JT Assistant for Android
  • Open CASCADE JT Assistant Sources
  • JT Assistant Linux and CAD Assistant

  • © OPEN CASCADE 2000 - 2015  |  Search  |  Contacts   |  Site map