Merge branch 'llvm-cliptest-viewport'
[mesa.git] / src / mesa / main / lines.c
index 0c2dbf915a1901503bb9a7f8867e902601e0c7ed..505f840ba5a659e1f86bef1a76c28883cacbe155 100644 (file)
 
 #include "glheader.h"
 #include "context.h"
-#include "depth.h"
 #include "lines.h"
 #include "macros.h"
-#include "texstate.h"
 #include "mtypes.h"
 
 
@@ -56,6 +54,11 @@ _mesa_LineWidth( GLfloat width )
    FLUSH_VERTICES(ctx, _NEW_LINE);
    ctx->Line.Width = width;
 
+   if (width != 1.0F)
+      ctx->_TriangleCaps |= DD_LINE_WIDTH;
+   else
+      ctx->_TriangleCaps &= ~DD_LINE_WIDTH;
+
    if (ctx->Driver.LineWidth)
       ctx->Driver.LineWidth(ctx, width);
 }
@@ -99,11 +102,11 @@ _mesa_LineStipple( GLint factor, GLushort pattern )
  *
  * \param ctx GL context.
  *
- * Initializes __GLcontextRec::Line and line related constants in
- * __GLcontextRec::Const.
+ * Initializes __struct gl_contextRec::Line and line related constants in
+ * __struct gl_contextRec::Const.
  */
 void GLAPIENTRY
-_mesa_init_line( GLcontext * ctx )
+_mesa_init_line( struct gl_context * ctx )
 {
    ctx->Line.SmoothFlag = GL_FALSE;
    ctx->Line.StippleFlag = GL_FALSE;