Commit 382e3d06 authored by Jan Möbius's avatar Jan Möbius

Multisampling for snapshots

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@9942 383ad7c9-94d9-4d36-a494-682f7c89f535
parent eb8f9542
......@@ -2063,9 +2063,13 @@ void glViewer::snapshot(QImage& _image, int _width, int _height, bool _alpha, bo
QGLFramebufferObjectFormat format;
format.setInternalTextureFormat(GL_RGBA);
format.setTextureTarget(GL_TEXTURE_2D);
// set the attachments as in the standard rendering
format.setAttachment(QGLFramebufferObject::CombinedDepthStencil);
// 16 samples per pixel as we want a nice snapshot. If this is not supported
// it will fall back to the maximal supported number of samples
format.setSamples(16);
QGLFramebufferObject fb( w, h, format);
if ( fb.isValid() ){
fb.bind();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment