Skip to content

Multiple layers #395

@Cthutu

Description

@Cthutu

Hi, I'm rewriting my emulator to Rust and I've decided to use Pixels as my main rendering crate. But I've hit a little snag.

I would like to render two layers, the base layer is the emulated screen, and the top layer is the debugger UI when it is needed. The debugger UI is twice the resolution of the emulated screen.

Now, I know it's possible to use a single pixels struct and just render the emulated screen twice as big if the debugger UI pixel is transparent (i.e. alpha == 0), but I was wondering if it is possible to support transparency in the top layer.

I've tried rendering the emulator screen first then the debugger UI afterwards, but the debugger UI just overwrites the first render even though the pixel's alpha value is 0.

Looking for options here before I write my own compositing code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions