QRhiRenderTarget 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 |
| 상속: | 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 `가 반환하는 유형입니다.
참고: 이 API는 호환성 보장이 제한된 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() 호출 시점의 관련 첨부 파일(attachments)의 크기이며, 실제로는 첫 번째 색상 첨부 파일의 크기이거나, 색상 첨부 파일이 없는 경우에는 깊이/스텐실 버퍼의 크기입니다. 연관된 텍스처나 렌더 버퍼가 이후에 크기가 조정되고 재구축되는 경우, `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()도 참조하십시오 .
© 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.