good news, i’ve found a way to rendering a correct fbo to the quad in the scene.
it was dependend of the order of the painter->beginNativePainting(); line. i switch the order, that the painter->beginNativePainting(); is before the QGLContext and QGLFramebufferobject is init.
the message is still active but the result is correct.
source
painter->beginNativePainting();
// ------------ FBO begin ------------
context
= new QGLContext(QGLFormat(QGL
::SampleBuffers | QGL
::DoubleBuffer | QGL
::AlphaChannel), widget
);
context->create(); // !!!
context->makeCurrent();
fbo->bind();
{
...
}
fbo->release();
painter->beginNativePainting();
// ------------ FBO begin ------------
context = new QGLContext(QGLFormat(QGL::SampleBuffers | QGL::DoubleBuffer | QGL::AlphaChannel), widget);
context->create(); // !!!
context->makeCurrent();
fbo = new QGLFramebufferObject(512, 512); // GLWidget::GLWidget (constructor)
fbo->bind();
{
...
}
fbo->release();
To copy to clipboard, switch view to plain text mode
Bookmarks