Results 1 to 6 of 6

Thread: OpenGL version

  1. #1
    Join Date
    Jun 2009
    Posts
    22
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default OpenGL version

    What version of OpenGL is supported?

    Thank you.

  2. #2
    Join Date
    Jun 2009
    Posts
    22
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: OpenGL version

    I was wondering because it's nowhere explicitly stated. Still, if you read an article like this for example,

    http://labs.trolltech.com/blogs/2010...rmance-opengl/

    you get the impression not every version is supported.

    Many GUIs offer a minimal binding to OpenGL and then you can make any OpenGL calls you like. In this ways the GUI itself imposes no version restriction. Is Qt like that or does it offer a thicker abstraction which is limited to a certain OpenGL version?

  3. #3
    Join Date
    Feb 2007
    Location
    Karlsruhe, Germany
    Posts
    469
    Thanks
    17
    Thanked 90 Times in 88 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: OpenGL version

    As far as I understand this, Qt imposes no restriction. You can use whatever gl extension there is using direct opengl calls. You can make them available to you using GLee for example.

    When speaking of support it basically means, what Qt itself uses, for internal handling in QPainter etc..

    Sine 4.6, QPainter::beginNativePainting and QPainter::endNativePainting makes the intermixing a lot more reliable.

    Qt Code:
    1. void CGL3dRenderedItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
    2. {
    3. painter->beginNativePainting();
    4. if (_RenderRequired) Render(scene());
    5. glMultMatrixf(GetItemTransformation());
    6. glCallList(displaylist);
    7. painter->endNativePainting();
    8. }
    To copy to clipboard, switch view to plain text mode 

    HIH

    Johannes

  4. The following user says thank you to JohannesMunk for this useful post:

    uj (28th January 2010)

  5. #4
    Join Date
    Jun 2009
    Posts
    22
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: OpenGL version

    Okay so basically Qt offers a window with an OpenGL binding. And you're free to make any OpenGL call you like to control it (as long as it's supported by the OpenGL driver installed on your computer).

    But Qt also uses OpenGL internally to implement different features. And if you want to intermix with these you must use Qt methods and they correspond to the functionality of a certain version of OpenGL.
    Last edited by uj; 28th January 2010 at 12:44.

  6. #5
    Join Date
    Feb 2007
    Location
    Karlsruhe, Germany
    Posts
    469
    Thanks
    17
    Thanked 90 Times in 88 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: OpenGL version

    Quote Originally Posted by uj View Post
    Okay so basically Qt offers a window with an OpenGL binding. And you're free to make any OpenGL call you like to control it (as long as it's supported by the OpenGL driver installed on your computer).
    Exactly

    Quote Originally Posted by uj View Post
    But Qt also uses OpenGL internally to implement different features. And if you want to intermix with these you must use Qt methods and they correspond to the functionality of a certain version of OpenGL.
    Sorry, I don't quite get you! If you intermix (using both Qt calls and opengl native code) you can use whatever opengls you want.

    When talking of Qt support, it just means, that there are some convenience classes to handle something. For instance the support for OpenGL 2.0 Shaders was introduced with Qt4.6. So now you can (optionally!) use the more convenient QGLShader and QGLShaderProgram classes instead of glAttachShader, glLinkProgram, etc.. But you still can use the old native calls!

    HIH

    Johannes

  7. #6
    Join Date
    Jun 2009
    Posts
    22
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: OpenGL version

    Quote Originally Posted by JohannesMunk View Post
    When talking of Qt support, it just means, that there are some convenience classes to handle something. For instance the support for OpenGL 2.0 Shaders was introduced with Qt4.6. So now you can (optionally!) use the more convenient QGLShader and QGLShaderProgram classes instead of glAttachShader, glLinkProgram, etc.. But you still can use the old native calls!
    Okay I see, so "Qt support" means there are convenience classes available for specific versions of OpenGL but you can still resort to making native calls of whatever version the OpenGL driver supports.

Similar Threads

  1. Creating an evaluation version or trial version
    By munna in forum General Discussion
    Replies: 9
    Last Post: 20th June 2015, 01:50
  2. Replies: 0
    Last Post: 6th December 2009, 00:41
  3. Qt with OpenGL ES for ARM9 - All OpenGL ES tests have failed!
    By vinpa in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 3rd December 2009, 10:10
  4. Replies: 0
    Last Post: 11th August 2009, 09:38
  5. Replies: 5
    Last Post: 5th October 2008, 05:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.