1. Loading Libraries for OpenGL Functions
OpenGL loading libraries handle the loading of OpenGL functions.
(1) gl3w
Focusing on OpenGL3/4 Core context loading.
Its main part is a simple gl3w_gen.py Python 2.6 script that downloads the glcorearb.h header and generates gl3w.h and gl3w.c from it. Those files can then be added and linked (statically or dynamically) into your project.
Assuming that you already:
- grabbed python script
- ran it:
python gl3w_gen.py
- found
gl3w.h
glcorearb.h
andgl3w.c
files generated
There are two ways:
First way. Just include those files in your project, so it will be compiled along with your own sources. Note, that you need to preserve GL
folder or manually fix includes in gl3w.c
.
Second way. Create a visual studio project, and add all three files in it and compile as static library. Then link it to your application (or just compile it in command line or makefile, whatever).