[SDL] Question about RLEACCEL-Bug

Torsten Giebl wizard at syntheticsw.com
Sun Jul 1 05:47:46 PDT 2007


Hello !


>> In my game I'm using a ColorKey with activated RLE acceleration
>> (RLEACCEL). If I now try to access a pixel directly (using the
>> getpixel()-routine from the docs), I get a segfault. Without the
>> RLEACCEL-feature the game works as it should.


When using RLEACCEL the pixels are
not in their original raw form.
RLEACCEL should be used for sprites
that don't change their look.

When you need to do pixel operations on
surfaces, don't use RLEACCEL.

When Locking RLEACCEL Surfaces SDL unpacks the packed
pixelform into a normal surface, attaches that to
the pixel pointer. You then manipulate the pixels
and then call Unlock, then SDL packs this raw pixel form
into the packed RLE form and then SDL deletes the pixels surface.

All these operations combined are VERY expensive.


CU



More information about the SDL mailing list