Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.6.0
-
None
-
c0b81480b2909b18ac15bdd124a562ae005c2f41
Description
When using a regular QWidget and the GL graphics system for direct GL painting, the user can cause the window surface's fbo to become unbound.
void MyWidget::paintEvent(QPaintEvent *e) { QPainter painter(this); // bound fbo is set to window surface's fbo painter.beginNativePainting(); fbo->bind(); glClearColor(1.0f, 0.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); fbo->release(); // returns bound fbo to 0 glClearColor(1.0f, 1.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); // renders to raw context surface, not fbo painter.endNativePainting(); }
The GL graphics system possibly needs to record the window surface fbo in the context so that it can be automatically rebound when a user-defined fbo is released.