QSSGRhiContext Class
QSSGRhiContext. 더 보기...
Header: | #include <QSSGRhiContext> |
Since: | Qt 6.7 |
공용 함수
void | checkAndAdjustForNPoT(QRhiTexture *texture, QSSGRhiSamplerDescription *samplerDescription) |
QRhiCommandBuffer * | commandBuffer() const |
QRhiCommandBuffer::BeginPassFlags | commonPassFlags() const |
QRhiTexture * | dummyTexture(QRhiTexture::Flags flags, QRhiResourceUpdateBatch *rub, const QSize &size = QSize(64, 64), const QColor &fillColor = Qt::black, int arraySize = 0) |
bool | isValid() const |
int | mainPassSampleCount() const |
int | mainPassViewCount() const |
QRhiRenderPassDescriptor * | mainRenderPassDescriptor() const |
QRhiRenderTarget * | renderTarget() const |
QRhi * | rhi() const |
QRhiSampler * | sampler(const QSSGRhiSamplerDescription &samplerDescription) |
멤버 함수 문서
void QSSGRhiContext::checkAndAdjustForNPoT(QRhiTexture *texture, QSSGRhiSamplerDescription *samplerDescription)
texture 의 픽셀 크기에 따라 samplerDescription 의 타일링 및 필터링 모드를 조정합니다.
대부분의 경우 samplerDescription 은 변경되지 않습니다. 그러나 오래된 레거시 3D API를 사용하는 경우 너비 또는 높이가 2의 거듭제곱이 아닌 텍스처에 대해 QRhiSampler::Repeat 같은 타일링 모드가 지원되지 않을 수 있습니다.
이 편의 기능은 런타임에 OpenGL ES 2.0 또는 WebGL 1 구현에서 QRhi::NPOTTextureRepeat 같은 기능이 지원되지 않는 경우에도 여전히 작동할 수 있는 강력한 애플리케이션을 만드는 데 도움이 됩니다.
QRhiCommandBuffer *QSSGRhiContext::commandBuffer() const
Qt Quick 3D 렌더러가 사용하는 현재 프레임의 명령 버퍼를 반환합니다.
QRhiCommandBuffer::BeginPassFlags QSSGRhiContext::commonPassFlags() const
QRhiCommandBuffer::beginPass()를 호출할 때 권장되는 플래그를 반환합니다.
QRhiTexture *QSSGRhiContext::dummyTexture(QRhiTexture::Flags flags, QRhiResourceUpdateBatch *rub, const QSize &size = QSize(64, 64), const QColor &fillColor = Qt::black, int arraySize = 0)
지정된 flags 및 픽셀 size 을 가진 텍스처를 반환합니다.
이는 주어진 fillColor 로 채워진 "더미" 텍스처에 효율적으로 액세스하고 렌더링 스택의 여러 위치에서 재사용하기 위한 것입니다.
rub 이 함수는 적절한 캐시된 객체를 찾을 수 없는 경우 새 텍스처를 생성하고 콘텐츠를 생성하므로 QRhiResourceUpdateBatch 이 유효한 것이어야 합니다. 그런 다음 필요한 업로드 작업이 이 지정된 업데이트 배치에 큐에 대기합니다.
arraySize 가 2 이상이면 2D 텍스처 배열이 반환됩니다.
반환된 텍스처의 소유권은 Qt Quick 3D 에 유지됩니다.
bool QSSGRhiContext::isValid() const
렌더러가 성공적으로 초기화되면 true를 반환합니다.
int QSSGRhiContext::mainPassSampleCount() const
메인 렌더 패스에 사용된 샘플 수를 반환합니다.
int QSSGRhiContext::mainPassViewCount() const
메인 렌더 패스에 사용된 멀티뷰 수를 반환합니다. 멀티뷰 렌더링이 사용 중인 경우 2 또는 1(멀티뷰 없음)입니다.
QRhiRenderPassDescriptor *QSSGRhiContext::mainRenderPassDescriptor() const
Qt Quick 3D 렌더러의 메인 렌더링 패스에 사용된 QRhiRenderPassDescriptor 을 반환합니다.
QRhiRenderTarget *QSSGRhiContext::renderTarget() const
Qt Quick 3D 렌더러가 현재 프레임의 메인 렌더 패스에 사용하는 렌더 타겟을 반환합니다.
View3D 가 오프스크린이 아닌 다른 렌더모드를 사용하는 경우, 이는 사실상 스왑체인의 렌더 타깃이 될 수 있습니다. 일반적으로 렌더 타깃은 텍스처(예: QRhiTextureRenderTarget)를 참조하는데, 렌더 모드가 기본 오프스크린이거나 포스트 프로세싱 효과가 사용 중이기 때문입니다.
QRhi *QSSGRhiContext::rhi() const
Qt Quick 3D 렌더러가 사용하는 QRhi 객체를 반환합니다.
QRhiSampler *QSSGRhiContext::sampler(const QSSGRhiSamplerDescription &samplerDescription)
samplerDescription 에 지정된 필터 및 타일링 모드가 있는 샘플러를 반환합니다.
생성된 QRhiSampler 객체는 캐시되어 재사용됩니다. 따라서 항상 새로운 전용 객체를 만들지 않고도 주어진 설정으로 QRhiSampler 에 액세스할 수 있는 편리한 방법입니다.
반환된 QRhiSampler 의 소유권은 Qt Quick 3D 에 유지됩니다.
© 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.