QRhiTextureUploadEntry Class

描述纹理上传操作中的一个层(立方体贴图的面层、三维纹理的切片层、纹理阵列的元素层)。更多

页眉: #include <rhi/qrhi.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
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] QRhiTextureUploadEntry::QRhiTextureUploadEntry()

构造一个以 0 层和 0 级为目标的空 QRhiTextureUploadEntry。

注意: 在未通过setDescription() 设置QRhiTextureSubresourceUploadDescription 之前,不应提交空 QRhiTextureUploadEntry。

QRhiTextureUploadEntry::QRhiTextureUploadEntry(int layer, int level, const QRhiTextureSubresourceUploadDescription &desc)

构建一个 QRhiTextureUploadEntry,目标是给定的layer 和 miplevel ,子资源内容由desc 描述。

QRhiTextureSubresourceUploadDescription QRhiTextureUploadEntry::description() const

返回当前设置的子资源描述。

另请参阅 setDescription()。

int QRhiTextureUploadEntry::layer() const

返回当前设置的图层索引(cubemap 面、数组图层)。默认为 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() 。

© 2025 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.