| 228 | } |
| 229 | |
| 230 | bool OpenGLWindow::OnWindowResized(WindowResizedEvent& event) |
| 231 | { |
| 232 | m_property.SetWidth(event.GetWidth()); |
| 233 | m_property.SetHeight(event.GetHeight()); |
| 234 | |
| 235 | ZENGINE_CORE_INFO("Window size updated, Properties : Width = {0}, Height = {1}", m_property.Width, m_property.Height); |
| 236 | |
| 237 | RendererCommand::SetViewport(0, 0, m_property.Width, m_property.Height); |
| 238 | |
| 239 | Event::EventDispatcher event_dispatcher(event); |
| 240 | event_dispatcher.ForwardTo<Event::WindowResizedEvent>(std::bind(&CoreWindow::ForwardEventToLayers, this, std::placeholders::_1)); |
| 241 | return false; |
| 242 | } |
| 243 | |
| 244 | bool OpenGLWindow::OnKeyPressed(KeyPressedEvent& event) { |
| 245 | Event::EventDispatcher event_dispatcher(event); |