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:
34
docs/api/rhi/device/create-swap-chain.md
Normal file
34
docs/api/rhi/device/create-swap-chain.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# RHIDevice::CreateSwapChain
|
||||
|
||||
```cpp
|
||||
virtual RHISwapChain* CreateSwapChain(const SwapChainDesc& desc) = 0;
|
||||
```
|
||||
|
||||
创建交换链,用于管理窗口渲染和帧缓冲区切换。
|
||||
|
||||
**参数:**
|
||||
- `desc` - 交换链描述符,包含尺寸、缓冲数量、格式等
|
||||
|
||||
**返回:** 新创建的交换链指针,失败返回 `nullptr`
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
SwapChainDesc swapChainDesc;
|
||||
swapChainDesc.width = 1280;
|
||||
swapChainDesc.height = 720;
|
||||
swapChainDesc.bufferCount = 2;
|
||||
swapChainDesc.format = (uint32_t)Format::R8G8B8A8_UNorm;
|
||||
swapChainDesc.refreshRate = 60;
|
||||
swapChainDesc.sampleCount = 1;
|
||||
swapChainDesc.sampleQuality = 0;
|
||||
|
||||
RHISwapChain* swapChain = device->CreateSwapChain(swapChainDesc);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHIDevice 总览](device.md) - 返回类总览
|
||||
- [RHISwapChain](../swap-chain/swap-chain.md) - 交换链类
|
||||
Reference in New Issue
Block a user