docs: update RHI API docs
This commit is contained in:
39
docs/api/rhi/opengl/device/get-device-info-impl.md
Normal file
39
docs/api/rhi/opengl/device/get-device-info-impl.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# OpenGLDevice::GetDeviceInfoImpl
|
||||
|
||||
```cpp
|
||||
const RHIDeviceInfo& GetDeviceInfoImpl() const
|
||||
```
|
||||
|
||||
获取设备信息的内部实现。
|
||||
|
||||
## 详细描述
|
||||
|
||||
返回存储在设备中的 `RHIDeviceInfo` 结构,包含 OpenGL 设备的具体信息:
|
||||
- **vendor**: GPU 厂商名称
|
||||
- **renderer**: GPU 渲染器名称
|
||||
- **version**: OpenGL 驱动版本
|
||||
- **majorVersion**: OpenGL 主版本号
|
||||
- **minorVersion**: OpenGL 次版本号
|
||||
|
||||
此方法直接返回内部缓存的设备信息,无需额外查询。
|
||||
|
||||
## 返回值
|
||||
|
||||
`const RHIDeviceInfo&` - 设备信息结构的常量引用
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
const RHIDeviceInfo& info = device.GetDeviceInfoImpl();
|
||||
std::wcout << L"GPU: " << info.renderer << std::endl;
|
||||
std::wcout << L"OpenGL Version: " << info.majorVersion << L"." << info.minorVersion << std::endl;
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLDevice](device.md) - 类总览
|
||||
- [GetDeviceInfo](get-device-info.md) - 获取设备信息(公共接口)
|
||||
Reference in New Issue
Block a user