Hi!
I am writing a game (c++) for the vesafb (1024x768).
my problem is that I have to display a lot of large
(~200x100) pictures which can move over the screen
fade in and fade out.
I am working on a Cyrix Media GX (~Pentium 166) and a
realy bad graphiccard.
At this time I use the same algorithm like the
test-programs(dirty rectangle work):
"while(run)
{
// take all pictures from screen (blit the
background)
// move the objects (rect.x += dx; …)
// Get the background of the new position (blit)
and then show the object at the new position.
If the object should fade SetAlpha(background)
and put the background over the image (because if
i do a SetAlpha with pngs which already have an
alpha channel i lose the alpha_channel
infornation in the pngs
}"
This algortihm is to slow. if i just move an object i
need 3 Blits(200x100) (Hide/Getbackground/Show). For
one picture this is okay but if there are 50(maximum)
it gets realy slow.
I think the Cyrix Media GX has a big problem with
memcopy so i have to find another way (algorithm).
Does anybody know how i can find out how fast my
memcopy is (benchmark)?
I tried some SDL_flags like doublebuffering,HWSurface
and found out that HWSurface is very,very slow.
With SWSurface I sometimes see flickering (not realy
beautifull).
So I created a SWSurface(1024x768) where I blit all my
images at and if this is finished I blit it to the
backbuffer (using SDL_DOUBLEBUF). After that I call
SDL_Flip(screen). Thats the fastest method ?!
Is it possible to accelerate the Blits ?
I saw the SDL_GetVideoInfo() and there are some
accelerating Flags (at this machine the only flag
which is set is the HW_Surface flag). How can I get
the accelerated Blits?
Any suggestions how I can improve my main_loop; ?
Are there any suggestions for other algortihms to
display a lot of large pictures ?
I know the hardware is realy f**** up but i have no
choice.
Thanx__________________________________________________________________
Do You Yahoo!?
Gesendet von Yahoo! Mail - http://mail.yahoo.de
Yahoo! Mail auf Ihrem Handy? - http://mobil.yahoo.de