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

Solra Bizna sbizna at tejat.net
Fri Nov 16 12:54:56 PST 2007


On Nov 16, 2007 7:01 PM, David Roguin <nesdavid at gmail.com> wrote:
> I was thinking, if I test if the GL_RENDER is Mesa, I'm sure that not
> hardware accel is present. But is there another soft OpenGL
> implementation besides Mesa?
Ah, but here you hit another problem... :)
Most "Free" 3D drivers report themselves as some variant of "Mesa
DRI." So, you might think you could make an exception to the rule by
checking for "DRI" in the RENDER string... but, alas, it's not that
simple, as often DRI is reported in the RENDER string despite the lack
of worthwhile hardware acceleration. (Mach64 anyone? Or the Creator3D,
on which texture mapping is not accelerated?)

All hope is not lost, though, since SDL now has a GL attribute you can
use to request hardware acceleration (SDL_GL_ACCELERATED_VISUAL). I
haven't used it, so I don't know how extensive backend support is, but
at least there's the potential. (Not to mention being
cross-platform...)
-:sigma.SB


More information about the SDL mailing list