[SDL] how to know if (direct render) hardware accelerated is available

David Roguin nesdavid at gmail.com
Fri Nov 16 04:44:12 PST 2007


With 'direct render' I was meaning "hardware accelerated".
Is there any way to be sure that hardware accelerated is available?

I was thinking that maybe with GL_VENDOR and GL_RENDER I could
determine that, but I'm not really sure if that is the best way to do
it.

The SDL_SysWMinfo has de Display, but I'm missing the GLXContext.

David.


On Nov 16, 2007 3:49 AM, Solra Bizna <sbizna at tejat.net> wrote:
>
> On Nov 15, 2007 6:55 PM, David Roguin <nesdavid at gmail.com> wrote:
> > I want to know for a program running in linux if direct rendering is abailable.
> > I believe glXIsDirect does the trick.
> > The question is, can I call this function within a SDL context?
> SDL under X11 uses GLX internally for OpenGL, so I would assume so. I
> can think of two caveats, though.
> 1) You'll need a Display and a GLXContext to pass to the function, and
> I'm not sure how you'd get your hands on those.
> 2) If you're taking "direct rendering" to mean "hardware accelerated,"
> remember that indirect rendering can be accelerated too. For example,
> if X11 forwarding is in effect, rendering may be hardware accelerated
> (and reasonably fast) but glXIsDirect will return False. (I'm not sure
> how AIGLX fits in.)
> -:sigma.SB
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>


More information about the SDL mailing list