GLUT / alpha blending / texture question
I have two textures, the first has an alpha channel, and the second one doesn''t. In PSP7, I saved the black part (by selecting it with the magic wand) of the TGA to the alpha channel. In my program, I draw the first quad in the background, and map the second texture to it. I draw another quad in front of it, and map the alpha channel texture to it. I want the black part of the alpha channel texture to be invisible. What am I doing wrong?
Screenshot:
http://home.houston.rr.com/bjohnston2/texture.jpg
Code:
http://home.houston.rr.com/bjohnston2/glutfps.cpp
Thanks,
B
Here''s a screenshoot of my texture in Photoshop, with alpha channel:
http://home.houston.rr.com/bjohnston2/ps.jpg
B
http://home.houston.rr.com/bjohnston2/ps.jpg
B
The problem with your program lies with the initilization of the variables. The computer thinks that the alpha paramater is not used, but it is which causes an overloaded in memory for the graphic. This causes the computer to throw out a random "garbage" for output, which results in the garble. To fix this problem you must do some low level programming on your own (video card) to fix it.
Asmodean00
I''''m a coder who sucks.
Asmodean00
I''''m a coder who sucks.
I just did a quick check on your code but it looks like you are storing the texture with RGB as internal format. This is also something that should be done with alpha testing.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement