Jump to content
  • Advertisement
Sign in to follow this  
EvilNando

OpenGL OpenGL version?

This topic is 2600 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 want to start using the OpenGL version 3.1+ using the core Profile

So far Ive added the glew library, but when adding the gl and glu headers I feel those ones are the ones embedded on my OS

so how do I know which Opengl version Im targeting?


EDIT:

looking through glew I found this

[color=#007800]if (GLEW_VERSION_3_1)
[color=#007800]{
[color=#007800] 3.1 supported
[color=#007800]}
[color=#007800]

but currently in my project this macro just fails as I suspected


how can I fix this? (And yes I have proper hardware)

Share this post


Link to post
Share on other sites
Advertisement

I want to start using the OpenGL version 3.1+ using the core Profile

So far Ive added the glew library, but when adding the gl and glu headers I feel those ones are the ones embedded on my OS

so how do I know which Opengl version Im targeting?


EDIT:

looking through glew I found this

[color="#007800"]if (GLEW_VERSION_3_1)
[color="#007800"]{
[color="#007800"] 3.1 supported
[color="#007800"]}

but currently in my project this macro just fails as I suspected


how can I fix this? (And yes I have proper hardware)


It basically boils down to whether the library you are using to handle windowing/user input (glut, SDL, etc) supports creating a 3.x context or not. I know for a fact SDL 1.3 (which is still in alpha) supports creating a 3.x context. Not sure about the rest.

Share this post


Link to post
Share on other sites
nvm Im good

the problem was that I was only taking care of SDL initialization routines while leaving GLEW unattended

now Ive checked and my system supports up to 4.0


thanks

Share this post


Link to post
Share on other sites
For checking the version, the modern way is
glGetIntegerv(GL_MAJOR_VERSION, &OpenGLVersion[0]);
and
glGetIntegerv(GL_MINOR_VERSION, &OpenGLVersion[1]);

http://www.opengl.org/wiki/Tutorial1:_Rendering_shapes_with_glDrawRangeElements,_VAO,_VBO,_shaders_%28C%2B%2B_/_freeGLUT%29

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!