• Home
  • Raw
  • Download

Lines Matching full:line

27  * Antialiased line template.
32 * Function to render each fragment in the AA line.
37 NAME(plot)(struct gl_context *ctx, struct LineInfo *line, int ix, int iy) in NAME()
42 const GLfloat coverage = compute_coveragef(line, ix, iy); in NAME()
43 const GLuint i = line->span.end; in NAME()
50 line->span.end++; in NAME()
51 line->span.array->coverage[i] = coverage; in NAME()
52 line->span.array->x[i] = ix; in NAME()
53 line->span.array->y[i] = iy; in NAME()
60 line->span.array->z[i] = (GLuint) solve_plane(fx, fy, line->zPlane); in NAME()
62 line->span.array->rgba[i][RCOMP] = solve_plane_chan(fx, fy, line->rPlane); in NAME()
63 line->span.array->rgba[i][GCOMP] = solve_plane_chan(fx, fy, line->gPlane); in NAME()
64 line->span.array->rgba[i][BCOMP] = solve_plane_chan(fx, fy, line->bPlane); in NAME()
65 line->span.array->rgba[i][ACOMP] = solve_plane_chan(fx, fy, line->aPlane); in NAME()
68 GLfloat (*attribArray)[4] = line->span.array->attribs[attr]; in NAME()
73 const GLfloat invQ = solve_plane_recip(fx, fy, line->attrPlane[attr][3]); in NAME()
76 attribArray[i][c] = solve_plane(fx, fy, line->attrPlane[attr][c]) * invQ; in NAME()
78 line->span.array->lambda[unit][i] in NAME()
79 = compute_lambda(line->attrPlane[attr][0], in NAME()
80 line->attrPlane[attr][1], invQ, in NAME()
81 line->texWidth[attr], line->texHeight[attr]); in NAME()
85 const GLfloat invW = solve_plane_recip(fx, fy, line->wPlane); in NAME()
88 attribArray[i][c] = solve_plane(fx, fy, line->attrPlane[attr][c]) * invW; in NAME()
94 if (line->span.end == SWRAST_MAX_WIDTH) { in NAME()
95 _swrast_write_rgba_span(ctx, &(line->span)); in NAME()
96 line->span.end = 0; /* reset counter */ in NAME()
103 * Line setup
106 NAME(line)(struct gl_context *ctx, const SWvertex *v0, const SWvertex *v1) in NAME() argument
109 GLfloat tStart, tEnd; /* segment start, end along line length */ in NAME()
114 struct LineInfo line; in NAME() local
115 line.x0 = v0->attrib[VARYING_SLOT_POS][0]; in NAME()
116 line.y0 = v0->attrib[VARYING_SLOT_POS][1]; in NAME()
117 line.x1 = v1->attrib[VARYING_SLOT_POS][0]; in NAME()
118 line.y1 = v1->attrib[VARYING_SLOT_POS][1]; in NAME()
119 line.dx = line.x1 - line.x0; in NAME()
120 line.dy = line.y1 - line.y0; in NAME()
121 line.len = sqrtf(line.dx * line.dx + line.dy * line.dy); in NAME()
122 line.halfWidth = 0.5F * CLAMP(ctx->Line.Width, in NAME()
126 if (line.len == 0.0F || IS_INF_OR_NAN(line.len)) in NAME()
129 INIT_SPAN(line.span, GL_LINE); in NAME()
130 line.span.arrayMask = SPAN_XY | SPAN_COVERAGE; in NAME()
131 line.span.facing = swrast->PointLineFacing; in NAME()
132 line.xAdj = line.dx / line.len * line.halfWidth; in NAME()
133 line.yAdj = line.dy / line.len * line.halfWidth; in NAME()
136 line.span.arrayMask |= SPAN_Z; in NAME()
137 compute_plane(line.x0, line.y0, line.x1, line.y1, in NAME()
138 v0->attrib[VARYING_SLOT_POS][2], v1->attrib[VARYING_SLOT_POS][2], line.zPlane); in NAME()
140 line.span.arrayMask |= SPAN_RGBA; in NAME()
142 compute_plane(line.x0, line.y0, line.x1, line.y1, in NAME()
143 v0->color[RCOMP], v1->color[RCOMP], line.rPlane); in NAME()
144 compute_plane(line.x0, line.y0, line.x1, line.y1, in NAME()
145 v0->color[GCOMP], v1->color[GCOMP], line.gPlane); in NAME()
146 compute_plane(line.x0, line.y0, line.x1, line.y1, in NAME()
147 v0->color[BCOMP], v1->color[BCOMP], line.bPlane); in NAME()
148 compute_plane(line.x0, line.y0, line.x1, line.y1, in NAME()
149 v0->color[ACOMP], v1->color[ACOMP], line.aPlane); in NAME()
152 constant_plane(v1->color[RCOMP], line.rPlane); in NAME()
153 constant_plane(v1->color[GCOMP], line.gPlane); in NAME()
154 constant_plane(v1->color[BCOMP], line.bPlane); in NAME()
155 constant_plane(v1->color[ACOMP], line.aPlane); in NAME()
161 line.span.arrayMask |= SPAN_LAMBDA; in NAME()
162 compute_plane(line.x0, line.y0, line.x1, line.y1, invW0, invW1, line.wPlane); in NAME()
167 constant_plane(v1->attrib[attr][c], line.attrPlane[attr][c]); in NAME()
174 compute_plane(line.x0, line.y0, line.x1, line.y1, a0, a1, in NAME()
175 line.attrPlane[attr][c]); in NAME()
178 line.span.arrayAttribs |= BITFIELD64_BIT(attr); in NAME()
184 line.texWidth[attr] = (GLfloat) texImage->Width; in NAME()
185 line.texHeight[attr] = (GLfloat) texImage->Height; in NAME()
193 iLen = (GLint) line.len; in NAME()
195 if (ctx->Line.StippleFlag) { in NAME()
197 const GLuint bit = (swrast->StippleCounter / ctx->Line.StippleFactor) & 0xf; in NAME()
198 if ((1 << bit) & ctx->Line.StipplePattern) { in NAME()
200 const GLfloat t = (GLfloat) i / (GLfloat) line.len; in NAME()
215 segment(ctx, &line, NAME(plot), tStart, tEnd); in NAME()
226 /* draw the final segment of the line */ in NAME()
227 segment(ctx, &line, NAME(plot), tStart, 1.0F); in NAME()
232 segment(ctx, &line, NAME(plot), 0.0, 1.0); in NAME()
235 _swrast_write_rgba_span(ctx, &(line.span)); in NAME()