PDA

View Full Version : Opengl 1.2 extensions



Alcionei Estevam Jr
01-20-2003, 03:52 AM
How I can use opengl 1.2 extensions with Mingw?
Where a can get headers and libs?

Thanks,
Alcionei

marcus256
01-20-2003, 04:59 AM
They are included in the latest MinGW distro (ever since w32api 1.3, actually). You can find GL includes (that work with MinGW) separately here: http://hem.passagen.se/opengl/getstarted (in the GL includes section).

All you need to do is to include <GL/gl.h>, which defines all the extensions for you (by including glext.h - don't do it yourself).


[This message has been edited by marcus256 (edited 01-20-2003).]

Alcionei Estevam Jr
01-20-2003, 01:21 PM
Thanks Marcus,
Now I need build a libopengl32 that suporte opengl extensions.
Do you can help me?

Azdo
01-21-2003, 04:28 AM
Originally posted by Alcionei Estevam Jr:
Thanks Marcus,
Now I need build a libopengl32 that suporte opengl extensions.
Do you can help me?

You don't need a special OpenGL library to use extensions. Just use the one provided with the compiler. By the way, extension functions are loaded dynamically, so their symbols are not defined in any import library.

Azdo

marcus256
01-21-2003, 08:51 PM
Originally posted by Alcionei Estevam Jr:
Thanks Marcus,
Now I need build a libopengl32 that suporte opengl extensions.
Do you can help me?

As Azdo said, you don't do it that way. Of course you can do your own lib. Actually, Lev has done a great job with this (I haven't tried it yet, but I think it works with MinGW): http://www.levp.de/3d/extensionlib.html

I usually prefer to do the dynamic function loading myself. GLFW (http://hem.passagen.se/opengl/glfw) has a very portable implementation of dynamic GL function loading (plus extension handling is described in the Users Guide). If you do not use GLFW or the lib by Lev (called extgl), you will have to use wglGetProcAddress under Windows or glXGetProcAddressARB under Linux (or other functions for other systems) to dynamically load OpenGL 1.2+ functions.