docs: update resources API docs

This commit is contained in:
2026-03-20 02:35:35 +08:00
parent fd792b7df1
commit ea756c0177
314 changed files with 9439 additions and 1360 deletions

View File

@@ -0,0 +1,32 @@
# Texture::GetPixelDataSize
```cpp
size_t GetPixelDataSize() const
```
获取纹理像素数据大小(字节)。
**参数:**
**返回:** 像素数据大小(字节)
**线程安全:**
**示例:**
```cpp
std::vector<uint8_t> pixels(1024 * 1024 * 4, 255);
Texture tex;
tex.Create(1024, 1024, 1, 1,
TextureType::Texture2D,
TextureFormat::RGBA8_UNORM,
pixels.data(), pixels.size());
size_t size = tex.GetPixelDataSize(); // 返回 4194304 (1024*1024*4)
```
## 相关文档
- [Texture 总览](texture.md) - 返回类总览
- [GetPixelData](getpixeldata.md) - 获取像素数据指针