From b755a2d9de5b7977c410a904a8adb7c07c88f82a Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 11 Jul 2007 16:19:51 -0600 Subject: Minor clean-up of polygon offset logic. Properly compute _MRD field. --- src/mesa/main/framebuffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/framebuffer.c') diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index 1fd31a5321..dc10d9ffbc 100644 --- a/src/mesa/main/framebuffer.c +++ b/src/mesa/main/framebuffer.c @@ -65,7 +65,9 @@ compute_depth_max(struct gl_framebuffer *fb) fb->_DepthMax = 0xffffffff; } fb->_DepthMaxF = (GLfloat) fb->_DepthMax; - fb->_MRD = 1.0; /* Minimum resolvable depth value, for polygon offset */ + + /* Minimum resolvable depth value, for polygon offset */ + fb->_MRD = 1.0 / fb->_DepthMaxF; } -- cgit v1.2.3