Skip to content
This repository was archived by the owner on Feb 16, 2025. It is now read-only.
This repository was archived by the owner on Feb 16, 2025. It is now read-only.

Redesign OpenXR rendering integration #46

@jdm

Description

@jdm

Based on the changes that @pcwalton is making in https://github.com/pcwalton/rust-offscreen-rendering-context/tree/io-surface-22 and https://github.com/pcwalton/servo/tree/texture-sharing-iosurface, here is the proposed new design:

  • the webxr openxr backend creates a NativeSurface, and the webgl thread creates a NativeSurface - these are the two main surfaces that are used for double-buffering.
  • When it's time to render, the webxr openxr backend will extract a dxgi ShareHandle from the single surface it possesses, then perform a GPU blit from that d3d texture to the appropriate OpenXR texture
  • The WebGL/WebXR integration is responsible for passing a new surface that contains a complete frame to the webxr device's frame rendering method, and obtaining the previous frame's surface from that device so it can be used in the webgl thread
  • An XRWebGLLayer's framebuffer will not be backed by an actual framebuffer object (at least in EGL). Instead it will be backed by a NativeSurface and will be associated with the currently active framebuffer (0).
  • The webxr crate will need to depend upon rust-offscreen-rendering-context to use its NativeSurface types

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