QSGTextureMaterial Class
La clase QSGTextureMaterial proporciona una forma conveniente de renderizar geometría texturizada en el gráfico de escena. Más...
| Cabecera: | #include <QSGTextureMaterial> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Quick)target_link_libraries(mytarget PRIVATE Qt6::Quick) |
| qmake: | QT += quick |
| Hereda: | QSGOpaqueTextureMaterial |
- Lista de todos los miembros, incluyendo los heredados
- QSGTextureMaterial es parte de Qt Quick Scene Graph Material Classes.
Descripción Detallada
Advertencia: Esta clase de utilidad sólo es funcional cuando se ejecuta con el backend por defecto de la Qt Quick scenegraph.
El material de textura rellenará cada píxel de una geometría con la textura suministrada.
La geometría que se va a renderizar con un material de textura requiere vértices en la posición 0 del atributo y coordenadas de textura en la posición 1 del atributo. La coordenada de textura es una tupla bidimensional en coma flotante. QSGGeometry::defaultAttributes_TexturedPoint2D devuelve un conjunto de atributos compatible con este material.
La textura a renderizar puede establecerse utilizando setTexture(). La forma en que debe renderizarse la textura puede especificarse utilizando setMipmapFiltering(), setFiltering(), setHorizontalWrapMode() y setVerticalWrapMode(). El estado de renderizado se establece en la instancia de textura justo antes de que se vincule.
El material texturizado respeta la matriz actual y el canal alfa de la textura. También respetará la opacidad acumulada en el scenegraph.
Un material de textura debe tener una textura establecida antes de ser utilizado como material en el gráfico de escena.
© 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.