En esta página

QNativeInterface::QGLXContext Struct

Interfaz nativa para un contexto GLX. Más...

Cabecera: #include <QOpenGLContext>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Desde: Qt 6.0

Funciones Públicas

int nativeContext() const

Miembros Públicos Estáticos

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

Descripción Detallada

Se accede a través de QOpenGLContext::nativeInterface().

Documentación de la Función Miembro

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

Adopta un GLXContext configBasedContext creado a partir de un FBConfig.

El contexto debe crearse a partir de una configuración de framebuffer, utilizando la función glXCreateNewContext.

La propiedad del QOpenGLContext creado shareContext se transfiere a la persona que llama.

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

Adopta un GLXContext creado a partir de un visual X.

El contexto debe crearse a partir de un visual, utilizando la función glXCreateContext. El mismo visual debe pasarse como puntero a una estructura XVisualInfo, en el argumento visualInfo.

La propiedad del QOpenGLContext creado se transfiere al llamante.

int QGLXContext::nativeContext() const

Devuelve el GLXContext subyacente.

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