automated extension linking with GLee (V1.1 is up)

Started by
27 comments, last by benjamin bunny 20 years, 8 months ago
Edit: Version 1.1 is up. It's a bit neater internally, and it gives detailed error reporting (see the readme). I've just finished writing GLee, the OpenGL Easy Extension library. It's developed using a little program I made called GLeeGen, which automatically writes the code to link and query every OpenGL extension based on the contents of glExt.h and wglExt.h. As far as I know, it supports every GL and WGL extension in the registry. To use it, you just have to link to glee.lib, and include glee.h in your project. Once linked, it's pretty straightforward to use:

...create openGL window etc...
GLeeInit();   //extensions can be used from here onwards

...
//Does GL_ARB_point_parameter exist?

if (GLEE_ARB_point_parameter)
{
   glPointParameterfARB(...);
}

//Is OpenGL 1.3 supported?

if (GLEE_VERSION_1_3)
{
  glLoadTransposeMatrixf(...) ; 
  ...
}
I've made the license as non-restrictive as possible in order to make it useful to everyone. The only thing I'm asking is you give credit where due. Let me know if you have any comments/bug reports etc. I've only tested this on my Radeon 9700, so more testing would be helpful. Links: Note: You will need wglext.h and glext.h from sgi. [EDIT: updated for version 1.01: The hDC is no longer required (thanks davepermen)] [edited by - benjamin bunny on August 19, 2003 6:47:49 AM] [edited by - benjamin bunny on August 23, 2003 12:48:36 PM]

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

Advertisement
Congrats on finishing this, but I thought I should let you know that there is already a library that does what yours does... at least from what you''ve put down so far. Have you heard of Lev Povalahev''s extension loading library? Take a look at it if you haven''t. Maybe you could post what makes yours unique or different.
I'm aware of other similar libs such as extgl, GLEW and GLuX.

The main advantage of my lib is it supports every extension in the registry. It's automatically generated, so every extension in glext.h and wglext.h is supported as soon as glext.h and wglext.h are updated; I just have to run GleeGen.exe and rebuild. I believe GLEW works in a similar way, however the licenses are more restrictive.

I plan to support it right up through OpenGL 2.0 and beyond.

____________________________________________________________
www.elf-stone.com

[edited by - benjamin bunny on August 18, 2003 5:19:28 PM]

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

great. but why do you need the hdc?

"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

To pass to wglGetExtensionsStringARB to get the WGL extensions.

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

others don''t need it as well.. dunno.. it would look much more clean.. and as i use sdl i normally don''t access the hdc myself at all..

wglGetCurrentDC or so should give you all you need, not?

"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

Ah, wglGetCurrentDC, that's what I needed. I was looking in the win32 API docs before. Thanks. It's fixed now.

[edited by - benjamin bunny on August 19, 2003 6:31:51 AM]

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

Cool! I''m using extgl for my projects right now, but I''ll give it a try. Also, maybe it would be helpful to add links to your libray and extgl as well as others to the forum faqs, since every so often there are questions on good ways to load extensions.
What, you mean abuse my moderator privilages to pimp my own software. Done!

____________________________________________________________
www.elf-stone.com | Automated GL Extension Loading: GLee

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

lol, no conflict of interest here

[edited by - _walrus on August 19, 2003 11:57:19 AM]

This topic is closed to new replies.

Advertisement