mesa: refactor: move _mesa_is_color/depth/stencil_format() helpers to image.c
[mesa.git] / src / mesa / main / lines.c
index dc7195d4ebf7389600c0b54c1cab5bdd8bb892b0..81d0d33abb405ab9fd1ad5fbb246daedb447b213 100644 (file)
@@ -55,9 +55,11 @@ _mesa_LineWidth( GLfloat width )
 
    FLUSH_VERTICES(ctx, _NEW_LINE);
    ctx->Line.Width = width;
-   ctx->Line._Width = CLAMP(width,
-                           ctx->Const.MinLineWidth,
-                           ctx->Const.MaxLineWidth);
+
+   if (width != 1.0F)
+      ctx->_TriangleCaps |= DD_LINE_WIDTH;
+   else
+      ctx->_TriangleCaps &= ~DD_LINE_WIDTH;
 
    if (ctx->Driver.LineWidth)
       ctx->Driver.LineWidth(ctx, width);
@@ -105,13 +107,12 @@ _mesa_LineStipple( GLint factor, GLushort pattern )
  * Initializes __GLcontextRec::Line and line related constants in
  * __GLcontextRec::Const.
  */
-void GLAPIENTRY _mesa_init_line( GLcontext * ctx )
+void GLAPIENTRY
+_mesa_init_line( GLcontext * ctx )
 {
-   /* Line group */
    ctx->Line.SmoothFlag = GL_FALSE;
    ctx->Line.StippleFlag = GL_FALSE;
    ctx->Line.Width = 1.0;
-   ctx->Line._Width = 1.0;
    ctx->Line.StipplePattern = 0xffff;
    ctx->Line.StippleFactor = 1;
 }