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:
29
docs/api/rhi/device/get-native-device.md
Normal file
29
docs/api/rhi/device/get-native-device.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# RHIDevice::GetNativeDevice
|
||||
|
||||
```cpp
|
||||
virtual void* GetNativeDevice() = 0;
|
||||
```
|
||||
|
||||
获取原生图形 API 设备指针。
|
||||
|
||||
**返回:**
|
||||
- D3D12 后端: `ID3D12Device*`
|
||||
- OpenGL 后端: `void*` (GLFWwindow* 或 GL 上下文指针)
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
void* nativeDevice = device->GetNativeDevice();
|
||||
|
||||
// D3D12 使用
|
||||
ID3D12Device* d3d12Device = static_cast<ID3D12Device*>(nativeDevice);
|
||||
|
||||
// OpenGL 使用
|
||||
GLFWwindow* glfwWindow = static_cast<GLFWwindow*>(nativeDevice);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHIDevice 总览](device.md) - 返回类总览
|
||||
Reference in New Issue
Block a user