gl3w and GL extensions

377 Views Asked by At

I am targeting GL Core Profile on Linux. When I directly use the system GL headers like so:

#include <GL/glcorearb.h>

...then everything works as expected, and I can use GL extensions too, e.g. glPushGroupMarkerEXT() calls.

But since I've integrated imgui, I have been forced to go through a GL Loader (I was not able to make imgui work without a loader.) So I have followed the imgui examples, and now use gl3w.

Now that I go through gl3w, I can no longer use those GL extensions:

src/wld.cpp:373:2: error: use of undeclared identifier 'glPushGroupMarkerEXT'

I looked, but gl3w does not seem to come with a separate header for extension, like glew does: the glxew.h file.

Does this mean that I cannot use glPushGroupMarkerEXT() if I use gl3w as a GL loader?

1

There are 1 best solutions below

0
On

Ok, so it wasn't mentioned in the README before (it is now, I created a pull rq) but there is a command line option to gl3w's generator script:

gl3w_gen.py --ext

When using the --ext flag, the extensions will be available in the generated GL/glcorearb.h header.

The gl3w packed with the imgui repository was generated without this flag, hence the extensions were not available.