I don’t know about your embeded sistem, but as I could understand so far:
-If you do not use SDL_UpdateRect or any other SDL function for doing
blit/fill operations, you may get slow performance without any 2D
acceleration.
For SW mode, there may be MMX, SSE accelerated subrutines for intel procs,
but I don’t know if SDL has implemented all kind of optimizations for all
cpu’s…
Just an example: If you use HW memory (local video memory) and try to
blit(SDL does a rect fill if no double buffer) and don’t have some 2D acc or
simply you do not use SDL functions for this operations… well, it moves
like crap. On my P4 and X1600, using ddraw, tryed an alpha blit. It moves
like grandma! Because of the ALPHA operations are not hw accelerated and the
slow buss to video mem & it is not cached by cpu & etc…
Either you have 2D accel an your video driver (see SDL_GetVideoInfo)and use
SDL function for blit/fill or if you don’t, than use the system memory for
all your drawings buffer/screens, it’s a lot faster. If you wanna be
generic, use SDL functions for everything(avoid using HW surfaces with
operations that are not accelerated).
As an example for your animation:
load for example 10 frames in memory. For each screen update/flip, you do a
SDL_UpdateRect (or blit) each time for the consecutive frame. Well, the
experts may help you further, as a demo I looked into the SDL_bouncing.zip
example. Just search for some examples, they are many.On 10/2/06, benang at cs.its.ac.id wrote:
Hi again, in my current application the animation is done by calling these
procedures:
- Blit the whole background
- Blit the sprites
- Flip the surface
- For the next frame --> loop to no 1
Well, the application runs fast enough in my PC. But when I run it in an
embedded platform called EPIA Mini ITX, it lags a lot. Maybe it’s because
of my way of doing the animation, or maybe it’s because I load all the
approx. 200 megs of bitmap surfaces in the memory. In a recent message in
this mailing list, there’s been a discussion about doing animation with
SDL_UpdateRect(s). How do I do that? Is there any example for this kind of
animation system?
Thanks in advance.
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
–
george