XOpenGL.dll: interested anyone ?

Hi there !

Sorry for the title: there’s nothing new from SGI or MS…

XOpenGL.dll is a DLL I built for my own use but it might be useful to others… The purpose of this post is to check if people would be interested in it or not…

Basically, XOpenGL.dll takes care of OpenGL extensions for you…

When you use wglCreateContext, XOpenGL will also load all the extensions available in the context (providing it knows them !). Then, when you use wglMakeCurrent, it will make the extended functions available.

For example, if GL_ARB_multitexture is available, the functions glMultiTexCoordxxx will be initialized. If the extension is not there, the functions are linked to a no-operation function. A global flag (e.g. m_bGL_ARB_multitexture) will tell you if an extension is present in the current context.

This is quite convenient when you use multiple contexts such as on-screen and off-screen ones (the former will be HW accelerated but the latter will use MS GDI Generic implementation -> different extensions available !).

The other thing XOpenGL.dll enables you to do is to link dynamically to any OpenGL implementation. The default goes to OpenGL32.dll and GLU32.dll but you can use the SetDLLs function to change that. I still have some problems with the SGI implementation but I should fix it soon… It seemed to work with older versions of MESA (haven’t tried 3.4 yet).

As far as extensions are concerned, all nVidia ones are already built in (sorry but I use a GeForce DDR !). I do not know yet if I would release the source code as well as the DLL… If not, I would have to include all the extensions for other cards myself (which is quite quick…).

Well, if anyone thinks this might save time or be useful in anyway, don’t hesitate to put a message here or drop me an e-mail…

Best regards.


Cool idea…Sounds very interesting!

Greets, XBTC!