Qt3DRender::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 |
| 상태: | 사용 중단됨 |
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
속성
- 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 장면의 공유 컨텍스트. 5.13 버전 기준 공유 컨텍스트는 qt_gl_global_share_context이지만, 해당 공유 컨텍스트를 제어하려면 QWindow 를 서브클래스화하거나 QtQuickRenderControl을 사용해야 할 수도 있습니다.
Qt 3D 렌더러와 컨텍스트를 공유하는 모든 타사 엔진은 이제 Qt 3D 텍스처에서 참조될 텍스처 ID를 제공할 수 있습니다.
텍스처 속성 지정을 생략할 수 있으며, 이 경우 Qt 3D 가 런타임에 해당 속성을 파악하려고 시도합니다. 속성을 알고 있다면 당연히 직접 지정하여 Qt 3D 의 추가 작업을 줄일 수 있습니다.
사용자 정의 머티리얼과 셰이더를 사용하는 경우, 사용될 올바른 샘플러 유형을 지정해야 한다는 점을 유의하십시오.
© 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.