QOpenGLFramebufferObject toImage after bindDefault is empty
-
Hello,
I'm in trouble. I have following code and in QMessageBox just white box :/ If I print it in fbo->bind its working.
@QOpenGLFramebufferObjectFormat format;
format.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil);
format.setInternalTextureFormat(GL_RGBA);fbo = new QOpenGLFramebufferObject(size, format);
fbo->bind();
mapChunks[0][0]->draw();
fbo->bindDefault();QMessageBox msg;
msg.setIconPixmap(QPixmap::fromImage(fbo->toImage());
msg.exec();fbo->release();@
Thanks for help.