| 42 | } |
| 43 | |
| 44 | void resize() |
| 45 | { |
| 46 | static const auto fovy = glm::radians(40.f); |
| 47 | static const auto zNear = 1.f; |
| 48 | static const auto zFar = 16.f; |
| 49 | static const auto eye = glm::vec3{ 0.f, 1.f, 4.f }; |
| 50 | static const auto center = glm::vec3{ 0.0, 0.0, 0.0 }; |
| 51 | static const auto up = glm::vec3{ 0.0, 1.0, 0.0 }; |
| 52 | |
| 53 | const auto aspect = static_cast<float>(g_size.x) / glm::max(static_cast<float>(g_size.y), 1.f); |
| 54 | |
| 55 | g_viewProjection = glm::perspective(fovy, aspect, zNear, zFar) * glm::lookAt(eye, center, up); |
| 56 | } |
| 57 | |
| 58 | void initialize() |
| 59 | { |
no outgoing calls
no test coverage detected