Lines Matching refs:ctx
50 typedef void (* swsetup_edge_render_prim_tri)(struct gl_context *ctx,
63 _swsetup_edge_render_line_tri(struct gl_context *ctx,
72 SScontext *swsetup = SWSETUP_CONTEXT(ctx);
75 if (ef[e2]) _swrast_Line( ctx, v2, v0 );
76 if (ef[e0]) _swrast_Line( ctx, v0, v1 );
77 if (ef[e1]) _swrast_Line( ctx, v1, v2 );
79 if (ef[e0]) _swrast_Line( ctx, v0, v1 );
80 if (ef[e1]) _swrast_Line( ctx, v1, v2 );
81 if (ef[e2]) _swrast_Line( ctx, v2, v0 );
89 _swsetup_edge_render_point_tri(struct gl_context *ctx,
98 if (ef[e0]) _swrast_Point( ctx, v0 );
99 if (ef[e1]) _swrast_Point( ctx, v1 );
100 if (ef[e2]) _swrast_Point( ctx, v2 );
102 _swrast_flush(ctx);
108 static void _swsetup_render_tri(struct gl_context *ctx,
115 SScontext *swsetup = SWSETUP_CONTEXT(ctx);
116 struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
124 if (ctx->Polygon.CullFlag) {
125 if (facing == 1 && ctx->Polygon.CullFaceMode != GL_FRONT)
127 if (facing == 0 && ctx->Polygon.CullFaceMode != GL_BACK)
131 _swrast_SetFacing(ctx, facing);
133 if (ctx->Light.ShadeModel == GL_FLAT) {
149 render(ctx, ef, e0, e1, e2, v0, v1, v2);
157 render(ctx, ef, e0, e1, e2, v0, v1, v2);
198 void _swsetup_trifuncs_init( struct gl_context *ctx )
200 (void) ctx;
213 static void swsetup_points( struct gl_context *ctx, GLuint first, GLuint last )
215 struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
216 SWvertex *verts = SWSETUP_CONTEXT(ctx)->verts;
222 _swrast_Point( ctx, &verts[VB->Elts[i]] );
227 _swrast_Point( ctx, &verts[i] );
231 static void swsetup_line( struct gl_context *ctx, GLuint v0, GLuint v1 )
233 SWvertex *verts = SWSETUP_CONTEXT(ctx)->verts;
234 _swrast_Line( ctx, &verts[v0], &verts[v1] );
239 void _swsetup_choose_trifuncs( struct gl_context *ctx )
241 TNLcontext *tnl = TNL_CONTEXT(ctx);
244 if (ctx->Polygon.OffsetPoint ||
245 ctx->Polygon.OffsetLine ||
246 ctx->Polygon.OffsetFill)
249 if ((ctx->Light.Enabled && ctx->Light.Model.TwoSide) ||
250 (ctx->VertexProgram._Current && ctx->VertexProgram.TwoSideEnabled))
256 if (ctx->Polygon.FrontMode != GL_FILL ||
257 ctx->Polygon.BackMode != GL_FILL ||
258 (ctx->Stencil.Enabled && ctx->Stencil._TestTwoSide))