PDA

View Full Version : Triangle culling problem ... ATI



Andrew Jameson
02-02-2004, 01:29 AM
Hi,
It's been reported by a few users of our application that the faces of our objects are not been drawn properly and that triangles are missing.

I've narrowed it down to ATI cards but before chasing this problem with them directly I'd appreciate comments about the following code snippet.

Essentially, I use the following piece of code to draw a square face in a glList ... it's based on Delphi but that shouldn't matter :

TopFace : array[0..3] of TGLArrayf3 =
((-1, 0, -1), (-1, 0, 1), (1, 0, -1), (1, 0, 1));
TopFaceTex : array[0..3] of TGLArrayi2 =
((0, 0), (0, 1), (1, 0), (1, 1));

glNormal3f(0.0, 1.0, 0.0);
glBegin(GL_TRIANGLE_STRIP);
for lp1 := 0 to 3 do begin
glTexCoord2iv(@TopFaceTex[lp1]);
glVertex3fv(@TopFace[lp1]);
end; {for}
glEnd;

It appears that one of the triangles is being culled.

Many thanks

Andrew