Lines Matching refs:Light
59 const struct gl_material *mat = &ctx->Light.Material;
93 /* state[1] is the light number */
95 /* state[2] is the light attribute */
98 COPY_4V(value, ctx->Light.Light[ln].Ambient);
101 COPY_4V(value, ctx->Light.Light[ln].Diffuse);
104 COPY_4V(value, ctx->Light.Light[ln].Specular);
107 COPY_4V(value, ctx->Light.Light[ln].EyePosition);
110 value[0] = ctx->Light.Light[ln].ConstantAttenuation;
111 value[1] = ctx->Light.Light[ln].LinearAttenuation;
112 value[2] = ctx->Light.Light[ln].QuadraticAttenuation;
113 value[3] = ctx->Light.Light[ln].SpotExponent;
116 COPY_3V(value, ctx->Light.Light[ln].SpotDirection);
117 value[3] = ctx->Light.Light[ln]._CosCutoff;
120 value[0] = ctx->Light.Light[ln].SpotCutoff;
128 * light.EyePosition.w should be 0 for infinite lights.
130 COPY_3V(p, ctx->Light.Light[ln].EyePosition);
138 _mesa_problem(ctx, "Invalid light state in fetch_state");
143 COPY_4V(value, ctx->Light.Model.Ambient);
150 value[i] = ctx->Light.Model.Ambient[i]
151 * ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_AMBIENT][i]
152 + ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_EMISSION][i];
154 value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
160 value[i] = ctx->Light.Model.Ambient[i]
161 * ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_AMBIENT][i]
162 + ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_EMISSION][i];
164 value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3];
176 value[i] = ctx->Light.Light[ln].Ambient[i] *
177 ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_AMBIENT+face][i];
180 value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_AMBIENT+face][3];
184 value[i] = ctx->Light.Light[ln].Diffuse[i] *
185 ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE+face][i];
188 value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE+face][3];
192 value[i] = ctx->Light.Light[ln].Specular[i] *
193 ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_SPECULAR+face][i];
196 value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_SPECULAR+face][3];
412 if(ctx->Light._ClampVertexColor &&
501 /* here, state[2] is the light number */
504 COPY_3V(value, ctx->Light.Light[ln]._NormSpotDirection);
505 value[3] = ctx->Light.Light[ln]._CosCutoff;
512 COPY_4V(value, ctx->Light.Light[ln]._Position);
519 COPY_4V(value, ctx->Light.Light[ln]._Position);
530 * light.EyePosition.w should be 0 for infinite lights.
532 COPY_3V(p, ctx->Light.Light[ln]._Position);
746 append(dst, "light");
893 append(dst, "light.position.normalized");
959 append_index(str, state[1]); /* light number [i]. */
974 append_index(str, state[1]); /* light number [i]. */