Lines Matching refs:lighting
68 c->lighting.lights[i].ambient.a = 0x10000;
69 c->lighting.lights[i].position.z = 0x10000;
70 c->lighting.lights[i].spotDir.z = -0x10000;
71 c->lighting.lights[i].spotCutoff = gglIntToFixed(180);
72 c->lighting.lights[i].attenuation[0] = 0x10000;
74 init_white(c->lighting.lights[0].diffuse);
75 init_white(c->lighting.lights[0].specular);
77 c->lighting.front.ambient.r =
78 c->lighting.front.ambient.g =
79 c->lighting.front.ambient.b = gglFloatToFixed(0.2f);
80 c->lighting.front.ambient.a = 0x10000;
81 c->lighting.front.diffuse.r =
82 c->lighting.front.diffuse.g =
83 c->lighting.front.diffuse.b = gglFloatToFixed(0.8f);
84 c->lighting.front.diffuse.a = 0x10000;
85 c->lighting.front.specular.a = 0x10000;
86 c->lighting.front.emission.a = 0x10000;
88 c->lighting.lightModel.ambient.r =
89 c->lighting.lightModel.ambient.g =
90 c->lighting.lightModel.ambient.b = gglFloatToFixed(0.2f);
91 c->lighting.lightModel.ambient.a = 0x10000;
93 c->lighting.colorMaterial.face = GL_FRONT_AND_BACK;
94 c->lighting.colorMaterial.mode = GL_AMBIENT_AND_DIFFUSE;
105 c->lighting.shadeModel = GL_SMOOTH;
200 #pragma mark lighting equations
205 if (ggl_likely(!c->lighting.enable)) {
206 c->lighting.lightVertex = lightVertexNop;
209 if (c->lighting.colorMaterial.enable) {
210 c->lighting.lightVertex = lightVertexMaterial;
212 c->lighting.lightVertex = lightVertex;
218 uint32_t en = c->lighting.enabledLights;
223 light_t& l = c->lighting.lights[i];
235 &c->lighting.objViewer, &eyeViewer);
236 vnorm3(c->lighting.objViewer.v, c->lighting.objViewer.v);
238 c->lighting.objViewer = eyeViewer;
245 if (!c->lighting.colorMaterial.enable) {
246 material_t& material = c->lighting.front;
247 uint32_t en = c->lighting.enabledLights;
251 light_t& l = c->lighting.lights[i];
267 vmla3( c->lighting.implicitSceneEmissionAndAmbient.v,
268 c->lighting.lightModel.ambient.v,
271 c->lighting.implicitSceneEmissionAndAmbient.a = material.diffuse.a;
280 c->lighting.lightVertex = lightVertexValidate;
297 c->lighting.lightVertex(c, v);
304 c->lighting.lightVertex(c, v);
315 material_t& material = c->lighting.front;
319 uint32_t en = c->lighting.enabledLights;
323 light_t& l = c->lighting.lights[i];
334 vmla3( c->lighting.implicitSceneEmissionAndAmbient.v,
335 c->lighting.lightModel.ambient.v,
338 c->lighting.implicitSceneEmissionAndAmbient.a = material.diffuse.a;
347 vec4_t r = c->lighting.implicitSceneEmissionAndAmbient;
348 const vec4_t objViewer = c->lighting.objViewer;
350 uint32_t en = c->lighting.enabledLights;
352 // since we do the lighting in object-space, we don't need to
369 const material_t& material = c->lighting.front;
370 const int twoSide = c->lighting.lightModel.twoSide;
375 const light_t& l = c->lighting.lights[i];
458 c->lighting.lightModel.twoSide = param ? GL_TRUE : GL_FALSE;
469 light_t& light = c->lighting.lights[i-GL_LIGHT0];
524 light_t& light = c->lighting.lights[i-GL_LIGHT0];
575 c->lighting.front.shininess = param;
630 #pragma mark lighting APIs
640 c->lighting.shadeModel = mode;
668 c->lighting.lightModel.ambient.r = gglFloatToFixed(params[0]);
669 c->lighting.lightModel.ambient.g = gglFloatToFixed(params[1]);
670 c->lighting.lightModel.ambient.b = gglFloatToFixed(params[2]);
671 c->lighting.lightModel.ambient.a = gglFloatToFixed(params[3]);
688 c->lighting.lightModel.ambient.r = params[0];
689 c->lighting.lightModel.ambient.g = params[1];
690 c->lighting.lightModel.ambient.b = params[2];
691 c->lighting.lightModel.ambient.a = params[3];
769 case GL_AMBIENT: what = c->lighting.front.ambient.v; break;
770 case GL_DIFFUSE: what = c->lighting.front.diffuse.v; break;
771 case GL_SPECULAR: what = c->lighting.front.specular.v; break;
772 case GL_EMISSION: what = c->lighting.front.emission.v; break;
774 what = c->lighting.front.ambient.v;
775 other = c->lighting.front.diffuse.v;
778 c->lighting.front.shininess = gglFloatToFixed(params[0]);
809 case GL_AMBIENT: what = c->lighting.front.ambient.v; break;
810 case GL_DIFFUSE: what = c->lighting.front.diffuse.v; break;
811 case GL_SPECULAR: what = c->lighting.front.specular.v; break;
812 case GL_EMISSION: what = c->lighting.front.emission.v; break;
814 what = c->lighting.front.ambient.v;
815 other = c->lighting.front.diffuse.v;
818 c->lighting.front.shininess = gglFloatToFixed(params[0]);