485 B
485 B
Texture::GetWidth
Core::uint32 GetWidth() const
获取纹理宽度。
参数: 无
返回: 纹理宽度(像素)
线程安全: ✅
示例:
Texture tex;
tex.Create(1024, 512, 1, 1,
TextureType::Texture2D,
TextureFormat::RGBA8_UNORM,
nullptr, 0);
Core::uint32 width = tex.GetWidth(); // 返回 1024
相关文档
- Texture 总览 - 返回类总览
- GetHeight - 获取纹理高度