At first execuse for my english and for my wrong stylized questions too.
exists sdl_gfx library for delphi (or similar lib)? I can’t find this
library (Google can’t help me ), please if you know about sdl_gfx (or
anything similar) for delphi write me link pls.
My second question is about displaying images with alpha channel to
hardware surface, it’s too slow. I know, in archive of this forum are much
answers for this question but i misunderstand. Please can me anybody here
write (in basic english if it possible ) how can i fast blit image with
alpha to hw surface?
My (delphi) code is:
screen := SDL_SetVideoMode(w, h, bpp, SDL_HWSURFACE or SDL_DOUBLEBUF or
Image := LoadImage(‘my-image.png’);
SDL_SetColorKey(Image, SDL_RLEACCEL or SDL_SRCCOLORKEY,
SDL_MapRGB(Image.format, 255, 0, 228));
SDL_SetAlpha(Image, SDL_SRCALPHA, 128);
Image := SDL_DisplayFormat(Image);
SDL_BlitSurface(Image, @SrcRect, Screen, @DstRect);
I use png images without alpha. This code is function but to slow. When i
use sw surface blit alpha image is faster, but all other is slowly Can i
fast blit alpha image to hw surface?