View Full Version : gl.h 1.5

01-20-2005, 05:20 AM
Where's a good place to get a header file (and possibly a .lib) for OpenGL 1.5. I checked with my card vendor (ATI) and I downloaded this glati.h thing, but I couldn't really make heads or tails of it.

01-20-2005, 08:01 AM
If you're talking about Windows, then the header, import library and the dynamic link library is a part of Microsofts implementation of OpenGL on Windows, and they should provide new versions of these files. However, they don't, so 1.1 is the latest version available for those files.

This is not a problem though, as you can do the job of the import libray yourself and load every function you need.

01-20-2005, 01:25 PM
For the header, look for glext.h

01-21-2005, 12:05 AM
Sounds like OP is looking for new versions of the library, so maybe one should point out that glext.h is an addon to gl.h, not a replacement for it.

01-21-2005, 01:50 AM
Originally posted by ZbuffeR:
For the header, look for glext.hWell, I wonder: does glext.h is providen with all opengl development kits ? I mean, I have it for Nvidia cards under Linux. But is it true for ATI, and for Windows/Mac ?

It's for portability issues.

01-21-2005, 04:38 AM
This is not a problem though, as you can do the job of the import libray yourself and load every function you need.How does someone go about doing this, pray tell?

01-21-2005, 05:02 AM
First you setup a function pointer, and then you load the function using wglGetProcAddress. wglGetProcAddress takes the name of the function, and returns the address to it. All necessary function pointer typedefs are defined in glext.h, which you can download from here (http://oss.sgi.com/projects/ogl-sample/registry/) .

An example. Say you want to load the function glActiveTexture.

PFNGLACTIVETEXTUREPROC glActiveTexture = 0; // define a function pointer.


glActiveTexture = wglGetProcAddress("glActiveTexture"); // load function pointerNow the function can be used as any other function.

edit: Well, that's the really manual of doing it. You can also use pre-made libraries to do it. Like Glee (http://elf-stone.com/glee.php) .

01-21-2005, 07:39 AM
So is that like what GLEW does?

BTW, thanks for everybodies help. I'm consistently impressed by this community!

01-31-2005, 05:35 AM
Tried the FAQ?


Yes, that's what GLEW does. There is a link on the FAQ.