Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Winit and Fix crash on x11 Linux #481

Closed
wants to merge 4 commits into from
Closed

Update Winit and Fix crash on x11 Linux #481

wants to merge 4 commits into from

Commits on Oct 14, 2021

  1. update winit

    hYdos committed Oct 14, 2021
    Configuration menu
    Copy the full SHA
    5836f27 View commit details
    Browse the repository at this point in the history
  2. We do a little fixing

    hYdos committed Oct 14, 2021
    Configuration menu
    Copy the full SHA
    7abe434 View commit details
    Browse the repository at this point in the history
  3. tmp

    hYdos committed Oct 14, 2021
    Configuration menu
    Copy the full SHA
    8b0ebac View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2021

  1. Major rework of testing ExampleBase to update winit.

    Because Winit has changed quite a bit since 0.19, some of the test lifecycle had to change.
    
    Explanation of the changes:
    1) `EventLoop::run` is the new way of starting the event loop. This function will never return. There is `EventLoop::run_return` but that does not exist on macOS, so let's use `EventLoop::run` so all platforms may use the same code.
    2) Since the callback winit takes is 'static and I need to process some destructor code, the `ExampleBase::run` function now takes a state object, of type `T`. The state object may be accessed while rendering and when the application is exiting, allowing destruction of Vulkan state.
    3) Invocation of the rendering function needs to occur in `RedrawRequested`and we request a redraw always after rendering.
    4) Eliminate the `RefCel`l around the event loop by having the event loop outlive the entire application. This means `ExampleBase::new`'s function signature now returns `(EventLoop<()>, Self)`
    
    The code appears to run properly after testing.
    i509VCB committed Oct 16, 2021
    Configuration menu
    Copy the full SHA
    a35b98b View commit details
    Browse the repository at this point in the history