957 B
957 B
OpenGLDevice::GetDeviceInfoImpl
const RHIDeviceInfo& GetDeviceInfoImpl() const
获取设备信息的内部实现。
详细描述
返回存储在设备中的 RHIDeviceInfo 结构,包含 OpenGL 设备的具体信息:
- vendor: GPU 厂商名称
- renderer: GPU 渲染器名称
- version: OpenGL 驱动版本
- majorVersion: OpenGL 主版本号
- minorVersion: OpenGL 次版本号
此方法直接返回内部缓存的设备信息,无需额外查询。
返回值
const RHIDeviceInfo& - 设备信息结构的常量引用
复杂度
O(1)
示例
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 - 类总览
- GetDeviceInfo - 获取设备信息(公共接口)