DiscussionsIssue archiveVisualization and 3D Viewer

Archived discussion

Using FBO Created with QT

Visualization and 3D ViewerSun, 03/15/2020 - 10:023 replies

Browse this forum
QuestionAuthor

Hello,

is it possible to render in frame buffer object created with QT?

I'm trying to create a FBO using QOpenGLFrameBuffer object and I bind to the context. The QT openGL context is created using the native context created by OCCT.

now if I check the current bound frame buffer before and after a view_->redraw() , the value is not the same

glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &drawFboId);
if(!view_.IsNull())
    view_->Redraw();
glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &drawFboId);

 

if I check the value of drawFboId before and after, the value is different (  before is different from zero, after is zero ).

 

The result of this behaviour is that the image obtained from the FBO is not correct ( a black rectangle ).

How can I use the FBO created with QT to render OCCT?

thank you

 

 

 

 

 

 

 

 

 

Discussion

3 archived replies

Posts are displayed in their archived order.

01Commenter-1

Rendering OCCT 3D Viewer into Qt framebuffer is possible - for this OpenGl_FrameBuffer::InitWrapper() allows wrapping an existing OpenGL object.
But implementing this connection is tricky.

02Author

Thank you Kirill for the response,

the same software worked with occt 6.8. What is different with version 7.4?

03Commenter-1

It might worked somehow because OCCT used off-screen frame buffers only for image dump, and since OCCT 6.9.0 they are used for a regular rendering to provide/improve functionality/performance.