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.