[SDL] SDL performance over OpenGL performance.

Warren LEVIN kurapix at gmail.com
Sat Jun 2 19:17:40 PDT 2007


Ok.
So if I want my 2D game to go fast, I need to use OpenGL hardware surface?
It sound quite a heavy solution.
To rewrite a full SDL only game to an OpenGL-SDL it takes a lot of rewrite
no?
Or can the SDL handle OpenGL hardware surface by itself?

Why doesn't SDL have hardware acceleration implemented in itself? (I haven't
seen this question in the FAQS).
It would be great since on some platform, SDL is port but not OpenGL (so if
there isn't OpenGL ... no hardware acceleration).

I've always though of OpenGL for 3D and SDL for 2D ...

Thank you for answering.

Kurapix

2007/6/2, Ryan C. Gordon <icculus at icculus.org>:
>
>
> > On 2D games with a lot of sprites and details it really is slooow.
> > Why?
> > Does SDL only use CPU (software)? Doesn't it also use GPU (hardware)?
> > Thank you for answering.
>
> In many cases, yes. It'll use hardware when used with OpenGL, obviously,
> and on some platforms, if you're careful to put everything into hardware
> surfaces, it'll use them.
>
> Most "slowdown" comes from blitting between different surface formats,
> so SDL has to convert on the fly. Preconvert and most of the slowdown
> resolves itself.
>
> (And naturally, blitting less is faster, and using OpenGL is probably a
> better idea at this point, even for 2D stuff.)
>
> --ryan.
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070602/9fd0680d/attachment.htm 


More information about the SDL mailing list