Make sure we export the on-screen image. Fixes #1154

master
Marius Kintel 2015-01-13 22:29:33 -05:00
parent f32eb7e84d
commit c30eeecfa2
2 changed files with 4 additions and 0 deletions

View File

@ -299,6 +299,8 @@ void QGLView::mouseReleaseEvent(QMouseEvent*)
bool QGLView::save(const char *filename)
{
// Force reading from front buffer. Some configurations will read from the back buffer here.
glReadBuffer(GL_FRONT);
QImage img = grabFrameBuffer();
return img.save(filename, "PNG");
}

View File

@ -1753,6 +1753,8 @@ void MainWindow::csgRender()
}
if (viewActionAnimate->isChecked() && e_dump->isChecked()) {
// Force reading from front buffer. Some configurations will read from the back buffer here.
glReadBuffer(GL_FRONT);
QImage img = this->qglview->grabFrameBuffer();
QString filename;
double s = this->e_fsteps->text().toDouble();