[SDL] How to dynamically check for SDL_GL_SWAP_INTERVAL support

atrix2 at cox.net atrix2 at cox.net
Mon Dec 4 10:20:34 PST 2006


even though you are dynamically linking to the sdl lib, you still "statically link" to sdl.h and other sdl related headers which is where the enum is actually defined.

---- Stephen Anthony <sa666666 at gmail.com> wrote: 
> Hi, I'm wondering how to check (at runtime) if I can use the GL command:
> 
>     SDL_GL_SetAttribute( SDL_GL_SWAP_CONTROL, 1 );
> 
> This only works on SDL > 1.2.10, I think.  The problem is, how do I 
> check this at runtime, since the SDL lib will be dynamically linked?  
> And just because it's available at compile-time doesn't mean it will be 
> at run-time (and vice-versa).
> 
> Basically, I need to determine at run-time if the 
> enum 'SDL_GL_SWAP_CONTROL' is actually defined.  Does anyone have any 
> advice?  I know I could just define that variable to whatever SDL 
> 1.2.10 uses and just always call the function, but that seems a hacky 
> way of doing things.
> 
> Thanks for any info,
> Steve
> 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl





More information about the SDL mailing list