skaslev / gl3w

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

Is gl3w available as a library by default in Ubuntu? #58

Closed ghost closed 6 years ago

ghost commented 6 years ago

For now, we have to add gl3w.c into the project as a source file. It is annoying sometimes if we have many an OpenGL projects to create because we have to repeat this adding work for each new project and the compiler has to compile it again and again, generating exactly the same binary code which resides in every executible. GLEW, on the other hand, is a library available by default in Ubuntu. All we need to do to load OpenGL functions is add a linking flag for it. Then all the functions in GLEW are ready to use. Further, only one copy of memory and file system space is consumed for GLEW. Is this the case for gl3w? That is, is gl3w available as a (shared) library in Ubuntu by default?

ikskuh commented 6 years ago

If you require a shared library that provides the functionality of gl3w, just compile it with gcc -shared -fPIC -o libgl3w.so -I ../include/ gl3w.c, then reference the folder of libgl3w.so in your projects.

I really like gl3w for not beeing a shared library, as it is small enough to not be a burden when used for static linking, also it removes a dependency so i don't require gl3w to be installed on other machines (with outdated versions or similar)

ghost commented 6 years ago

I'm afraid you misunderstand my question. I'm not asking what you are trying to answer.

tombsar commented 6 years ago

Ubuntu does not currently package gl3w; someone would need to take responsibility for creating and maintaining the package at Ubuntu's side. You can install it locally if you like, as MasterQ32 explained.

ghost commented 6 years ago

@tombsar: Thank you for the clear reply.

tombsar commented 6 years ago

Closing this. Please reopen if you have further questions.