I have a rather strange effect when rendering a composition using the iMac, which have a NVIDIA GeForce 7600 GT graphic card. Using exactly the same code this effect doesn't show when running the program on a MacBookPro with the ATY,RadeonX1600 graphic card.
The problem appear when rendering using transparency for the cylindrical object shown in blue in the image below: the iMac image show the lines making up the wireframe while the MacBookPro renders the scene as expected. It seems obvious that the behavior of both cards is different for the same function calls.
Anyone has a hint to solve this? Just in case I tried to set the line width to 0.0 before using the transparency but it makes no effect, the problem persists.
The settings for drawing the objects are quite standard:
aglSetCurrentContext (aglContext);
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
aglSetCurrentContext (aglContext);
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glClearColor (agl.clColor.x, agl.clColor.y, agl.clColor.z,agl.clColor.u); // clear the surface to black opaque
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glDisable(GL_CULL_FACE); // draw inside of surface
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
//........... here I draw sevral object before the cylinder, and now the cylinders:
glPushMatrix();
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
glDisable(GL_CULL_FACE); // do notdraw inside of surface
glEnable(GL_BLEND);
glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE,(GLfloat *) &aglbr.mat_ambient.x); //set the object color
glCallList (cylList); // the cyl in question list
glPopMatrix();
aglSwapBuffers(aglContext); // send swap command
the lis is generated in a standard manner using quads:
cylList=glGenLists(1);
glNewList(lid, GL_COMPILE);
glBegin (GL_QUADS); //detailed way of drawing axis arrow-cones
i=0;
while (i<nsides-1)
{j=0;
while (j<=currentBMachine.SrcPositions)
{vt=*vtH+j*nsides;
glNormal3fv(&normc[i].x);
glVertex3fv(&(vt+i)->x);
glNormal3fv(&normc[i].x);
glVertex3fv(&(vt+i+nsides)->x);
glNormal3fv(&normc[i+1].x);
glVertex3fv(&(vt+i+nsides+1)->x);
glNormal3fv(&normc[i+1].x);
glVertex3fv(&(vt+i+1)->x);
j++;
}
i++;
}
glEnd();
glEndList();