Skip to main content
gamedev.net
🔒 Locked

Transparency

Started by Derilect101 3 replies 250+ views
Original Post
Derilect101
Derilect101
Just out of curiousity I have been going through the gl header files and was just curious if you can actually strip out certain colors using the blending function (aka transparent blitting) using that function. Also if there is another function built in for that would like to know.
ursa
ursa
U can try Accum function out.
Maximus
Maximus
If you mean making only certain colours transparent or translucent, you can, but not through OpenGL. When you load the texture, do a sweep over every pixel and check its rgb value, and if its the colour you want transparent, then alter its alpha value.
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack
The Kid
The Kid
Maximus, how would you go about doing that ?


Edited by - The Kid on April 18, 2001 11:09:02 PM
I don''t know what the future holds, but I know who holds the future.
Derilect101
Derilect101
It was posted in another section after you load in your graphics image go through the image data and if the color in the image data is the same as the one you want transparent then add another bit to it and alter the value to it just so later you can tell if its transparent. So basically making a 24 bit image to a 32 bit just adding the extra alpha channel to it RGBA

Topic Locked

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

Sign in to reply to this topic.