Advertisement

runtime linking of opengl32.dll and glGetString?

Started by February 26, 2000 07:22 AM
0 comments, last by Chappa 25 years ago
When I call const GLubyte *glGetString(GLenum name) it doesn''t return a pointer to some string but a null pointer. All the other (dynamically loaded) functions work perfectly well. Any ideas on this? I use GetProcAddress to retrieve all of the functions and check the pointers afterwards, to make sure that every function is present. Then I just call the function pointer like this glGetString(GL_VENDOR) , where glGetString is defined as something like const GLubyte* (APIENTRY *glGetString)(GLenum name) = NULL . By the way, I''ve got a Diamond Viper770 TNT2 with reference drivers from NVidia. Sure, it is quite confusing at first glance to use the same name for a function pointer as for a function, but one get''s used to it after some time. It''s just like calling normal OpenGL functions.
Uh oh, stupid me. I called glGetString before I created a rendering context. So it has nothing to do with runtime linking of opengl. (fortunately!)

This topic is closed to new replies.

Advertisement