Unable to load OpenGL extensions.

Hello,

I am trying to use OpenGL’s Extension for my NVIDIA Geforce4 MX 440.
This is my code:

const GLubyte *version;
version = glGetString(GL_VERSION);

PROC wglGetExtString = wglGetProcAddress("wglGetExtensionsStringARB");

However, when I run this code segment, version = “GL_WIN_swap_hint
GL_EXT_bgra GL_EXT_paletted_texture” and wglGetExtString == NULL.
I am wondering where I did something wrong, because I don’t believe the
GF4 card support so few extensions.

I an a newbie of OpenGL. I guess maybe I used an older version of OpenGL
library supplied by Windows. Do I need to get a new OpenGL library for my
Video card, and where?

Thanks very much.

You have created a valid opengl context first? and you made sure that its a HW accelerated mode?

No, there are no “latest” librarys you could get.

Just check out http://glew.sourceforge.net/
or http://www.levp.de/3d/

Those are libraries, which load all the extension-stuff for you.

Hope that helps.
Jan.

Originally posted by xunhuan:
I an a newbie of OpenGL. I guess maybe I used an older version of OpenGL
library supplied by Windows. Do I need to get a new OpenGL library for my
Video card, and where?

You might be doind the same thing I did the first time I tried using extensions. Are you still using the old gl.h file and/or an older version of glext.h? If this is your first time with something like this, you might have forgotten to copy over the new header files when you installed new drivers for your video card. This is just a thought.

[This message has been edited by jleffelm (edited 11-06-2003).]

Originally posted by jleffelm:
[b] You might be doind the same thing I did the first time I tried using extensions. Are you still using the old gl.h file and/or an older version of glext.h? If this is your first time with something like this, you might have forgotten to copy over the new header files when you installed new drivers for your video card. This is just a thought.

[This message has been edited by jleffelm (edited 11-06-2003).][/b]

I downloaded the glext.h and wglext.h from the OpenGL website, and put them in my GL/ directory. After I included these two headers, it still doesn’t work.

By the way, I use a software called OpenGL Extension Viewer from realtech VR. It shows a lot of extensions. The viewer shows the WGL_ARB_extensions_string exists.

Originally posted by Mazy:
You have created a valid opengl context first? and you made sure that its a HW accelerated mode?

I’ve created a valid opengl context. I also found a file called “nvoglnt.dll” in WINNT/system32/ directory. I guess this is the actual opengl library.

I tried to get the current version of OpenGL:

const GLubyte *version;
version = glGetString(GL_VERSION);

Unfortunately, the returned value is “1.1.0”. It doesn’t make sense for me. Since now I’ve installed the new driver, the OpenGL version should not be 1.1.0 any more.

My problem was that I set my PixelFormatDescriptor as PFD_DRAW_TO_BITMAP.
In this mode, Windows use software acceleration.

Thanks!