diff options
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qgl.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 1bcfab8..f8a88601 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -3983,7 +3983,7 @@ void QGLWidget::qglColor(const QColor& c) const { #if !defined(QT_OPENGL_ES_2) #ifdef QT_OPENGL_ES - glColor4f(c.red()/255.0, c.green()/255.0, c.blue()/255.0, c.alpha()/255.0); + glColor4f(c.redF(), c.greenF(), c.blueF(), c.alphaF()); #else Q_D(const QGLWidget); const QGLContext *ctx = QGLContext::currentContext(); @@ -4015,15 +4015,13 @@ void QGLWidget::qglColor(const QColor& c) const void QGLWidget::qglClearColor(const QColor& c) const { #ifdef QT_OPENGL_ES - glClearColor((GLfloat)c.red() / 255.0, (GLfloat)c.green() / 255.0, - (GLfloat)c.blue() / 255.0, (GLfloat) c.alpha() / 255.0); + glClearColor(c.redF(), c.greenF(), c.blueF(), c.alphaF()); #else Q_D(const QGLWidget); const QGLContext *ctx = QGLContext::currentContext(); if (ctx) { if (ctx->format().rgba()) - glClearColor((GLfloat)c.red() / 255.0, (GLfloat)c.green() / 255.0, - (GLfloat)c.blue() / 255.0, (GLfloat) c.alpha() / 255.0); + glClearColor(c.redF(), c.greenF(), c.blueF(), c.alphaF()); else if (!d->cmap.isEmpty()) { // QGLColormap in use? int i = d->cmap.find(c.rgb()); if (i < 0) |