Skip to content

Consider adding a viewport abstraction #202

@aclysma

Description

@aclysma

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-FeatureA new feature, making something new possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions