TinyGL: Use standard initial diffuse and specular values.

As per OpenGL specifications, light 0 is the only light with full diffuse and
specular light initial state. This should not affect residualvm as all enabled
light properties are configured.
This commit is contained in:
Vincent Pelletier 2015-03-15 22:14:39 +01:00
parent 09478b1791
commit f6bbbc7b28

View File

@ -99,8 +99,13 @@ void glInit(void *zbuffer1, int textureSize) {
for (int i = 0; i < T_MAX_LIGHTS; i++) {
GLLight *l = &c->lights[i];
l->ambient = Vector4(0, 0, 0, 1);
l->diffuse = Vector4(1, 1, 1, 1);
l->specular = Vector4(1, 1, 1, 1);
if (i == 0) {
l->diffuse = Vector4(1, 1, 1, 1);
l->specular = Vector4(1, 1, 1, 1);
} else {
l->diffuse = Vector4(0, 0, 0, 0);
l->specular = Vector4(0, 0, 0, 0);
}
l->position = Vector4(0, 0, 1, 0);
l->norm_position = Vector3(0, 0, 1);
l->spot_direction = Vector3(0, 0, -1);