summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-12-10 18:11:31 -0700
committerBrian Paul <[email protected]>2008-12-10 18:11:31 -0700
commit0c31661e73dd2979df22a275452efc71c7064f81 (patch)
tree8f6347c716219b513c56d827d88f461fa62da0a6 /src/gallium/auxiliary/draw/draw_context.c
parentb716de47798defa7d22b0f15b201af6fba27f0b9 (diff)
parentd0bc5293d6e1e9c34fa822b7c2928932ed22462c (diff)
Merge commit 'origin/gallium-0.1' into gallium-0.2
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index b2a34811c2d..7bd4a2e2218 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -103,6 +103,18 @@ void draw_flush( struct draw_context *draw )
}
+/**
+ * Specify the Minimum Resolvable Depth factor for polygon offset.
+ * This factor potentially depends on the number of Z buffer bits,
+ * the rasterization algorithm and the arithmetic performed on Z
+ * values between vertex shading and rasterization. It will vary
+ * from one driver to another.
+ */
+void draw_set_mrd(struct draw_context *draw, double mrd)
+{
+ draw->mrd = mrd;
+}
+
/**
* Register new primitive rasterization/rendering state.
@@ -377,7 +389,7 @@ draw_set_mapped_element_buffer_range( struct draw_context *draw,
unsigned eltSize,
unsigned min_index,
unsigned max_index,
- void *elements )
+ const void *elements )
{
draw->pt.user.elts = elements;
draw->pt.user.eltSize = eltSize;
@@ -389,7 +401,7 @@ draw_set_mapped_element_buffer_range( struct draw_context *draw,
void
draw_set_mapped_element_buffer( struct draw_context *draw,
unsigned eltSize,
- void *elements )
+ const void *elements )
{
draw->pt.user.elts = elements;
draw->pt.user.eltSize = eltSize;