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.

I enable blending, and with a texture with alpha channel, y use the next blend function


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?

this function takes unsigned bytes [0,255]. you are passing floats.

try glColor4ub(255,255,255,128);

only the floating point flavors take the normalized color components…

Ah I see. Thanks for the help!