|
|
|
|
@ -256,15 +256,11 @@ createScene(std::vector<hex_info>* hexes, Entity* entities, uint32 entity_count)
|
|
|
|
|
// lights
|
|
|
|
|
|
|
|
|
|
// TODO: load light properties from scene/level files
|
|
|
|
|
|
|
|
|
|
//g_test_light.light_ID = glGetUniformLocation(g_entity_render_group.program_id, "light_position");
|
|
|
|
|
if (entities[0].ren_group != nullptr) { |
|
|
|
|
g_test_light.light_ID = glGetUniformLocation(entities[0].ren_group->shader.program_id, "light_position"); |
|
|
|
|
g_test_light.position = glm::vec3(800, 300, 400); // above center of hexgrid
|
|
|
|
|
g_test_light.direction = glm::vec3(0, 0, 0) - g_test_light.position; // back towards test entity
|
|
|
|
|
g_test_light.color = glm::vec3(1.f, 1.f, 1.f); |
|
|
|
|
g_test_light.intensity = 1.f; |
|
|
|
|
} |
|
|
|
|
g_test_light.light_ID = glGetUniformLocation(g_default_shader.program_id, "light_position"); |
|
|
|
|
g_test_light.position = glm::vec3(800, 300, 400); // above center of hexgrid
|
|
|
|
|
g_test_light.direction = glm::vec3(0, 0, 0) - g_test_light.position; // back towards test entity
|
|
|
|
|
g_test_light.color = glm::vec3(1.f, 1.f, 1.f); |
|
|
|
|
g_test_light.intensity = 1.f; |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|