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