RenderState Class

( QSGRenderNode::RenderState )

公共函数

virtual ~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

成员函数文档编制

[虚拟] RenderState:: ~RenderState ()

Destroys the instance of RenderState. The destructor is virtual.

[pure virtual] const QRegion *RenderState:: clipRegion () const

[虚拟] void *RenderState:: get (const char * state ) const

Returns pointer to a state 值。

Reserved for future use.

[pure virtual] const QMatrix4x4 *RenderState:: projectionMatrix () const

Returns pointer to the current projection matrix.

The model-view matrix can be retrieved with QSGRenderNode::matrix (). Typically projection * modelview is the matrix that is then used in the vertex shader to transform the vertices.

[pure virtual] bool RenderState:: scissorEnabled () const

Returns the current state of scissoring.

注意: Only relevant for graphics APIs that have a dedicated on/off state of scissoring.

[pure virtual] QRect RenderState:: scissorRect () const

Returns the current scissor rectangle when clipping is active.

注意: Be aware of the differences between graphics APIs: for some the scissor rect is only active when scissoring is enabled (for example, OpenGL), while for others the scissor rect is equal to the viewport rect when there is no need to scissor away anything (for example, Direct3D 12).

[pure virtual] bool RenderState:: stencilEnabled () const

Returns the current state of stencil testing.

注意: With graphics APIs where stencil testing is enabled in pipeline state objects, instead of individual state-setting commands, it is up to the implementation of render () to enable stencil testing with operations KEEP , comparison function EQUAL , and a read and write mask of 0xFF .

[pure virtual] int RenderState:: stencilValue () const

Returns the current stencil reference value when clipping is active.