Skip to content

Example does not support the latest winit #294

Open

Description

@Kaifuny

Example does not support the latest winit

winit = 0.29.0 api has undergone a destructive change. Can't get NSView via window.ns_view(), set MetalView inside window.

I don't know what to do and would like help

Activity

  1. madsmtm commented on Nov 2, 2023

    @madsmtm
    Contributor

    You have to use the raw-window-handle implementation to get the ns_view pointer

  2. Kaifuny commented on Nov 2, 2023

    @Kaifuny
    Author

    You have to use the raw-window-handle implementation to get the ns_view pointer

    I noticed that the logs for the release version of winit have instructions for using raw_window_handle. But I didn't find any example or description of winit with raw_window_handle.

  3. MarijnS95 commented on Nov 21, 2023

    @MarijnS95
    Contributor

    You might want to look at https://github.com/norse-rs/raw-window-metal which takes care of part of the conversion :)

  4. Rottenfront commented on Jan 6, 2024

    @Rottenfront

    @Kaifuny, there is an example of using raw window handle 0.6 with latest winit 0.29 by skia-safe

  5. MarijnS95 commented on Jan 6, 2024

    @MarijnS95
    Contributor

    @Rottenfront that link points to the main repo here which is still on Winit 0.27. Did you mean to point to a fork?

  6. Rottenfront commented on Jan 7, 2024

    @Rottenfront
  7. MarijnS95 commented on Jan 7, 2024

    @MarijnS95
    Contributor

    Nice, yeah part of that is what raw-window-metal abstracts away for you (though not by using the metal-rs type yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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