Is there ever a reason to use Raw OpenGL Calls vs using the Qt GL Calls?



  • I've been doing quite a bit of digging around and I found this was going to be the best place to ask about it. I am porting a project from wxWidgets into QT. However the wxWidgets project has raw OpenGL calls from glew, and others. As far as I can tell, the calls are exactly identical and the support that QT has for OpenGL is up to date with the most modern GL calls.

    I don't really want to go through the hassle of setting up raw OpenGL if it isn't necessary. But I want to ask if there is any reason to go through that hassle?



  • Not that I have found. You can even target specific versions of OpenGL:

    QOpenGLFunctions
    or
    QOpenGLFunctions_3_3_Core
    or
    QOpenGLFunctions_4_4_Core
    or
    etc
    

    I would hazard a guess that they support not just most, but all functions depending upon which version you target.



  • One reason would be if you want to write code that can run independently from Qt. For example, if you are writing a game engine that is intended to standalone and not depend on Qt, but you also want to make an asset editor that embeds your engine into a Qt app. You might try to avoid doing anything Qt specific when writing the viewport of the Qt app, so that you can easily share that codepath with the actual game engine.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.