I have an OpenGL application that shows a transparent pipe and some colorful liquid that runs through it.
The picture shows the pipe empty on the left side and full on the right side.
When I change the background to white, the transparent pipe vanishes (I guess it becomes white, too due to the blending).
I use the following GL-Code:
gl.glColor4d( 240, 240, 240, 0.1); // transparent color
gl.glEnable( gl.GL_BLEND );
gl.glBlendFunc( gl.GL_SRC_ALPHA, gl.GL_ONE );
glu.gluCylinder( quadObj, width, width, length, 32, 1 );
How should I adjust the blend func (and/or color, if necessary) to achieve the same effect with a white background?