Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop extracting mesh entities to the render world. #11803

Merged
merged 3 commits into from
Feb 10, 2024

Commits on Feb 10, 2024

  1. Stop extracting mesh entities to the render world.

    This fixes a `FIXME` in `extract_meshes` and results in a performance
    improvement.
    
    As a result of this change, meshes in the render world might not be
    attached to entities anymore. Therefore, the `entity` parameter to
    `RenderCommand::render()` is now wrapped in an `Option`. Most
    applications that use the render app's ECS can simply unwrap the
    `Option`.
    
    Note that for now sprites, gizmos, and UI elements still use the render
    world as usual.
    
    Migration guide
    ---------------
    
    * For efficiency reasons, some meshes in the render world may not have
      corresponding `Entity` IDs anymore. As a result, the `entity`
      parameter to `RenderCommand::render()` is now wrapped in an `Option`.
      Custom rendering code may need to be updated to handle the case in
      which no `Entity` exists for an object that is to be rendered.
    pcwalton committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    b98cfcc View commit details
    Browse the repository at this point in the history
  2. Rustfmt police

    pcwalton committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    0d3c60d View commit details
    Browse the repository at this point in the history
  3. Address review comments

    pcwalton committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    c847bd3 View commit details
    Browse the repository at this point in the history