Reputation: 641
I have an QGLWidget-based application. On Qt 5.2.1 / msvc2012, it works great. But with Qt 5.4.2 / msvc2013, there are 2 bugs: the screen is black until I click on it, and more annoying, in my picking (color-picking), I use a QOpenGLFrameBufferObject to draw my object, and it is black.
I create my FrameBufferObject in this way:
pickingFbo = new QOpenGLFramebufferObject(width(), height(), OpenGLFramebufferObject::Depth, GL_TEXTURE_RECTANGLE);
and then, when I need to pick, I bind it, using
QOpenGLFrameBufferObject::bind()
and it returns true). But when I save my result as an image to check, with pickingFbo->toImage().save("D:/picking.bmp");
I got a fully black picture (of the wanted size).
I have tried to use a QOpenGLWidget instead of QGLWidget, but it completely explode interface (literraly, all is black with white line going from top left to bottom right).
Have anyone got any idea? As I said, it used to work with a different compilator...
EDIT: I printed in the same line bind(), isBound() and isValid(), and I got true/false/true... Seems there's a bug or I miss something.
Upvotes: 1
Views: 188