Max number of Views

Is there any limitation for the number of V3D_Views that can be created from V3D_Viewer.

I am able to create max 2. If I call CreateView more than twice, it crashes.

Actually I wanted to display 4 views in different viewports with each view set to its own projection. It is working only for 2.

Paul Jimenez's picture

There is not a limitation in the number of views, at least up to 4 views. Actually, I was using such a setup in my application before, so each view would represent different projections: top, side, front and free.

Having multiple views in OCC is known to cause problems. To increase stability you must apply a few patches and recompile OCC. To find the patches, search for OCCPATCH in the forums. The main patch for that problem makes reference to the method loadTexFont.

If you can avoid having multiple views, do so.

Sharjith Naramparambath's picture

Paul, thanks for the reply. Actually it was an error in my code which could not get the window id of the widget. But when I forced the realize event it is successful (I am using GTK). I now have a toolbutton with which I switch into a single or multi4 views with projections as you said. It is working well though it is a bit lazy when the switching to multi view happens.