summaryrefslogtreecommitdiff
path: root/src/graphics/texture.rs
diff options
context:
space:
mode:
authorTengu712 <genreihoutengu@gmail.com>2026-09-27 03:51:41 +0900
committerTengu712 <genreihoutengu@gmail.com>2026-09-27 03:51:41 +0900
commite3835c956011c217e498b272490005dca457d402 (patch)
tree2285879dfc515dee2d6e3fddcf71f81b77d6829c /src/graphics/texture.rs
parentf6d058be6639c8e052c5a38dea4f33d6b26ae20c (diff)
render font
Diffstat (limited to 'src/graphics/texture.rs')
-rw-r--r--src/graphics/texture.rs10
1 files changed, 6 insertions, 4 deletions
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,