![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
An EGL context implementation. More...
#include <qeglplatformcontext_p.h>
Public Types | |
| enum | Flag { NoSurfaceless = 0x01 } |
Public Member Functions | |
| QEGLPlatformContext (const QSurfaceFormat &formatformat, QPlatformOpenGLContext *share, EGLDisplay displaydisplay, EGLConfig *configconfig=nullptr, Flags flagsflags={ }) | |
| ~QEGLPlatformContext () | |
| void | initialize () override |
| Called after a new instance is constructed. | |
| bool | makeCurrent (QPlatformSurface *surface) override |
| void | doneCurrent () override |
| void | swapBuffers (QPlatformSurface *surface) override |
| Reimplement in subclass to native swap buffers calls. | |
| QFunctionPointer | getProcAddress (const char *procName) override |
| Reimplement in subclass to allow dynamic querying of OpenGL symbols. | |
| QSurfaceFormat | format () const override |
| bool | isSharing () const override |
| bool | isValid () const override |
| EGLContext | nativeContext () const override |
| EGLConfig | config () const override |
| EGLDisplay | display () const override |
| virtual void | invalidateContext () override |
| EGLContext | eglContext () const |
| EGLDisplay | eglDisplay () const |
| EGLConfig | eglConfig () const |
| Public Member Functions inherited from QPlatformOpenGLContext | |
| QPlatformOpenGLContext () | |
| virtual | ~QPlatformOpenGLContext () |
| virtual GLuint | defaultFramebufferObject (QPlatformSurface *surface) const |
| Reimplement in subclass if your platform uses framebuffer objects for surfaces. | |
| virtual void | beginFrame () |
| Called when the RHI begins rendering a new frame in the context. | |
| virtual void | endFrame () |
| Called when the RHI ends rendering a in the context. | |
| QOpenGLContext * | context () const |
Static Public Member Functions | |
| template<typename T> | |
| static QOpenGLContext * | createFrom (EGLContext context, EGLDisplay contextDisplay, EGLDisplay platformDisplay, QOpenGLContext *shareContext) |
| Static Public Member Functions inherited from QPlatformOpenGLContext | |
| static bool | parseOpenGLVersion (const QByteArray &versionString, int &major, int &minor) |
Protected Member Functions | |
| QEGLPlatformContext () | |
| virtual EGLSurface | eglSurfaceForPlatformSurface (QPlatformSurface *surface)=0 |
| virtual EGLSurface | createTemporaryOffscreenSurface () |
| virtual void | destroyTemporaryOffscreenSurface (EGLSurface surface) |
| virtual void | runGLChecks () |
| bool | checkGraphicsReset () |
An EGL context implementation.
Implement QPlatformOpenGLContext using EGL. To use it in platform plugins a subclass must be created since eglSurfaceForPlatformSurface() has to be reimplemented. This function is used for mapping platform surfaces (windows) to EGL surfaces and is necessary since different platform plugins may have different ways of handling native windows (for example, a plugin may choose not to back every platform window by a real EGL surface). Other than that, no further customization is necessary.
Definition at line 27 of file qeglplatformcontext_p.h.
| Enumerator | |
|---|---|
| NoSurfaceless | |
Definition at line 31 of file qeglplatformcontext_p.h.
| QEGLPlatformContext::QEGLPlatformContext | ( | const QSurfaceFormat & | format, |
| QPlatformOpenGLContext * | share, | ||
| EGLDisplay | display, | ||
| EGLConfig * | config = nullptr, | ||
| Flags | flags = { } ) |
Definition at line 120 of file qeglplatformcontext.cpp.
| QEGLPlatformContext::~QEGLPlatformContext | ( | ) |
Definition at line 560 of file qeglplatformcontext.cpp.
|
inlineprotected |
Definition at line 85 of file qeglplatformcontext_p.h.
|
protected |
Definition at line 1010 of file qeglplatformcontext.cpp.
|
inlineoverride |
Definition at line 75 of file qeglplatformcontext_p.h.
|
inlinestatic |
Definition at line 40 of file qeglplatformcontext_p.h.
|
protectedvirtual |
Reimplemented in QEglFSContext, and QtWaylandClient::QWaylandGLContext.
Definition at line 322 of file qeglplatformcontext.cpp.
|
protectedvirtual |
Reimplemented in QEglFSContext, and QtWaylandClient::QWaylandGLContext.
Definition at line 340 of file qeglplatformcontext.cpp.
|
inlineoverride |
Definition at line 76 of file qeglplatformcontext_p.h.
|
overridevirtual |
Implements QPlatformOpenGLContext.
Reimplemented in QQnxGLContext, QtWaylandClient::QWaylandGLContext, and QXcbEglContext.
Definition at line 568 of file qeglplatformcontext.cpp.
| EGLConfig QEGLPlatformContext::eglConfig | ( | ) | const |
Definition at line 1005 of file qeglplatformcontext.cpp.
| EGLContext QEGLPlatformContext::eglContext | ( | ) | const |
Definition at line 995 of file qeglplatformcontext.cpp.
| EGLDisplay QEGLPlatformContext::eglDisplay | ( | ) | const |
Definition at line 1000 of file qeglplatformcontext.cpp.
|
protectedpure virtual |
|
overridevirtual |
Implements QPlatformOpenGLContext.
Definition at line 990 of file qeglplatformcontext.cpp.
|
overridevirtual |
Reimplement in subclass to allow dynamic querying of OpenGL symbols.
As opposed to e.g. the wglGetProcAddress function on Windows, Qt expects this methods to be able to return valid function pointers even for standard OpenGL symbols.
Implements QPlatformOpenGLContext.
Definition at line 587 of file qeglplatformcontext.cpp.
|
overridevirtual |
Called after a new instance is constructed.
The default implementation does nothing.
Subclasses can use this function to perform additional initialization that relies on virtual functions.
Reimplemented from QPlatformOpenGLContext.
Definition at line 314 of file qeglplatformcontext.cpp.
|
inlineoverridevirtual |
Definition at line 78 of file qeglplatformcontext_p.h.
|
inlineoverridevirtual |
Reimplemented from QPlatformOpenGLContext.
Definition at line 71 of file qeglplatformcontext_p.h.
|
inlineoverridevirtual |
Reimplemented from QPlatformOpenGLContext.
Definition at line 72 of file qeglplatformcontext_p.h.
|
overridevirtual |
Implements QPlatformOpenGLContext.
Reimplemented in QQnxGLContext, QtWaylandClient::QWaylandGLContext, and QXcbEglContext.
Definition at line 499 of file qeglplatformcontext.cpp.
|
inlineoverride |
Definition at line 74 of file qeglplatformcontext_p.h.
|
protectedvirtual |
Reimplemented in QEglFSContext, and QtWaylandClient::QWaylandGLContext.
Definition at line 345 of file qeglplatformcontext.cpp.
|
overridevirtual |
Reimplement in subclass to native swap buffers calls.
The implementation must support being called in a thread different than the gui-thread.
Implements QPlatformOpenGLContext.
Reimplemented in QOhosEGLPlatformContext, QQnxGLContext, QtWaylandClient::QWaylandGLContext, and QXcbEglContext.
Definition at line 576 of file qeglplatformcontext.cpp.