From e3835c956011c217e498b272490005dca457d402 Mon Sep 17 00:00:00 2001 From: Tengu712 Date: Sun, 27 Sep 2026 03:51:41 +0900 Subject: render font --- src/graphics/texture.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/graphics/texture.rs') diff --git a/src/graphics/texture.rs b/src/graphics/texture.rs index 6273b6e..95b9727 100644 --- a/src/graphics/texture.rs +++ b/src/graphics/texture.rs @@ -51,14 +51,15 @@ impl TextureWrapper { /// /// `data`がテクスチャサイズと一致しない場合は、クラッシュしないように不足分が白色で埋められる。 pub fn write(&self, queue: &Queue, data: &[u8]) { - self.write_partial(queue, data, Origin3d::ZERO, self.width, self.height); + self.write_partial(queue, data, 0, 0, self.width, self.height); } /// テクスチャを部分的に更新するメソッド /// /// * queue - queue /// * data - 更新データ - /// * origin - 更新領域の開始座標 + /// * x - 更新領域の開始X座標 + /// * y - 更新領域の開始Y座標 /// * width - 更新領域の幅 /// * height - 更新領域の高さ /// @@ -67,7 +68,8 @@ impl TextureWrapper { &self, queue: &Queue, data: &[u8], - origin: Origin3d, + x: u32, + y: u32, width: u32, height: u32, ) { @@ -89,7 +91,7 @@ impl TextureWrapper { TexelCopyTextureInfo { texture: &self.texture, mip_level: 0, - origin, + origin: Origin3d { x, y, z: 0 }, aspect: TextureAspect::All, }, data, -- cgit v1.3.1