Visualization on a restricted rect of the window

Hi Friends,

Is it possible to make visualization to be inside a rect on the window? Currently, visualization is rendered on the entire window.


Kirill Gavrilov's picture

So far Aspect_Window and graphic driver in OCCT do not provide an API for rendering into window sub-region (save the Graphic3d_Camera::SetTile() property which has another purpose). Though this is technically possible, this will be an advanced usage scenario, as application will be responsible for clearing/filling outer parts of the window and for swapping front/back buffers. So you may propose a patch for OCCT adding such a feature.

Using existing API, this could be done by specifying an off-screen render target (Graphic3d_CView::SetFBO()) instead of a window and manual blitting of FBO content into window buffer.

Frank Martinez's picture

Thank you Kirill,

It sounds too advanced for me.

I am using OCCT with QtQuick and it works well but the Visualization takes the entire window, so it does not play well with Layouts. My next experiment will be to create a QuickItem with its own window (I don't know if it is possible).