/** * Called via swrast->Point. Examine current GL state and choose a software * point routine. Then call it. */ static void _swrast_validate_point( struct gl_context *ctx, const SWvertex *v0 ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); _swrast_validate_derived( ctx ); swrast->choose_point( ctx ); if (swrast->SpecularVertexAdd) { swrast->SpecPoint = swrast->Point; swrast->Point = _swrast_add_spec_terms_point; } swrast->Point( ctx, v0 ); }
/** * Called via swrast->Point. Examine current GL state and choose a software * point routine. Then call it. */ static void _swrast_validate_point( GLcontext *ctx, const SWvertex *v0 ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); _swrast_validate_derived( ctx ); swrast->choose_point( ctx ); if (ctx->Texture._EnabledUnits == 0 && NEED_SECONDARY_COLOR(ctx) && !ctx->FragmentProgram._Enabled) { swrast->SpecPoint = swrast->Point; swrast->Point = _swrast_add_spec_terms_point; } swrast->Point( ctx, v0 ); }