QRhiRenderPassDescriptor 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 bool isCompatible(const QRhiRenderPassDescriptor *other) const = 0
virtual const QRhiNativeHandles *nativeHandles()
virtual QRhiRenderPassDescriptor *newCompatibleRenderPassDescriptor() const = 0
virtual QVector<quint32> serializedFormat() const = 0

재구현된 공용 함수

virtual QRhiResource::Type resourceType() const override

상세 설명

렌더 패스는 기본 그래픽 API에 이러한 개념이 있는 경우 어태치먼트(색상, 깊이, 스텐실)의 모음이며 이러한 어태치먼트가 어떻게 사용되는지 설명합니다.

참고: 호환성이 제한적으로 보장되는 RHI API로, 자세한 내용은 QRhi 을 참조하세요.

멤버 함수 문서

[pure virtual] bool QRhiRenderPassDescriptor::isCompatible(const QRhiRenderPassDescriptor *other) const

other QRhiRenderPassDescriptor 이 호환되는 경우 참을 반환합니다. 즉, thisotherQRhiGraphicsPipeline::setRenderPassDescriptor() 에서 서로 바꿔서 사용할 수 있습니다.

렌더패스 디스크립터의 호환성 개념은 QRhiShaderResourceBindings 인스턴스의 layout compatibility 와 유사합니다. QRhiGraphicsPipeline 예를 들어 QRhiGraphicsPipeline 인스턴스 캐시는 단순히 포인터를 비교하는 대신 이러한 함수를 사용하여 일치하는 파이프라인을 찾을 것으로 예상되므로 호환되는 한 다른 QRhiRenderPassDescriptorQRhiShaderResourceBindings 을 파이프라인과 함께 사용할 수 있습니다.

호환성에 대한 정확한 세부 사항은 기본 그래픽 API에 따라 다릅니다. 동일한 QRhiTextureRenderTarget 의 두 렌더패스 디스크립터 created 는 항상 호환됩니다.

QRhiShaderResourceBindings 과 유사하게 기존 객체 두 개가 없어도 호환성을 테스트할 수 있습니다. serializedFormat ()를 호출하여 불투명 블롭을 추출하면 반환된 벡터를 다른 QRhiRenderPassDescriptorserializedFormat()와 비교하여 호환성을 테스트할 수 있습니다. 이는 특정 상황에서 이점이 있는데, 파이프라인이 원래 구축된 QRhiRenderPassDescriptor 을 더 이상 사용할 수 없는 경우에도 QRhiGraphicsPipelineQRhiRenderPassDescriptor 의 호환성을 테스트할 수 있기 때문입니다(하지만 serializedFormat() 에서 반환된 데이터는 여전히 사용 가능).

newCompatibleRenderPassDescriptor() 및 serializedFormat()도 참조하세요 .

[virtual] const QRhiNativeHandles *QRhiRenderPassDescriptor::nativeHandles()

백엔드별 QRhiNativeHandles 하위 클래스(예: QRhiVulkanRenderPassNativeHandles)에 대한 포인터를 반환합니다. 기본 네이티브 리소스 노출이 백엔드에서 지원되지 않는 경우 반환되는 값은 nullptr 입니다.

QRhiVulkanRenderPassNativeHandles도 참조하세요 .

[pure virtual] QRhiRenderPassDescriptor *QRhiRenderPassDescriptor::newCompatibleRenderPassDescriptor() const

이 객체와 함께 compatible 인 새 QRhiRenderPassDescriptor 을 반환합니다.

이 함수를 사용하면 QRhiRenderPassDescriptor 를 복제할 수 있습니다. 반환된 객체는 사용할 준비가 된 상태이며 소유권은 호출자에게 이전됩니다. QRhiRenderPassDescriptor 객체를 복제하는 것은 객체가 그래픽 파이프라인과 관련된 데이터 구조에 저장되어 있고(새 파이프라인을 생성할 때 렌더패스 디스크립터 객체가 필요한 경우) 렌더 타겟에서 생성된 렌더패스 디스크립터의 수명이 파이프라인보다 짧을 수 있는 상황에서 유용할 수 있습니다. (예를 들어 엔진이 렌더패스를 생성한 텍스처 및 렌더 타깃과 함께 관리하고 파기하기 때문에) 이러한 상황에서는 복제된 버전을 데이터 구조에 저장하여 소유권도 이전하는 것이 유리할 수 있습니다.

isCompatible()도 참조하세요 .

[override virtual] QRhiResource::Type QRhiRenderPassDescriptor::resourceType() const

재구현합니다: QRhiResource::resourceType() const.

리소스 타입을 리턴합니다.

[pure virtual] QVector<quint32> QRhiRenderPassDescriptor::serializedFormat() const

compatibility 에 관련된 데이터를 설명하는 불투명한 블롭이 포함된 정수 벡터를 반환합니다.

두 개의 QRhiRenderPassDescriptor 객체 rp1rp2 가 주어졌을 때 이 함수에서 반환된 데이터가 동일하면 rp1->isCompatible(rp2) 도 참입니다.

참고: 반환된 데이터는 객체가 속한 QRhi 의 수명 기간 동안 메모리에 저장하고 비교하는 데 사용됩니다. 디스크에 저장하거나 프로세스 간에 재사용하거나 백엔드가 다른 여러 QRhi 인스턴스와 함께 사용하기 위한 것이 아닙니다.

isCompatible()도 참조하세요 .

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