GLEW and supported types problem


i am running a Glew “Hello World” type aplication that only does this

#include <stdio.h> 
#include <stdlib.h> 
#include <GL/glew.h> 
#include <GL/glut.h> 

        void main(int argc, char **argv) { 
                glutInit(&argc, argv); 
                if (glewIsSupported("GL_VERSION_2_0")){ 
                        printf("Ready for OpenGL 2.0
                else { 
                        printf("OpenGL 2.0 not supported

it returns “OpenGL 2.0 not supported” and return that message to wahtever version of Opengl y ask for, also throws not supported for all Extensions.

BUT, if i run the glewinfo.exe i get that everything is OK from opengl 1.1 to 3.0 and a lot of extension are also OK. that means that it is supported i guess, the opengl version is what matters in my case.

so actually my card+driver does support opengl even up to 3.0 (i got Nvidia 9800gtx+ 512mb )
im runnning it on Windows 7 Beta with latest Nvidia driver released for windows 7

any help why on my app it shjows not supported?
how could the glewinfo.exe detect the supported types, is the glewIsSupported(“GL_VERSION_2_0”) the only way to check support?

PD: also tried with glewExperimental = GL_TRUE before glewInit() and same problem…

I think you might have to include <GL/gl.h> and <GL/glext.h> as well:

#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/glext.h>

Not sure though… might be that glut also does that, but it might be the case that glut does not load glext.h.

Or what happens if you don’t provide any arguments to glewInit()? I found an old piece of code, exactly the same as yours, except I didn’t give any arguments to glewInit (and I included gl.h and glext.h). That code works fine for me.

You could also try using OpenGL functions to get the version:


The 9800gtx does indeed support all OpenGL versions up until version 3.0 (when using the beta drivers even version 3.1 is supported).

ok thanks :slight_smile:
i will try those advices and will answer with news.

ok i realized,

first i managed to get my version of Opengl, which is 3.0.0
then, i asked other people about glew problem, and they told me that there is a bug when opengl 3.0.0 needs to be checked, which results on every version to be returned as not supported.