Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

technobot

Help Loading OGL1.2 Functions

This topic is 5540 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Yesterday I tried to switch to OpenGL 1.2, with no success. I've tried using the GetProcAddress, SDL_GL_GetProcAddress, and wglGetProcAddress, and they all fail. All I get is a null pointer. This happens with any 1.2 function that I've tried to load, both on my Mobility Readeon 9000 (ogl 1.3 drivers) and on my cousin's GeForce4MX (ogl 1.4 drivers)... I'm particualrly interested in the glDrawRangeElements function at the moment, but the other 1.2 functions are also important. I've also tried loading glDrawRangeElementsEXT, but without success, despite the fact that my card most definitely does support that extension... If it makes any difference, I'm using Delphi 6. Any help is greatly appreciated. EDIT: I forgot to mention that after GetProcAddress, GetLastError returns PROC_NOT_FOUND, and after wglGetProcAddress it returns INVALID_HANDLE... Michael K., Co-designer and Graphics Programmer of "The Keepers"
We come in peace... surrender or die! [edited by - technobot on April 19, 2003 5:07:59 AM]

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by Brother Bob
Are you sure you have a rendering context at the time you try to load the function pointers?

No, in fact I''m pretty sure I don''t. Despite this, OpenGL 1.1 functions such as glPolygonOffset get loaded correctly. Also, it may be a bit of a problem making the rendering context active before loading the ogl 1.2 functions, since we''re activating the rendering context through SDL (thus we don''t have access to it), and SDL_GL_GetProcAddress must be called before the video mode is set (read: before a rendering context is created)...

Michael K.,
Co-designer and Graphics Programmer of "The Keepers"



We come in peace... surrender or die!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
> wglGetProcAddress it returns INVALID_HANDLE

That''s a pretty clear indication right there.

You need to have a valid, hardware accelerated context current to retrieve post-1.1 functions. The reason 1.1 functions "may" be retrievable is because those are all part of the vanilla OpenGL library you link directly to.

Share this post


Link to post
Share on other sites
OK, it works now. I had to call SDL_GL_LoadLibrary before setting the video mode, and SDL_GL_GetProcAddress after.

Thanks a bunch for your help!

Michael K.,
Co-designer and Graphics Programmer of "The Keepers"



We come in peace... surrender or die!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!