O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Accessing OpenGL functions

Interaction with OpenGL is usually done through calling functions provided by the OpenGL library. For example, in a regular C++ OpenGL application, you can see calls to OpenGL functions such as glClearColor(). These functions are resolved when your binary is linked against the OpenGL library. However, when you write a cross-platform application, resolving all the required OpenGL functions is not trivial. Luckily, Qt provides a way to call OpenGL functions without having to worry about the platform-specific details.

In a Qt application, you should access OpenGL functions through a family of QOpenGLFunctions classes. The QOpenGLFunctions class itself only provides access to functions that are part of OpenGL ES 2.0 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required