I’ve read very quickly your post, and you talked about a wave effect.
Actually, I’ve written a little demo doing a wave effect on an image recently,
using either SDL_Rects or a direct access to pixels. Performances are equal
as long as you convert your surfaces to the display format.
I’ve tried a loop for writing data, and using memcpy. Those two methods
have equivalent performances with SDL_BlitSurface when there is no
surface format mismatch.
You can download it and see the source code if you want, at:
If your machine is fast, add a “-DDELAY=16” to the definition of the "config"
variable at the beginning of the makefile.
----- Message d’origine ----De : walter
? : sdl at lists.libsdl.org
Envoy? le : Jeudi, 26 Juin 2008, 21h12mn 49s
Objet : [SDL] Black/White Stripes again
A couple of weeks ago I asked you how to generate black and white stripes
which are moving from right to left.
I did this “quest” with some help, but there are still some problems.
My professor wants the stripes more efficient.
The problem to solve is:
How can I generate black and white stripes without doing this with
This is necessary, because the stripes have to move as fast as possible so
that the stripes blur to gray.
He told me to do this something with sinus-waves or so, but I didn’t
understand him yet.
I would be very glad, if someone of you know how to do it.
SDL mailing list
SDL at lists.libsdl.org
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr