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의 경우 , render() 함수의 구현에 따라 연산 KEEP, 비교 함수 EQUAL, 읽기 및 쓰기 마스크 0xFF 를 사용하여 스텐실 테스트를 활성화할 수 있습니다.
[pure virtual] int RenderState::stencilValue() const
클리핑이 활성화된 상태에서 현재 스텐실 기준값을 반환합니다.
© 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.