Let Polygon Offset be turned on and off.
authorVladimir Dergachev <volodya@freedesktop.org>
Tue, 8 Feb 2005 04:20:40 +0000 (04:20 +0000)
committerVladimir Dergachev <volodya@freedesktop.org>
Tue, 8 Feb 2005 04:20:40 +0000 (04:20 +0000)
src/mesa/drivers/dri/r300/r300_state.c

index 88318ecda44f3ab49b2f1b60c25aa217ff601083..f8d3de65d31f40e89016c8619982b0717f2bb2bc 100644 (file)
@@ -506,7 +506,11 @@ static void r300Enable(GLcontext* ctx, GLenum cap, GLboolean state)
                
        case GL_POLYGON_OFFSET_FILL:
                R300_STATECHANGE(r300, unk42B4);
-               r300->hw.unk42B4.cmd[1] = 3;
+               if(state){
+                       r300->hw.unk42B4.cmd[1] |= 3;
+                       } else {
+                       r300->hw.unk42B4.cmd[1] &= ~3;
+                       }
                break;
        case GL_VERTEX_PROGRAM_ARB:
                //TCL_FALLBACK(rmesa->glCtx, R200_TCL_FALLBACK_TCL_DISABLE, state);