Jump to content
  • Advertisement
Sign in to follow this  
justin12343

OpenGL Opengl 2.1 files

This topic is 2957 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

I can't seem to find the header files and the lib for opengl 2.1 anywhere. I installed the NVidia SDK hoping it will be there( and it wasn't). Can anyone post a link to those files (and not to opengl.org/sdk because I can't find it there either). Help will be much appreciated.


~Justin12343

Share this post


Link to post
Share on other sites
Advertisement
On windows you just use the original GL header/lib that comes with your compiler, then as explained above, you use something like glew/glee to access the new 2.1 functions.

Share this post


Link to post
Share on other sites
The headers that you find at http://www.opengl.org/registry/ (which you didn't want) are exactly what you need.

Everything up to OpenGL 1.2 is included in the normal import library that comes with your compiler, under every platform. Which means you link with opengl32.lib and it'll just work.
Everything beyond version 1.2 (on some platforms, version 1.3), and all extensions, you must load yourself.

If you don't want to use something like GLEW or glee (because of size, there is really no other reason), then you need to do the following:
1. declare a global PFNWHATEVERFUNCTIONNAMEGL glWhateverFunctionName; function pointer in a header
2. define a global PFNWHATEVERFUNCTIONNAMEGL glWhateverFunctionName = 0; in a source file
3. check for the GL version
4. if applicable, check the extension string
5. use wglGetProcAddress under Windows and glXGetProcAddress under Unix to assign valid addresses to your function pointers
6. check that these are not null_ptr before calling them

GLEW and glee do all that with one function call. Surely at the expense of a few hundred kB of program size, but so what... :-)

Share this post


Link to post
Share on other sites
Just a quick "correction":
Quote:
1. declare a global PFNWHATEVERFUNCTIONNAMEGL glWhateverFunctionName; function pointer in a header

1. declare a global extern PFNWHATEVERFUNCTIONNAMEGL glWhateverFunctionName; function pointer in a header

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!