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. QT supports OpenGL 5.0, 6.0 and 10.0
Forum Updated to NodeBB v4.3 + New Features

QT supports OpenGL 5.0, 6.0 and 10.0

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.5k 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.
  • L Offline
    L Offline
    laurent bauer
    wrote on last edited by
    #1

    Funny experiments:

    The following code works very well:
    @
    QGLFormat glFormat;
    glFormat.setVersion( 5, 0 );
    glFormat.setProfile(QGLFormat::CompatibilityProfile);
    cout << glFormat.majorVersion() << "," << glFormat.minorVersion() << endl;
    @
    It retrieves a perfect "5,0". Actually, I get the same result when requiring OpenGL 10.
    Analysis : When requiring the compatibility profile, you are not bounded.
    When requiring a GLFormat::CoreProfile, I meet the 3,1 upper bound.

    So my question: How can I retrieve the really supported OpenGl level in Compatibility Profile.
    Is this a bug ?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mohsen
      wrote on last edited by
      #2

      this function returns the OpenGL version which Qt has been configured with that. You may try other versions of OpenGL and configure Qt yourself.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        laurent bauer
        wrote on last edited by
        #3

        In between, I've seen that the format must be requested after the creation of the OpenGL context.
        It sounds that before the actual creation of the context, you might wish whatever version you want

        Just like Christmas : You might wish a very big present and sometimes get a smaller one. But you know it after it appends, not before

        ;o)

        Laurent

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mohsen
          wrote on last edited by
          #4

          it's about setVersion:
          [quote author="http://developer.qt.nokia.com/doc/qt-4.8/QGLFormat.html" date="0"]
          Set the OpenGL version to the major and minor numbers. If a context compatible with the requested OpenGL version cannot be created, a context compatible with version 1.x is created instead.
          [/quote]

          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