[SDL] Hardware per pixel alpha blitting
krib at lappasoft.com
Fri Aug 19 12:09:37 PDT 2005
Hello, can someone show me code for loading PNG with alpha in HW surface and
blitting it using hwaccel? I am using SDL_image library (IMG_Load) to load
bmp, and although I open display in HW doublebuf mode, surfaces are never
loaded in video mem. Also on my geforce 6600 I get these caps:
vi->vfmt->Rmask, Gmask, Bmask, Amask: 63488, 2016, 31, 0
vi->vfmt->Rshift, Gshift, Bshift, Ashift: 11, 5, 0, 0
vi->vfmt->Rmask, Rloss, Gloss, Bloss, Aloss: 3, 2, 3, 8
I also tried SDL_ConvertSurface(img, img->format, SDL_HWSURFACE|SDL_HWACCEL);,
with no success.
Why is blit_hw_A 0, and blit_sw_A 0, on this card? What is the simplest way to
load png alpha (per pixel) image into video surface (and/or system mem) and
blit it using hardware acceleration? Is it possible at all? If not whats the
fastest way to blit alpha PNG?
Thank you in advance.
More information about the SDL