QRhiTextureCopyDescription Class
テクスチャ間でのコピー操作について説明します。詳細...
| ヘッダー: | #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 |
パブリック関数
| QRhiTextureCopyDescription() | |
| int | destinationLayer() const |
| int | destinationLevel() const |
| QPoint | destinationTopLeft() const |
| QSize | pixelSize() const |
| void | setDestinationLayer(int layer) |
| void | setDestinationLevel(int level) |
| void | setDestinationTopLeft(const QPoint &p) |
| void | setPixelSize(const QSize &sz) |
| void | setSourceLayer(int layer) |
| void | setSourceLevel(int level) |
| void | setSourceTopLeft(const QPoint &p) |
| int | sourceLayer() const |
| int | sourceLevel() const |
| QPoint | sourceTopLeft() const |
詳細な説明
pixelSize() が空の場合、サブリソース全体がコピーされることを示します。したがって、デフォルトで構築されたコピー記述は、レイヤー 0 のレベル 0 にあるサブリソース全体がコピーされる結果となります。
注: ソーステクスチャは 、QRhiTexture::UsedAsTransferSource を使用して作成されている必要があります。
注: pixelSize()、sourceTopLeft()、およびdestinationTopLeft() で定義されるソースおよび宛先の矩形は 、それぞれソースおよび宛先のテクスチャに収まる必要があります。そうでない場合、動作は未定義となります。
キューブマップ、3D テクスチャ、およびテクスチャ配列の場合、1 回につき 1 つの面またはスライスをコピーできます。面またはスライスは、ソースおよび宛先のレイヤーインデックスによって指定されます。ミップマップされたテクスチャの場合、1 回につき 1 つのミップレベルをコピーできます。 ソースおよびデスティネーションのレイヤーインデックスとミップレベルインデックスは異なることができますが、範囲外へのコピーを避けるためにサイズと位置を慎重に制御する必要があります。範囲外へのコピーが行われた場合、その挙動は未定義となります。
注:これは 互換性の保証が限定的な RHI API です。詳細については、QRhi を参照してください。
メンバ関数のドキュメント
[constexpr noexcept default] QRhiTextureCopyDescription::QRhiTextureCopyDescription()
空のテクスチャコピーの記述を作成します。
int QRhiTextureCopyDescription::destinationLayer() const
宛先のアレイレイヤー(キューブマップの面またはアレイレイヤーのインデックス)を返します。デフォルトは 0 です。
setDestinationLayer()も参照してください 。
int QRhiTextureCopyDescription::destinationLevel() const
宛先のミップレベルを返します。デフォルトは 0 です。
setDestinationLevel()も参照してください 。
QPoint QRhiTextureCopyDescription::destinationTopLeft() const
宛先の左上座標をピクセル単位で返します。デフォルトは (0, 0) です。
setDestinationTopLeft()も参照してください 。
QSize QRhiTextureCopyDescription::pixelSize() const
コピーする領域のサイズを返します。
注: pixelSize()が 空の場合 、サブリソース全体がコピーされることを示します。したがって、デフォルトで生成されたコピー記述では、レイヤー0のレベル0にあるサブリソース全体がコピーされます。
setPixelSize()も参照してください 。
void QRhiTextureCopyDescription::setDestinationLayer(int layer)
宛先配列 `layer` を設定します。
destinationLayer()も参照してください 。
void QRhiTextureCopyDescription::setDestinationLevel(int level)
宛先のミップを設定しますlevel 。
destinationLevel()も参照してください 。
void QRhiTextureCopyDescription::setDestinationTopLeft(const QPoint &p)
p の左上隅の位置を指定します。
destinationTopLeft()も参照してください 。
void QRhiTextureCopyDescription::setPixelSize(const QSize &sz)
sz にコピーする領域のサイズを設定します。
pixelSize()も参照してください 。
void QRhiTextureCopyDescription::setSourceLayer(int layer)
ソース配列をlayer に設定します。
sourceLayer()も参照してください 。
void QRhiTextureCopyDescription::setSourceLevel(int level)
ソースのミップlevel を設定します。
sourceLevel()も参照してください 。
void QRhiTextureCopyDescription::setSourceTopLeft(const QPoint &p)
ソースの左上位置を `p` に設定します。
sourceTopLeft()も参照してください 。
int QRhiTextureCopyDescription::sourceLayer() const
ソース配列レイヤー(キューブマップの面または配列レイヤーのインデックス)を返します。デフォルトは 0 です。
setSourceLayer()も参照してください 。
int QRhiTextureCopyDescription::sourceLevel() const
ソースのミップレベルを返します。デフォルトは 0 です。
setSourceLevel()も参照してください 。
QPoint QRhiTextureCopyDescription::sourceTopLeft() const
ソースの左上位置(ピクセル単位)を返します。デフォルトは (0, 0) です。
setSourceTopLeft()も参照してください 。
© 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.