- glBegin(GL_TRIANGLES);
- for i:=0 {TRXLOD[0].FirstObj} to 1 {TRXLOD[0].FirstObj+TRXLOD[0].NumObj-1} do begin
- glBindTexture(GL_TEXTURE_2D, Texture[TRXObjects[i].MatID]);
- for j:=FirstFace[i] to FirstFace[i]+TRXObjects[i].FaceCount-1 do
- for k:=3 downto 1 do begin
- glColor3f(GetRValue(MTL[TRXObjects[i].MatID].Diffuse),
- GetGValue(MTL[TRXObjects[i].MatID].Diffuse),
- GetBValue(MTL[TRXObjects[i].MatID].Diffuse));
- glTexCoord2fv(@TRXPoints[TRXFaces[j,k]].U2);
- glNormal3f(TRXPoints[TRXFaces[j,k]].nX/128-1,
- TRXPoints[TRXFaces[j,k]].nY/128-1,
- TRXPoints[TRXFaces[j,k]].nZ/128-1);
- glVertex3fv(@TRXPoints[TRXFaces[j,k]].X);
- end;
- end;
- glEnd;