skaslev / gl3w

Simple OpenGL core profile loading
http://github.com/skaslev/gl3w
The Unlicense
705 stars 157 forks source link

generated gl3w.h dependent on khrplatform.h #60

Closed ix-dcourtois closed 6 years ago

ix-dcourtois commented 6 years ago

Hello there !

I don't know if it's just me not using this lib correctly, but I have a small "problem": in one of my project, I'm using gl3w_gen.py to generate gl3w.c, which I then compile as a static lib. The problem comes from the downloaded glcorearb.h file, which includes KHR/khrplatform.h (line 616 as of today) : this header is nowhere to be found on my systems (I'm developing on both Linux (Mint 18.3, which is derived from a recent Ubuntu I think) and Windows 10)

Fortunately for me I have another lib in my project which does include khrplatform.h so I fixed my problem by adding the correct include directory to the gl3w lib. But I find it odd that gl3w would generate a file which doesn't compile out of the box.

Since I can't seem to find any pertinent information on the subject, I'm starting to think that maybe I'm doing something wrong ? Am I the only one having this issue ? Would it make sense to slightly modify gl3w_gen.py to also download this file (found here : https://www.khronos.org/registry/EGL/api/KHR/khrplatform.h) so that it would build out of the box ?

Regards, Damien

skaslev commented 6 years ago

Latest master downloads KHR/khrplatform.h to gl3w's include directory since commit 99ed321100d37032cb6bfa7dd8dea85f10c86132 . Are you using the latest gl3w version?

ix-dcourtois commented 6 years ago

Ah ! I thought I was, but I must have made a mistake with the submodule ! Sorry for the issue, and thanks for the answer :)