Compare commits
2 Commits
0c589e4d27
...
e38bb50245
Author | SHA1 | Date | |
---|---|---|---|
e38bb50245 | |||
75e1748302 |
@ -85,6 +85,7 @@ void Renderer::UpdateView(entt::registry& registry, Shader &shader) {
|
||||
glm::vec3(0.f, 1.f, 0.f)
|
||||
);
|
||||
shader.setMat4("u_view", m_view);
|
||||
shader.setMat4("u_projection", m_proj);
|
||||
|
||||
shader.setVec3("viewPos", camTransform.position);
|
||||
}
|
||||
|
@ -104,8 +104,13 @@ void Window::ProcessEvents() {
|
||||
if (event.key.scancode == SDL_SCANCODE_ESCAPE) {
|
||||
Dispatch(WindowCloseRequested());
|
||||
}
|
||||
if (event.key.scancode == SDL_SCANCODE_F11) {
|
||||
bool isFullscreen = SDL_GetWindowFlags(m_handle) & SDL_WINDOW_FULLSCREEN;
|
||||
SDL_SetWindowFullscreen(m_handle, !isFullscreen);
|
||||
}
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_RESIZED:
|
||||
case SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED:
|
||||
int width, height;
|
||||
if (SDL_GetWindowSizeInPixels(m_handle, &width, &height)) {
|
||||
m_width = width;
|
||||
|
Reference in New Issue
Block a user