本页内容

Qt3DRender::QRenderCapabilities Class

class Qt3DRender::QRenderCapabilities

QRenderCapabilities 类包含与可用渲染引擎相关的设置。更多内容...

头文件: #include <qrendercapabilities.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
在 QML 中: RenderCapabilities
继承自: QObject
状态: 已弃用

该类已弃用。我们强烈建议不要在新代码中使用它。

属性

公共函数

Qt3DRender::QRenderCapabilities::API api() const
QString driverVersion() const
QStringList extensions() const
QString glslVersion() const
bool isValid() const
int majorVersion() const
int maxComputeInvocations() const
int maxComputeSharedMemorySize() const
int maxImageUnits() const
int maxSSBOBindings() const
int maxSSBOSize() const
int maxSamples() const
int maxTextureLayers() const
int maxTextureSize() const
int maxTextureUnits() const
int maxUBOBindings() const
int maxUBOSize() const
int maxWorkGroupCountX() const
int maxWorkGroupCountY() const
int maxWorkGroupCountZ() const
int maxWorkGroupSizeX() const
int maxWorkGroupSizeY() const
int maxWorkGroupSizeZ() const
int minorVersion() const
Qt3DRender::QRenderCapabilities::Profile profile() const
QString renderer() const
bool supportsCompute() const
bool supportsImageStore() const
bool supportsSSBO() const
bool supportsUBO() const
QString vendor() const

详细说明

QRenderCapabilities 提供了运行时可用图形功能的详细信息。它可用于决定某些算法应采用哪条代码路径,例如,根据计算着色器是否可用来决定。

属性文档

[read-only] api : const API

返回当前正在使用的 API。

访问函数:

Qt3DRender::QRenderCapabilities::API api() const

[read-only] driverVersion : const QString

返回驱动程序版本字符串。

访问函数:

QString driverVersion() const

[read-only] extensions : const QStringList

返回当前可用的扩展名列表。

访问函数:

QStringList extensions() const

[read-only] glslVersion : const QString

返回 GLSL 版本字符串。

访问函数:

QString glslVersion() const

[read-only] majorVersion : const int

返回当前正在使用的主版本号。

访问函数:

int majorVersion() const

[read-only] maxComputeInvocations : const int

返回可用的计算着色器的最大数量。

访问函数:

int maxComputeInvocations() const

[read-only] maxComputeSharedMemorySize : const int

返回可供计算着色器使用的最大共享内存容量。

访问函数:

int maxComputeSharedMemorySize() const

[read-only] maxImageUnits : const int

返回可用的图像单元最大数量。

访问函数:

int maxImageUnits() const

[read-only] maxSSBOBindings : const int

返回可用的 SSBO 绑定点最大数量(如果支持的话)。

访问函数:

int maxSSBOBindings() const

[read-only] maxSSBOSize : const int

返回 SSBO 的最大大小(如果可用)。

访问函数:

int maxSSBOSize() const

[read-only] maxSamples : const int

返回可用于 MSAA 的最大采样数。

访问函数:

int maxSamples() const

[read-only] maxTextureLayers : const int

返回可用纹理层的数量。

访问函数:

int maxTextureLayers() const

[read-only] maxTextureSize : const int

返回纹理的最大大小。

访问函数:

int maxTextureSize() const

[read-only] maxTextureUnits : const int

返回可用纹理单元的数量。

访问函数:

int maxTextureUnits() const

[read-only] maxUBOBindings : const int

返回可用的 UBO 绑定点最大数量(如果支持的话)。

访问函数:

int maxUBOBindings() const

[read-only] maxUBOSize : const int

返回 UBO 的最大大小(如果支持的话)。

访问函数:

int maxUBOSize() const

[read-only] maxWorkGroupCountX : const int

返回 X 轴上可用的计算着色器工作组的最大数量。

访问函数:

int maxWorkGroupCountX() const

[read-only] maxWorkGroupCountY : const int

返回 Y 轴上可用的计算着色器工作组的最大数量。

访问函数:

int maxWorkGroupCountY() const

[read-only] maxWorkGroupCountZ : const int

返回 Z 轴上可用的计算着色器工作组的最大数量。

访问函数:

int maxWorkGroupCountZ() const

[read-only] maxWorkGroupSizeX : const int

返回计算着色器本地工作组在 X 轴上的最大大小。

访问函数:

int maxWorkGroupSizeX() const

[read-only] maxWorkGroupSizeY : const int

返回计算着色器在 Y 轴上的本地工作组最大大小。

访问函数:

int maxWorkGroupSizeY() const

[read-only] maxWorkGroupSizeZ : const int

返回计算着色器本地工作组在 Z 轴上的最大尺寸。

访问函数:

int maxWorkGroupSizeZ() const

[read-only] minorVersion : const int

返回当前使用的次版本号。

访问函数:

int minorVersion() const

[read-only] profile : const Profile

返回当前正在使用的配置文件(如有)。

访问函数:

Qt3DRender::QRenderCapabilities::Profile profile() const

[read-only] renderer : const QString

返回设备标识字符串。

访问函数:

QString renderer() const

[read-only] supportsCompute : const bool

如果支持计算着色器,则返回 true。

访问函数:

bool supportsCompute() const

[read-only] supportsImageStore : const bool

如果支持 Image Store 操作,则返回 true。

访问函数:

bool supportsImageStore() const

[read-only] supportsSSBO : const bool

如果支持 SSBO,则返回 true。

访问函数:

bool supportsSSBO() const

[read-only] supportsUBO : const bool

如果支持 UBO,则返回 true。

访问函数:

bool supportsUBO() const

[read-only] valid : const bool

如果数据有效,则返回 true;否则返回Qt 3D ,表示无法查询到可用硬件。

访问函数:

bool isValid() const

[read-only] vendor : const QString

返回供应商标识字符串。

访问函数:

QString vendor() const

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.