Accessing Functions

Depending on the operating system you’re using, there may be differences in the compilation (or specifically, the program-linking phase) libraries, and the libraries used by the application when it runs. For example, in Microsoft Windows, your application will link with opengl32.lib but execute using opengl32.dll (along with other libraries). In this particular case (and also in other operating systems), the set of functions available in the link-time library differs from those available in the run-time library. To solve this problem, each window system that supports OpenGL has a mechanism for obtaining function pointers at run time. GLUT abstracts away the window–system-specific functions, and presents glutGetProcAddress() ...

Get OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3, Eighth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.