GLuint point_smooth:1;
- GLubyte line_stipple_factor; /**< [1..255] only */
+ GLubyte line_stipple_factor; /**< [1..256] actually */
GLushort line_stipple_pattern;
GLfloat line_width;
GLfloat point_size; /**< used when no per-vertex size */
setup.line_smooth = ctx->Line.SmoothFlag;
setup.line_stipple_enable = ctx->Line.StippleFlag;
setup.line_stipple_pattern = ctx->Line.StipplePattern;
- setup.line_stipple_factor = ctx->Line.StippleFactor;
+ /* GL stipple factor is in [1,256], remap to [0, 255] here */
+ setup.line_stipple_factor = ctx->Line.StippleFactor - 1;
if (memcmp(&setup, &st->state.setup, sizeof(setup)) != 0) {