Skip to content

Rendering from Rust's wgpu and Pyo3 #64

@rafaelbeckel

Description

@rafaelbeckel

Hey team!

I'm writing a rendering library in Rust and want to implement Python support for it with Pyo3.

I'm reading rendercanvas's documentation and trying to understand how to get a Window handle in Rust from a RenderCanvas instance from Python.

My library controls the wgpu context, so I'm trying to achieve surface creation from a Window handle in Rust. I can already access the RenderCanvas instance from Rust and call its methods. Is there any method in the API that provides a reference to the internal Window handle?

Can I somehow get it from the built-in get_context("wgpu")? Where does this "wgpu" context come from? Will it conflict with my internal wgpu context? Should I implement the ContextInterface in my library instead?

Thanks in advance!

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