Sur cette page

QNativeInterface::QCocoaGLContext Struct

Interface native d'un NSOpenGLContext sur macOS. Plus d'informations...

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

virtual NSOpenGLContext *nativeContext() const = 0

Membres publics statiques

QOpenGLContext *fromNative(NSOpenGLContext *context, QOpenGLContext *shareContext = nullptr)

Description détaillée

Accessible via QOpenGLContext::nativeInterface().

Documentation des fonctions membres

[static] QOpenGLContext *QCocoaGLContext::fromNative(NSOpenGLContext *context, QOpenGLContext *shareContext = nullptr)

Adopte un NSOpenGLContext.

Le NSOpenGLContext adopté context est conservé. La propriété du site QOpenGLContext shareContext créé est transférée à l'appelant.

[pure virtual] NSOpenGLContext *QCocoaGLContext::nativeContext() const

Renvoie le contexte NSOpenGLC sous-jacent.

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