i am drawing two objects the first one is opaque , and the second one is semi transparent on a black
the alpha factor of the opaque object is 1.0 and of the transparent one is 0.5
i have the following problem :
if i use the blending functions :
glBlendFunc (GL_SRC_ALPHA, GL_ONE);
I see only the opaque object and not the transparent one.
if i use :
glBlendFunc(GL_ONE ,GL_ONE);
both objects appear but when they are one in front of the other
the blended pixels turns white, and the transparent object turns white also in some angles when is just
against the black background.(as if it reflects to much light even that the specular component is disabled)
if i use:
I get good results when the transparent object is in front of the opaque object, but when the transparent
object is on the black background it disappears !!! (if i change the color of the background to white
it works great, but I need it black…)
the display function is :

GLfloat SurfaceColor[4];

// Erase last list
if (m_ListOpenGL)
if (glIsList(m_ListOpenGL))

// Search for a new list
m_ListOpenGL = ::glGenLists(1);
if(m_ListOpenGL == 0)
return 0;

// Start list
unsigned int NbVertex = (unsigned int)m_ArrayVertex.GetSize();
return 0;

unsigned int NbFace = (unsigned int)m_ArrayFace.GetSize();
return 0;

CFace3d* pFace;
CVector3d* pVector;
CColor* pColorPrevious;


//the alph value of the mesh
if(m_fTransperentLevel< 1.0)
//both objects appear but when are one in fron of the
//the blendind turns white, and the transparent object is
//white in some angles.
//glBlendFunc(GL_ONE ,GL_ONE);
//only the solid object appear, the transperent isn’t
//glBlendFunc (GL_SRC_ALPHA, GL_ONE);
//works good but dissapear in black backround
//turn off the depth buffer
glDepthMask (GL_FALSE);

// Init color
pFace = m_ArrayFace[0];
pColorPrevious = pFace->GetColor();

// form the first two vertices of the N-2 triangle strip.
SurfaceColor[0] = (float)1 / (float)255 * (float)pFace->v(0)->GetColor()->r();
SurfaceColor[1] = (float)1 / (float)255 * (float)pFace->v(0)->GetColor()->g();
SurfaceColor[2] = (float)1 / (float)255 * (float)pFace->v(0)->GetColor()->b();
SurfaceColor[3] = m_fTransperentLevel;
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, SurfaceColor);

pVector = pFace->v(0)->GetNormal();
pVector = pFace->v(1)->GetNormal();

for(unsigned int i=0; i< NbFace-1; i++)
pFace = m_ArrayFace[i];
// Normal (per face)
if(m_NormalBinding == NORMAL_PER_FACE)
pVector = pFace->GetNormal();
// Color (per face)
if(m_ColorBinding == COLOR_PER_FACE &&
pColorPrevious != pFace->GetColor())
pColorPrevious = pFace->GetColor();
// Normal
if(m_NormalBinding == NORMAL_PER_VERTEX)
pVector = pFace->v(2)->GetNormal
// Color (per vertex)
if(m_ColorBinding == COLOR_PER_VERTEX &&
pColorPrevious != pFace->v(2)->GetColor())
SurfaceColor[0] = (float)1 /
(float)255 * (float)pFace->v(2)->GetColor()->r();
SurfaceColor[1] = (float)1 /
(float)255 * (float)pFace->v(2)->GetColor()->g();
SurfaceColor[2] = (float)1 /
(float)255 * (float)pFace->v(2)->GetColor()->b();
SurfaceColor[3] =
if(m_fTransperentLevel< 1.0)
//change the transperent
//object color from the
//original color
SurfaceColor[0] -= 0.4;
if(SurfaceColor[0] < 0)
SurfaceColor[0] = 0;
SurfaceColor[1] -= 0.3;
if(SurfaceColor[1] < 0)
SurfaceColor[1] = 0;
SurfaceColor[2] -= 0.1;
if(SurfaceColor[2] < 0)
SurfaceColor[2] = 0;


      pColorPrevious = pFace-&gt;v(2)-&gt;GetColor();

      // Vertex     
 //complete the last ring triangle strip
 pFace = m_ArrayFace[i-39];
 pVector = pFace-&gt;v(1)-&gt;GetNormal();
 pVector = pFace-&gt;v(2)-&gt;GetNormal();
 pFace = m_ArrayFace[i-37];
 pVector = pFace-&gt;v(1)-&gt;GetNormal();

 if(m_fTransperentLevel&lt; 1.0)
      glDepthMask (GL_TRUE);

 // List is done now
 m_ListDone = TRUE;
 m_Modified = FALSE;
 return 1;

any ideas ???
thanks in advance

hmmm, nothing specific, but don’t use GL_COMPILE_AND_EXECUTE, I seem to rememeber it being very broken. Instead use GL_COMPILE, and then call the list with glCallList();