이 페이지에서

QSGVertexColorMaterial Class

QSGVertexColorMaterial 클래스는 씬 그래프에서 정점별로 색상이 지정된 지오메트리를 렌더링하는 편리한 방법을 제공합니다. 더 보기...

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

공개 함수

상세 설명

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

버텍스 컬러 머티리얼은 지오메트리의 각 버텍스에 색상을 부여합니다. 버텍스 사이의 픽셀은 선형 보간됩니다. 색상에는 투명도가 포함될 수 있습니다.

버텍스 컬러로 렌더링될 지오메트리는 다음 레이아웃을 가져야 합니다. 속성 위치 0에는 버텍스가 포함되어야 합니다. 속성 위치 1에는 RGBA 레이아웃을 가진 4개의 값으로 구성된 튜플인 색상이 포함되어야 합니다. 색상 값으로는 0에서 1 사이의 부동 소수점 수와 0에서 255 사이의 부호 없는 바이트가 모두 유효합니다.

참고: 렌더링파이프라인은 사전 곱해진 알파(premultiplied alpha)가 적용된 픽셀을 기대합니다.

QSGGeometry::defaultAttributes_ColoredPoint2D()를 사용하여 이 머티리얼과 호환되는 속성 세트를 구성할 수 있습니다.

버텍스 컬러 머티리얼은 렌더링 상태를 업데이트할 때 현재 불투명도와 현재 행렬을 모두 반영합니다.

멤버 함수 문서

QSGVertexColorMaterial::QSGVertexColorMaterial()

새로운 버텍스 컬러 머티리얼을 생성합니다.

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