Skip to content

[Flutter GPU] Add RenderPass.setViewport. #157201

@bdero

Description

@bdero

The viewport determines the region and depth range of the framebuffer that the RenderPass draws to.

Allow the user to set the viewport on the RenderPass by passing in a Viewport class containing a floating point region rectangle and a floating point DepthRange (defaulting to zNear=0 and zFar=1).

Similar to the scissor, there is no need to add functionality to "disable" the viewport. By default, the viewport's region is set to the render target texture size and the viewport's depth range is set to zNear=0 and zFar=1. So if the user wants to "disable" the viewport, they should simply call setViewport again and set it back to the default values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.flutter-gputeam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions