[SDL] how to know if direct render is abailable

Solra Bizna sbizna at tejat.net
Thu Nov 15 22:49:49 PST 2007


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


More information about the SDL mailing list