summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2009-07-22 00:19:34 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2009-07-22 00:23:46 (GMT)
commit5be62fbd822206c625cab4892ab485923dc79a00 (patch)
treed8374a09f4b5e4627af2a2bfddb721e2661905ad /src/opengl
parentb9b6258729585803e00b71280e175618b6bd50c2 (diff)
downloadQt-5be62fbd822206c625cab4892ab485923dc79a00.zip
Qt-5be62fbd822206c625cab4892ab485923dc79a00.tar.gz
Qt-5be62fbd822206c625cab4892ab485923dc79a00.tar.bz2
Fixed compile with -qtnamespace and MSVC.
When an extern function is declared in the scope of another function, MSVC sometimes ignores the enclosing namespace {}.
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qpixmapdata_gl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp
index f0c7e20..fe3bb0c 100644
--- a/src/opengl/qpixmapdata_gl.cpp
+++ b/src/opengl/qpixmapdata_gl.cpp
@@ -303,6 +303,8 @@ QImage QGLPixmapData::fillImage(const QColor &color) const
return img;
}
+extern QImage qt_gl_read_texture(const QSize &size, bool alpha_format, bool include_alpha);
+
QImage QGLPixmapData::toImage() const
{
if (!isValid())
@@ -319,7 +321,6 @@ QImage QGLPixmapData::toImage() const
}
QGLShareContextScope ctx(qt_gl_share_widget()->context());
- extern QImage qt_gl_read_texture(const QSize &size, bool alpha_format, bool include_alpha);
glBindTexture(GL_TEXTURE_2D, m_textureId);
return qt_gl_read_texture(QSize(w, h), true, true);
}