Sur cette page

QNativeInterface::QGLXContext Struct

Interface native vers un contexte GLX. En savoir plus...

En-tête : #include <QOpenGLContext>
CMake : find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake : QT += gui
Depuis : Qt 6.0

Fonctions publiques

QGLXContext()
QGLXContext(const QNativeInterface::QGLXContext &)
QGLXContext(QNativeInterface::QGLXContext &&)
int nativeContext() const
QNativeInterface::QGLXContext &operator=(QNativeInterface::QGLXContext &&)
QNativeInterface::QGLXContext &operator=(const QNativeInterface::QGLXContext &)

Membres publics statiques

QOpenGLContext *fromNative(int configBasedContext, QOpenGLContext *shareContext = nullptr)
QOpenGLContext *fromNative(int visualBasedContext, void *visualInfo, QOpenGLContext *shareContext = nullptr)

Description détaillée

Accessible via la méthode ` QOpenGLContext::nativeInterface()`.

Documentation des fonctions membres

[constexpr noexcept default] QGLXContext::QGLXContext()

Construit par défaut une instance de ` QGLXContext`.

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

Copie et construit une instance de ` QGLXContext`. Cette fonction est supprimée.

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

Crée par « move » une instance de ` QGLXContext`. Cette fonction a été supprimée.

[static] QOpenGLContext *QGLXContext::fromNative(int configBasedContext, QOpenGLContext *shareContext = nullptr)

Adopte un GLXContext configBasedContext créé à partir d'un FBConfig.

Le contexte doit être créé à partir d’une configuration de framebuffer, à l’aide de la fonction glXCreateNewContext.

La propriété de l'QOpenGLContext shareContext ainsi créée est transférée à l'appelant.

[static] QOpenGLContext *QGLXContext::fromNative(int visualBasedContext, void *visualInfo, QOpenGLContext *shareContext = nullptr)

Adopte un GLXContext créé à partir d'un visuel X.

Le contexte doit être créé à partir d’un visuel, à l’aide de la fonction glXCreateContext. Ce même visuel doit être transmis sous forme de pointeur vers une structure XVisualInfo, dans l’argument visualInfo.

La propriété de l’ QOpenGLContext ainsi créé est transférée à l’appelant.

int QGLXContext::nativeContext() const

Renvoie le GLXContext sous-jacent.

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

La commande « Move » affecte l'other à cette instance QGLXContext. Cette fonction est supprimée.

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

Copie et attribue other à cette instance QGLXContext. Cette fonction est supprimée.

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