OpenGL Color problem, red and blue are swaped



  • Since Qt 5.1 i get wrong colors in openGl.
    Setting color with qglColor(QColor(255, 0, 0)) result in blue, but QColor(255, 0, 0).blue() = 0.
    Setting color with glColor3f(1.0, 0.0, 0.0) results again to blue.
    Setting color with glColor3f(0.0, 1.0, 0.0) results in green.
    Setting color with glColor3f(0.0, 0.0, 1.0) results in red.
    Setting color with glColor3f(0.0, 1.0, 1.0) results in yellow.

    After compiling the program code with Qt4.x or Qt5.0 everthing is okay.
    Someone has an idea?


  • Lifetime Qt Champion

    Hi,

    Which OS are you using ?



  • I am using Linux, but the problem is solved - seems that some defaults of QGLWidget changed form Qt 5.0 to Qt 5.1 and so the behavior of glBlend.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.