* tristrips, lineloops to linestrips), or to indexed vertices.
*/
-#if !HAVE_TRIANGLES || !HAVE_LINES || !HAVE_LINE_STRIPS || !HAVE_TRI_STRIPS
-#error "must have lines, line strips, triangles, and triangle strips to use render template"
+#if !HAVE_TRIANGLES || !HAVE_LINES || !HAVE_LINE_STRIPS || !HAVE_TRI_STRIPS || !HAVE_TRI_FANS
+#error "must have lines, line strips, triangles, triangle fans, and triangle strips to use render template"
#endif
#if HAVE_QUAD_STRIPS || HAVE_QUADS
GLuint count,
GLuint flags )
{
- if (HAVE_TRI_FANS) {
LOCAL_VARS;
GLuint j, nr;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
}
FLUSH();
- }
- else {
- /* Could write code to emit these as indexed vertices (for the
- * g400, for instance).
- */
- fprintf(stderr, "%s - cannot draw primitive\n", __func__);
- return;
- }
}
FLUSH();
}
- else if (HAVE_TRI_FANS && ctx->Light.ShadeModel == GL_SMOOTH) {
+ else if (ctx->Light.ShadeModel == GL_SMOOTH) {
TAG(render_tri_fan_verts)( ctx, start, count, flags );
} else {
fprintf(stderr, "%s - cannot draw primitive\n", __func__);
GLuint count,
GLuint flags )
{
- if (HAVE_TRI_FANS) {
LOCAL_VARS;
GLuint *elts = TNL_CONTEXT(ctx)->vb.Elts;
GLuint j, nr;
FLUSH();
currentsz = dmasz;
}
- } else {
- /* TODO: try to emit as indexed triangles */
- fprintf(stderr, "%s - cannot draw primitive\n", __func__);
- return;
- }
}
FLUSH();
currentsz = dmasz;
}
- } else if (HAVE_TRI_FANS && ctx->Light.ShadeModel == GL_SMOOTH) {
+ } else if (ctx->Light.ShadeModel == GL_SMOOTH) {
TAG(render_tri_fan_verts)( ctx, start, count, flags );
} else {
fprintf(stderr, "%s - cannot draw primitive\n", __func__);
ok = GL_TRUE;
break;
case GL_TRIANGLE_FAN:
- ok = HAVE_TRI_FANS;
+ ok = GL_TRUE;
break;
case GL_POLYGON:
if (HAVE_POLYGONS) {
ok = GL_TRUE;
}
else {
- ok = (HAVE_TRI_FANS && ctx->Light.ShadeModel == GL_SMOOTH);
+ ok = (ctx->Light.ShadeModel == GL_SMOOTH);
}
break;
case GL_QUAD_STRIP: