QEGLContext Struct

struct QNativeInterface::QEGLContext

Native interface to an EGL context. More...

Header: #include <QOpenGLContext>
Inherited By:

QEGLPlatformContext

Public Functions

int config() const
int display() const
virtual void invalidateContext() = 0
int nativeContext() const

Static Public Members

QOpenGLContext *fromNative(int context, int display, QOpenGLContext *shareContext = nullptr)

Detailed Description

\since6.0

Accessed through QOpenGLContext::nativeInterface().

\inmoduleQtGui \ingroup native-interfaces \ingroup native-interfaces-qopenglcontext

Member Function Documentation

int QEGLContext::config() const

\since6.3 Returns the EGLConfig associated with the underlying EGLContext.

int QEGLContext::display() const

\since6.3 Returns the EGLDisplay associated with the underlying EGLContext.

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

Adopts an EGLContext context.

The same EGLDisplay passed to eglCreateContext must be passed as the display argument.

Ownership of the created QOpenGLContext shareContext is transferred to the caller.

[pure virtual] void QEGLContext::invalidateContext()

\since6.5

Marks the context as invalid

If this context is used by the Qt Quick scenegraph, this will trigger the SceneGraph to destroy this context and create a new one.

Similarly to QPlatformWindow::invalidateSurface(), this function can only be expected to have an effect on certain platforms, such as eglfs.

See also QOpenGLContext::isValid() and QPlatformWindow::invalidateSurface().

int QEGLContext::nativeContext() const

Returns the underlying EGLContext.