Sign in to follow this  
AnjinSan

OpenGL detection in SDL

Recommended Posts

AnjinSan    122
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
basement    229
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
Koshmaar    989
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this