-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
This is related to #197 but didn't want to derail the original bug
Bevy has a window abstraction, basically HashMap<WindowId, Window>. I think we may want a viewport abstraction as well. The default behavior would be that a window has a single viewport that fills it completely. I could see this being useful for an editor where we might want to render two views of the same scene, or render a single view within just part of the window. (Likely with UI surrounding it) (Draggable UI panels might have their own viewports for example)
I would suggest setting it up as a separate resource that looks a lot like the Windows resource, but where each viewport has a WindowId indicating which window contains it. (HashMap<ViewportId, Viewport>, Viewport is a struct that contains a WindowId)
This could have some camera state to help with converting between 2D/3D (or just reference a camera that has that information).