diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-06-21 13:39:26 +0200 |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-06-21 14:02:22 +0200 |
commit | 176f30b13739b352cbe453cba7796d9a9c808bcd (patch) | |
tree | 8fa60b6ae4ef06455652863a0406bc5e86a22303 /src/platformsupport/eglconvenience/qeglconvenience.cpp | |
parent | 272daebaa07b21e372ad4274fafb51ce0be92396 (diff) |
OpenGL API refactor.
Rename QGuiGLFormat to QSurfaceFormat, and make QWindow sub-class of
QSurface and QPlatformWindow sub-class of QPlatformSurface, instead of
having QPlatformGLSurface accessor in QWindow.
Diffstat (limited to 'src/platformsupport/eglconvenience/qeglconvenience.cpp')
-rw-r--r-- | src/platformsupport/eglconvenience/qeglconvenience.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/platformsupport/eglconvenience/qeglconvenience.cpp b/src/platformsupport/eglconvenience/qeglconvenience.cpp index a9973b642a..63f564c2d5 100644 --- a/src/platformsupport/eglconvenience/qeglconvenience.cpp +++ b/src/platformsupport/eglconvenience/qeglconvenience.cpp @@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE -QVector<EGLint> q_createConfigAttributesFromFormat(const QGuiGLFormat &format) +QVector<EGLint> q_createConfigAttributesFromFormat(const QSurfaceFormat &format) { int redSize = format.redBufferSize(); int greenSize = format.greenBufferSize(); @@ -70,7 +70,7 @@ QVector<EGLint> q_createConfigAttributesFromFormat(const QGuiGLFormat &format) // "AtLeast" for EGL_BUFFER_SIZE, it's sort order is "smaller" meaning 16-bit configs are // put in the list before 32-bit configs. So, to make sure 16-bit is preffered over 32-bit, // we must set the red/green/blue sizes to zero. This has an unfortunate consequence that - // if the application sets the red/green/blue size to 5/6/5 on the QGuiGLFormat, + // if the application sets the red/green/blue size to 5/6/5 on the QSurfaceFormat, // they will probably get a 32-bit config, even when there's an RGB565 config available. // // Now normalize the values so -1 becomes 0 @@ -197,7 +197,7 @@ bool q_reduceConfigAttributes(QVector<EGLint> *configAttributes) return false; } -EGLConfig q_configFromGLFormat(EGLDisplay display, const QGuiGLFormat &format, bool highestPixelFormat, int surfaceType) +EGLConfig q_configFromGLFormat(EGLDisplay display, const QSurfaceFormat &format, bool highestPixelFormat, int surfaceType) { EGLConfig cfg = 0; QVector<EGLint> configureAttributes = q_createConfigAttributesFromFormat(format); @@ -259,9 +259,9 @@ EGLConfig q_configFromGLFormat(EGLDisplay display, const QGuiGLFormat &format, b return 0; } -QGuiGLFormat q_glFormatFromConfig(EGLDisplay display, const EGLConfig config) +QSurfaceFormat q_glFormatFromConfig(EGLDisplay display, const EGLConfig config) { - QGuiGLFormat format; + QSurfaceFormat format; EGLint redSize = 0; EGLint greenSize = 0; EGLint blueSize = 0; |