Skip to content

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

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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