QRhiReadbackDescription Class
리드백(GPU 전용 메모리에 저장된 텍스처 내용을 읽어오는) 작업에 대해 설명합니다. 더 보기...
| 헤더: | #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부터 |
공개 함수
| QRhiReadbackDescription() | |
| QRhiReadbackDescription(QRhiTexture *texture) | |
| int | layer() const |
| int | level() const |
(since 6.10) QRect | rect() const |
| void | setLayer(int layer) |
| void | setLevel(int level) |
(since 6.10) void | setRect(const QRect &rectangle) |
| void | setTexture(QRhiTexture *tex) |
| QRhiTexture * | texture() const |
상세 설명
리드백 작업의 소스는 ` QRhiTexture `이거나 현재 타깃으로 지정된 ` QRhiSwapChain`의 현재 백버퍼입니다. ` texture()`가 설정되지 않은 경우 스왑체인이 사용됩니다. 그렇지 않은 경우 지정된 ` QRhiTexture `가 소스로 간주됩니다.
참고: 리드백에 사용되는텍스처는 QRhiTexture::UsedAsTransferSource 로 생성되어야 합니다.
참고: 리드백에 사용되는스왑체인은 QRhiSwapChain::UsedAsTransferSource 를 사용하여 생성되어야 합니다.
layer() 및 level()은 소스가 QRhiTexture 일 때만 적용됩니다.
참고: 멀티샘플 텍스처는 리드백할 수 없습니다. 그러나 멀티샘플 스왑체인 버퍼의 경우 리드백이 지원됩니다.
참고: 이는 호환성이 제한적으로 보장되는 RHI API입니다. 자세한 내용은 QRhi 를 참조하십시오.
멤버 함수 문서
[constexpr noexcept default] QRhiReadbackDescription::QRhiReadbackDescription()
빈 텍스처 리드백 설명을 생성합니다.
참고: 소스텍스처는 기본적으로 null로 설정되어 있으며, 이는 여전히 유효한 리드백입니다. 이는 현재 스왑체인(swapchain)의 백버퍼를 리드백하도록 지정함을 의미합니다. (여기서 '현재'란, texture readback 가 포함된 스왑 체인( QRhiResourceUpdateBatch )을 커밋하는 시점의 프레임 대상 스왑체인을 의미합니다.)
QRhiReadbackDescription::QRhiReadbackDescription(QRhiTexture *texture)
texture 의 레이어 0, 레벨 0을 다시 읽어들일 것을 지정하는 텍스처 리드백 설명을 생성합니다.
참고: ` texture `는 `null`일 수도 있으며, 이 경우 이 생성자는 인수가 없는 생성자와 동일합니다.
int QRhiReadbackDescription::layer() const
현재 설정된 배열 레이어(큐브맵 면, 배열 인덱스)를 반환합니다. 기본값은 0입니다.
리드백의 소스가 ` QRhiTexture`인 경우에만 적용됩니다.
setLayer()도 참조하십시오 .
int QRhiReadbackDescription::level() const
현재 설정된 미프 레벨을 반환합니다. 기본값은 0입니다.
리드백의 소스가 ` QRhiTexture`인 경우에만 적용됩니다.
setLevel()도 참조하십시오 .
[since 6.10] QRect QRhiReadbackDescription::rect() const
다시 읽을 사각형을 반환합니다. 기본값은 유효하지 않은 사각형입니다.
무효인 경우, 텍스처 또는 스왑체인 백버퍼 전체가 다시 읽힙니다.
이 함수는 Qt 6.10에서 도입되었습니다.
setRect()도 참조하십시오 .
void QRhiReadbackDescription::setLayer(int layer)
layer 배열을 다시 읽을 수 있도록 설정합니다.
layer()도 참조하십시오 .
void QRhiReadbackDescription::setLevel(int level)
읽어올 미프 level 를 설정합니다.
level()도 참조하십시오 .
[since 6.10] void QRhiReadbackDescription::setRect(const QRect &rectangle)
rectangle 를 다시 읽을 수 있도록 설정합니다.
이 함수는 Qt 6.10에서 도입되었습니다.
rect()도 참조하십시오 .
void QRhiReadbackDescription::setTexture(QRhiTexture *tex)
tex 텍스처를 리드백 작업의 소스로 설정합니다.
nullptr 을 설정하는 것도 유효하며, 이 경우 현재 스왑체인의 현재 백버퍼가 사용됩니다. (단, 이 경우 스왑체인 기반이 아닌 프레임에서는 리드백을 실행할 수 없습니다.)
참고: 멀티샘플 텍스처는 리드백할 수 없습니다. 다만, 멀티샘플 스왑체인 버퍼에 대해서는 리드백이 지원됩니다.
참고: 리드백에 사용되는텍스처는 QRhiTexture::UsedAsTransferSource 로 생성되어야 합니다.
참고: 리드백에 사용되는스왑체인은 ` QRhiSwapChain::UsedAsTransferSource`를 사용하여 생성되어야 합니다.
texture()도 참조하십시오 .
QRhiTexture *QRhiReadbackDescription::texture() const
읽어온 QRhiTexture 를 반환합니다. nullptr 로 설정해 둘 수 있으며, 이는 대신 현재 스왑 체인의 백버퍼를 사용해야 함을 나타냅니다.
setTexture()도 참조하십시오 .
© 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.