이 페이지에서

QSGTextureMaterial Class

QSGTextureMaterial 클래스는 씬 그래프에서 텍스처가 적용된 지오메트리를 렌더링하는 편리한 방법을 제공합니다. 더 보기...

헤더: #include <QSGTextureMaterial>
CMake: find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
qmake: QT += quick
상속받음: QSGOpaqueTextureMaterial

상세 설명

경고: 이 유틸리티 클래스는 Qt Quick 시네그래프의 기본 백엔드로 실행할 때만 작동합니다.

텍스처가 적용된 머티리얼은 지오메트리의 모든 픽셀을 제공된 텍스처로 채웁니다.

텍스처 머티리얼로 렌더링될 지오메트리는 속성 위치 0에 버텍스를, 속성 위치 1에 텍스처 좌표를 포함해야 합니다. 텍스처 좌표는 2차원 부동 소수점 튜플입니다. QSGGeometry::defaultAttributes_TexturedPoint2D 는 이 머티리얼과 호환되는 속성 세트를 반환합니다.

렌더링할 텍스처는 ` setTexture()`를 사용하여 설정할 수 있습니다. 텍스처의 렌더링 방식은 ` setMipmapFiltering()`, ` setFiltering()`, ` setHorizontalWrapMode()` 및 ` setVerticalWrapMode()`를 사용하여 지정할 수 있습니다. 렌더링 상태는 텍스처 인스턴스가 바인딩되기 직전에 설정됩니다.

텍스처가 적용된 머티리얼은 텍스처의 현재 행렬과 알파 채널을 반영합니다. 또한 씬그래프에서 누적된 불투명도도 반영합니다.

텍스처 머티리얼은 씬 그래프에서 머티리얼로 사용되기 전에 텍스처가 설정되어 있어야 합니다.

© 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.