View Full Version : TRANSPARENCY AND MOUSE CONTROL PROBLEMS
06-29-2005, 11:55 AM
I am trying to make an object transparent, though I don't really know what to do here. Someone mentioned to me about the alpha level, but I don't know what the standard variable for that is, or where to look on the program I am modifying.
Also, I was responsible for making the mouse useable on a program that was originally all controlled through the keyboard. The program is for viewing 3D objects. Basically, when the user clicks on the object, he can rotate it. For some reason, the mouse controls act differently with different 3D objects I view with the program. I don't understand why.
I am trying to make an object transparent, though I don't really know what to do here.have you read the redbook?
i think the transparent object can be realized by modifying the transparency of the texture of every faces.
Maybe it can resolve your puzzle.
José Gerardo Palma Durán
06-29-2005, 10:16 PM
I enable blending, and with a texture with alpha channel, y use the next blend function
06-30-2005, 12:02 PM
I also put this in the init function.
The original code used glColor3ub, I changed it to 4ub, and gave it an alpha value of 0.5.
After that, I also added this code below it:
Though, there isn't any change. What am I doing wrong?
glColor4ub((GLubyte)(1.0),(GLubyte)(1.0),(GLubyte) (1.0),(GLubyte)(0.5));this function takes unsigned bytes [0,255]. you are passing floats.
only the floating point flavors take the normalized color components...
07-01-2005, 12:28 PM
Ah I see. Thanks for the help!
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.