|
Displaying bitmap with alpha |
mentalDisorder
Member #13,376
August 2011
|
I'm trying to draw bitmap with alpha channel. |
Trent Gamblin
Member #261
April 2000
|
Show some code, please.
|
mentalDisorder
Member #13,376
August 2011
|
ALLEGRO_FILE *file = al_fopen("gfx/something.bmp", "r"); Drawing: |
Trent Gamblin
Member #261
April 2000
|
Allegro can't load alpha from .bmps. Use .png.
|
Matthew Leverton
Supreme Loser
January 1999
|
ALLEGRO_FILE *file = al_fopen("gfx/something.bmp", "r"); bitmap = al_load_bitmap_f(file, ".bmp"); al_fclose(file); could be written as: bitmap = al_load_bitmap("gfx/something.bmp");
|
mentalDisorder
Member #13,376
August 2011
|
oh yee I know it can be done in a shorter way, I had some issues with loading .bmps and I tried different solutions By the way, allegro5 seems not to cope with .tga files, manual says it should ? |
Trent Gamblin
Member #261
April 2000
|
It probably doesn't support every type of TGA, but it does work.
|
|