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 、比較関数EQUAL0xFF の読み取りおよび書き込みマスクの操作でステンシルテストを有効にするかどうかは、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.