These programs show complete sample programs for using Modern OpenGL. These programs are based on older legacy OpenGL programs which were written for the book 3D Computer Graphics: A mathematical approach with OpenGL, by Sam Buss, Cambridge University Press, 2003. It is hoped that in the near future, all of those legacy OpenGL programs will be translated to Modern OpenGL, to support the course Math155A/B at UCSD during Winter and Spring 2017.
These programs are still UNDER DEVELOPMENT. Corrections or improvements (minor and major) will be very much welcomed!
The programs will be supplied with Visual Studio 2015 project and workspace files; however, the source files should work with other compilers and on other systems as well. You will need to have OpenGL, GLFW, and GLEW installed: namely, the header files to compile programs and the object libraries to link and run the programs.
GLFW files are available from
http://www.glfw.org. For Windows machines,
the header files and binary files (library files) are available for
direct download, by clicking on the "Download" header on that web page.
After you obtain the header files (.h) and the Windows library files (.lib),
install them on your system (as administrator) in
the same location as GL/glu.h and glu32.lib.
Installing the .dll files should not be necessary, as it is recommended to
use static linkage. If you do not have administrator privileges, you may
instead store the files locally.
For non-Windows machines, you will need to compile GLFW from its source code: this is also available at http://www.glfw.org/ along with CMake files.
If you compile and link with makefiles instead of using Visual Studio projects, you may wish to remove the #pragma commands in the .cpp files.
Obtaining GLEW. GLEW files are available from http://glew.sourceforge.net. Installation directions are the same as for GLFW above.
Acknowledgements: I initially started learning Modern OpenGL primarily from the OpenGL Programming Guide, Ninth Edition (Kindle version), and the Learn OpenGL website by Joey de Vries. Books on Modern OpenGL include the OpenGL Programming Guide and the OpenGL Super Bible; if you get one, be sure it is for OpenGL 4.2 or later. The LearnOpenGL website also a PDF version of itself available for download as a complete online book. For somewhat denser reading, the official specification of OpenGL 4.5 is available online at https://www.khronos.org/registry/OpenGL/specs/gl/glspec45.core.pdf.