Skip to main content
gamedev.net
🔒 Locked

Blending question

Started by Xano Oct 29, 2005 at 7:17 AM 11 replies 800+ views
Original Post
Xano
Xano
Hi, about the lesson 09. There it says that blending is a way of erasing the black shape around the images. I tried to do this on my own image, but then it got transparent too. Is there a way of making an image not transparent and the black shape is gone?
CRACK123
CRACK123
Yes, use alpha testing.
The more applications I write, more I find out how less I know
Xano
Xano
Erm and exactly how I do that? :P
Pipo DeClown
Pipo DeClown
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=32

Download the tutorial, it's funny game! =P
CRACK123
CRACK123
You will have to use glAlphaFunc and enable GL_ALPHA_TEST.
The more applications I write, more I find out how less I know
Xano
Xano
Could you show me the code? I don't really know how to "use" glAlphaFunc

Thanks :)
CRACK123
CRACK123
Well it would go something like this :-

glAlphaFunc(GL_GREATER, 0.1);
glEnable(GL_ALPHA_TEST);

It may or may not work for you. You can also look at what Pipo suggested.
The more applications I write, more I find out how less I know
Xano
Xano
Quote:
Original post by CRACK123
Well it would go something like this :-

glAlphaFunc(GL_GREATER, 0.1);
glEnable(GL_ALPHA_TEST);

It may or may not work for you. You can also look at what Pipo suggested.


Didn't work.. Can't any expert help me out here? :/
Xano
Xano
~bump~ please I know there is lots of experts here -.-
Xano
Xano
~bump~ ..
Xano
Xano
~bump~ ..................................................................................
dbzprogrammer
dbzprogrammer
Someone bumped a little too much...
We should do this the Microsoft way: "WAHOOOO!!! IT COMPILES! SHIP IT!"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.