QRhiTextureUploadEntry Class
描述纹理上传操作中的一层(对于立方体贴图为“面”,对于3D纹理为“切片”,对于纹理数组为“元素”)。更多内容...
| 头文件: | #include <rhi/qrhi.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS GuiPrivate) target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate) |
| qmake: | QT += gui-private |
| 自: | Qt 6.6 |
公共函数
| QRhiTextureUploadEntry() | |
| QRhiTextureUploadEntry(int layer, int level, const QRhiTextureSubresourceUploadDescription &desc) | |
| QRhiTextureSubresourceUploadDescription | description() const |
| int | layer() const |
| int | level() const |
| void | setDescription(const QRhiTextureSubresourceUploadDescription &desc) |
| void | setLayer(int layer) |
| void | setLevel(int level) |
详细说明
注意:这是一个 兼容性保证有限的 RHI API,详情请参见QRhi 。
成员函数文档
[noexcept default] QRhiTextureUploadEntry::QRhiTextureUploadEntry()
构建一个目标层为 0、级别为 0 的空 QRhiTextureUploadEntry。
注意: 在未通过 `setDescription()` 方法先设置 `QRhiTextureSubresourceUploadDescription ` 的情况下,不应提交空的` QRhiTextureUploadEntry` 。
QRhiTextureUploadEntry::QRhiTextureUploadEntry(int layer, int level, const QRhiTextureSubresourceUploadDescription &desc)
构建一个针对给定layer 和miplevel 的QRhiTextureUploadEntry,其子资源内容由desc 描述。
QRhiTextureSubresourceUploadDescription QRhiTextureUploadEntry::description() const
返回当前设置的子资源描述。
另请参阅 setDescription()。
int QRhiTextureUploadEntry::layer() const
返回当前设置的图层索引(立方贴图面、数组图层)。默认值为 0。
另请参阅 setLayer()。
int QRhiTextureUploadEntry::level() const
返回当前设置的MIP级别。默认值为0。
另请参阅 setLevel()。
void QRhiTextureUploadEntry::setDescription(const QRhiTextureSubresourceUploadDescription &desc)
设置子资源描述desc 。
另请参阅 description()。
void QRhiTextureUploadEntry::setLayer(int layer)
设置layer 。
另请参阅 layer()。
void QRhiTextureUploadEntry::setLevel(int level)
设置miplevel 。
另请参阅 level()。
© 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.