Skip to content
Till edited this page Dec 15, 2021 · 1 revision

Surface creation

On Android surface creation should happen on the Resume event and surface cleanup on the Suspended event of the window. A valid surface can not be created beforehand. This means using winit, sdl2 or anything similar, surface creation could happen like this:

        Event::Resumed => {
            let surface = unsafe { instance.create_surface(&window) };
            //...
        }