이 페이지에서

QRhiGraphicsPipeline 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

공개 유형

(since 6.6) struct StencilOpState
(since 6.6) struct TargetBlend
enum BlendFactor { Zero, One, SrcColor, OneMinusSrcColor, DstColor, …, OneMinusSrc1Alpha }
enum BlendOp { Add, Subtract, ReverseSubtract, Min, Max }
flags ColorMask
enum ColorMaskComponent { R, G, B, A }
enum CompareOp { Never, Less, Equal, LessOrEqual, Greater, …, Always }
enum CullMode { None, Front, Back }
enum Flag { UsesBlendConstants, UsesStencilRef, UsesScissor, CompileShadersWithDebugInfo, UsesShadingRate, UsesIndirectDraws }
flags Flags
enum FrontFace { CCW, CW }
enum PolygonMode { Fill, Line }
enum StencilOp { StencilZero, Keep, Replace, IncrementAndClamp, DecrementAndClamp, …, DecrementAndWrap }
enum Topology { Triangles, TriangleStrip, TriangleFan, Lines, LineStrip, …, Patches }

공개 함수

const QRhiShaderStage *cbeginShaderStages() const
const QRhiGraphicsPipeline::TargetBlend *cbeginTargetBlends() const
const QRhiShaderStage *cendShaderStages() const
const QRhiGraphicsPipeline::TargetBlend *cendTargetBlends() const
virtual bool create() = 0
QRhiGraphicsPipeline::CullMode cullMode() const
int depthBias() const
QRhiGraphicsPipeline::CompareOp depthOp() const
QRhiGraphicsPipeline::Flags flags() const
QRhiGraphicsPipeline::FrontFace frontFace() const
(since 6.11) bool hasDepthClamp() const
bool hasDepthTest() const
bool hasDepthWrite() const
bool hasStencilTest() const
float lineWidth() const
(since 6.7) int multiViewCount() const
int patchControlPointCount() const
QRhiGraphicsPipeline::PolygonMode polygonMode() const
QRhiRenderPassDescriptor *renderPassDescriptor() const
int sampleCount() const
void setCullMode(QRhiGraphicsPipeline::CullMode mode)
void setDepthBias(int bias)
(since 6.11) void setDepthClamp(bool enable)
void setDepthOp(QRhiGraphicsPipeline::CompareOp op)
void setDepthTest(bool enable)
void setDepthWrite(bool enable)
void setFlags(QRhiGraphicsPipeline::Flags f)
void setFrontFace(QRhiGraphicsPipeline::FrontFace f)
void setLineWidth(float width)
(since 6.7) void setMultiViewCount(int count)
void setPatchControlPointCount(int count)
void setPolygonMode(QRhiGraphicsPipeline::PolygonMode mode)
void setRenderPassDescriptor(QRhiRenderPassDescriptor *desc)
void setSampleCount(int s)
void setShaderResourceBindings(QRhiShaderResourceBindings *srb)
void setShaderStages(std::initializer_list<QRhiShaderStage> list)
void setShaderStages(InputIterator first, InputIterator last)
void setSlopeScaledDepthBias(float bias)
void setStencilBack(const QRhiGraphicsPipeline::StencilOpState &state)
void setStencilFront(const QRhiGraphicsPipeline::StencilOpState &state)
void setStencilReadMask(quint32 mask)
void setStencilTest(bool enable)
void setStencilWriteMask(quint32 mask)
void setTargetBlends(std::initializer_list<QRhiGraphicsPipeline::TargetBlend> list)
void setTargetBlends(InputIterator first, InputIterator last)
void setTopology(QRhiGraphicsPipeline::Topology t)
void setVertexInputLayout(const QRhiVertexInputLayout &layout)
QRhiShaderResourceBindings *shaderResourceBindings() const
const QRhiShaderStage *shaderStageAt(qsizetype index) const
qsizetype shaderStageCount() const
float slopeScaledDepthBias() const
QRhiGraphicsPipeline::StencilOpState stencilBack() const
QRhiGraphicsPipeline::StencilOpState stencilFront() const
quint32 stencilReadMask() const
quint32 stencilWriteMask() const
const QRhiGraphicsPipeline::TargetBlend *targetBlendAt(qsizetype index) const
qsizetype targetBlendCount() const
QRhiGraphicsPipeline::Topology topology() const
QRhiVertexInputLayout vertexInputLayout() const

재구현된 공용 함수

virtual QRhiResource::Type resourceType() const override

상세 설명

그래픽 파이프라인을 나타냅니다. 이것이 기본 네이티브 그래픽 API에서 정확히 무엇에 매핑되는지는 상황에 따라 다릅니다. 예를 들어 Vulkan과 같이 파이프라인 객체라는 개념이 있는 경우, QRhi 백엔드는 create()를 호출할 때 이러한 객체를 생성합니다. 그 외의 경우, 예를 들어 OpenGL에서는 QRhiGraphicsPipeline이 단순히 다양한 상태를 수집할 뿐이며, ` create()`의 주요 임무는 해당 셰이더 프로그램을 설정하는 것이지만, 요청된 상태를 확인하는 작업은 나중에 미루게 됩니다.

모든 QRhiResource 하위 클래스와 마찬가지로, 2단계 초기화 패턴이 적용됩니다. 즉, setDepthTest()과 같은 세터(setter)를 통해 값을 설정하는 것은 create()를 호출한 후에야 비로소 효력이 발생합니다. QRhiGraphicsPipeline이 create()를 통해 초기화된 후에는 어떤 값도 변경하지 마십시오. 상태를 변경하려면 새 값을 설정하고 create()를 다시 호출하십시오. 그러나 이 경우 기본적으로 사용되는 모든 네이티브 리소스가 해제되고 새로운 리소스가 생성됩니다. 결과적으로 이는 부하가 크고 비용이 많이 드는 작업이 될 수 있습니다. 대신, 서로 다른 상태를 가진 여러 파이프라인을 생성하고, 렌더 패스를 기록할 때 switch between them 를 호출하는 방식을 권장합니다.

참고: 셰이더 스테이지설정은 필수입니다. 스테이지가 적어도 하나는 있어야 하며, 버텍스 스테이지가 반드시 포함되어야 합니다.

참고: 셰이더 리소스 바인딩을설정하는 것은 필수입니다. 참조된 ` QRhiShaderResourceBindings ` 객체에 대해서는 ` create()`가 호출될 시점에 이미 ` create()`가 호출되어 있어야 합니다. 어떤 스테이지의 셰이더도 리소스를 기대하지 않는 한, 바인딩이 없는 ` QRhiShaderResourceBindings ` 객체와 연결하는 것도 유효합니다. 실제 리소스(즉, 바인딩 포인트에 대한 버퍼, 텍스처 등이 ` nullptr`로 설정된 경우)를 지정하지 않은 ` QRhiShaderResourceBindings ` 객체를 사용하는 것도 유효합니다. 단, 모든 바인딩에 대한 리소스를 지정하는 ` layout-compatible ` QRhiShaderResourceBindings 가 렌더 패스를 기록할 때 ` setShaderResources()`를 통해 설정될 예정인 경우에 한합니다.

참고: 렌더 패스 디스크립터를설정하는 것은 필수입니다. setRenderPassDescriptor()에 전달할 수 있는 QRhiRenderPassDescriptor 를 얻으려면 QRhiTextureRenderTarget::newCompatibleRenderPassDescriptor() 또는 QRhiSwapChain::newCompatibleRenderPassDescriptor() 중 하나를 사용하십시오.

참고: 버텍스 입력 레이아웃을설정해야 합니다.

참고: sampleCount()의 기본값은 1이며, 렌더 타겟의 색상 및 깊이 스텐실 어태치먼트의 샘플 수와 일치해야 합니다.

참고: 깊이테스트 , 깊이 쓰기 및 스텐실테스트는 기본적으로 비활성화되어 있습니다. 면 컬링 모드는 기본적으로 컬링 없음으로 설정됩니다.

참고: stencilReadMask() 및 stencilWriteMask()는 양쪽 면 모두에 적용됩니다. 두 매개변수 모두 기본값은 0xFF입니다.

사용 예

그래픽 파이프라인의 모든 설정에는 많은 애플리케이션에 적합할 수 있는 기본값이 있습니다. 따라서 그래픽 파이프라인을 생성하는 최소한의 예제는 다음과 같을 수 있습니다. 이는 버텍스 셰이더가 입력 위치 0에서 단일 vec3 position 입력을 받는다고 가정합니다. QRhiShaderResourceBindings 및 QRhiRenderPassDescriptor 객체와 버텍스 및 프래그먼트 스테이지를 위한 QShader 컬렉션을 사용하여 다음과 같이 파이프라인을 생성할 수 있습니다:

QRhiShaderResourceBindings *srb;
QRhiRenderPassDescriptor *rpDesc;
QShader vs, fs;
// ...

QRhiVertexInputLayout inputLayout;
inputLayout.setBindings({ { 3 * sizeof(float) } });
inputLayout.setAttributes({ { 0, 0, QRhiVertexInputAttribute::Float3, 0 } });

QRhiGraphicsPipeline *ps = rhi->newGraphicsPipeline();
ps->setShaderStages({ { QRhiShaderStage::Vertex, vs }, { QRhiShaderStage::Fragment, fs } });
ps->setVertexInputLayout(inputLayout);
ps->setShaderResourceBindings(srb);
ps->setRenderPassDescriptor(rpDesc);
if (!ps->create()) { error(); }

위의 코드는 많은 설정과 상태에 대해 기본값을 사용하는 파이프라인 객체를 생성합니다. 예를 들어, 이 파이프라인은 Triangles 토폴로지를 사용하며, 백페이스 컬링은 적용되지 않고, 블렌딩은 비활성화되지만 4개 채널 모두에 대해 색상 쓰기는 활성화되며, 깊이 테스트/쓰기는 비활성화되고, 스텐실 연산은 비활성화됩니다.

참고: 이는 호환성 보장이 제한적인 RHI API입니다. 자세한 내용은 QRhi 를 참조하십시오.

QRhiCommandBuffer 및 QRhi도 참조하십시오 .

멤버 유형 설명서

enum QRhiGraphicsPipeline::BlendFactor

블렌드 계수를 지정합니다

상수값
QRhiGraphicsPipeline::Zero0
QRhiGraphicsPipeline::One1
QRhiGraphicsPipeline::SrcColor2
QRhiGraphicsPipeline::OneMinusSrcColor3
QRhiGraphicsPipeline::DstColor4
QRhiGraphicsPipeline::OneMinusDstColor5
QRhiGraphicsPipeline::SrcAlpha6
QRhiGraphicsPipeline::OneMinusSrcAlpha7
QRhiGraphicsPipeline::DstAlpha8
QRhiGraphicsPipeline::OneMinusDstAlpha9
QRhiGraphicsPipeline::ConstantColor10
QRhiGraphicsPipeline::OneMinusConstantColor11
QRhiGraphicsPipeline::ConstantAlpha12
QRhiGraphicsPipeline::OneMinusConstantAlpha13
QRhiGraphicsPipeline::SrcAlphaSaturate14
QRhiGraphicsPipeline::Src1Color15
QRhiGraphicsPipeline::OneMinusSrc1Color16
QRhiGraphicsPipeline::Src1Alpha17
QRhiGraphicsPipeline::OneMinusSrc1Alpha18

enum QRhiGraphicsPipeline::BlendOp

블렌드 연산을 지정합니다

상수값
QRhiGraphicsPipeline::Add0
QRhiGraphicsPipeline::Subtract1
QRhiGraphicsPipeline::ReverseSubtract2
QRhiGraphicsPipeline::Min3
QRhiGraphicsPipeline::Max4

enum QRhiGraphicsPipeline::ColorMaskComponent
flags QRhiGraphicsPipeline::ColorMask

색상 쓰기 마스크를 지정하기 위한 플래그 값

상수값
QRhiGraphicsPipeline::R1 << 0
QRhiGraphicsPipeline::G1 << 1
QRhiGraphicsPipeline::B1 << 2
QRhiGraphicsPipeline::A1 << 3

ColorMask 유형은 QFlags<ColorMaskComponent>에 대한 typedef입니다. 이 유형은 ColorMaskComponent 값들의 OR 조합을 저장합니다.

enum QRhiGraphicsPipeline::CompareOp

깊이 또는 스텐실 비교 함수를 지정합니다

상수값설명
QRhiGraphicsPipeline::Never0 
QRhiGraphicsPipeline::Less1(깊이 값의 기본값)
QRhiGraphicsPipeline::Equal2 
QRhiGraphicsPipeline::LessOrEqual3 
QRhiGraphicsPipeline::Greater4 
QRhiGraphicsPipeline::NotEqual5 
QRhiGraphicsPipeline::GreaterOrEqual6 
QRhiGraphicsPipeline::Always7(스텐실의 기본값)

enum QRhiGraphicsPipeline::CullMode

컬링 모드를 지정합니다

상수값설명
QRhiGraphicsPipeline::None0컬링 없음 (기본값)
QRhiGraphicsPipeline::Front1전면 면 켈링
QRhiGraphicsPipeline::Back2뒷면 제거

enum QRhiGraphicsPipeline::Flag
flags QRhiGraphicsPipeline::Flags

파이프라인의 동적 상태를 설명하는 플래그 값 및 기타 옵션. 뷰포트는 항상 동적으로 변경됩니다.

상수값설명
QRhiGraphicsPipeline::UsesBlendConstants1 << 0QRhiCommandBuffer::setBlendConstants()를 통해 블렌드 색상 상수가 설정됨을 나타냅니다.
QRhiGraphicsPipeline::UsesStencilRef1 << 1QRhiCommandBuffer::setStencilRef()을 통해 스텐실 참조 값이 설정될 것임을 나타냅니다.
QRhiGraphicsPipeline::UsesScissor1 << 2QRhiCommandBuffer::setScissor()를 통해 시저 사각형이 설정될 것임을 나타냅니다.
QRhiGraphicsPipeline::CompileShadersWithDebugInfo1 << 3디버그 정보를 활성화한 상태로 셰이더를 컴파일하도록 요청합니다. 이는 소스 코드로부터의 런타임 셰이더 컴파일이 포함될 때에만 해당되며, 기본 인프라가 이를 지원하는 경우에만 적용됩니다. 구체적인 예를 들면, GLSL에서 SPIR-V로의 컴파일이 런타임에 발생하지 않기 때문에 Vulkan 및 SPIR-V의 경우에는 이 항목이 관련이 없습니다. 반면, Direct3D와 HLSL의 경우 여러 가지 옵션이 있습니다. QShader 패키지에 사전 컴파일된 바이트코드(DXBC)가 포함되어 있는 경우, Vulkan 및 SPIR-V의 경우와 마찬가지로 .qsb 파일을 생성하는 도구를 통해 디버그 정보를 요청해야 합니다. 그러나 사전 또는 런타임에 생성된 QShader 패키지에 HLSL 소스 코드가 포함된 경우, 컴파일의 첫 번째 단계(HLSL 소스에서 중간 형식으로의 변환)도 이 플래그를 고려하여 런타임에 수행됩니다. 디버그 정보는 특히 RenderDoc과 같은 도구에서 중요합니다. 파이프라인을 조사하거나 버텍스 또는 프래그먼트 셰이더 디버깅을 수행할 때 원본 소스 코드를 확인할 수 있게 해주기 때문입니다.
QRhiGraphicsPipeline::UsesShadingRate1 << 4드로우당(파이프라인당) 셰이딩 속도 값이 QRhiCommandBuffer::setShadingRate()를 통해 설정될 것임을 나타냅니다. 이 플래그를 지정하지 않고 setShadingRate()를 호출하면, 기본 그래픽 API에 따라 예상치 못한 결과가 나타날 수 있습니다.
QRhiGraphicsPipeline::UsesIndirectDraws (since Qt 6.12)1 << 5이 파이프라인이 간접 드로우 호출(QRhiCommandBuffer::drawIndirect() 또는 QRhiCommandBuffer::drawIndexedIndirect())과 함께 사용될 것임을 나타냅니다. 이 플래그를 설정하면 Metal 백엔드가 GPU 주도 렌더링에 ICB(Indirect Command Buffers)를 사용할 수 있게 되어, 드로우 횟수가 많은 경우 CPU 오버헤드를 크게 줄일 수 있습니다. 간접 드로우를 사용할 때 이 플래그를 설정하지 않아도 기능은 정상적으로 작동하지만, Metal에서 성능이 최적화되지 않을 수 있습니다. 이 플래그는 다른 백엔드에는 영향을 미치지 않습니다.

Flags 유형은 QFlags<Flag>에 대한 typedef입니다. 이 유형은 Flag 값들의 OR 조합을 저장합니다.

enum QRhiGraphicsPipeline::FrontFace

전면 권선 순서를 지정합니다

상수값설명
QRhiGraphicsPipeline::CCW0반시계 방향 (기본값)
QRhiGraphicsPipeline::CW1시계 방향

enum QRhiGraphicsPipeline::PolygonMode

다각형 래스터화 모드를 지정합니다.

다각형 모드(Metal의 삼각형 채우기 모드, D3D의 채우기 모드)는 다각형을 래스터화할 때 사용되는 채우기 모드를 지정합니다. 다각형은 솔리드(채우기)로 그려지거나 와이어 메쉬(선)로 그려질 수 있습니다.

채우기 방식이 아닌 다각형 모드에 대한 지원은 선택 사항이며, ‘ QRhi::NonFillPolygonMode ’ 기능으로 표시됩니다. OpenGL ES 및 일부 Vulkan 구현에서는 이 기능이 지원되지 않는 것으로 보고될 가능성이 높으며, 이는 ‘Fill’ 이외의 값을 사용할 수 없음을 의미합니다.

상수값설명
QRhiGraphicsPipeline::Fill0다각형 내부가 채워집니다(기본값).
QRhiGraphicsPipeline::Line1다각형의 경계 가장자리가 선분으로 그려집니다.

enum QRhiGraphicsPipeline::StencilOp

스텐실 연산을 지정합니다

상수값설명
QRhiGraphicsPipeline::StencilZero0 
QRhiGraphicsPipeline::Keep1(기본값)
QRhiGraphicsPipeline::Replace2 
QRhiGraphicsPipeline::IncrementAndClamp3 
QRhiGraphicsPipeline::DecrementAndClamp4 
QRhiGraphicsPipeline::Invert5 
QRhiGraphicsPipeline::IncrementAndWrap6 
QRhiGraphicsPipeline::DecrementAndWrap7 

enum QRhiGraphicsPipeline::Topology

기본 토폴로지를 지정합니다

상수값설명
QRhiGraphicsPipeline::Triangles0(기본값)
QRhiGraphicsPipeline::TriangleStrip1 
QRhiGraphicsPipeline::TriangleFan2( QRhi::TriangleFanTopology 가 지원되는 경우에만 사용 가능)
QRhiGraphicsPipeline::Lines3 
QRhiGraphicsPipeline::LineStrip4 
QRhiGraphicsPipeline::Points5 
QRhiGraphicsPipeline::Patches6( QRhi::Tessellation 가 지원되는 경우에만 사용할 수 있으며, 파이프라인에 테셀레이션 스테이지가 포함되어야 함)

멤버 함수 문서

const QRhiShaderStage *QRhiGraphicsPipeline::cbeginShaderStages() const

셰이더 스테이지 목록의 첫 번째 항목을 가리키는 const 이터레이터를 반환합니다.

const QRhiGraphicsPipeline::TargetBlend *QRhiGraphicsPipeline::cbeginTargetBlends() const

렌더 타겟 블렌드 설정 목록의 첫 번째 항목을 가리키는 const 이터레이터를 반환합니다.

const QRhiShaderStage *QRhiGraphicsPipeline::cendShaderStages() const

셰이더 스테이지 목록의 마지막 항목 바로 뒤를 가리키는 const 이터레이터를 반환합니다.

const QRhiGraphicsPipeline::TargetBlend *QRhiGraphicsPipeline::cendTargetBlends() const

렌더 타겟 블렌드 설정 목록의 마지막 항목 바로 다음을 가리키는 const 이터레이터를 반환합니다.

[pure virtual] bool QRhiGraphicsPipeline::create()

해당 네이티브 그래픽 리소스를 생성합니다. 이전에 destroy() 호출 없이 create()를 호출하여 이미 리소스가 존재하는 경우, 먼저 destroy()가 암시적으로 호출됩니다.

성공 시 true 를 반환하고, 그래픽 작업이 실패한 경우 false 를 반환합니다. 반환 값과 관계없이 destroy()를 호출하는 것은 항상 안전합니다.

참고: 기본 그래픽 API에 따라, 특히 셰이더가 소스나 중간 바이트코드 형식에서 GPU 고유의 명령어 세트로 컴파일/최적화될 때,이는 비용이 많이 드는 작업일 수 있습니다. 해당되는 경우, QRhi 백엔드는 이를 가속화하기 위해 관련 비영구적 기능을 자동으로 설정합니다. 예를 들어, Vulkan 백엔드는 애플리케이션의 수명 기간 동안 데이터 재사용을 개선하기 위해 VkPipelineCache 를 자동으로 생성합니다.

참고: 드라이버는 셰이더 및 파이프라인 데이터에 대해 다양한 영구적(디스크 기반) 캐싱 전략을 사용할 수도 있으며, 이는 Qt에 노출되지 않으며 Qt의 제어 범위를 벗어납니다. 경우에 따라 그래픽 API 및 QRhi 백엔드에 따라, QRhi 내에 이러한 캐시를 수동으로 관리할 수 있는 기능이 있어, 직렬화 가능한 blob을 검색한 후 향후 애플리케이션 실행 시 이를 다시 불러와 파이프라인 생성 시간을 단축할 수 있습니다. 자세한 내용은 QRhi::pipelineCacheData() 및 QRhi::setPipelineCacheData()를 참조하십시오. 또한 Qt Quick 와 같은 상위 수준의 Qt 프레임워크에서 관리하는 QRhi 인스턴스를 사용할 경우, 이러한 디스크 기반 캐싱이 자동으로 처리될 수 있다는 점에 유의하십시오. 예를 들어, QQuickWindow 는 기본적으로 디스크 기반 파이프라인 캐시를 사용하며(이는 드라이버 수준의 캐싱에 추가로 제공됨),

QRhiGraphicsPipeline::CullMode QRhiGraphicsPipeline::cullMode() const

현재 설정된 면 켈링 모드를 반환합니다.

setCullMode()도 참조하십시오 .

int QRhiGraphicsPipeline::depthBias() const

현재 설정된 깊이 바이어스를 반환합니다.

setDepthBias()도 참조하십시오 .

QRhiGraphicsPipeline::CompareOp QRhiGraphicsPipeline::depthOp() const

깊이 비교 함수를 반환합니다.

setDepthOp()도 참조하십시오 .

QRhiGraphicsPipeline::Flags QRhiGraphicsPipeline::flags() const

현재 설정된 플래그를 반환합니다.

setFlags()도 참조하십시오 .

QRhiGraphicsPipeline::FrontFace QRhiGraphicsPipeline::frontFace() const

현재 설정된 전면 모드 정보를 반환합니다.

setFrontFace()도 참조하십시오 .

[since 6.11] bool QRhiGraphicsPipeline::hasDepthClamp() const

깊이 클램프가 활성화되어 있으면 true를 반환합니다.

이 함수는 Qt 6.11부터 도입되었습니다.

bool QRhiGraphicsPipeline::hasDepthTest() const

깊이 검사가 활성화되어 있으면 true를 반환합니다.

bool QRhiGraphicsPipeline::hasDepthWrite() const

심도 쓰기가 활성화되어 있으면 true를 반환합니다.

bool QRhiGraphicsPipeline::hasStencilTest() const

스텐실 테스트가 활성화되어 있으면 true를 반환합니다.

float QRhiGraphicsPipeline::lineWidth() const

현재 설정된 선 두께를 반환합니다. 기본값은 1.0f입니다.

setLineWidth()도 참조하십시오 .

[since 6.7] int QRhiGraphicsPipeline::multiViewCount() const

조회수 카운트를 반환합니다. 기본값은 0이며, 이는 멀티뷰 렌더링이 없음을 나타냅니다.

이 함수는 Qt 6.7에서 도입되었습니다.

setMultiViewCount()도 참조하십시오 .

int QRhiGraphicsPipeline::patchControlPointCount() const

현재 설정된 패치 제어점의 개수를 반환합니다.

setPatchControlPointCount()도 참조하십시오 .

QRhiGraphicsPipeline::PolygonMode QRhiGraphicsPipeline::polygonMode() const

다각형 모드를 반환합니다.

setPolygonMode()도 참조하십시오 .

QRhiRenderPassDescriptor *QRhiGraphicsPipeline::renderPassDescriptor() const

현재 설정된 QRhiRenderPassDescriptor 를 반환합니다.

setRenderPassDescriptor()도 참조하십시오 .

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

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

리소스 유형을 반환합니다.

int QRhiGraphicsPipeline::sampleCount() const

현재 설정된 샘플 수를 반환합니다. 1은 멀티샘플 앤티앨리어싱이 적용되지 않음을 의미합니다.

setSampleCount()도 참조하십시오 .

void QRhiGraphicsPipeline::setCullMode(QRhiGraphicsPipeline::CullMode mode)

지정된 면 켈링 mode 을 설정합니다.

cullMode()도 참조하십시오 .

void QRhiGraphicsPipeline::setDepthBias(int bias)

bias 의 깊이를 설정합니다. 기본값은 0입니다.

depthBias()도 참조하십시오 .

[since 6.11] void QRhiGraphicsPipeline::setDepthClamp(bool enable)

enable 가 true인 경우 깊이 클램핑을 활성화합니다. 깊이 클램핑이 활성화되면, 일반적으로 근거리 또는 원거리 클립 평면에 의해 잘려나갔을 프라이미티브가 래스터화되며, 해당 프라이미티브의 깊이 값은 깊이 범위로 제한됩니다. 비활성화된 경우(기본값), 이러한 프라이미티브는 잘려나갑니다.

참고: QRhi::DepthClamp 기능이 지원되지 않는 것으로 보고된 경우이 설정은 무시됩니다.

이 함수는 Qt 6.11에서 도입되었습니다.

hasDepthClamp()도 참조하십시오 .

void QRhiGraphicsPipeline::setDepthOp(QRhiGraphicsPipeline::CompareOp op)

op 의 깊이 비교 함수를 설정합니다.

depthOp()도 참조하십시오 .

void QRhiGraphicsPipeline::setDepthTest(bool enable)

enable 에 따라 깊이 테스트를 활성화하거나 비활성화합니다. 기본적으로 깊이 테스트와 깊이 데이터 쓰기 모두 비활성화되어 있습니다.

hasDepthTest() 및 setDepthWrite()도 참조하십시오 .

void QRhiGraphicsPipeline::setDepthWrite(bool enable)

enable 에 따라 깊이 버퍼에 깊이 데이터를 기록하는 기능을 제어합니다. 기본적으로 이 기능은 비활성화되어 있습니다. 깊이 기록은 일반적으로 깊이 테스트와 함께 활성화됩니다.

참고: 깊이 테스트가 활성화되지 않은 상태에서 깊이 쓰기를활성화하면 원하는 결과를 얻지 못할 수 있으므로 피해야 합니다.

hasDepthWrite() 및 setDepthTest()도 참조하십시오 .

void QRhiGraphicsPipeline::setFlags(QRhiGraphicsPipeline::Flags f)

f 플래그를 설정합니다.

flags()도 참조하십시오 .

void QRhiGraphicsPipeline::setFrontFace(QRhiGraphicsPipeline::FrontFace f)

전면 모드 f 를 설정합니다.

frontFace()도 참조하십시오 .

void QRhiGraphicsPipeline::setLineWidth(float width)

width 줄을 설정합니다. 런타임 시 ‘ QRhi::WideLines ’ 기능이 지원되지 않는 것으로 보고될 경우, 1.0f 이외의 값은 무시됩니다.

lineWidth()도 참조하십시오 .

[since 6.7] void QRhiGraphicsPipeline::setMultiViewCount(int count)

멀티뷰 렌더링을 위한 뷰의 ‘ count ’을 설정합니다. 기본값은 0이며, 이는 멀티뷰 렌더링을 수행하지 않음을 의미합니다. 멀티뷰 렌더링을 활성화하려면 ‘ count ’ 값이 2 이상이어야 합니다.

멀티뷰는 MultiView feature 가 지원되는 것으로 보고된 경우에만 사용할 수 있습니다. 렌더 타깃은 2D 텍스처 배열이어야 하며, 렌더 타깃의 컬러 어태치먼트에는 동일한 count 가 설정되어 있어야 합니다.

멀티뷰 렌더링에 대한 자세한 내용은 QRhiColorAttachment::setMultiViewCount()을 참조하십시오.

이 함수는 Qt 6.7에서 도입되었습니다.

multiViewCount(), QRhi::MultiView 및 QRhiColorAttachment::setMultiViewCount()도 참조하십시오 .

void QRhiGraphicsPipeline::setPatchControlPointCount(int count)

패치 제어점의 개수를 count 로 설정합니다. 기본값은 3입니다. 이 설정은 토폴로지가 Patches 로 설정된 경우에만 사용됩니다.

patchControlPointCount()도 참조하십시오 .

void QRhiGraphicsPipeline::setPolygonMode(QRhiGraphicsPipeline::PolygonMode mode)

다각형을 ‘ mode ’로 설정합니다. 기본값은 ‘Fill’입니다.

polygonMode() 및 QRhi::NonFillPolygonMode도 참조하십시오 .

void QRhiGraphicsPipeline::setRenderPassDescriptor(QRhiRenderPassDescriptor *desc)

지정된 QRhiRenderPassDescriptor desc 과 연결됩니다.

renderPassDescriptor()도 참조하십시오 .

void QRhiGraphicsPipeline::setSampleCount(int s)

샘플 수를 설정합니다. s 의 일반적인 값은 1, 4 또는 8입니다. 파이프라인은 항상 렌더 타깃과 호환되어야 하며, 즉 샘플 수가 일치해야 합니다.

sampleCount() 및 QRhi::supportedSampleCounts()도 참조하십시오 .

void QRhiGraphicsPipeline::setShaderResourceBindings(QRhiShaderResourceBindings *srb)

srb 와 연관되어 있으며, 리소스 바인딩 레이아웃과 리소스(QRhiBuffer, QRhiTexture) 자체를 설명합니다. 파이프라인 생성 시에는 레이아웃만 중요하므로 후자는 선택 사항입니다. 따라서, 여기에 전달된 srb 는 드로우 호출을 기록하기 전에 setShaderResources()를 통해 바인딩된 다른 layout-compatible QRhiShaderResourceBindings 가 존재하는 한, 실제 버퍼나 텍스처 객체를 명시하지 않아도 됩니다(nullptr).

shaderResourceBindings()도 참조하십시오 .

void QRhiGraphicsPipeline::setShaderStages(std::initializer_list<QRhiShaderStage> list)

셰이더 스테이지의 list 를 설정합니다.

template <typename InputIterator> void QRhiGraphicsPipeline::setShaderStages(InputIterator first, InputIterator last)

first 및 last 이터레이터에서 셰이더 스테이지 목록을 설정합니다.

void QRhiGraphicsPipeline::setSlopeScaledDepthBias(float bias)

경사 스케일링 깊이 bias 를 설정합니다. 기본값은 0입니다.

slopeScaledDepthBias()도 참조하십시오 .

void QRhiGraphicsPipeline::setStencilBack(const QRhiGraphicsPipeline::StencilOpState &state)

뒷면의 스텐실 테스트 state 를 설정합니다.

stencilBack()도 참조하십시오 .

void QRhiGraphicsPipeline::setStencilFront(const QRhiGraphicsPipeline::StencilOpState &state)

전면 면에 대한 스텐실 테스트 state 를 설정합니다.

stencilFront()도 참조하십시오 .

void QRhiGraphicsPipeline::setStencilReadMask(quint32 mask)

mask 의 스텐실 읽기 설정을 지정합니다. 기본값은 0xFF입니다.

stencilReadMask()도 참조하십시오 .

void QRhiGraphicsPipeline::setStencilTest(bool enable)

enable 에 따라 스텐실 테스트를 활성화하거나 비활성화합니다. 기본적으로 이 기능은 비활성화되어 있습니다.

hasStencilTest()도 참조하십시오 .

void QRhiGraphicsPipeline::setStencilWriteMask(quint32 mask)

스텐실 쓰기 mask 를 설정합니다. 기본값은 0xFF입니다.

stencilWriteMask()도 참조하십시오 .

void QRhiGraphicsPipeline::setTargetBlends(std::initializer_list<QRhiGraphicsPipeline::TargetBlend> list)

렌더 타겟 블렌드 설정의 ‘ list ’을 설정합니다. 이는 리스트 형식입니다. 여러 렌더 타겟이 사용될 경우(예: ‘ QRhiColorAttachment ’이 두 개 이상인 ‘ QRhiTextureRenderTarget ’), 렌더 타겟(컬러 어태치먼트)마다 하나의 ‘ TargetBlend ’ 구조체가 필요하기 때문입니다.

기본적으로 기본 생성된 TargetBlend 세트가 하나 있습니다.

QRhi::MaxColorAttachments도 참조하십시오 .

template <typename InputIterator> void QRhiGraphicsPipeline::setTargetBlends(InputIterator first, InputIterator last)

first 및 last 이터레이터에서 렌더 타겟 블렌드 설정 목록을 설정합니다.

void QRhiGraphicsPipeline::setTopology(QRhiGraphicsPipeline::Topology t)

t 의 기본 토폴로지를 설정합니다.

topology()도 참조하십시오 .

void QRhiGraphicsPipeline::setVertexInputLayout(const QRhiVertexInputLayout &layout)

layout 의 정점 입력을 지정합니다.

vertexInputLayout()도 참조하십시오 .

QRhiShaderResourceBindings *QRhiGraphicsPipeline::shaderResourceBindings() const

현재 연결된 QRhiShaderResourceBindings 객체를 반환합니다.

setShaderResourceBindings()도 참조하십시오 .

const QRhiShaderStage *QRhiGraphicsPipeline::shaderStageAt(qsizetype index) const

지정된 index 의 셰이더 스테이지를 반환합니다.

qsizetype QRhiGraphicsPipeline::shaderStageCount() const

이 파이프라인에 포함된 셰이더 스테이지의 수를 반환합니다.

float QRhiGraphicsPipeline::slopeScaledDepthBias() const

현재 설정된 기울기 스케일링된 깊이 바이어스를 반환합니다.

setSlopeScaledDepthBias()도 참조하십시오 .

QRhiGraphicsPipeline::StencilOpState QRhiGraphicsPipeline::stencilBack() const

뒷면의 현재 스텐실 테스트 상태를 반환합니다.

setStencilBack()도 참조하십시오 .

QRhiGraphicsPipeline::StencilOpState QRhiGraphicsPipeline::stencilFront() const

전면 면에 대한 현재 스텐실 테스트 상태를 반환합니다.

setStencilFront()도 참조하십시오 .

quint32 QRhiGraphicsPipeline::stencilReadMask() const

현재 스텐실 읽기 마스크를 반환합니다.

setStencilReadMask()도 참조하십시오 .

quint32 QRhiGraphicsPipeline::stencilWriteMask() const

현재 스텐실 쓰기 마스크를 반환합니다.

setStencilWriteMask()도 참조하십시오 .

const QRhiGraphicsPipeline::TargetBlend *QRhiGraphicsPipeline::targetBlendAt(qsizetype index) const

지정된 index 의 렌더 타겟 블렌드 설정을 반환합니다.

qsizetype QRhiGraphicsPipeline::targetBlendCount() const

렌더 타겟 블렌드 설정의 개수를 반환합니다.

QRhiGraphicsPipeline::Topology QRhiGraphicsPipeline::topology() const

현재 설정된 프리미티브 토폴로지를 반환합니다.

setTopology()도 참조하십시오 .

QRhiVertexInputLayout QRhiGraphicsPipeline::vertexInputLayout() const

현재 설정된 정점 입력 레이아웃 사양을 반환합니다.

setVertexInputLayout()도 참조하십시오 .

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