{"id":18145088,"url":"https://github.com/matchachoco010/egui-winit-ash-integration","last_synced_at":"2025-04-15T21:23:33.367Z","repository":{"id":44246165,"uuid":"404781694","full_name":"MatchaChoco010/egui-winit-ash-integration","owner":"MatchaChoco010","description":"This is the egui integration crate for winit and ash.","archived":false,"fork":false,"pushed_at":"2024-04-06T12:19:45.000Z","size":513,"stargazers_count":18,"open_issues_count":6,"forks_count":21,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-14T10:49:17.975Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MatchaChoco010.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-09T15:49:07.000Z","updated_at":"2024-03-30T15:07:45.000Z","dependencies_parsed_at":"2024-11-01T20:07:20.994Z","dependency_job_id":"6525e99f-56cf-491f-9f58-71506425da6a","html_url":"https://github.com/MatchaChoco010/egui-winit-ash-integration","commit_stats":{"total_commits":18,"total_committers":4,"mean_commits":4.5,"dds":0.5555555555555556,"last_synced_commit":"540a0bb2375991139312d79d691c308b166bf110"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatchaChoco010%2Fegui-winit-ash-integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatchaChoco010%2Fegui-winit-ash-integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatchaChoco010%2Fegui-winit-ash-integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatchaChoco010%2Fegui-winit-ash-integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MatchaChoco010","download_url":"https://codeload.github.com/MatchaChoco010/egui-winit-ash-integration/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249155159,"owners_count":21221550,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-01T20:07:18.500Z","updated_at":"2025-04-15T21:23:33.341Z","avatar_url":"https://github.com/MatchaChoco010.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# egui-winit-ash-integration\n\n[![Latest version](https://img.shields.io/crates/v/egui-winit-ash-integration.svg)](https://crates.io/crates/egui-winit-ash-integration)\n[![Documentation](https://docs.rs/egui-winit-ash-integration/badge.svg)](https://docs.rs/egui-winit-ash-integration)\n![MIT](https://img.shields.io/badge/license-MIT-blue.svg)\n![Apache](https://img.shields.io/badge/license-Apache-blue.svg)\n[![egui version: 0.23.0](https://img.shields.io/badge/egui%20version-0.23.0-orange)](https://docs.rs/egui/0.23.0/egui/index.html)\n\nThis is the [egui](https://github.com/emilk/egui) integration crate for [egui-winit](https://github.com/emilk/egui/tree/master/crates/egui-winit) and [ash](https://github.com/MaikKlein/ash).\nThe default GPU allocator is [gpu_allocator](https://github.com/Traverse-Research/gpu-allocator), but you can also implement AllocatorTrait.\n\nThis crate does not support multi-viewports for multi-window since version 0.24 of egui.\n\n[egui-ash](https://github.com/MatchaChoco010/egui-ash) is an alternative crate, which supports multi-viewports, so please take a look at this one.\n\n# Example\n\n```sh\ncargo run --example example\n```\n\n```sh\ncargo run --example user_texture\n```\n\n# Usage\n\n```rust\nfn main() -\u003e Result\u003c()\u003e {\n    let event_loop = EventLoop::new();\n    // (1) Call Integration::\u003cArc\u003cMutex\u003cAllocator\u003e\u003e\u003e::new() in App::new().\n    let mut app = App::new(\u0026event_loop)?;\n\n    event_loop.run(move |event, _, control_flow| {\n        *control_flow = ControlFlow::Poll;\n\n        match event {\n            Event::WindowEvent { event, window_id: _ } =\u003e {\n                // (2) Call integration.handle_event(\u0026event).\n                let _response = app.egui_integration.handle_event(\u0026event);\n                match event {\n                    WindowEvent::Resized(_) =\u003e {\n                        app.recreate_swapchain().unwrap();\n                    }\n                    WindowEvent::ScaleFactorChanged { .. } =\u003e {\n                        // (3) Call integration.recreate_swapchain(...) in app.recreate_swapchain().\n                        app.recreate_swapchain().unwrap();\n                    }\n                    WindowEvent::CloseRequested =\u003e {\n                        *control_flow = ControlFlow::Exit;\n                    }\n                    _ =\u003e (),\n                }\n            },\n            Event::MainEventsCleared =\u003e app.window.request_redraw(),\n            Event::RedrawRequested(_window_id) =\u003e {\n                // (4) Call integration.begin_frame(), integration.end_frame(\u0026mut window),\n                // integration.context().tessellate(shapes), integration.paint(...)\n                // in app.draw().\n                app.draw().unwrap();\n            },\n            _ =\u003e (),\n        }\n    })\n}\n// (5) Call integration.destroy() when drop app.\n```\n\n[Full example is in examples directory](https://github.com/MatchaChoco010/egui-winit-ash-integration/tree/main/examples)\n\n# Feature flags\n\n`gpu-allocator-feature` - Enables the gpu-allocator crate.\n\nThe other features directly control the underlying [egui_winit features](https://docs.rs/egui-winit/latest/egui_winit/)\n\n# License\n\nMIT OR Apache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatchachoco010%2Fegui-winit-ash-integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatchachoco010%2Fegui-winit-ash-integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatchachoco010%2Fegui-winit-ash-integration/lists"}