Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QGLRenderState Class

The QGLRenderState class encapsulates the states of a rendering pass. More...

 #include <QGLRenderState>

This class was introduced in Qt 4.8.

Public Functions

QGLRenderState()
QGLRenderState(const QGLRenderState & other)
virtual ~QGLRenderState()
QGLMaterial * backMaterial() const
bool hasEffect() const
uint hash() const
bool isValid() const
QGLMaterial * material() const
const QGLSceneNode * node() const
QGL::StandardEffect standardEffect() const
virtual void updateFrom(const QGLSceneNode * node)
QGLAbstractEffect * userEffect() const
QGLRenderState & operator=(const QGLRenderState & rhs)
bool operator==(const QGLRenderState & rhs) const

Detailed Description

The QGLRenderState class encapsulates the states of a rendering pass.

The QGLRenderState class works with the QGLRenderOrder class to optimize the rendering order of scene nodes.

In general instances of this class are managed by the render sequencer and it should not be necessary to explicitly create or manipulate them.

A QGLRenderState instance encapsulates rendering properties for a given path through the rendering process. The state includes properties such as effects, and materials; which may either be directly set on a scene node, or inherited from its parents.

QGLRenderState may be subclassed in advanced applications to provide a different inheritance pattern for rendering properties - reimplement the updateFrom() function to do this. The default implementation simply sets an effect on the state if the argument node has an effect (found by calling the QGLSceneNode::hasEffect() function), and sets a material on the state if the node has a non-null material; otherwise the existing state is left as it is.

The render sequencer will ensure that the relevant render state is set onto the painter at the beginning of the pass which renders all nodes with that state.

See also QGLRenderOrder.

Member Function Documentation

QGLRenderState::QGLRenderState()

Creates a new QGLRenderState empty of any values.

QGLRenderState::QGLRenderState(const QGLRenderState & other)

Creates a new QGLRenderState as a copy of other

QGLRenderState::~QGLRenderState() [virtual]

Destroys this QGLRenderState recovering and resources.

QGLMaterial * QGLRenderState::backMaterial() const

Returns the back material stored on this QGLRenderState, or null if no back material has been set. The default value is null.

bool QGLRenderState::hasEffect() const

Returns true is there is a valid effect on this QGLRenderState. The default value is false.

uint QGLRenderState::hash() const

Returns a hash value representing this state.

bool QGLRenderState::isValid() const

Returns true if this is a valid representation of a render state, that is if it has ever been updated from a node; and false otherwise.

QGLMaterial * QGLRenderState::material() const

Returns the material stored on this QGLRenderState, or null if no material has been set. The default value is null.

const QGLSceneNode * QGLRenderState::node() const

Returns the node used to populate this QGLRenderState.

QGL::StandardEffect QGLRenderState::standardEffect() const

Returns the standard effect stored on this QGLRenderState. The default value is QGL::FlatColor. To determine if an effect has been specifically set call hasEffect().

void QGLRenderState::updateFrom(const QGLSceneNode * node) [virtual]

Sets the values of this QGLRenderState from the node, where the node has a value. For example if the node has an effect but no material, then this state will have its effect changed to that of the node, but this state's material will be unchanged.

QGLAbstractEffect * QGLRenderState::userEffect() const

Returns the user effect stored on this QGLRenderState, or null if no user effect has been set. The default value is null.

QGLRenderState & QGLRenderState::operator=(const QGLRenderState & rhs)

Assigns this QGLRenderState to be a copy of rhs.

bool QGLRenderState::operator==(const QGLRenderState & rhs) const

Returns true if this state is equal to rhs, that is if each of the materials, effects and values are equal to those of rhs.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web