questions about OpenGL

Started by
4 comments, last by deavik 17 years, 8 months ago
Hello, Community, I'm having some trouble understanding opengl and how to use versions greater that 1.1 in windows. In this document, it dictates that the user needs to use wglGetProcAddress for the use of every api function in opengl. Does this apply to the core api as well as the extensions? If so, why does this page contain wrappers for extensions only? Thanks for any help, exorcist_bob
Advertisement
You only need to fetch the function pointers for anything beyond GL1.1, so that includes extensions and anything that made it into the core after 1.1.

You might have already seen it but the forum FAQ has some links to extension libraries so you don't need to do it yourself.
But what about the core after 1.1? I wanted to use 2.0, but I don't know the api well enought to know which functions to import. Also, I don't want to use the extensions to help make it compatible with direct3d, because I am not using d3dx.

EDIT: Is it possible to have support for opengl 2.0? Or won't enough graphics cards support it?
The Microsoft implementation of OpenGL is only for 1.1 So anything after, from the point of view of Windows, is an extension, whether it is in the core now or not. You will need to use the extension mechanism for anything beyond that. I like glew.

What do you mean by "he extensions to help make it compatible with direct3d"?
I just mean that I don't to use too much opengl specific stuff, just like I don't want to for direct3d. Basically avoiding the use of d3dx, and extensions for opengl. BUT, since I need to use extensions to get ogl2.0 functionality, which extensions should I use?

Thanks for your help, it has cleared quite a bit up,
exorcist_bob

[Edited by - exorcist_bob on July 26, 2006 9:46:42 AM]
Quote:Original post by exorcist_bob
... which extensions should I use?

That depends on just which extensions you want [smile] (and of course which are supoprted by your card/driver). You can load a "core" function pointer in exactly the same way you load one from the extension specs. Pseudo code:
glActiveTextureARB = GetProcAddress("glActiveTextureARB");glActiveTexture = GetProcAddress("glActiveTexture");

Checking for a core function is slightly trickier. The rule of thumb (I think) is:

a) Virtually every new core function set is derived from a related extension (eg. multitexturing in GL1.3 from ARB_multitexture). Check that the corresponding extension string is present, ie ARB_xxx/EXT_xxx is in the extension string.

b) GL_VERSION should be greater than the version that first introduced the funtions in core. eg. for multitexturing (core), glGetString(GL_VERSION) should report > 1.3.

This topic is closed to new replies.

Advertisement