- if (gl_cull_triangle( ctx, v0, v1, v2 )) {
- FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_POLYGON_TOKEN );
- FEEDBACK_TOKEN( ctx, (GLfloat) 3 ); /* three vertices */
-
- feedback_vertex( ctx, v0 );
- feedback_vertex( ctx, v1 );
- feedback_vertex( ctx, v2 );
+ if (_swrast_culltriangle(ctx, v0, v1, v2)) {
+ FEEDBACK_TOKEN(ctx, (GLfloat) (GLint) GL_POLYGON_TOKEN);
+ FEEDBACK_TOKEN(ctx, (GLfloat) 3); /* three vertices */
+
+ if (ctx->Light.ShadeModel == GL_SMOOTH) {
+ feedback_vertex(ctx, v0, v0);
+ feedback_vertex(ctx, v1, v1);
+ feedback_vertex(ctx, v2, v2);
+ }
+ else {
+ feedback_vertex(ctx, v0, v2);
+ feedback_vertex(ctx, v1, v2);
+ feedback_vertex(ctx, v2, v2);
+ }