diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-06-24 09:12:15 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-06-24 09:12:15 (GMT) |
commit | 11cc0f661911628fb51c92d30c684eb1cea01145 (patch) | |
tree | 3f89e82669b12ea49e0586d3ff14c0d01594301e /src/opengl/qgl_qpa.cpp | |
parent | 9d5b0e31f287ce502eaf9a2c0876d900424c80ab (diff) | |
parent | 164728f711136356a6c3482f762321b01c9d82dd (diff) | |
download | Qt-11cc0f661911628fb51c92d30c684eb1cea01145.zip Qt-11cc0f661911628fb51c92d30c684eb1cea01145.tar.gz Qt-11cc0f661911628fb51c92d30c684eb1cea01145.tar.bz2 |
Merge remote-tracking branch 'origin/4.8'
Diffstat (limited to 'src/opengl/qgl_qpa.cpp')
-rw-r--r-- | src/opengl/qgl_qpa.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp index e7fc560..9ba8b75 100644 --- a/src/opengl/qgl_qpa.cpp +++ b/src/opengl/qgl_qpa.cpp @@ -52,6 +52,9 @@ QT_BEGIN_NAMESPACE +/*! + Returns an OpenGL format for the platform window format specified by \a format. +*/ QGLFormat QGLFormat::fromPlatformWindowFormat(const QPlatformWindowFormat &format) { QGLFormat retFormat; @@ -83,6 +86,9 @@ QGLFormat QGLFormat::fromPlatformWindowFormat(const QPlatformWindowFormat &forma return retFormat; } +/*! + Returns a platform window format for the OpenGL format specified by \a format. +*/ QPlatformWindowFormat QGLFormat::toPlatformWindowFormat(const QGLFormat &format) { QPlatformWindowFormat retFormat; @@ -150,6 +156,8 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) if (shareContext) { winFormat.setSharedContext(shareContext->d_func()->platformContext); } + if (widget->testAttribute(Qt::WA_TranslucentBackground)) + winFormat.setAlpha(true); winFormat.setWindowApi(QPlatformWindowFormat::OpenGL); winFormat.setWindowSurface(false); widget->setPlatformWindowFormat(winFormat); @@ -378,6 +386,10 @@ QGLContext::QGLContext(QPlatformGLContext *platformContext) d->setupSharing(); } +/*! + Returns a OpenGL context for the platform-specific OpenGL context given by + \a platformContext. +*/ QGLContext *QGLContext::fromPlatformGLContext(QPlatformGLContext *platformContext) { if (!platformContext) |