ssell / OcularEngine

Ocular Rendering Engine
http://www.ocularengine.com
Apache License 2.0
7 stars 6 forks source link

Properly Handle Resize Event #111

Closed ssell closed 8 years ago

ssell commented 8 years ago

We need to be able to properly handle resize events (in both standalone and editor). There is currently a WindowResizeEvent that is not being used, which should be received and handled by Window instances. After a resize event has been received, the following actions need to be taken:

Resize events should be generated in the engine when the appropriate system message is received, and then in the editor when the RenderFrame's method resizeEvent is triggered.

Also, the WindowResizeEvent needs to be redesigned. Originally it was intended to be generated by a window after it had performed the resize operations. But in light of the current design of Ocular, the resize event should be alerting the window of a resize request.

The event should therefor provide a generic system pointer for the window (ie HWND for Windows) so that the proper window can identify itself.

Finally, the WindowWin32(descriptor, windId) constructor should be made part of the generic AWindow class. There should also be a virtual method that can return the generic operating system window pointer (which can then be cast into the system specific construct).

All of the above bulleted actions should be bundled into a single public resize method.

ssell commented 8 years ago

Windows are being properly resized.

See: WindowResizeEvent and the methods that operate on it (Window::onEvent, Window::resize, Camera::onEvent, D3D11GraphicsDriver::onEvent.