QSGOpaqueTextureMaterial#
The QSGOpaqueTextureMaterial
class provides a convenient way of rendering textured geometry in the scene graph. More…
Inherited by: QSGTextureMaterial
Synopsis#
Functions#
def
anisotropyLevel
()def
filtering
()def
horizontalWrapMode
()def
mipmapFiltering
()def
setAnisotropyLevel
(level)def
setFiltering
(filteringType)def
setHorizontalWrapMode
(mode)def
setMipmapFiltering
(filteringType)def
setTexture
(texture)def
setVerticalWrapMode
(mode)def
texture
()def
verticalWrapMode
()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
Warning
This utility class is only functional when running with the default backend of the Qt Quick scenegraph.
The opaque textured material will fill every pixel in a geometry with the supplied texture. The material does not respect the opacity of the 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 defaultAttributes_TexturedPoint2D
returns an attribute set compatible with this material.
The texture to be rendered can be set using setTexture()
. How the texture 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.
- class PySide6.QtQuick.QSGOpaqueTextureMaterial#
Creates a new QSGOpaqueTextureMaterial
.
The default mipmap filtering and filtering mode is set to Nearest
. The default wrap modes is set to QSGTexture::ClampToEdge
.
- PySide6.QtQuick.QSGOpaqueTextureMaterial.m_texture#
- PySide6.QtQuick.QSGOpaqueTextureMaterial.m_filtering#
- PySide6.QtQuick.QSGOpaqueTextureMaterial.m_mipmap_filtering#
- PySide6.QtQuick.QSGOpaqueTextureMaterial.m_horizontal_wrap#
- PySide6.QtQuick.QSGOpaqueTextureMaterial.m_vertical_wrap#
- PySide6.QtQuick.QSGOpaqueTextureMaterial.m_anisotropy_level#
- PySide6.QtQuick.QSGOpaqueTextureMaterial.m_reserved#
- PySide6.QtQuick.QSGOpaqueTextureMaterial.anisotropyLevel()#
- Return type:
Returns this material’s anistropy level.
See also
Returns this material’s filtering mode.
The default filtering is QSGTexture::Nearest
.
See also
Returns this material’s horizontal wrap mode.
The default horizontal wrap mode is QSGTexture::ClampToEdge
.
See also
Returns this material’s mipmap filtering mode.
The default mipmap mode is QSGTexture::Nearest
.
See also
- PySide6.QtQuick.QSGOpaqueTextureMaterial.setAnisotropyLevel(level)#
- Parameters:
level –
AnisotropyLevel
Sets this material’s anistropy level to level
.
See also
- PySide6.QtQuick.QSGOpaqueTextureMaterial.setFiltering(filteringType)#
- Parameters:
filteringType –
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
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
- PySide6.QtQuick.QSGOpaqueTextureMaterial.setMipmapFiltering(filteringType)#
- Parameters:
filteringType –
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
- PySide6.QtQuick.QSGOpaqueTextureMaterial.setTexture(texture)#
- Parameters:
texture –
PySide6.QtQuick.QSGTexture
Sets the texture of this material to texture
.
The material does not take ownership of the texture.
See also
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
- PySide6.QtQuick.QSGOpaqueTextureMaterial.texture()#
- Return type:
Returns this texture material’s texture.
See also
Returns this material’s vertical wrap mode.
The default vertical wrap mode is QSGTexture::ClampToEdge
.
See also