Skip to content

Commit

Permalink
Change screenshot mode to avoid transparent holes.
Browse files Browse the repository at this point in the history
  • Loading branch information
gzotti committed Apr 10, 2018
1 parent 830dcd9 commit 64465a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/StelMainView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,7 @@ void StelMainView::doScreenshot(void)
float pixelRatio = QOpenGLContext::currentContext()->screen()->devicePixelRatio();
QOpenGLFramebufferObjectFormat fbFormat;
fbFormat.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil);
fbFormat.setInternalTextureFormat(GL_RGB); // avoid transparent background!
QOpenGLFramebufferObject * fbObj = new QOpenGLFramebufferObject(stelScene->width() * pixelRatio, stelScene->height() * pixelRatio, fbFormat);
fbObj->bind();
QOpenGLPaintDevice fbObjPaintDev(stelScene->width(), stelScene->height());
Expand Down

0 comments on commit 64465a1

Please sign in to comment.