Results 1 to 3 of 3

Thread: OpenGL versions

  1. #1
    Join Date
    Feb 2015
    Posts
    7
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default OpenGL versions

    Hi,

    I just started learning OpenGL (in Qt environment, interested in desktop currently), and I want to cleanup this frustrating mess in my head regarding OpenGL versions.

    The only thing I understand is that OpenGL ES is a subset of "normal" OpenGL (4.5), and is used for mobile platforms. So for example, here is what confuses me:
    • according to some sources, glBegin/glBegin and other functions are deprecated -- some say that these are deprecated only in ES, others claim that these functions are banned due to performance reasons and should not be used in new code;
    • I bought an OpenGL Superbible 7, but I work in Qt, so there are different APIs as I see? Where I am supposed to find Qt-related API information? In document breadcrumbs?;
    • where do I find information how to correctly use functions? For example -- https://en.wikibooks.org/wiki/OpenGL...rom_1.x_to_2.x, tells nicely (but not enough) what should not be used;
    • how am I supposed to replace glMatrixMode(GL_MODELVIEW); if that does not (does not?) work? And questions alike.
    • the internet is full of sources, answers and questions, obviously mostly outdated. What should I focus on? What should I avoid?
    • how do I distinguish OpenGL ES from "normal" OpenGL? What is absent in ES version, how do I know it?


    Ideally, I would like to see sort of a list (and according explanation) of OpenGL versions.

    Thank you in advance.

  2. #2
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    258
    Thanks
    3
    Thanked 65 Times in 59 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: OpenGL versions

    (1) Google "trent reed qt5 opengl". You get a tutorial (six or so parts) which will push you forward.
    (2) there is the "old OpenGL" where you paint the scene yourself using OpenGL API, and the "new OpenGL" where you paint using shaders. glBegin() and glEnd() are specific for the old OpenGL: glBegin() - paint first triangle - paint next triangle - ... - glEnd() - glFlush(). The new OpenGL does not draw this way and it does not use glBegin() and glEnd().
    (3) OpenGL Superbible and similar books deal with OpenGL and not with Qt. You see the "real", platform independent, OpenGL interface.

  3. #3
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: OpenGL versions

    Here ftp://ftp.informatik.hu-berlin.de/pu...GLTutorial.pdf you have a great tutorial on how to do OpenGL the Qt way. Note that by now QGLWidget class is a bit outdated, QOpenGLWidget should be used instead
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

Similar Threads

  1. Qwt with two Qt versions
    By Induriel in forum Qwt
    Replies: 1
    Last Post: 26th June 2015, 08:10
  2. QGLWidget crashes with QPainter in some OpenGL versions
    By prosa21 in forum Qt Programming
    Replies: 0
    Last Post: 16th March 2012, 09:44
  3. Uninstall Old Versions of Qt?
    By kwire in forum Installation and Deployment
    Replies: 2
    Last Post: 12th February 2012, 15:30
  4. what are the debug versions used for?!!
    By FS Lover in forum General Programming
    Replies: 37
    Last Post: 29th November 2009, 19:44
  5. What versions of OpenGL does Qt support?
    By abernat in forum Qt Programming
    Replies: 3
    Last Post: 1st September 2009, 21:33

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
  •  
Qt is a trademark of The Qt Company.