TextureData QML Type (Uncreatable)
사용자 정의 텍스처 데이터의 기본 유형. 더 보기...
| Import Statement: | import QtQuick3D |
| In C++: | QQuick3DTextureData |
| Inherits: | |
| Inherited By: |
참고: 이 타입은 생성할 수 없는 타입입니다. QML에서 인스턴스화할 수 없습니다.
상세 설명
사용자 정의 텍스처 데이터를 사용하면 애플리케이션에서 생성한 텍스처 데이터를 활용할 수 있으며, 이 데이터는 동적으로 변경될 수도 있습니다. 사용자 정의 텍스처 데이터를 사용하려면 ` Texture `의 ` textureData ` 속성을 설정하여 `TextureData` 객체를 참조하도록 하십시오.
사용자 정의 텍스처 데이터는 C++에서 QQuick3DTextureData 인스턴스를 생성하여 구현되며, 대개 이를 상속받은 서브클래스를 사용합니다. QQuick3DTextureData 타입은 TextureData라는 이름으로 QML에 등록됩니다. 서브클래스가 QML에 등록되면 Texture 객체가 이를 참조할 수 있게 됩니다.
이 API를 사용해야 하는 예로는, 파일에서 정적 이미지를 불러오는 대신 런타임에 텍스처를 절차적으로 생성해야 하는 경우가 있습니다.
import MyCustomTexture 1.0
Model {
source: "#Cube"
materials: [
DefaultMaterial {
diffuseMap: diffuseMapCustomTexture
}
]
}
Texture {
id: diffuseMapCustomTexture
textureData: MyCustomTextureData {
}
}Texture도 참조하십시오 .
© 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.