Whose gl.h?
Hello everyone,
I've programmed graphics for years, but am still confused by a simple puzzle. I'm using Visual Studio 2003, Windows 2000, and an NVidia 6800GT. When I once again download the latest version of NVidia's SDK, I see as always that there is a new version of gl.h inside. However, there is also a gl.h file in the Microsoft Platform SDK. As it seems opengl32.lib from Microsoft is the library to link to, which gl.h header file should I use; Microsoft's or NVidia's?
Thanks in advance,
Graham
Quote:Original post by Cypher19
I'd use the NV SDK as it's probably more up-to-date.
Although that might not help you much when opengl32.lib is the same old... Why don't you run a diff, compare the files? If there's nothing you actually need that's in the NVidia SDK OpenGL header, which isn't in the ordinary header, then there's probably no reason to use it.
I would use the standard gl.h, and the glext.h files from openGL.org.
The NVidia headers are no good. The only extra you get from NVIdia's headers are some obscure definition you will probarbly not use. The last time i installed the NVidia headers they had thing like NV_TEXTURE_RECTANGLE, but you don't need that since there is also an ARB_TEXTURE_RECTANGLE. I should update from OpenGL.org.
Hope this makes sense.
The NVidia headers are no good. The only extra you get from NVIdia's headers are some obscure definition you will probarbly not use. The last time i installed the NVidia headers they had thing like NV_TEXTURE_RECTANGLE, but you don't need that since there is also an ARB_TEXTURE_RECTANGLE. I should update from OpenGL.org.
Hope this makes sense.
Quote:Original post by Dybbuk
I would use the standard gl.h, and the glext.h files from openGL.org.
Right. And even then, for extension definitions and such, I would use a library like GLEW or GLee.
Thanks. Some mixed answers there. When I download other APIs, a header file will have a specific dll library it works with. Surely that would argue against using an updated version of gl.h; if the same dll is being used anyway?
Thing is, I'm still confused. I guess for gl extensions, nvidia/ati's driver dlls are used, but what about core gl changes...how can a new nvidia gl.h, update core functionality?
Cheers,
Graham
Thing is, I'm still confused. I guess for gl extensions, nvidia/ati's driver dlls are used, but what about core gl changes...how can a new nvidia gl.h, update core functionality?
Cheers,
Graham
Quote:Original post by Graham11
Thanks. Some mixed answers there. When I download other APIs, a header file will have a specific dll library it works with. Surely that would argue against using an updated version of gl.h; if the same dll is being used anyway?
Thing is, I'm still confused. I guess for gl extensions, nvidia/ati's driver dlls are used, but what about core gl changes...how can a new nvidia gl.h, update core functionality?
Cheers,
Graham
ATI and Nvidia drivers implement the entire OpenGL functionality: core and extensions. They have to, as they should try to make all functions use their hardware as efficiently as possible. You should also realize that the implementation can change without modifying the headers. These headers just define what all functions look like (in terms of parameters and stuff) their implementations can (and probably do) differ significantly between drivers.
That being said, I would like to put my vote in for GLEW (and probably GLee, although I don't have experience with that). These projects both provide an excellent way of solving the GL header nightmare on Windows (you need to pick only one).
Tom
Thanks Tom. GLEW also gets my vote. But what about Microsoft's opengl32.dll? Does it just pass instructions through to the driver dlls?
Graham
Graham
Quote:Original post by Graham11
Thanks Tom. GLEW also gets my vote. But what about Microsoft's opengl32.dll? Does it just pass instructions through to the driver dlls?
Graham
I'm definitely not an expert on this, but I think it does. That's why GLEW, besides defining the header contents for all current OpenGL versions (upto 2.0 right now), also needs to use wglGetProcAddress() to get the adresses of all functions not defined by version 1.1 (which is the version implemented by Windows). My guess is that the function pointers returned by that function come directly from the driver rather than OpenGL32.dll.
Tom
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement