diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2011-04-04 10:19:57 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2011-04-04 10:21:05 (GMT) |
commit | 05f2b1c912e09be9cb9f1128494d315c53698d02 (patch) | |
tree | ceee96fb740b52aecbcc8152b8b78062a9bd216e /src/plugins/platforms/glxconvenience | |
parent | cc46428d5b421b3ebc3a2ff3171b5197af008022 (diff) | |
download | Qt-05f2b1c912e09be9cb9f1128494d315c53698d02.zip Qt-05f2b1c912e09be9cb9f1128494d315c53698d02.tar.gz Qt-05f2b1c912e09be9cb9f1128494d315c53698d02.tar.bz2 |
Lighthouse: Add drawable bit to the glx config selection rutine
So that we can use the same thing when creating glx pixmaps
Diffstat (limited to 'src/plugins/platforms/glxconvenience')
-rw-r--r-- | src/plugins/platforms/glxconvenience/qglxconvenience.cpp | 8 | ||||
-rw-r--r-- | src/plugins/platforms/glxconvenience/qglxconvenience.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/platforms/glxconvenience/qglxconvenience.cpp b/src/plugins/platforms/glxconvenience/qglxconvenience.cpp index 08972f7..f548ad9 100644 --- a/src/plugins/platforms/glxconvenience/qglxconvenience.cpp +++ b/src/plugins/platforms/glxconvenience/qglxconvenience.cpp @@ -25,14 +25,14 @@ enum { #undef FontChange #endif -QVector<int> qglx_buildSpec(const QPlatformWindowFormat &format) +QVector<int> qglx_buildSpec(const QPlatformWindowFormat &format, int drawableBit) { QVector<int> spec(48); int i = 0; spec[i++] = GLX_LEVEL; spec[i++] = 0; - spec[i++] = GLX_DRAWABLE_TYPE; spec[i++] = GLX_WINDOW_BIT; + spec[i++] = GLX_DRAWABLE_TYPE; spec[i++] = drawableBit; if (format.rgba()) { spec[i++] = GLX_RENDER_TYPE; spec[i++] = GLX_RGBA_BIT; @@ -77,13 +77,13 @@ QVector<int> qglx_buildSpec(const QPlatformWindowFormat &format) return spec; } -GLXFBConfig qglx_findConfig(Display *display, int screen , const QPlatformWindowFormat &format) +GLXFBConfig qglx_findConfig(Display *display, int screen , const QPlatformWindowFormat &format, int drawableBit) { bool reduced = true; GLXFBConfig chosenConfig = 0; QPlatformWindowFormat reducedFormat = format; while (!chosenConfig && reduced) { - QVector<int> spec = qglx_buildSpec(reducedFormat); + QVector<int> spec = qglx_buildSpec(reducedFormat, drawableBit); int confcount = 0; GLXFBConfig *configs; configs = glXChooseFBConfig(display, screen,spec.constData(),&confcount); diff --git a/src/plugins/platforms/glxconvenience/qglxconvenience.h b/src/plugins/platforms/glxconvenience/qglxconvenience.h index a3cfd9a..6b65e08 100644 --- a/src/plugins/platforms/glxconvenience/qglxconvenience.h +++ b/src/plugins/platforms/glxconvenience/qglxconvenience.h @@ -7,9 +7,9 @@ #include <GL/glx.h> XVisualInfo *qglx_findVisualInfo(Display *display, int screen, const QPlatformWindowFormat &format); -GLXFBConfig qglx_findConfig(Display *display, int screen, const QPlatformWindowFormat &format); +GLXFBConfig qglx_findConfig(Display *display, int screen, const QPlatformWindowFormat &format, int drawableBit = GLX_WINDOW_BIT); QPlatformWindowFormat qglx_platformWindowFromGLXFBConfig(Display *display, GLXFBConfig config, GLXContext context); -QVector<int> qglx_buildSpec(const QPlatformWindowFormat &format); +QVector<int> qglx_buildSpec(const QPlatformWindowFormat &format, int drawableBit = GLX_WINDOW_BIT); QPlatformWindowFormat qglx_reducePlatformWindowFormat(const QPlatformWindowFormat &format, bool *reduced); #endif // QGLXCONVENIENCE_H |