Alpha-blended Surface Blitting Works very slow. . why and how to solve?

Hi.

Alpha-blended Surface Blitting Works very slow… (framerate is downed about 60.0 to 9.0 fps…)

Alpha-blended surface is filled of about 240x420x24 scale pixels… (without rotation and zoom by sdl_gfx)

My SDL Program is run on Windows 7. (compiled by visual studio 2010, SDL 1.2)

i checked the flags ‘SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN’,

Screen Surface is set that flags and bpp is set to ‘32’ (but, ‘24 bpp’ can’t solve the problem)

why and how to solve this???

Do you have the latest drivers for your GPU?On 10 December 2012 10:59, axt32 wrote:

Hi.

Alpha-blended Surface Blitting Works very slow… (framerate is downed
about 60.0 to 9.0 fps…)

Alpha-blended surface is filled of about 240x420x24 scale pixels…
(without rotation and zoom by sdl_gfx)

My SDL Program is run on Windows 7. (compiled by visual studio 2010, SDL
1.2)

i checked the flags ‘SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN’,

Screen Surface is set that flags and bpp is set to ‘32’ (but, '24 bpp’
can’t solve the problem)

why and how to solve this???


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Are you using SDL_DisplayFormatAlpha()? Also, don’t expect really great
framerates from SDL 1.2. The new version in development, SDL 1.3, uses the
GPU whereas SDL 1.2 renders using the CPU.

Jonny DOn Mon, Dec 10, 2012 at 6:45 AM, Robin Kaup <k.robin64 at gmail.com> wrote:

Do you have the latest drivers for your GPU?

On 10 December 2012 10:59, axt32 wrote:

Hi.

Alpha-blended Surface Blitting Works very slow… (framerate is downed
about 60.0 to 9.0 fps…)

Alpha-blended surface is filled of about 240x420x24 scale pixels…
(without rotation and zoom by sdl_gfx)

My SDL Program is run on Windows 7. (compiled by visual studio 2010, SDL
1.2)

i checked the flags ‘SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN’,

Screen Surface is set that flags and bpp is set to ‘32’ (but, '24 bpp’
can’t solve the problem)

why and how to solve this???


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hello !

Alpha-blended Surface Blitting Works very slow… (framerate is downed about 60.0 to 9.0 fps…)
Alpha-blended surface is filled of about 240x420x24 scale pixels… (without rotation and zoom by sdl_gfx)
My SDL Program is run on Windows 7. (compiled by visual studio 2010, SDL 1.2)
i checked the flags ‘SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN’,
Screen Surface is set that flags and bpp is set to ‘32’ (but, ‘24 bpp’ can’t solve the problem)

why and how to solve this???

SDL 1.2 does Alpha Blending only in software, no matter if
Windows or Linux or whatever OS, the only real solution is to change
to SDL 2.0.

CU

Alpha-blended surface is filled of about 240x420x24 scale pixels…
(without rotation and zoom by sdl_gfx)

My SDL Program is run on Windows 7. (compiled by visual studio 2010, SDL
1.2)

i checked the flags ‘SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN’,

Two things can help you to solve this problem:

  1. If you already don’t do it convert all your “source” surfaces to the
    display format with SDL_DisplayFormatAlpha

  2. Use SDL_SWSURFACE and remove SDL_DOUBLEBUF, since software alpha
    blending requires reading the destination surface, sw blitting is faster if
    the destination surface is software.

As alternative use SDL 2.0 with SDL_Textures instead of SDL_Surfaces
(texture API is hardware accelerated on all architectures).–
Bye,
Gabry