Is there a way to dynamically render objects created on the existing view using a different render mode?

  1. FAQ
  2. »
  3. Vectorization and Visualization in Drawings

There is no direct way to render entities inside a single view using different render modes. To emulate this behavior, you can create additional overlapping views with a different render mode and dynamically draw created objects using it:

  1. Create the intermediate view (pView->device()->createView).
  2. Append the view into the device on the top of all other views (device()->addView(pNewView)).
  3. Copy all view parameters into the new view (pNewView->viewParameters(pView)).
  4. Add your drawables into the new view (pNewView->add(pSelectionRectDrawable)).
  5. Now you can change the view parameters (such as pView->setMode(OdGsView::k2dOptimized)).
  6. device()->update() // draw
  7. Now you can remove the new view from the device until the next update (device()->eraseView(pNewView)).