diff options
author | Brian <brian.paul@tungstengraphics.com> | 2008-01-22 10:16:30 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2008-01-22 10:17:28 -0700 |
commit | f1fb69a6e52260193ec16a9820a66e3e4bb03edd (patch) | |
tree | bf34e88d6e43af1a96f650fda6e940a26d4b21fd /src/mesa/pipe/draw/draw_context.c | |
parent | 7049ff53f640aeccc9523a103468183ffda996fd (diff) |
gallium: Added FORMAT_1F_PSIZE to insert constant point size into vertices
Also, added draw_convert_wide_points/lines() so a driver can tell the draw
module whether to convert wide points/lines into triangles, or just pass
them through.
Diffstat (limited to 'src/mesa/pipe/draw/draw_context.c')
-rw-r--r-- | src/mesa/pipe/draw/draw_context.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/mesa/pipe/draw/draw_context.c b/src/mesa/pipe/draw/draw_context.c index e08873c5e1..5b9ea55630 100644 --- a/src/mesa/pipe/draw/draw_context.c +++ b/src/mesa/pipe/draw/draw_context.c @@ -71,7 +71,7 @@ struct draw_context *draw_create( void ) */ { uint i; - char *tmp = MALLOC( Elements(draw->vcache.vertex) * MAX_VERTEX_SIZE ); + char *tmp = (char*) MALLOC( Elements(draw->vcache.vertex) * MAX_VERTEX_SIZE ); for (i = 0; i < Elements(draw->vcache.vertex); i++) draw->vcache.vertex[i] = (struct vertex_header *)(tmp + i * MAX_VERTEX_SIZE); @@ -82,6 +82,9 @@ struct draw_context *draw_create( void ) draw->attrib_front1 = 0; draw->attrib_back1 = 0; + draw->convert_wide_points = TRUE; + draw->convert_wide_lines = TRUE; + draw->prim = ~0; /* != any of PIPE_PRIM_x */ draw_vertex_cache_invalidate( draw ); @@ -217,6 +220,26 @@ draw_set_mapped_constant_buffer(struct draw_context *draw, } +/** + * Tells the draw module whether to convert wide points (size != 1) + * into triangles. + */ +void +draw_convert_wide_points(struct draw_context *draw, boolean enable) +{ + draw->convert_wide_points = enable; +} + + +/** + * Tells the draw module whether to convert wide lines (width != 1) + * into triangles. + */ +void +draw_convert_wide_lines(struct draw_context *draw, boolean enable) +{ + draw->convert_wide_lines = enable; +} |