TextureData QML Type

커스텀 텍스처 데이터의 기본 유형입니다. 더 보기...

Import Statement: import QtQuick3D
In C++: QQuick3DTextureData
Inherits:

Object3D

Inherited By:

ProceduralSkyTextureData and ProceduralTextureData

상세 설명

사용자 지정 텍스처 데이터를 사용하면 동적으로 변경될 수 있는 애플리케이션 생성 텍스처 데이터를 사용할 수 있습니다. 사용자 지정 텍스처 데이터를 사용하려면 TexturetextureData 속성을 설정하여 TextureData 객체를 참조합니다.

커스텀 텍스처 데이터는 QQuick3DTextureData 인스턴스를 생성하고 이를 서브클래싱하여 C++로 구현합니다. QQuick3DTextureData 유형은 TextureData라는 이름으로 QML에 등록됩니다. 서브클래스가 QML에 등록되면 텍스처 오브젝트는 이를 참조하기 시작할 수 있습니다.

파일에서 정적 이미지를 로드하는 대신 런타임에 텍스처를 절차적으로 생성해야 할 때 이 API를 사용하는 경우를 예로 들 수 있습니다.

import MyCustomTexture 1.0

Model {
    source: "#Cube"
    materials: [
        DefaultMaterial {
            diffuseMap: diffuseMapCustomTexture
        }
    ]
}

Texture {
    id: diffuseMapCustomTexture
    textureData: MyCustomTextureData {

    }
}

Texture참조하세요 .

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