QRhiGraphicsPipeline 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

공용 형

(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 }
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
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)
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()와 같은 세터를 통한 값 설정은 create()를 호출한 후에만 유효합니다. create ()를 통해 QRhiGraphicsPipeline이 초기화된 후에는 값을 변경하지 마세요. 일부 상태를 변경하려면 새 값을 설정하고 create()를 다시 호출하세요. 그러나 이렇게 하면 모든 기본 네이티브 리소스가 효과적으로 해제되고 새 리소스가 생성됩니다. 결과적으로 작업이 무겁고 비용이 많이 들 수 있습니다. 그보다는 상태가 다른 여러 파이프라인을 생성하고 렌더 패스를 기록할 때 switch between them 을 사용하는 것이 좋습니다.

참고: 셰이더 스테이지 설정은 필수입니다. 스테이지가 하나 이상 있어야 하며 버텍스 스테이지가 있어야 합니다.

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

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

참고: 버텍스 입력 레이아웃 설정은 필수입니다.

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

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

참고: stencilReadMask() 및 stencilWriteMask()은 두 얼굴에 모두 적용됩니다. 둘 다 기본값은 0xFF입니다.

사용 예

그래픽 파이프라인의 모든 설정에는 여러 애플리케이션에 적합한 기본값이 있습니다. 따라서 그래픽 파이프라인을 만드는 최소한의 예시는 다음과 같습니다. 버텍스 셰이더가 입력 위치 0에서 단일 vec3 position 입력을 받는다고 가정합니다. QRhiShaderResourceBindingsQRhiRenderPassDescriptor 객체와 버텍스 및 조각 단계에 대한 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 토폴로지를 사용하고, 백페이스 컬링이 없으며, 블렌딩은 비활성화되지만 네 채널 모두에 대해 컬러 쓰기가 활성화되고, 깊이 테스트/쓰기가 비활성화되고, 스텐실 작업이 비활성화됩니다.

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

QRhiCommandBufferQRhi참조하세요 .

멤버 유형 문서

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
플래그 QRhiGraphicsPipeline::ColorMask

컬러 쓰기 마스크를 지정하기 위한 플래그 값

Constant
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뒷면 컬링

열거형 QRhiGraphicsPipeline::플래그
플래그 QRhiGraphicsPipeline::플래그

파이프라인의 동적 상태 및 기타 옵션을 설명하기 위한 플래그 값입니다. 뷰포트는 항상 동적입니다.

Constant설명
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)와 함께 제공되는 경우, 디버그 정보는 .qsb 파일을 생성하는 툴을 통해 요청해야 하며, 이는 Vulkan 및 SPIR-V의 경우와 유사합니다. 그러나 사전 또는 런타임에 생성된 QShader 패키지에 HLSL 소스 코드가 있는 경우 컴파일의 첫 번째 단계(HLSL 소스에서 중간 포맷으로)도 런타임에 이루어지며 이 플래그가 고려됩니다. 디버그 정보는 파이프라인을 조사할 때나 버텍스 또는 프래그먼트 셰이더 디버깅을 수행할 때 원본 소스 코드를 볼 수 있으므로 특히 RenderDoc과 같은 툴과 관련이 있습니다.

Flags 유형은 QFlags<Flag>에 대한 타입 정의입니다. 플래그 값의 OR 조합을 저장합니다.

enum QRhiGraphicsPipeline::FrontFace

앞면 와인딩 순서를 지정합니다.

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

enum QRhiGraphicsPipeline::PolygonMode

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

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

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

Constant설명
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 QRhiGraphicsPipeline::TargetBlend *QRhiGraphicsPipeline::cbeginTargetBlends() const

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

const QRhiShaderStage *QRhiGraphicsPipeline::cendShaderStages() const

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

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

렌더 타깃 블렌드 설정 목록의 마지막 항목 바로 뒤를 가리키는 상수 이터레이터를 반환합니다.

[pure virtual] bool QRhiGraphicsPipeline::create()

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

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

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

참고: 드라이버는 셰이더 및 파이프라인 데이터에 대해 다양한 영구(디스크 기반) 캐싱 전략을 사용할 수도 있으며, 이는 Qt의 제어 범위를 벗어나 숨겨져 있습니다. 경우에 따라 그래픽 API 및 QRhi 백엔드에 따라 이러한 캐시를 수동으로 관리할 수 있는 기능이 QRhi 내에 있어 직렬화 가능한 블롭을 검색한 다음 애플리케이션의 향후 실행에서 다시 로드하여 파이프라인 생성 시간을 단축할 수 있습니다. 자세한 내용은 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()도 참조하세요 .

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()도 참조하세요 .

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. 기본값은 채우기입니다.

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)

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

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)

이터레이터 firstlast 에서 렌더 타깃 블렌드 설정 목록을 설정합니다.

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()도 참조하세요 .

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