![]() |
|
Does allegro support tga alpha channels? |
lin lin
Member #7,251
May 2006
|
I am confused.. I can load tgas with Load_Tga just fine, but when I draw them, the transparent or alpha bits turn white... Is there a special function for Blting tgas? I can use png format if it's not support. But I am not sure if .png will produce the same results. |
Matthew Leverton
Supreme Loser
January 1999
![]() |
Anomie
Member #9,403
January 2008
![]() |
But with set_alpha_blender(), rather than set_trans_blender(). ______________ |
lin lin
Member #7,251
May 2006
|
What a useful little library... Thank you Matt... Now if only I can figure out what they do... (their explianations are a little vague...) |
Paul whoknows
Member #5,081
September 2004
![]() |
Look at the allegro examples, the example I am talking about is the one that shows a horrible picture of a disgusting rat blending and bouncing. ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
Peter Wang
Member #23
April 2000
|
Who're you calling a disgusting rat? Them's fightin' words!
|
lin lin
Member #7,251
May 2006
|
set_alpha_blender() isn't working. The whole image is gone... I draw but I see nothing... |
blargmob
Member #8,356
February 2007
![]() |
You may be drawing the whole image as transparent... --- |
Anomie
Member #9,403
January 2008
![]() |
1#include <allegro.h>
2
3int main()
4{
5 allegro_init();
6 install_keyboard();
7
8 set_color_depth(32);
9 set_gfx_mode(GFX_AUTODETECT_WINDOWED, 300,300, 0,0);
10
11 BITMAP* image = load_bitmap("image.tga", NULL);
12
13 set_alpha_blender();
14
15 draw_trans_sprite(screen, image, 100,100);
16
17 readkey();
18
19 return 0;
20}
21END_OF_MAIN()
My bet is that the source/target args are backwards. ______________ |
lin lin
Member #7,251
May 2006
|
Nope. Thanks for the help. it turns out my graphics mode was 16 bits and my image was 32. Now I have a new issue... I can't seem to use set_trans_blender at the same time as this. For example, if I wanna draw this image then use set_trans_blender to shade it a little, the alpha channels will come back... I am guessing you need to turn one off before using the other one? |
|