/*
* Mesa 3-D graphics library
- * Version: 6.1
+ * Version: 6.5.1
*
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
*/
-/* Template for render stages which build and emit vertices directly
+/**
+ * \file t_dd_dmatmp.h
+ * Template for render stages which build and emit vertices directly
* to fixed-size dma buffers. Useful for rendering strips and other
* native primitives where clipping and per-vertex tweaks such as
* those in t_dd_tritmp.h are not required.
tmp = ALLOC_VERTS(nr+1);
tmp = TAG(emit_verts)( ctx, j, nr, tmp );
tmp = TAG(emit_verts)( ctx, start, 1, tmp );
+ (void) tmp;
}
else {
TAG(emit_verts)( ctx, j, nr, ALLOC_VERTS(nr) );
tmp = ALLOC_VERTS(2);
tmp = TAG(emit_verts)( ctx, start+1, 1, tmp );
tmp = TAG(emit_verts)( ctx, start, 1, tmp );
+ (void) tmp;
}
FLUSH();
tmp = ALLOC_VERTS( nr );
tmp = TAG(emit_verts)( ctx, start, 1, tmp );
tmp = TAG(emit_verts)( ctx, j, nr - 1, tmp );
+ (void) tmp;
currentsz = dmasz;
}
tmp = ALLOC_VERTS( nr );
tmp = TAG(emit_verts)( ctx, start, 1, tmp );
tmp = TAG(emit_verts)( ctx, j, nr - 1, tmp );
+ (void) tmp;
currentsz = dmasz;
}
FLUSH();
}
- else if (HAVE_TRI_FANS && !(ctx->_TriangleCaps & DD_FLATSHADE)) {
+ else if (HAVE_TRI_FANS && ctx->Light.ShadeModel == GL_SMOOTH) {
TAG(render_tri_fan_verts)( ctx, start, count, flags );
} else {
fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
FLUSH();
} else if (HAVE_TRI_STRIPS &&
- (ctx->_TriangleCaps & DD_FLATSHADE) &&
+ ctx->Light.ShadeModel == GL_FLAT &&
TNL_CONTEXT(ctx)->vb.ColorPtr[0]->stride) {
if (HAVE_ELTS) {
LOCAL_VARS;
/* Send v1, v2, v3
*/
tmp = EMIT_VERTS(ctx, j + 1, 3, tmp);
+ (void) tmp;
}
}
else {
tmp = ALLOC_ELTS( nr );
tmp = TAG(emit_elts)( ctx, elts+start, 1, tmp );
tmp = TAG(emit_elts)( ctx, elts+j, nr - 1, tmp );
+ (void) tmp;
FLUSH();
currentsz = dmasz;
}
FLUSH();
currentsz = dmasz;
}
- } else if (HAVE_TRI_FANS && !(ctx->_TriangleCaps & DD_FLATSHADE)) {
+ } else if (HAVE_TRI_FANS && ctx->Light.ShadeModel == GL_SMOOTH) {
TAG(render_tri_fan_verts)( ctx, start, count, flags );
} else {
fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
if (currentsz < 12)
currentsz = dmasz;
- if (ctx->_TriangleCaps & DD_FLATSHADE) {
+ if (ctx->Light.ShadeModel == GL_FLAT) {
ELT_INIT( GL_TRIANGLES );
currentsz = currentsz/6*2;
if (HAVE_POLYGONS) {
ok = GL_TRUE;
}
- else
- ok = (HAVE_TRI_FANS && !(ctx->_TriangleCaps & DD_FLATSHADE));
+ else {
+ ok = (HAVE_TRI_FANS && ctx->Light.ShadeModel == GL_SMOOTH);
+ }
break;
case GL_QUAD_STRIP:
if (VB->Elts) {
else if (HAVE_QUAD_STRIPS) {
ok = GL_TRUE;
} else if (HAVE_TRI_STRIPS &&
- (ctx->_TriangleCaps & DD_FLATSHADE) &&
+ ctx->Light.ShadeModel == GL_FLAT &&
VB->ColorPtr[0]->stride != 0) {
if (HAVE_ELTS) {
ok = (GLint) count < GET_SUBSEQUENT_VB_MAX_ELTS();