Game Programming using Qt 5 Beginner's Guide - Second Edition
by Pavel Strakhov, Witold Wysota, Lorenz Haas
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access