Skip to content
This repository was archived by the owner on Dec 23, 2022. It is now read-only.

Get this working everywhere #1

@Osspial

Description

@Osspial

The goal of this crate is to have a quick-and-dirty way to throw pixels into a buffer and display them on a window without a significant number of dependencies. Potentially, we'll be able to use this in the Winit examples to clear the screen quickly and get windows showing up with Wayland, but that would require that this work on all the platforms Winit supports.

@vbogaevsky @murarth @vberger @ryanisaacg @mtak- @goddessfreya - would any of you be able to throw together an implementation for the platform you've worked on in Winit? It's totally fine if you're unable or uninterested in working on this, and I have no desire to thrust work onto any of you that you don't want to do. However, you're the people I know I can ping, which seems like a good place to start for getting movement on this crate.

Anyhow, assorted implementation details:

  • I have no idea if the current public API will work on all platforms. There's a good chance it won't, but figuring that out will be part of the design process.
  • This crate doesn't depend on Winit directly - instead, it depends on raw-window-handle. That works fine on Windows, but there may be some friction on other platforms - particularly X11, which uses a #[doc(hidden)] API to load up Winit's X11 bindings. We should be able to resolve that problem by moving the X11-bindings-loading code into a separate crate that creates a lazy_static bindings object, which both Winit and winit-blit can depend upon.
    • That X11 work will be necessary for decoupling Glutin from Winit, which we should do in the long term. Getting this crate working should help lay the groundwork for figuring out how to do that.
  • Ideally, this shouldn't be too complex to implement for the various platforms - the Windows implementation is about 250 lines, and the majority of that code is API boilerplate that can be copied to other platforms.

Let me know if there are any questions. Thanks!

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