How to use the new OpenGL features of Qt5

Qt5 hosts a couple of new features to simplify working with OpenGL, with a helpful introduction given by Dr. Sean Harmer at Qt Developer Days 2012:

Unfortunately the source code to the presentations was not made available. To remedy, I’ve created a GitHub repository of the “Hello World” triangle example that is shown at the beginning of the presentation and adapted it to work with GLSL 1.30 and vanilla Qt5.

Find the code at https://github.com/advancingu/Qt5OpenGL

About these ads

4 thoughts on “How to use the new OpenGL features of Qt5

  1. I wonder how good Qt5’s mobile cross-platform capabilities are. I’ve been doing a lot of research and while originally I was considering something like a cross-platform framework, or something like Xamarin’s mono which lets you use C# across all platforms while still targeting native UI, I now think the best approach (for the best user experience and the best performance, if not necessarily the most rapid development time) may be to put some shared code in C or C++ and call this from platform-specific code.

    Qt might have an interesting role to play here in providing framework features. I wonder if they ever thought of decoupling the framework from the GUI as I am still not a believer in cross-platform UI.

  2. @Kevin
    The GUI widgets should be in a completely separate “Qt Widgets” module in Qt5:

    Prior to Qt 5.0, the Qt GUI library was the monolithic container for all things relating to graphical user interfaces in Qt, and included the Qt widget set, the item views, the graphics view framework and also printing. Starting Qt 5, these classes have been moved to the QtWidgets library. Printing has been moved to the QtPrintSupport library. Please note that these libraries can be excluded from a Qt installation.
    QtGui now contains only a small set of enablers, which are generally useful for all graphical applications.

    http://qt-project.org/doc/qt-5.0/qtgui/qtgui-index.html

    This means you won’t have to pull in widget code if you don’t need it for your purposes. As always though, it depends on your specific needs to determine if a framework is suitable or not.

  3. Pingback: OpenGL Community Roundup, January 2013 Edition | Learn OpenGL ES

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s