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)
OpenGL version?
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.
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
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
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement