View Full Version : Translucent cylinder
08-31-2004, 04:04 AM
Is there any way to apply a gradient translucency to a gluCylinder? What I want is a cylinder that is completely opaque at one end and completely transparent at the other. The only way I've come across performing such gradient fills is by specifying vertices with the transparency at each one but how do I do this with gluCylinder?
08-31-2004, 06:08 AM
Create a 32bit RGBA texture that is the gradient you want. for example you could use the gradient tool in photoshop and create a texture going from white to transparent (white is a good choice because then you can choose the color in OpenGL space using a call to glColor* before you render the cylinder).
apply this texture to your cylinder using GL_MODULATE and voila, you've got your cylinder going from opaque to transparent.
09-01-2004, 11:51 PM
Is there any chance you could post an example? From what you say it sounds very easy, but I've had a look at a couple of tutorials which make texture mapping look fairly involved... I need a quick solution ;-)
I downloaded Photoshop Tryout Version 6 but there doesn't seem to be an option to save anything... do you know of any other package I could try which lets me create textures? (preferably one that's free for download)
09-02-2004, 01:36 AM
09-02-2004, 04:03 AM
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.