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  · 

QSGOpaqueTextureMaterial Class

The QSGOpaqueTextureMaterial class provides a convenient way of rendering textured geometry in the scene graph. More...

 #include <QSGOpaqueTextureMaterial>

Inherits: QSGMaterial.

Inherited by: QSGTextureMaterial.

Public Types

enum Flag { Blending, RequiresDeterminant, RequiresFullMatrix }
flags Flags

Public Functions

QSGMaterial()
QSGOpaqueTextureMaterial()
virtual ~QSGMaterial()
virtual int compare(const QSGMaterial * other) const
virtual QSGMaterialShader * createShader() const = 0
QSGTexture::Filtering filtering() const
QSGMaterial::Flags flags() const
QSGTexture::WrapMode horizontalWrapMode() const
QSGTexture::Filtering mipmapFiltering() const
void setFiltering(QSGTexture::Filtering filtering)
void setFlag(Flags flags, bool on = true)
void setHorizontalWrapMode(QSGTexture::WrapMode mode)
void setMipmapFiltering(QSGTexture::Filtering filtering)
void setTexture(QSGTexture * texture)
void setVerticalWrapMode(QSGTexture::WrapMode mode)
QSGTexture * texture() const
virtual QSGMaterialType * type() const = 0
QSGTexture::WrapMode verticalWrapMode() const

Detailed Description

The QSGOpaqueTextureMaterial class provides a convenient way of rendering textured geometry in the scene graph.

The opaque textured material will fill every pixel in a geometry with the supplied texture. The material does not respect the opacity of the QSGMaterialShader::RenderState, so opacity nodes in the parent chain of nodes using this material, have no effect.

The geometry to be rendered with an opaque texture material requires vertices in attribute location 0 and texture coordinates in attribute location 1. The texture coordinate is a 2-dimensional floating-point tuple. The QSGGeometry::defaultAttributes_TexturedPoint2D returns an attribute set compatible with this material.

The texture to be rendered is can be set using setTexture(). How the texure should be rendered can be specified using setMipmapFiltering(), setFiltering(), setHorizontalWrapMode() and setVerticalWrapMode(). The rendering state is set on the texture instance just before it is bound.

The opaque textured material respects the current matrix and the alpha channel of the texture. It will disregard the accumulated opacity in the scenegraph.

A texture material must have a texture set before it is used as a material in the scene graph.

Member Function Documentation

QSGOpaqueTextureMaterial::QSGOpaqueTextureMaterial()

Creates a new QSGOpaqueTextureMaterial.

The default mipmap filtering and filtering mode is set to QSGTexture::Nearest. The default wrap modes is set to QSGTexture::ClampToEdge.

QSGTexture::Filtering QSGOpaqueTextureMaterial::filtering() const

Returns this material's filtering mode.

The default filtering is QSGTexture::Nearest.

See also setFiltering().

QSGTexture::WrapMode QSGOpaqueTextureMaterial::horizontalWrapMode() const

Returns this material's horizontal wrap mode.

The default horizontal wrap mode is QSGTexutre::ClampToEdge

See also setHorizontalWrapMode().

QSGTexture::Filtering QSGOpaqueTextureMaterial::mipmapFiltering() const

Returns this material's mipmap filtering mode.

The default mipmap mode is QSGTexture::Nearest.

See also setMipmapFiltering().

void QSGOpaqueTextureMaterial::setFiltering(QSGTexture::Filtering filtering)

Sets the filtering to filtering.

The filtering mode is set on the texture instance just before the texture is bound for rendering.

See also filtering().

void QSGOpaqueTextureMaterial::setHorizontalWrapMode(QSGTexture::WrapMode mode)

Sets the horizontal wrap mode to mode.

The horizontal wrap mode is set on the texture instance just before the texture is bound for rendering.

See also horizontalWrapMode().

void QSGOpaqueTextureMaterial::setMipmapFiltering(QSGTexture::Filtering filtering)

Sets the mipmap mode to filtering.

The mipmap filtering mode is set on the texture instance just before the texture is bound for rendering.

If the texture does not have mipmapping support, enabling mipmapping has no effect.

See also mipmapFiltering().

void QSGOpaqueTextureMaterial::setTexture(QSGTexture * texture)

Sets the texture of this material to texture.

The material does not take ownership over the texture.

See also texture().

void QSGOpaqueTextureMaterial::setVerticalWrapMode(QSGTexture::WrapMode mode)

Sets the vertical wrap mode to mode.

The vertical wrap mode is set on the texture instance just before the texture is bound for rendering.

See also verticalWrapMode().

QSGTexture * QSGOpaqueTextureMaterial::texture() const

Returns this texture material's texture.

See also setTexture().

QSGTexture::WrapMode QSGOpaqueTextureMaterial::verticalWrapMode() const

Returns this material's vertical wrap mode.

The default vertical wrap mode is QSGTexutre::ClampToEdge

See also setVerticalWrapMode().

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