Lines Matching refs:lu

105    struct gl_light_uniforms *lu = &ctx->Light.LightSource[lnum];
109 if (TEST_EQ_4V(lu->Ambient, params))
112 COPY_4V( lu->Ambient, params );
115 if (TEST_EQ_4V(lu->Diffuse, params))
118 COPY_4V( lu->Diffuse, params );
121 if (TEST_EQ_4V(lu->Specular, params))
124 COPY_4V( lu->Specular, params );
128 if (TEST_EQ_4V(lu->EyePosition, params))
132 bool old_positional = lu->EyePosition[3] != 0.0f;
134 COPY_4V(lu->EyePosition, params);
156 COPY_3V(lu->_HalfVector, p);
157 lu->_HalfVector[3] = 1.0;
162 if (TEST_EQ_3V(lu->SpotDirection, params))
165 COPY_3V(lu->SpotDirection, params);
170 if (lu->SpotExponent == params[0])
173 lu->SpotExponent = params[0];
177 if (lu->SpotCutoff == params[0])
181 bool old_is_180 = lu->SpotCutoff == 180.0f;
183 lu->SpotCutoff = params[0];
184 lu->_CosCutoff = (cosf(lu->SpotCutoff * M_PI / 180.0));
185 if (lu->_CosCutoff < 0)
186 lu->_CosCutoff = 0;
201 if (lu->ConstantAttenuation == params[0])
205 bool old_is_one = lu->ConstantAttenuation == 1.0f;
207 lu->ConstantAttenuation = params[0];
217 if (lu->LinearAttenuation == params[0])
221 bool old_is_zero = lu->LinearAttenuation == 0.0f;
223 lu->LinearAttenuation = params[0];
233 if (lu->QuadraticAttenuation == params[0])
237 bool old_is_zero = lu->QuadraticAttenuation == 0.0f;
239 lu->QuadraticAttenuation = params[0];
684 struct gl_light_uniforms *lu = &ctx->Light.LightSource[i];
685 SCALE_3V( light->_MatAmbient[0], lu->Ambient,
695 struct gl_light_uniforms *lu = &ctx->Light.LightSource[i];
696 SCALE_3V( light->_MatAmbient[1], lu->Ambient,
720 struct gl_light_uniforms *lu = &ctx->Light.LightSource[i];
721 SCALE_3V( light->_MatDiffuse[0], lu->Diffuse,
731 struct gl_light_uniforms *lu = &ctx->Light.LightSource[i];
732 SCALE_3V( light->_MatDiffuse[1], lu->Diffuse,
743 struct gl_light_uniforms *lu = &ctx->Light.LightSource[i];
744 SCALE_3V( light->_MatSpecular[0], lu->Specular,
754 struct gl_light_uniforms *lu = &ctx->Light.LightSource[i];
755 SCALE_3V( light->_MatSpecular[1], lu->Specular,
1035 struct gl_light_uniforms *lu = &ctx->Light.LightSource[i];
1039 COPY_4FV( light->_Position, lu->EyePosition );
1044 lu->EyePosition );
1071 COPY_3V( light->_NormSpotDirection, lu->SpotDirection );
1076 COPY_3V(spotDir, lu->SpotDirection);
1089 if (PV_dot_dir > lu->_CosCutoff) {
1091 powf(PV_dot_dir, lu->SpotExponent);
1183 init_light( struct gl_light *l, struct gl_light_uniforms *lu, GLuint n )
1185 ASSIGN_4V( lu->Ambient, 0.0, 0.0, 0.0, 1.0 );
1187 ASSIGN_4V( lu->Diffuse, 1.0, 1.0, 1.0, 1.0 );
1188 ASSIGN_4V( lu->Specular, 1.0, 1.0, 1.0, 1.0 );
1191 ASSIGN_4V( lu->Diffuse, 0.0, 0.0, 0.0, 1.0 );
1192 ASSIGN_4V( lu->Specular, 0.0, 0.0, 0.0, 1.0 );
1194 ASSIGN_4V( lu->EyePosition, 0.0, 0.0, 1.0, 0.0 );
1195 ASSIGN_3V( lu->SpotDirection, 0.0, 0.0, -1.0 );
1196 lu->SpotExponent = 0.0;
1197 lu->SpotCutoff = 180.0;
1198 lu->_CosCutoff = 0.0; /* KW: -ve values not admitted */
1199 lu->ConstantAttenuation = 1.0;
1200 lu->LinearAttenuation = 0.0;
1201 lu->QuadraticAttenuation = 0.0;