QSGOpenGLTexture Struct
struct QNativeInterface::QSGOpenGLTextureOpenGL 텍스처 오브젝트에 대한 액세스를 제공하고 이를 채택할 수 있도록 합니다. 더 보기...
Header: | #include <QSGTexture> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Quick) target_link_libraries(mytarget PRIVATE Qt6::Quick) |
qmake: | QT += quick |
이후: | Qt 6.0 |
- 상속된 멤버를 포함한 모든 멤버 목록
- QSGOpenGLTexture는 네이티브 인터페이스의 일부입니다.
공용 함수
virtual GLuint | nativeTexture() const = 0 |
정적 공용 멤버
(since 6.0) QSGTexture * | fromNative(GLuint textureId, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options = {}) |
(since 6.1) QSGTexture * | fromNativeExternalOES(GLuint textureId, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options = {}) |
멤버 함수 문서
[static, since 6.0]
QSGTexture *QSGOpenGLTexture::fromNative(GLuint textureId, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options = {})
window 에 대한 기존 OpenGL 텍스처 객체를 래핑하는 QSGTexture 을 새로 생성합니다.
textureId 에 지정된 네이티브 오브젝트는 결과 QSGTexture 에 의해 래핑되지만 소유되지는 않습니다. 함수 호출자는 반환된 QSGTexture 을 삭제할 책임이 있지만 기본 네이티브 오브젝트는 파괴되지 않습니다.
이 함수는 현재 2D RGBA 텍스처에만 적합합니다.
경고: 이 함수는 시나리오 그래프가 아직 초기화되지 않은 경우 null을 반환합니다.
텍스처 속성을 커스터마이징하려면 options 을 사용합니다. 여기서는 TextureHasAlphaChannel과 TextureHasMipmaps만 고려됩니다.
size 픽셀 단위로 크기를 지정합니다.
참고: 이 함수는 시나리오 그래프 렌더링 스레드에서 호출해야 합니다.
이 함수는 Qt 6.0에 도입되었습니다.
QQuickWindow::sceneGraphInitialized(), QSGTexture, 씬 그래프 - 메탈 텍스처 임포트 및 씬 그래프 - 벌칸 텍스처 임포트도참조하십시오 .
[static, since 6.1]
QSGTexture *QSGOpenGLTexture::fromNativeExternalOES(GLuint textureId, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options = {})
window 에 대한 기존 OpenGL ES 텍스처 객체를 래핑하는 QSGTexture 을 새로 생성합니다.
textureId 에 지정된 네이티브 오브젝트는 결과 QSGTexture 에 의해 래핑되지만 소유되지는 않습니다. 함수 호출자는 반환된 QSGTexture 을 삭제할 책임이 있지만, 기본 네이티브 오브젝트는 파괴되지 않습니다.
이 함수는 GL_TEXTURE_EXTERNAL_OES
대상과 함께 사용하려는 텍스처에만 적합합니다. 일반적으로 다른 장치(예: 카메라)가 데이터를 쓰는 텍스처입니다.
경고: 이 함수는 시나리오 그래프가 아직 초기화되지 않은 경우 null을 반환합니다.
텍스처 속성을 커스터마이징하려면 options 을 사용합니다. 여기서는 TextureHasAlphaChannel과 TextureHasMipmaps만 고려됩니다.
size 픽셀 단위로 크기를 지정합니다.
참고: 이 함수는 시나리오 그래프 렌더링 스레드에서 호출해야 합니다.
이 함수는 Qt 6.1에 도입되었습니다.
fromNative()도 참조하십시오 .
[pure virtual]
GLuint QSGOpenGLTexture::nativeTexture() const
OpenGL 텍스처 ID를 반환합니다.
© 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.