#pragma once #include #include #include #include #include "Texture.h" #include "Light.h" struct SceneContext { std::map lights; std::map floatValues; glm::mat4x4 viewMatrix; glm::mat4x4 projectionMatrix; glm::mat4x4 mvpMatrix; glm::mat4x4 modelViewMatrix; glm::mat4x4 modelMatrix; glm::mat3x3 normalMatrix; GLuint skybox_tex; std::map textures; GLuint height; GLuint width; glm::vec4 bg; void adjustSpots() { for (auto it : lights) { if (it.second.type == Light::SPOT) { it.second.location = it.second.location * viewMatrix; it.second.direction = (viewMatrix * it.second.lookAt - it.second.location * viewMatrix); } } } };