QRhiRenderTarget 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 |
상속합니다: | QRhiResource |
상속 대상: |
공용 함수
virtual float | devicePixelRatio() const = 0 |
virtual QSize | pixelSize() const = 0 |
QRhiRenderPassDescriptor * | renderPassDescriptor() const |
virtual int | sampleCount() const = 0 |
void | setRenderPassDescriptor(QRhiRenderPassDescriptor *desc) |
상세 설명
애플리케이션은 이 클래스의 인스턴스를 직접 생성하지 않습니다. 대신 API의 클라이언트가 newTextureRenderTarget()를 통해 인스턴스화할 수 있는 하위 클래스 QRhiTextureRenderTarget 가 있습니다. 다른 서브클래스는 QRhiSwapChainRenderTarget 이며, currentFrameRenderTarget()를 호출할 때 QRhiSwapChain 이 반환하는 유형입니다.
참고: 이것은 호환성이 제한적으로 보장되는 RHI API이며, 자세한 내용은 QRhi 을 참조하세요.
QRhiSwapChainRenderTarget 및 QRhiTextureRenderTarget도 참조하세요 .
멤버 함수 문서
[pure virtual]
float QRhiRenderTarget::devicePixelRatio() const
디바이스 픽셀 비율을 반환합니다. QRhiTextureRenderTarget 의 경우 이 값은 항상 1입니다. QRhiSwapChain 에서 검색된 타겟의 경우 이 값은 타겟 QWindow 의 device pixel ratio 을 반영합니다.
[pure virtual]
QSize QRhiRenderTarget::pixelSize() const
크기를 픽셀 단위로 반환합니다.
create()가 성공적으로 호출된 후에만 유효합니다. 그 전까지는 기본값으로 구성된 QSize 이 반환됩니다.
QRhiTextureRenderTarget 의 경우 반환되는 크기는 create() 시점에 연결된 어태치먼트의 크기, 실제로는 첫 번째 색상 어태치먼트의 크기 또는 색상 어태치먼트가 없는 경우 깊이/스텐실 버퍼입니다. 연관된 텍스처 또는 렌더버퍼의 크기가 조정되고 나중에 다시 빌드되는 경우, pixelSize()는 기본 데이터 구조를 다시 빌드하기 위해 create()에 대한 암시적 호출을 수행합니다. 이 암시적 검사는 QRhiCommandBuffer::beginPass()가 수행하는 것과 유사하며 반환된 크기가 항상 최신 상태인지 확인합니다.
QRhiRenderPassDescriptor *QRhiRenderTarget::renderPassDescriptor() const
관련 QRhiRenderPassDescriptor 을 반환합니다.
setRenderPassDescriptor()도 참조하세요 .
[pure virtual]
int QRhiRenderTarget::sampleCount() const
샘플 수 또는 멀티샘플 앤티앨리어싱이 이 렌더 타깃과 관련이 없는 경우 1을 반환합니다.
void QRhiRenderTarget::setRenderPassDescriptor(QRhiRenderPassDescriptor *desc)
이 렌더링 대상에 사용할 QRhiRenderPassDescriptor desc 을 설정합니다.
renderPassDescriptor()도 참조하세요 .
© 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.