* tristrips, lineloops to linestrips), or to indexed vertices.
*/
-#if !HAVE_TRIANGLES || !HAVE_LINES || !HAVE_LINE_STRIPS
-#error "must have lines, line strips, and triangles to use render template"
+#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"
#endif
#if HAVE_QUAD_STRIPS || HAVE_QUADS
GLuint count,
GLuint flags )
{
- if (HAVE_TRI_STRIPS) {
LOCAL_VARS;
GLuint j, nr;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
}
FLUSH();
-
- } else {
- fprintf(stderr, "%s - cannot draw primitive\n", __func__);
- return;
- }
}
static void TAG(render_tri_fan_verts)( struct gl_context *ctx,
{
GLuint j, nr;
- if (HAVE_TRI_STRIPS &&
- ctx->Light.ShadeModel == GL_FLAT &&
+ if (ctx->Light.ShadeModel == GL_FLAT &&
TNL_CONTEXT(ctx)->vb.AttribPtr[_TNL_ATTRIB_COLOR0]->stride) {
if (HAVE_ELTS) {
LOCAL_VARS;
return;
}
}
- else if (HAVE_TRI_STRIPS) {
+ else {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
int currentsz;
}
FLUSH();
-
- } else {
- fprintf(stderr, "%s - cannot draw primitive\n", __func__);
- return;
}
}
GLuint count,
GLuint flags )
{
- if (HAVE_TRI_STRIPS) {
LOCAL_VARS;
GLuint j, nr;
GLuint *elts = TNL_CONTEXT(ctx)->vb.Elts;
FLUSH();
currentsz = dmasz;
}
- } else {
- /* TODO: try to emit as indexed triangles */
- fprintf(stderr, "%s - cannot draw primitive\n", __func__);
- return;
- }
}
static void TAG(render_tri_fan_elts)( struct gl_context *ctx,
GLuint count,
GLuint flags )
{
- if (HAVE_TRI_STRIPS) {
LOCAL_VARS;
GLuint *elts = TNL_CONTEXT(ctx)->vb.Elts;
int dmasz = GET_SUBSEQUENT_VB_MAX_ELTS();
currentsz = dmasz;
}
}
- }
}
ok = GL_TRUE;
break;
case GL_TRIANGLE_STRIP:
- ok = HAVE_TRI_STRIPS;
+ ok = GL_TRUE;
break;
case GL_TRIANGLE_FAN:
ok = HAVE_TRI_FANS;
break;
case GL_QUAD_STRIP:
if (VB->Elts) {
- ok = HAVE_TRI_STRIPS;
- } else if (HAVE_TRI_STRIPS &&
- ctx->Light.ShadeModel == GL_FLAT &&
+ ok = GL_TRUE;
+ } else if (ctx->Light.ShadeModel == GL_FLAT &&
VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride != 0) {
if (HAVE_ELTS) {
ok = (GLint) count < GET_SUBSEQUENT_VB_MAX_ELTS();
}
}
else
- ok = HAVE_TRI_STRIPS;
+ ok = GL_TRUE;
break;
case GL_QUADS:
if (HAVE_ELTS) {