View Single Post
Old 07-24-11, 03:44 PM   #3
Registered User
Join Date: Sep 2002
Posts: 623
Default Re: 280.11: nvidia-installer, nvidia-settings, nvidia-xconfig are still 280.04

Originally Posted by Deanjo View Post
Since when is gl.h windows only?
See the content of Nvidia's gl.h:
#ifndef APIENTRY
#define APIENTRY
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.

#ifndef WIN32
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.
However, 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
installer option.
Nvidia does not know that 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.
zbiggy is offline   Reply With Quote