View Full Version : Transparency

05-07-2001, 02:48 AM
Does anyone know the easiest way to make a shpere (or any other object) looks transparent? I think I may have to do something with alpha value, but I am not sure. I do not want a completely transparent. I actually want a blue sphere that I can still see what is inside of it. So, it would be a semi-transparent sphere. Thanks for any input.

05-07-2001, 03:27 AM
change your alpha value.
alpha is <hand wavvy here> "transparency". actually, its not really. well, its argubably a reflection on how much light a given pixel contributes to the final scene, which isn't QUITE the same thing (insofar as opaque surfaces can have non-one alpha values).

it all depends on your blending modes, of course, but set an alpha to be non-one and you should see stuff 'appenin', man. <nods>


05-07-2001, 03:34 AM
Hi, i think the easyest and fastest way to draw a transparent sphere is not to draw it!
It is fast and 100% transparent. http://www.opengl.org/discussion_boards/ubb/cool.gif

05-07-2001, 05:25 AM
for making a transparent object, do i have to set a blending mode in the initgl function? and how do i do that? (apart from changing the alpha value to 0.5 or less)


05-07-2001, 03:46 PM

well, you can set the blend function anytime you want with the

glBlendFunc(..., ...);

there are man pages on this stuff all over the shop for parameter modes.


05-07-2001, 03:59 PM
Hmmm, not exactly anytime john. You can't call glBlendFunc inbetween a glBegin/glEnd pair. I figured since you want to play topic police lately, I could play detail police. http://www.opengl.org/discussion_boards/ubb/wink.gif

05-07-2001, 06:23 PM
well, yes, this is true. but my point was it wasn't something that could ONLY be done at init, and then never again.

what's this about topic police? I only get slighty narky about guys who post non-relevent non-opengl stuff to an opengl usegroup. its hardly being unreasonable.

you are right, of course. no state changes between glbegin/glend pairs. <looks stern> =)


Tim Stirling
05-07-2001, 11:01 PM
This reply is unrelated!