Fixing wrong shader getting used.

This commit is contained in:
Faerbit 2015-06-01 13:35:23 +02:00
parent 3fffa4c4ca
commit 2a09c7f83c

View File

@ -340,6 +340,7 @@ void Graphics::render(double time)
if (renderShadows) {
// render depth textures for point lights
glViewport(0, 0, cube_size, cube_size);
depthCubeShader->use();
glm::mat4 depthProjectionMatrix_pointlights = glm::perspective(1.571f, (float)cube_size/(float)cube_size, 0.1f, 50.0f);
glm::vec3 looking_directions[6] = {glm::vec3(1.0f, 0.0f, 0.0f), glm::vec3(-1.0f, 0.0f, 0.0f), glm::vec3(0.0f, 1.0f, 0.0f),
glm::vec3(0.0f, -1.0f, 0.0f), glm::vec3(0.0f, 0.0f, 1.0f), glm::vec3(0.0f, 0.0f, -1.0f)};