Originally Posted by Deanjo
Since when is gl.h windows only?
See the content of Nvidia's gl.h:
APIENTRY is used in M$ Windows programming, usually for DLL libraries. It is not defined on Linux but after including this header it will be - see instruction #ifndef - IF Not DEFined #define APIENTRY.
The same here. If WIN32 is not defined define WINGDIAPI.
The last 20% of Nvidia's gl.h lines start with: WINGDIAPI void APIENTRY.
Mesa's gl.h is designed different way. If WIN32 is defined before use windows GLAPIENTRY.
All OpenGL compilations on Linux failed when I used Nvidis's OpenGL headers. Mesa headers work great.
Nvidia installer by default will not install these headers. I simply see no reason for keeping this junk in package if they will never be installed:
Originally Posted by Nvidia installer -A option
Normally, installation will not install NVIDIA's OpenGL
header files; the OpenGL header files packaged by the Linux
distribution or available from
should be preferred.
does not yet
provide a glx.h or gl.h. Until that is resolved, NVIDIA's
OpenGL header files can still be chosen, through this
Nvidia does not know that www.opengl.org
will never provide gl.h and glx.h because these headers according to reference OpenGL implementation guide have to be provided by platform or OS. See here
. That is why these ugly headers will continue to appear in Nvidia driver package forever. In case of Linux gl.h and glx.h always comes with mesa devel package. Mesa also provides fresh glext.h and glxext.h from Khronos to have complete and compatible gl*.h header set.