Using OpenGL with Qt

I am currently looking into developing some games in C++, and OpenGL seems to have a great library and API for making games. Currently, I am using the Qt Creator IDE and wondering how to incorporate the OpenGL API into Qt Creator.

I looked up some tutorials, but haven't really seen many examples and such. All I know right now is that by typing "opengl" into the "QT += " part in the .pro file of a Qt project, you include the opengl API (I think). I also found out that there is a QGL library that is supposed to be related to OpenGL.

I am pretty confused and new to this kinda stuff. Any ideas/help?

Thanks in advance.
Last edited on
Hi there,

Here are some links that can point you in the good direction:

http://doc.qt.nokia.com/4.7-snapshot/qtopengl.html#details
http://programanddesign.com/cpp/qt-opengl-code-example/
http://www.digitalfanatics.org/projects/qt_tutorial/chapter14.html

Sorry I couldn't be of more help.

All the best,
NwN
Thanks, I will look into those resources.
This is a bit unrelated to the current topic, but in a tutorial that introduces you to using OpenGL with Qt, it mentions promoting a widget to a class using the "Promote to..." option when right clicking the widget.

What happens when you promote the QWidget to your class desired? Do the properties remain?
You might want to read these articles regarding the use of Qt in a videogame:

http://www.shamusyoung.com/twentysidedtale/?p=15758
http://www.shamusyoung.com/twentysidedtale/?p=15904

Suffice to say, I don't think that Shamus would recommend using Qt for any sort of real-time OpenGL application.
Topic archived. No new replies allowed.