glColor4f( r, g, b, a) a = alpha valus…1.0 = non-transparent, 0.5 simi-transparent, 0.0 = transparent.
Originally posted by kentut:
[b]I don’t know why this code doesn’t make my sphere to be transparent.
Should I have something that’s not “Solid”? like (if there is any) glutSphere(…)?
i assume that lighting is enabled.
the alpha value used in blending with color buffer is the one registered when calling glMaterialfv(GL_FRONT, GL_DIFFUSE, …).
what value did you set ?
if it is the same than the one for ambient, the sphere will be transparent as nexusone said. you have to set the alpha to 1.0 in order to have solid object.
the solid word in glutSolidSphere mean that the sphere is rendered using filled polygons. the opposite is glutWireSphere which draw a wireframe sphere.