Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. OpenGL Color problem, red and blue are swaped

OpenGL Color problem, red and blue are swaped

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Colon
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Which OS are you using ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Colon
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved