Lines Matching refs:ctx
37 feedback_vertex(struct gl_context * ctx, const SWvertex * v, const SWvertex * pv)
45 win[2] = v->attrib[FRAG_ATTRIB_WPOS][2] / ctx->DrawBuffer->_DepthMaxF;
48 _mesa_feedback_vertex(ctx, win, color, vtc);
56 _swrast_feedback_triangle(struct gl_context *ctx, const SWvertex *v0,
59 if (!_swrast_culltriangle(ctx, v0, v1, v2)) {
60 _mesa_feedback_token(ctx, (GLfloat) (GLint) GL_POLYGON_TOKEN);
61 _mesa_feedback_token(ctx, (GLfloat) 3); /* three vertices */
63 if (ctx->Light.ShadeModel == GL_SMOOTH) {
64 feedback_vertex(ctx, v0, v0);
65 feedback_vertex(ctx, v1, v1);
66 feedback_vertex(ctx, v2, v2);
69 feedback_vertex(ctx, v0, v2);
70 feedback_vertex(ctx, v1, v2);
71 feedback_vertex(ctx, v2, v2);
78 _swrast_feedback_line(struct gl_context *ctx, const SWvertex *v0,
82 SWcontext *swrast = SWRAST_CONTEXT(ctx);
87 _mesa_feedback_token(ctx, (GLfloat) (GLint) token);
89 if (ctx->Light.ShadeModel == GL_SMOOTH) {
90 feedback_vertex(ctx, v0, v0);
91 feedback_vertex(ctx, v1, v1);
94 feedback_vertex(ctx, v0, v1);
95 feedback_vertex(ctx, v1, v1);
103 _swrast_feedback_point(struct gl_context *ctx, const SWvertex *v)
105 _mesa_feedback_token(ctx, (GLfloat) (GLint) GL_POINT_TOKEN);
106 feedback_vertex(ctx, v, v);
111 _swrast_select_triangle(struct gl_context *ctx, const SWvertex *v0,
114 if (!_swrast_culltriangle(ctx, v0, v1, v2)) {
115 const GLfloat zs = 1.0F / ctx->DrawBuffer->_DepthMaxF;
117 _mesa_update_hitflag( ctx, v0->attrib[FRAG_ATTRIB_WPOS][2] * zs );
118 _mesa_update_hitflag( ctx, v1->attrib[FRAG_ATTRIB_WPOS][2] * zs );
119 _mesa_update_hitflag( ctx, v2->attrib[FRAG_ATTRIB_WPOS][2] * zs );
125 _swrast_select_line(struct gl_context *ctx, const SWvertex *v0, const SWvertex *v1)
127 const GLfloat zs = 1.0F / ctx->DrawBuffer->_DepthMaxF;
128 _mesa_update_hitflag( ctx, v0->attrib[FRAG_ATTRIB_WPOS][2] * zs );
129 _mesa_update_hitflag( ctx, v1->attrib[FRAG_ATTRIB_WPOS][2] * zs );
134 _swrast_select_point(struct gl_context *ctx, const SWvertex *v)
136 const GLfloat zs = 1.0F / ctx->DrawBuffer->_DepthMaxF;
137 _mesa_update_hitflag( ctx, v->attrib[FRAG_ATTRIB_WPOS][2] * zs );