QSharedGLTexture Class
class Qt3DRender::QSharedGLTextureQt 3D 장면에서 별도의 OpenGL 컨텍스트에서 textureId 을 사용할 수 있습니다. 더 보기...
헤더: | #include <Qt3DRender/QTexture> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
qmake: | QT += 3drender |
QML에서: | SharedGLTexture |
상속합니다: | Qt3DRender::QAbstractTexture |
상태: | Deprecated |
속성
- textureId : int
공용 기능
int | textureId() const |
공용 슬롯
void | setTextureId(int id) |
신호
void | textureIdChanged(int textureId) |
상세 설명
Qt 3D 에서 사용하는 렌더링 모드에 따라 공유 컨텍스트는 다음 중 하나가 됩니다:
- Qt 3D 가 렌더링을 구동하도록 하는 경우 qt_gl_global_share_context. QApplication 클래스에서 Qt::AA_ShareOpenGLContexts 속성을 설정하면 QOpenGLWidget 인스턴스의 컨텍스트가 qt_gl_global_share_context와 자동으로 공유됩니다.
- QtQuick 장면에서 공유 컨텍스트를 가져옵니다. 공유 컨텍스트를 제어하려면 QWindow 서브클래스를 만들거나 QtQuickRenderControl을 사용해야 할 수도 있지만 5.13에서는 qt_gl_global_share_context입니다.
이제 Qt 3D 렌더러와 컨텍스트를 공유하는 모든 타사 엔진은 Qt 3D 텍스처에서 참조할 텍스처 ID를 제공할 수 있습니다.
텍스처 속성 지정을 생략할 수 있으며, Qt 3D 은 런타임에 해당 속성이 무엇인지 확인하려고 시도합니다. 알고 있다면 당연히 제공하면 Qt 3D 에 대한 추가 작업을 피할 수 있습니다.
커스텀 머티리얼과 셰이더를 사용하는 경우 사용할 샘플러 유형을 올바르게 지정해야 한다는 점에 유의하세요.
© 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.