Results 1 to 4 of 4

Thread: What versions of OpenGL does Qt support?

  1. #1
    Join Date
    Feb 2009
    Posts
    24
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default What versions of OpenGL does Qt support?

    I'm developing with Qt 4.5, and I wanted to use the OpenGL 2.0 spec for development. I'm just trying to get a very basic program running right now. When I try to compile, glCreateShader() isn't declared, telling me that Qt's OpenGL is pre-2.0, yet when I grep the source code, I see references to glCreateShader(). Is there a compiler flag I need to set in order to code against the 2.0 spec? Is there a function I can call to see what version of the spec is being supported? Some insight would be greatly appreciated.

  2. #2
    Join Date
    Feb 2009
    Posts
    24
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: What versions of OpenGL does Qt support?

    As a partial answer, I figured out how to use QGLFormat:penGLVersionFlags() to get the versions supported on my system. It shows that I support everything from 1.1 - 3.0 (which is what I expected). But the compiler doesn't recognize functions introduced from 2.0 on, so I could still use some help with specifying what version I want to use. I noticed references to glCreateShader in qglextensions.cpp, but I can't find anything in the documentation about that. Help, please.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: What versions of OpenGL does Qt support?

    This is strictly related to header files. If there is a particular declaration missing, you can declare it yourself in your header or implementation file, just as any other function. In case of glCreateShader() it is:
    Qt Code:
    1. GLuint glCreateShader( GLenum shaderType);
    To copy to clipboard, switch view to plain text mode 

    There is probably a header file in Qt that already does that. Try grepping the sources if in doubt.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Feb 2009
    Posts
    24
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: What versions of OpenGL does Qt support?

    Thanks for responding wysota. Between the time I posted and saw your reply, deeper digging showed people using GLEW and GLEE to make to take of all the header stuff. I used GLEW, and it worked beautifully.

Similar Threads

  1. Installation Problem
    By QbelcorT in forum Installation and Deployment
    Replies: 4
    Last Post: 22nd April 2010, 09:04
  2. Qt 4.4.3 commercial on Kubuntu 8.10
    By Micawber in forum Installation and Deployment
    Replies: 5
    Last Post: 17th February 2010, 01:02
  3. Qt/X11 source-distro apps corrupting KDE Desktop background
    By wdezell in forum Installation and Deployment
    Replies: 5
    Last Post: 23rd July 2009, 21:10
  4. Qt-4.4.0 installation error in linux
    By babu198649 in forum Installation and Deployment
    Replies: 4
    Last Post: 27th May 2008, 14:35
  5. Access to PostgreSQL DB on a linux server
    By rmagro in forum Qt Programming
    Replies: 28
    Last Post: 13th March 2008, 09:02

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.