summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-09-13 23:23:49 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-09-13 23:23:49 (GMT)
commit6b401a8f426c089714c656b2ccfd334d3cbe3280 (patch)
tree176d29b84b9503e5e8c46ea789656c9296d81347
parentd622f5db9a81959227145603643a89208d77f611 (diff)
downloadQt-6b401a8f426c089714c656b2ccfd334d3cbe3280.zip
Qt-6b401a8f426c089714c656b2ccfd334d3cbe3280.tar.gz
Qt-6b401a8f426c089714c656b2ccfd334d3cbe3280.tar.bz2
QGLWidget::fontDisplayListBase() is not supported under OpenGL/ES
Update documentation and #ifdef out the implementation. Reviewed-by: trustme
-rw-r--r--src/opengl/qgl.cpp10
-rw-r--r--src/opengl/qgl_p.h2
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<QString, int> displayListCache;
+#endif
bool disable_clear_on_painter_begin;