From 3bbe5ebcdb2a5aa6810dd05576c6ec031efdc1c7 Mon Sep 17 00:00:00 2001 From: Tengu712 Date: Wed, 7 Oct 2026 00:57:01 +0900 Subject: render image --- src/main.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 7a8df1d..95457ee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -119,15 +119,23 @@ impl ApplicationHandler for App { renderer.render( window, current_texture, - &[graphics::command::RenderCommand::Text( - graphics::command::Text { + &[ + graphics::command::RenderCommand::Image(graphics::command::Image { + id: graphics::image::ImageId::Image, + origin: glam::Vec2::new(900.0, 400.0), + rotation: 0.2, + scale: glam::Vec2::new(0.25, 0.25), + uv_offset: glam::Vec2::new(0.0, 0.0), + uv_size: glam::Vec2::new(1.0, 1.0), + }), + graphics::command::RenderCommand::Text(graphics::command::Text { text: "君は呪われている!".to_string(), origin: glam::Vec2::new(240.0, 120.0), scale: 48, v_align: graphics::command::VerticalAlign::Top, h_align: graphics::command::HorizontalAlign::Left, - }, - )], + }), + ], ); if !renderer.is_presentation_mode_fifo() { -- cgit v1.3.1