glGetString(GL_EXTENSIONS) returns 0 ???

The glGetString(GL_EXTENSIONS) always return 0 to me. The same problem with GL_VERSION,etc. The plafform is Windows XP. Acturally I’ve writen a simple glut program and successed. The glew can be used in my competer, the supported extensions are return by it. But why glGetString function always return 0? :confused:

Thanks for your time.

Samuel

Nobody answers? OK, I myself try to answer.

I tried to move my glGetString function after glutCreateWindow(), the result is OK. It seems the glGetString must be invoked aftger some OpenGL function in the “glutCreateWindow”.

Thanks.

Samuel

All OpenGL functions require that you have a valid rendering context, without that it does not work.

Without a rendering context it cannot tell what version you are using because it might be software rendering or HW accel. rendering depending on the context.

Mikael