-
/*
* Mesa 3-D graphics library
- * Version: 4.0.3
+ * Version: 6.5.1
*
- * Copyright (C) 1999-2002 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_dmatmp2.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.
CLOSE_ELTS();
}
}
- else if (HAVE_TRI_STRIP_1)
- EMIT_PRIM( ctx, GL_TRIANGLE_STRIP, HW_TRIANGLE_STRIP_1, start, count );
- else {
- /* Emit the first triangle with elts, then the rest as a regular strip.
- * TODO: Make this unlikely in t_imm_api.c
- */
- ELT_TYPE *dest;
-
- ELT_INIT( GL_TRIANGLES, HW_TRIANGLES );
- dest = ALLOC_ELTS( 3 );
- EMIT_ELT( dest, 0, (start+1) );
- EMIT_ELT( dest, 1, (start+0) );
- EMIT_ELT( dest, 2, (start+2) );
- dest += 3;
- CLOSE_ELTS();
-
- start++;
- if (start + 2 >= count)
- return;
-
- EMIT_PRIM( ctx, GL_TRIANGLE_STRIP, HW_TRIANGLE_STRIP_0, start,
- count );
- }
+ else
+ EMIT_PRIM( ctx, GL_TRIANGLE_STRIP, HW_TRIANGLE_STRIP_0, start, count );
}
static void TAG(render_tri_fan_verts)( GLcontext *ctx,
if (HAVE_QUAD_STRIPS) {
EMIT_PRIM( ctx, GL_QUAD_STRIP, HW_QUAD_STRIP, start, count );
}
- else if (ctx->_TriangleCaps & DD_FLATSHADE) {
+ else if (ctx->Light.ShadeModel == GL_FLAT) {
LOCAL_VARS;
int dmasz = GET_MAX_HW_ELTS();
GLuint j, nr;
return;
if (HAVE_QUADS) {
- EMIT_PRIM( ctx, HW_QUADS, GL_QUADS, start, count );
+ EMIT_PRIM( ctx, GL_QUADS, HW_QUADS, start, count );
}
else {
/* Hardware doesn't have a quad primitive type -- simulate it
-static render_func TAG(render_tab_verts)[GL_POLYGON+2] =
+static tnl_render_func TAG(render_tab_verts)[GL_POLYGON+2] =
{
TAG(render_points_verts),
TAG(render_lines_verts),
dmasz -= dmasz & 1;
count -= (count-start) & 1;
- if (ctx->_TriangleCaps & DD_FLATSHADE) {
+ if (ctx->Light.ShadeModel == GL_FLAT) {
ELT_INIT( GL_TRIANGLES, HW_TRIANGLES );
dmasz = dmasz/6*2;
-static render_func TAG(render_tab_elts)[GL_POLYGON+2] =
+static tnl_render_func TAG(render_tab_elts)[GL_POLYGON+2] =
{
TAG(render_points_elts),
TAG(render_lines_elts),