* Authors:
* Keith Whitwell <keithw@vmware.com>
*/
-
+#include <stdbool.h>
/**
* \file t_dd_dmatmp.h
/* Pre-check the primitives in the VB to prevent the need for
* fallbacks later on.
*/
-static GLboolean TAG(validate_render)(struct gl_context *ctx,
- struct vertex_buffer *VB)
+static bool TAG(validate_render)(struct gl_context *ctx,
+ struct vertex_buffer *VB)
{
GLint i;
if (VB->ClipOrMask & ~CLIP_CULL_BIT)
- return GL_FALSE;
+ return false;
if (VB->Elts)
- return GL_FALSE;
+ return false;
for (i = 0 ; i < VB->PrimitiveCount ; i++) {
GLuint prim = VB->Primitive[i].mode;
GLuint count = VB->Primitive[i].count;
- GLboolean ok = GL_FALSE;
+ bool ok = false;
if (!count)
continue;
case GL_TRIANGLES:
case GL_TRIANGLE_STRIP:
case GL_TRIANGLE_FAN:
- ok = GL_TRUE;
+ ok = true;
break;
case GL_POLYGON:
ok = (HAVE_POLYGONS) || ctx->Light.ShadeModel == GL_SMOOTH;
VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride == 0);
break;
case GL_QUADS:
- ok = GL_TRUE; /* flatshading is ok. */
+ ok = true; /* flatshading is ok. */
break;
default:
break;
if (!ok) {
/* fprintf(stderr, "not ok %s\n", _mesa_enum_to_string(prim & PRIM_MODE_MASK)); */
- return GL_FALSE;
+ return false;
}
}
- return GL_TRUE;
+ return true;
}