From 6b401a8f426c089714c656b2ccfd334d3cbe3280 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Mon, 14 Sep 2009 09:23:49 +1000 Subject: QGLWidget::fontDisplayListBase() is not supported under OpenGL/ES Update documentation and #ifdef out the implementation. Reviewed-by: trustme --- src/opengl/qgl.cpp | 10 ++++++++-- src/opengl/qgl_p.h | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index f388cd5..e545c2c 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4113,9 +4113,12 @@ QImage QGLWidget::convertToGLFormat(const QImage& img) the characters in the given \a font. \a listBase indicates the base value used when generating the display lists for the font. The default value is 2000. + + \note This function is not supported on OpenGL/ES systems. */ int QGLWidget::fontDisplayListBase(const QFont & font, int listBase) { +#ifndef QT_OPENGL_ES Q_D(QGLWidget); int base; @@ -4133,9 +4136,7 @@ int QGLWidget::fontDisplayListBase(const QFont & font, int listBase) QString color_key; if (font.styleStrategy() != QFont::NoAntialias) { GLfloat color[4]; -#ifndef QT_OPENGL_ES glGetFloatv(GL_CURRENT_COLOR, color); -#endif color_key.sprintf("%f_%f_%f",color[0], color[1], color[2]); } QString key = font.key() + color_key + QString::number((int) regenerate); @@ -4158,6 +4159,11 @@ int QGLWidget::fontDisplayListBase(const QFont & font, int listBase) base = maxBase; } return base; +#else // QT_OPENGL_ES + Q_UNUSED(font); + Q_UNUSED(listBase); + return 0; +#endif } #ifndef QT_OPENGL_ES diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index fdd28a4..57b40fb 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -196,7 +196,9 @@ public: bool autoSwap; QGLColormap cmap; +#ifndef QT_OPENGL_ES QMap displayListCache; +#endif bool disable_clear_on_painter_begin; -- cgit v0.12