• Advertisement
Sign in to follow this  

OpenGL detection in SDL

This topic is 4475 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

Hello , I use OpenGL with SDL in my current project and I need to know if a given platform( a given video board ) has OpenGL capabilities before the initialisation of SDL. So is there a Win function for this? I used the search before posting this but I didn't find any answer. So please give me a link if this has been discused before or help me with an answer. Thank you.

Share this post


Link to post
Share on other sites
Advertisement
you can use LoadLibrary() to load the opengl32.dll so at least you know the dll is there (though I don't know of any cases where it would be missing)

If you want to check certain OpenGL capabilities like vendor extensions and all that then you have to use glGetString() but this requires you to have a valid gl context first.

Share this post


Link to post
Share on other sites
I suspect that this kind of information can't be obtained dynamically, instead you have to know on what kind of platforms your program will be compiled and run, and if they do have generic OGL support, you may expect that they will have it alwyas - but don't quote me on that.

Also, I'm not sure, but maybe using things like SDL_VideoModeOK and sending as flags SDL_OPENGL would work they way you intended.

And one last thing: http://www.libsdl.org/cgi/docwiki.cgi/

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement