Jump to content
  • Advertisement
Sign in to follow this  
one mind

OpenGL How do you use opengl 2?

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

Hi, At the moment I am trying to learn about whats new in gl2 and was wondering how you actually go about using any of gl's newer features than 1.1 The way i see it, i'm using windows xp and include the gl.h file in my code. The header file accesses the opengl32.dll (dont know if thats its real name) and this file came with windows and is opengl 1.1 I have updated my graphics card which supports gl2 but how do i access the features if i'm using the gl.dll that came with windows? Is there a newer set of dlls or header files somewhere? I dont get it. Any help would be greatly appreciated. :)

Share this post


Link to post
Share on other sites
Advertisement
see forum FAQ specifically look at How can I program for OpenGL beyond version 1.1 in windows? and Extension loading libraries. I personally use GLEE.

hth

Share this post


Link to post
Share on other sites
The way I will do this (read: this is untested but might work) is to use the glew headers.

I noticed that when I used the most recent version of glew, it reported I had gl2.0 functions available. So I guess including the header files would probably be enough to let me use those functions.

Share this post


Link to post
Share on other sites
yes and no.
The headers only provide the function prototypes and function pointers, unless you call a function to bind the pointers to the correct functions the first time you try to use those functions will cause things to go very wrong.

GLEE has GLeeInit(), I assume GLew has a system like it in place

Share this post


Link to post
Share on other sites
Quote:
Original post by _the_phantom_
yes and no.
The headers only provide the function prototypes and function pointers, unless you call a function to bind the pointers to the correct functions the first time you try to use those functions will cause things to go very wrong.

GLEE has GLeeInit(), I assume GLew has a system like it in place


It does and it's called glewInit.

To the OP, you just call the init function after creating your GL context and making it current.
Then check to see if the functionality you want is available. See
http://glew.sourceforge.net for more info.

I have my own lib http://www.geocities.com/vmelkon/glhlibrary.html that I use to check the GL version. See GLfloat GLHLIB_API glhGetOpenGLMainVersion()

PS: GLEW is not multicontext safe.

Share this post


Link to post
Share on other sites
Quote:
Original post by V-man
PS: GLEW is not multicontext safe.


Thanks for that snippet of info. Something to bear in mind.

Share this post


Link to post
Share on other sites
Quote:
Original post by mrbastard
Quote:
Original post by V-man
PS: GLEW is not multicontext safe.


Thanks for that snippet of info. Something to bear in mind.


I should say that it can handle it. Read about GLEW MX portion.
So I wasn't quite right.

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!