Skip to content

Expose with function in traits #249

@EriKWDev

Description

@EriKWDev

old: in blade_egui, the paint function expects a pass: &mut blade_graphics::RenderCommandEncoder since it needs to internally call .with.

I am in some parts of my code using the blade_grahpics::traits which can have a RenderEncoder and RenderPipelineEncoder. However, due to the with function not being part of the traits (or blade's common api), it is impossible to use the egui renderer with those since it is impossible to refactor the paint function's signature to instead take in a trait since everything isn't covered.

I still think the .with function and its return type should be standardized. Let it always specify both pipeline's and the encoder's lifetime as is required in the vulkan implementation, and other implementations can use phantom data for the lifetimes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions