QEGLContext Struct

struct QNativeInterface::QEGLContext

Native Schnittstelle zu einem EGL-Kontext. Mehr...

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

Öffentliche Funktionen

(since 6.3) virtual EGLConfig config() const = 0
(since 6.3) virtual EGLDisplay display() const = 0
(since 6.5) virtual void invalidateContext() = 0
virtual EGLContext nativeContext() const = 0

Statische öffentliche Mitglieder

QOpenGLContext *fromNative(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext = nullptr)

Detaillierte Beschreibung

Zu erreichen über QOpenGLContext::nativeInterface().

Dokumentation der Mitgliedsfunktionen

[pure virtual, since 6.3] EGLConfig QEGLContext::config() const

Gibt die EGLConfig zurück, die mit dem zugrunde liegenden EGLContext verbunden ist.

Diese Funktion wurde in Qt 6.3 eingeführt.

[pure virtual, since 6.3] EGLDisplay QEGLContext::display() const

Gibt das EGLDisplay zurück, das mit dem zugrunde liegenden EGLContext verbunden ist.

Diese Funktion wurde in Qt 6.3 eingeführt.

[static] QOpenGLContext *QEGLContext::fromNative(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext = nullptr)

Nimmt einen EGLContext context an.

Das gleiche EGLDisplay, das an eglCreateContext übergeben wurde, muss als Argument display übergeben werden.

Das Eigentum an dem erstellten QOpenGLContext shareContext wird an den Aufrufer übertragen.

[pure virtual, since 6.5] void QEGLContext::invalidateContext()

Markiert den Kontext als ungültig

Wenn dieser Kontext vom Qt Quick Scenegraph verwendet wird, wird dies den SceneGraph veranlassen, diesen Kontext zu zerstören und einen neuen zu erstellen.

Ähnlich wie bei QPlatformWindow::invalidateSurface() ist zu erwarten, dass diese Funktion nur auf bestimmten Plattformen, wie z.B. eglfs, eine Wirkung hat.

Diese Funktion wurde in Qt 6.5 eingeführt.

Siehe auch QOpenGLContext::isValid() und QPlatformWindow::invalidateSurface().

[pure virtual] EGLContext QEGLContext::nativeContext() const

Gibt den zugrunde liegenden EGLContext zurück.

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