summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglframebufferobject.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-09-01 12:16:08 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-09-01 12:26:14 (GMT)
commite0e0ae322e654b0b152fc54d99201b18b620a0ed (patch)
tree139382ebd9675decb9cac1c57ffea36dd91dda68 /src/opengl/qglframebufferobject.cpp
parentae2f5c66d16fab9f92f960435057d955e9a832ef (diff)
downloadQt-e0e0ae322e654b0b152fc54d99201b18b620a0ed.zip
Qt-e0e0ae322e654b0b152fc54d99201b18b620a0ed.tar.gz
Qt-e0e0ae322e654b0b152fc54d99201b18b620a0ed.tar.bz2
Fixed toImage() not working on a multisample QGLFramebufferObject.
Need to blit into a regular QGLFramebufferObject first to force a multisample resolve. Reviewed-by: Trond
Diffstat (limited to 'src/opengl/qglframebufferobject.cpp')
-rw-r--r--src/opengl/qglframebufferobject.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index 859afc7..8fd113a 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -875,6 +875,16 @@ QImage QGLFramebufferObject::toImage() const
if (!d->valid)
return QImage();
+ // qt_gl_read_framebuffer doesn't work on a multisample FBO
+ if (format().samples() != 0) {
+ QGLFramebufferObject temp(size());
+
+ QRect rect(QPoint(0, 0), size());
+ blitFramebuffer(&temp, rect, const_cast<QGLFramebufferObject *>(this), rect);
+
+ return temp.toImage();
+ }
+
bool wasBound = isBound();
if (!wasBound)
const_cast<QGLFramebufferObject *>(this)->bind();
ub'>bug_57945b574a_without_stub Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
path: root/win
ModeNameSize
-rw-r--r--.cvsignore105logstatsplain
-rw-r--r--Makefile.in17665logstatsplain
-rw-r--r--README3770logstatsplain
-rw-r--r--README.binary5145logstatsplain
-rw-r--r--aclocal.m424logstatsplain
-rwxr-xr-xbuildall.vc.bat1623logstatsplain
-rw-r--r--cat.c655logstatsplain
-rw-r--r--coffbase.txt1213logstatsplain
-rwxr-xr-xconfigure65307logstatsplain
-rw-r--r--configure.in9669logstatsplain
-rw-r--r--makefile.bc17942logstatsplain
-rw-r--r--makefile.vc24532logstatsplain
-rw-r--r--nmakehlp.c9680logstatsplain
-rw-r--r--rules.vc8478logstatsplain
-rw-r--r--stub16.c5635logstatsplain
-rw-r--r--tcl.dsp27715logstatsplain