이 페이지에서

QNativeInterface::QSGOpenGLTexture Struct

OpenGL 텍스처 객체에 대한 액세스를 제공하고 이를 사용할 수 있게 합니다. 더 보기...

헤더: #include <QSGTexture>
CMake: find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
qmake: QT += quick
다음부터: Qt 6.0부터

공개 함수

QSGOpenGLTexture()
QSGOpenGLTexture(const QNativeInterface::QSGOpenGLTexture &)
QSGOpenGLTexture(QNativeInterface::QSGOpenGLTexture &&)
virtual GLuint nativeTexture() const = 0
QNativeInterface::QSGOpenGLTexture &operator=(QNativeInterface::QSGOpenGLTexture &&)
QNativeInterface::QSGOpenGLTexture &operator=(const QNativeInterface::QSGOpenGLTexture &)

정적 공용 멤버

(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 = {})

상세 설명

멤버 함수 설명

[constexpr noexcept default] QSGOpenGLTexture::QSGOpenGLTexture()

QSGOpenGLTexture 의 인스턴스를 기본 생성합니다.

[delete] QSGOpenGLTexture::QSGOpenGLTexture(const QNativeInterface::QSGOpenGLTexture &)

QSGOpenGLTexture 의 인스턴스를 복사하여 생성합니다. 이 함수는 삭제되었습니다.

[delete] QSGOpenGLTexture::QSGOpenGLTexture(QNativeInterface::QSGOpenGLTexture &&)

QSGOpenGLTexture 의 인스턴스를 move-construct로 생성합니다. 이 함수는 삭제되었습니다.

[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, Scene Graph - Metal 텍스처 가져오기 및 Scene Graph - Vulkan 텍스처 가져오기도참조하십시오 .

[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를 반환합니다.

[delete] QNativeInterface::QSGOpenGLTexture &QSGOpenGLTexture::operator=(QNativeInterface::QSGOpenGLTexture &&)

other 를 이 QSGOpenGLTexture 인스턴스에 할당합니다. 이 함수는 삭제되었습니다.

[delete] QNativeInterface::QSGOpenGLTexture &QSGOpenGLTexture::operator=(const QNativeInterface::QSGOpenGLTexture &)

other 를 이 QSGOpenGLTexture 인스턴스에 복사-할당합니다. 이 함수는 삭제되었습니다.

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