sysgpu: implement texture getWidth/getHeight
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
44f950a7f3
commit
8089d3356e
5 changed files with 38 additions and 6 deletions
|
|
@ -1440,6 +1440,14 @@ pub const Texture = struct {
|
|||
allocator.destroy(texture);
|
||||
}
|
||||
|
||||
pub fn getWidth(texture: *Texture) u32 {
|
||||
return texture.size.width;
|
||||
}
|
||||
|
||||
pub fn getHeight(texture: *Texture) u32 {
|
||||
return texture.size.height;
|
||||
}
|
||||
|
||||
pub fn createView(texture: *Texture, desc: *const sysgpu.TextureView.Descriptor) !*TextureView {
|
||||
return TextureView.init(texture, desc, texture.extent);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue