attach canvas

This commit is contained in:
Quaternions 2025-01-02 22:29:02 -08:00
parent 2f422e97dd
commit e8da9d2a72

View File

@ -32,6 +32,11 @@ fn create_window(title:&str,event_loop:&winit::event_loop::EventLoop<()>)->Resul
use winit::platform::windows::WindowBuilderExtWindows; use winit::platform::windows::WindowBuilderExtWindows;
builder=builder.with_no_redirection_bitmap(true); builder=builder.with_no_redirection_bitmap(true);
} }
#[cfg(target_arch="wasm32")]
{
use winit::platform::web::WindowAttributesExtWebSys;
attr=attr.with_append(true);
}
event_loop.create_window(attr) event_loop.create_window(attr)
} }
fn create_instance()->SetupContextPartial1{ fn create_instance()->SetupContextPartial1{