QSGRenderNode::RenderState Struct
struct QSGRenderNode::RenderState투사 매트릭스 및 클리핑에 대한 정보를 제공합니다. 더 보기...
공용 함수
virtual const QRegion * | clipRegion() const = 0 |
virtual void * | get(const char *state) const |
virtual const QMatrix4x4 * | projectionMatrix() const = 0 |
virtual bool | scissorEnabled() const = 0 |
virtual QRect | scissorRect() const = 0 |
virtual bool | stencilEnabled() const = 0 |
virtual int | stencilValue() const = 0 |
QSGRenderNode::render()도 참조하십시오 .
멤버 함수 문서
[pure virtual]
const QRegion *RenderState::clipRegion() const
현재 클립 영역을 반환하거나 스텐실 또는 시소링을 통해 클리핑이 구현되는 백엔드의 경우 null을 반환합니다.
software
백엔드는 프로젝션, 시저 또는 스텐실을 사용하지 않으므로 대부분의 렌더링 상태가 사용되지 않습니다. 그러나 QPainter 에서 설정할 수 있는 클립 영역은 render()에서 수동으로 재구성하는 것이 합리적이지 않으므로 여전히 전달해야 합니다. 따라서 이 함수를 통해 조회할 수 있습니다. 지역은 세계 좌표로 되어 있으며 Qt::ReplaceClip 을 사용하여 QPainter::setClipRegion()에 전달할 수 있습니다. 클립 영역이 이미 QSGRenderNode::matrix()에 제공된 트랜스폼에 매핑되어 있으므로 QPainter::setTransform()를 호출하기 전에 이 작업을 수행해야 합니다.
[virtual]
void *RenderState::get(const char *state) const
state 값에 대한 포인터를 반환합니다.
향후 사용을 위해 예약되었습니다.
[pure virtual]
const QMatrix4x4 *RenderState::projectionMatrix() const
현재 투영 행렬에 대한 포인터를 반환합니다.
모델 뷰 행렬은 QSGRenderNode::matrix()로 검색할 수 있습니다. 일반적으로 projection * modelview
은 버텍스 셰이더에서 버텍스를 변환하는 데 사용되는 행렬입니다.
[pure virtual]
bool RenderState::scissorEnabled() const
현재 가위질 상태를 반환합니다.
참고: 가위질 전용 켜기/끄기 상태가 있는 그래픽 API에만 해당됩니다.
[pure virtual]
QRect RenderState::scissorRect() const
클리핑이 활성화된 경우 현재 가위 직사각형을 반환합니다. x와 y는 왼쪽 하단 좌표입니다.
[pure virtual]
bool RenderState::stencilEnabled() const
스텐실 테스트의 현재 상태를 반환합니다.
참고: 개별 상태 설정 명령 대신 파이프라인 상태 개체에서 스텐실 테스트가 활성화된 그래픽 API의 경우, KEEP
, 비교 함수 EQUAL
, 읽기 및 쓰기 마스크 0xFF
의 연산으로 스텐실 테스트를 활성화하려면 render() 구현에 따라 달라집니다.
[pure virtual]
int RenderState::stencilValue() const
클리핑이 활성화된 경우 현재 스텐실 참조 값을 반환합니다.
© 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.