Lines Matching defs:lu

107    struct gl_light_uniforms *lu = &ctx->Light.LightSource[lnum];
111 if (TEST_EQ_4V(lu->Ambient, params))
114 COPY_4V( lu->Ambient, params );
117 if (TEST_EQ_4V(lu->Diffuse, params))
120 COPY_4V( lu->Diffuse, params );
123 if (TEST_EQ_4V(lu->Specular, params))
126 COPY_4V( lu->Specular, params );
130 if (TEST_EQ_4V(lu->EyePosition, params))
134 bool old_positional = lu->EyePosition[3] != 0.0f;
136 COPY_4V(lu->EyePosition, params);
158 COPY_3V(lu->_HalfVector, p);
159 lu->_HalfVector[3] = 1.0;
164 if (TEST_EQ_3V(lu->SpotDirection, params))
167 COPY_3V(lu->SpotDirection, params);
172 if (lu->SpotExponent == params[0])
175 lu->SpotExponent = params[0];
179 if (lu->SpotCutoff == params[0])
183 bool old_is_180 = lu->SpotCutoff == 180.0f;
185 lu->SpotCutoff = params[0];
186 lu->_CosCutoff = (cosf(lu->SpotCutoff * M_PI / 180.0));
187 if (lu->_CosCutoff < 0)
188 lu->_CosCutoff = 0;
203 if (lu->ConstantAttenuation == params[0])
207 bool old_is_one = lu->ConstantAttenuation == 1.0f;
209 lu->ConstantAttenuation = params[0];
219 if (lu->LinearAttenuation == params[0])
223 bool old_is_zero = lu->LinearAttenuation == 0.0f;
225 lu->LinearAttenuation = params[0];
235 if (lu->QuadraticAttenuation == params[0])
239 bool old_is_zero = lu->QuadraticAttenuation == 0.0f;
241 lu->QuadraticAttenuation = params[0];
692 struct gl_light_uniforms *lu = &ctx->Light.LightSource[i];
693 SCALE_3V( light->_MatAmbient[0], lu->Ambient,
703 struct gl_light_uniforms *lu = &ctx->Light.LightSource[i];
704 SCALE_3V( light->_MatAmbient[1], lu->Ambient,
728 struct gl_light_uniforms *lu = &ctx->Light.LightSource[i];
729 SCALE_3V( light->_MatDiffuse[0], lu->Diffuse,
739 struct gl_light_uniforms *lu = &ctx->Light.LightSource[i];
740 SCALE_3V( light->_MatDiffuse[1], lu->Diffuse,
751 struct gl_light_uniforms *lu = &ctx->Light.LightSource[i];
752 SCALE_3V( light->_MatSpecular[0], lu->Specular,
762 struct gl_light_uniforms *lu = &ctx->Light.LightSource[i];
763 SCALE_3V( light->_MatSpecular[1], lu->Specular,
1046 struct gl_light_uniforms *lu = &ctx->Light.LightSource[i];
1050 COPY_4FV( light->_Position, lu->EyePosition );
1055 lu->EyePosition );
1082 COPY_3V( light->_NormSpotDirection, lu->SpotDirection );
1087 COPY_3V(spotDir, lu->SpotDirection);
1100 if (PV_dot_dir > lu->_CosCutoff) {
1102 powf(PV_dot_dir, lu->SpotExponent);
1210 init_light( struct gl_light *l, struct gl_light_uniforms *lu, GLuint n )
1212 ASSIGN_4V( lu->Ambient, 0.0, 0.0, 0.0, 1.0 );
1214 ASSIGN_4V( lu->Diffuse, 1.0, 1.0, 1.0, 1.0 );
1215 ASSIGN_4V( lu->Specular, 1.0, 1.0, 1.0, 1.0 );
1218 ASSIGN_4V( lu->Diffuse, 0.0, 0.0, 0.0, 1.0 );
1219 ASSIGN_4V( lu->Specular, 0.0, 0.0, 0.0, 1.0 );
1221 ASSIGN_4V( lu->EyePosition, 0.0, 0.0, 1.0, 0.0 );
1222 ASSIGN_3V( lu->SpotDirection, 0.0, 0.0, -1.0 );
1223 lu->SpotExponent = 0.0;
1224 lu->SpotCutoff = 180.0;
1225 lu->_CosCutoff = 0.0; /* KW: -ve values not admitted */
1226 lu->ConstantAttenuation = 1.0;
1227 lu->LinearAttenuation = 0.0;
1228 lu->QuadraticAttenuation = 0.0;