QTextureLoader Class

class Qt3DRender::QTextureLoader

텍스처 로드 및 텍스처 프로퍼티 설정을 처리합니다. 더 보기...

Header: #include <Qt3DRender/QTexture>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
QML에서: TextureLoader
상속합니다: Qt3DRender::QAbstractTexture
상태: Deprecated

속성

공용 기능

QTextureLoader(Qt3DCore::QNode *parent = nullptr)
bool isMirrored() const
QUrl source() const

공용 슬롯

void setMirrored(bool mirrored)
void setSource(const QUrl &source)

신호

void mirroredChanged(bool mirrored)
void sourceChanged(const QUrl &source)

상세 설명

속성 문서

mirrored : bool

이 프로퍼티는 텍스처를 로드할 때 미러링할지 여부를 지정합니다. 렌더링 API에서 사용하는 텍스처 좌표의 원점과 일치하도록 이미지를 조작할 필요가 없도록 하기 위한 편의 기능입니다. 기본적으로 이 속성은 true로 설정됩니다. GPU 압축 텍스처 형식을 사용할 때는 이 속성이 적용되지 않습니다.

경고: 이 속성으로 인해 비압축 이미지 형식이나 PNG와 같은 CPU 압축 이미지 형식을 로드할 때 런타임에 성능 대가를 지불해야 합니다. 이 성능 대가를 피하려면 이 속성을 false로 설정하고 미리 미러링된 텍스처 에셋을 로드하는 것이 좋습니다.

참고: OpenGL은 텍스처 좌표의 원점을 왼쪽 아래 모서리에서 지정하는 반면, DirectX는 왼쪽 위 모서리를 사용합니다.

참고: 큐브 맵 텍스처를 사용하는 경우 큐브 맵 샘플러는 일반 텍스처 좌표가 아닌 방향을 취하므로 미러링을 비활성화해야 할 수 있습니다.

기능에 액세스합니다:

bool isMirrored() const
void setMirrored(bool mirrored)

알림 신호:

void mirroredChanged(bool mirrored)

source : QUrl

이 프로퍼티에는 현재 텍스처 소스가 저장됩니다.

함수에 액세스합니다:

QUrl source() const
void setSource(const QUrl &source)

노티파이 신호:

void sourceChanged(const QUrl &source)

멤버 함수 문서

[explicit] QTextureLoader::QTextureLoader(Qt3DCore::QNode *parent = nullptr)

parent 을 부모로 하여 새 Qt3DRender::QTextureLoader 인스턴스를 생성합니다.

파일 메타데이터와 모순되지 않는다면 기본적으로 로드된 텍스처에는 다음과 같은 프로퍼티가 설정됩니다: - wrapMode를 반복으로 설정 - minificationFilter를 LinearMipMapLinear로 설정 - magnificationFilter를 Linear로 설정 - generateMipMaps를 true로 설정 - maximumAnisotropy를 16.0f로 설정 - target을 TargetAutomatic으로 설정합니다.

[slot] void QTextureLoader::setMirrored(bool mirrored)

미러링을 mirrored 으로 설정합니다.

참고: 이렇게 하면 내부적으로 데이터 생성기를 업데이트하는 호출이 트리거됩니다.

참고: 속성에 대한 설정자 함수 mirrored.

isMirrored()도 참조하세요 .

[slot] void QTextureLoader::setSource(const QUrl &source)

텍스처 로더 소스를 source. source로 설정합니다.

참고: 프로퍼티의 세터 함수 source.

source()도 참조하세요 .

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