Transparent sprites
Just a question I''m starting to make a small opengl game I have a tiled map on screen. But now I want to render the player,objects etc, so...I can''t just texture the player to a quad since there''s stuff I don''t want to draw in there. How can I make opengl eliminate the pixels I don''t want to be drawn?
What you need is called masking. Go here for a tutorial.
----------------------------------------------------"Plant a tree. Remove a Bush" -A bumper sticker I saw.
You can just as easily use textures with an alpha layer. This would require using TGAs or another file format that has an alpha layer. These are often refered to as 32 bit textures. You can use alpha blending or clipping to do what you want.
Thanks , yeah I''m using TGAs to load the textures with a small loader I wrote. I''ll take a look at the link see if I can figure it out...If I wanted to use a tga file how would that work exactly? Sorry kinda of new to opengl here

Hey guys, I got it to work using masks but now I see a white line drawn across each sprite that is masked any ideas what might be causing this problem?
[edit]
ok never mind I had something else enabled that was causing that problem it works ok now yeah...I guess I'm just talking to myself at this point so I'm going to get some sleep...
[edited by - NullPointer33 on March 20, 2004 2:28:48 AM]
[edit]
ok never mind I had something else enabled that was causing that problem it works ok now yeah...I guess I'm just talking to myself at this point so I'm going to get some sleep...
[edited by - NullPointer33 on March 20, 2004 2:28:48 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement