Jump to content
  • Advertisement
Sign in to follow this  
exorcist_bob

OpenGL questions about OpenGL

This topic is 4498 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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"?

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!