Skip to content

Consider removing present method becuase of incompatibility with the web #54

@MendyBerger

Description

@MendyBerger

I think we should consider removing the present() method from graphics-context because it's not really going to work on the web.

The web doesn't let you "present", you just write to the texture that's going the be presented next, and the browser presents it whenever it's ready to do so.

In the name of being compatible with the web platform, we should consider removing it. This would mean that the native hosts will now have to manage presenting on their own.

I'd just point out that it's probably possible to emulate preset behavior by not actually returning the "current-texture" returned by the browser, and instead provide our own texture that we use to copy onto the real "current-texture" when the user calls present. However, this would introduce a bunch of unnecessary overhead, so I don't think we should go there.

(@seanisom I'd love to get your thoughts)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions