fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
This commit is contained in:
15
docs/api/rhi/texture/get-depth.md
Normal file
15
docs/api/rhi/texture/get-depth.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# RHITexture::GetDepth
|
||||
|
||||
```cpp
|
||||
virtual uint32_t GetDepth() const = 0;
|
||||
```
|
||||
|
||||
获取纹理深度(3D 纹理)。
|
||||
|
||||
**返回:** 纹理深度
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHITexture 总览](texture.md) - 返回类总览
|
||||
15
docs/api/rhi/texture/get-format.md
Normal file
15
docs/api/rhi/texture/get-format.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# RHITexture::GetFormat
|
||||
|
||||
```cpp
|
||||
virtual Format GetFormat() const = 0;
|
||||
```
|
||||
|
||||
获取纹理格式。
|
||||
|
||||
**返回:** 纹理格式枚举值
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHITexture 总览](texture.md) - 返回类总览
|
||||
15
docs/api/rhi/texture/get-height.md
Normal file
15
docs/api/rhi/texture/get-height.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# RHITexture::GetHeight
|
||||
|
||||
```cpp
|
||||
virtual uint32_t GetHeight() const = 0;
|
||||
```
|
||||
|
||||
获取纹理高度(像素)。
|
||||
|
||||
**返回:** 纹理高度
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHITexture 总览](texture.md) - 返回类总览
|
||||
15
docs/api/rhi/texture/get-mip-levels.md
Normal file
15
docs/api/rhi/texture/get-mip-levels.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# RHITexture::GetMipLevels
|
||||
|
||||
```cpp
|
||||
virtual uint32_t GetMipLevels() const = 0;
|
||||
```
|
||||
|
||||
获取 Mipmap 级别数。
|
||||
|
||||
**返回:** Mipmap 级别数
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHITexture 总览](texture.md) - 返回类总览
|
||||
20
docs/api/rhi/texture/get-name.md
Normal file
20
docs/api/rhi/texture/get-name.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# RHITexture::GetName / SetName
|
||||
|
||||
```cpp
|
||||
virtual const std::string& GetName() const = 0;
|
||||
virtual void SetName(const std::string& name) = 0;
|
||||
```
|
||||
|
||||
获取或设置纹理名称(用于调试)。
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
texture->SetName("DiffuseMap_Main");
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHITexture 总览](texture.md) - 返回类总览
|
||||
15
docs/api/rhi/texture/get-native-handle.md
Normal file
15
docs/api/rhi/texture/get-native-handle.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# RHITexture::GetNativeHandle
|
||||
|
||||
```cpp
|
||||
virtual void* GetNativeHandle() = 0;
|
||||
```
|
||||
|
||||
获取原生 API 句柄。
|
||||
|
||||
**返回:** 原生纹理句柄
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHITexture 总览](texture.md) - 返回类总览
|
||||
15
docs/api/rhi/texture/get-state.md
Normal file
15
docs/api/rhi/texture/get-state.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# RHITexture::GetState
|
||||
|
||||
```cpp
|
||||
virtual ResourceStates GetState() const = 0;
|
||||
```
|
||||
|
||||
获取当前资源状态。
|
||||
|
||||
**返回:** 资源状态枚举值
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHITexture 总览](texture.md) - 返回类总览
|
||||
15
docs/api/rhi/texture/get-texture-type.md
Normal file
15
docs/api/rhi/texture/get-texture-type.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# RHITexture::GetTextureType
|
||||
|
||||
```cpp
|
||||
virtual TextureType GetTextureType() const = 0;
|
||||
```
|
||||
|
||||
获取纹理类型。
|
||||
|
||||
**返回:** 纹理类型枚举值
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHITexture 总览](texture.md) - 返回类总览
|
||||
15
docs/api/rhi/texture/get-width.md
Normal file
15
docs/api/rhi/texture/get-width.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# RHITexture::GetWidth
|
||||
|
||||
```cpp
|
||||
virtual uint32_t GetWidth() const = 0;
|
||||
```
|
||||
|
||||
获取纹理宽度(像素)。
|
||||
|
||||
**返回:** 纹理宽度
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHITexture 总览](texture.md) - 返回类总览
|
||||
22
docs/api/rhi/texture/set-name.md
Normal file
22
docs/api/rhi/texture/set-name.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# RHITexture::SetName
|
||||
|
||||
```cpp
|
||||
virtual void SetName(const std::string& name) = 0;
|
||||
```
|
||||
|
||||
设置纹理名称(用于调试)。
|
||||
|
||||
**参数:**
|
||||
- `name` - 新名称
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
texture->SetName("DiffuseMap");
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHITexture 总览](texture.md) - 返回类总览
|
||||
22
docs/api/rhi/texture/set-state.md
Normal file
22
docs/api/rhi/texture/set-state.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# RHITexture::SetState
|
||||
|
||||
```cpp
|
||||
virtual void SetState(ResourceStates state) = 0;
|
||||
```
|
||||
|
||||
设置资源状态。
|
||||
|
||||
**参数:**
|
||||
- `state` - 新的资源状态
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
texture->SetState(ResourceStates::PixelShaderResource);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHITexture 总览](texture.md) - 返回类总览
|
||||
13
docs/api/rhi/texture/shutdown.md
Normal file
13
docs/api/rhi/texture/shutdown.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# RHITexture::Shutdown
|
||||
|
||||
```cpp
|
||||
virtual void Shutdown() = 0;
|
||||
```
|
||||
|
||||
释放纹理资源。
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHITexture 总览](texture.md) - 返回类总览
|
||||
80
docs/api/rhi/texture/texture.md
Normal file
80
docs/api/rhi/texture/texture.md
Normal file
@@ -0,0 +1,80 @@
|
||||
# RHITexture
|
||||
|
||||
**命名空间**: `XCEngine::RHI`
|
||||
|
||||
**类型**: `class` (abstract)
|
||||
|
||||
**描述**: GPU 纹理资源抽象接口,用于管理 1D、2D、3D 纹理和立方体贴图等 GPU 资源。
|
||||
|
||||
## 公共方法
|
||||
|
||||
| 方法 | 描述 |
|
||||
|------|------|
|
||||
| [`GetWidth`](get-width.md) | 获取纹理宽度 |
|
||||
| [`GetHeight`](get-height.md) | 获取纹理高度 |
|
||||
| [`GetDepth`](get-depth.md) | 获取纹理深度 |
|
||||
| [`GetMipLevels`](get-mip-levels.md) | 获取 Mip 级别数量 |
|
||||
| [`GetFormat`](get-format.md) | 获取纹理格式 |
|
||||
| [`GetTextureType`](get-texture-type.md) | 获取纹理类型 |
|
||||
| [`GetState`](get-state.md) | 获取资源状态 |
|
||||
| [`SetState`](set-state.md) | 设置资源状态 |
|
||||
| [`Shutdown`](shutdown.md) | 关闭并释放资源 |
|
||||
| [`GetNativeHandle`](get-native-handle.md) | 获取原生句柄 |
|
||||
| [`GetName`](get-name.md) | 获取资源名称 |
|
||||
| [`SetName`](set-name.md) | 设置资源名称 |
|
||||
|
||||
## 纹理类型 (TextureType)
|
||||
|
||||
| 枚举值 | 描述 |
|
||||
|--------|------|
|
||||
| `TextureType::Texture1D` | 1D 纹理 |
|
||||
| `TextureType::Texture2D` | 2D 纹理 |
|
||||
| `TextureType::Texture2DArray` | 2D 纹理数组 |
|
||||
| `TextureType::Texture3D` | 3D 纹理(体积纹理) |
|
||||
| `TextureType::TextureCube` | 立方体贴图 |
|
||||
| `TextureType::TextureCubeArray` | 立方体贴图数组 |
|
||||
|
||||
## 纹理格式 (Format)
|
||||
|
||||
| 格式 | 描述 |
|
||||
|------|------|
|
||||
| `Format::Unknown` | 未知格式 |
|
||||
| `Format::R8_UNorm` | 单通道 8 位归一化 |
|
||||
| `Format::R8G8_UNorm` | 双通道 8 位归一化 |
|
||||
| `Format::R8G8B8A8_UNorm` | 四通道 8 位归一化 |
|
||||
| `Format::R16G16B16A16_Float` | 四通道 16 位浮点 |
|
||||
| `Format::R32G32B32A32_Float` | 四通道 32 位浮点 |
|
||||
| `Format::R16_Float` | 单通道 16 位浮点 |
|
||||
| `Format::R32_Float` | 单通道 32 位浮点 |
|
||||
| `Format::D16_UNorm` | 16 位深度 |
|
||||
| `Format::D24_UNorm_S8_UInt` | 24 位深度 + 8 位模板 |
|
||||
| `Format::D32_Float` | 32 位深度 |
|
||||
| `Format::BC1_UNorm` | BC1 压缩 (DXT1) |
|
||||
| `Format::BC2_UNorm` | BC2 压缩 (DXT2/3) |
|
||||
| `Format::BC3_UNorm` | BC3 压缩 (DXT4/5) |
|
||||
| `Format::BC4_UNorm` | BC4 压缩 |
|
||||
| `Format::BC5_UNorm` | BC5 压缩 |
|
||||
| `Format::BC6H_UF16` | BC6H 压缩 (UF16) |
|
||||
| `Format::BC7_UNorm` | BC7 高质量压缩 |
|
||||
| `Format::R32G32B32A32_UInt` | 四通道 32 位无符号整数 |
|
||||
| `Format::R32_UInt` | 单通道 32 位无符号整数 |
|
||||
|
||||
## 使用示例
|
||||
|
||||
```cpp
|
||||
TextureDesc desc;
|
||||
desc.width = 1024;
|
||||
desc.height = 1024;
|
||||
desc.format = (uint32_t)Format::R8G8B8A8_UNorm;
|
||||
desc.textureType = (uint32_t)TextureType::Texture2D;
|
||||
|
||||
RHITexture* texture = device->CreateTexture(desc);
|
||||
texture->SetState(ResourceStates::PixelShaderResource);
|
||||
texture->Shutdown();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [../rhi/rhi.md](../rhi.md) - RHI 模块总览
|
||||
- [RHIDevice](../device/device.md) - 创建设备
|
||||
- [RHIBuffer](../buffer/buffer.md) - 缓冲区资源
|
||||
Reference in New Issue
Block a user