![]() |
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 &format, QPlatformOpenGLContext *share, EGLDisplay display, EGLConfig *config=nullptr, Flags flags={ }) | |
~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 112 of file qeglplatformcontext.cpp.
QEGLPlatformContext::~QEGLPlatformContext | ( | ) |
Definition at line 535 of file qeglplatformcontext.cpp.
|
inlineprotected |
Definition at line 85 of file qeglplatformcontext_p.h.
|
protected |
Definition at line 985 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 316 of file qeglplatformcontext.cpp.
|
protectedvirtual |
Reimplemented in QEglFSContext, and QtWaylandClient::QWaylandGLContext.
Definition at line 334 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 543 of file qeglplatformcontext.cpp.
EGLConfig QEGLPlatformContext::eglConfig | ( | ) | const |
Definition at line 980 of file qeglplatformcontext.cpp.
EGLContext QEGLPlatformContext::eglContext | ( | ) | const |
Definition at line 970 of file qeglplatformcontext.cpp.
EGLDisplay QEGLPlatformContext::eglDisplay | ( | ) | const |
Definition at line 975 of file qeglplatformcontext.cpp.
|
protectedpure virtual |
|
overridevirtual |
Implements QPlatformOpenGLContext.
Definition at line 965 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 562 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.
Reimplemented in QtWaylandClient::QWaylandGLContext.
Definition at line 308 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 474 of file qeglplatformcontext.cpp.
|
inlineoverride |
Definition at line 74 of file qeglplatformcontext_p.h.
|
protectedvirtual |
Reimplemented in QEglFSContext, and QtWaylandClient::QWaylandGLContext.
Definition at line 339 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 QQnxGLContext, QtWaylandClient::QWaylandGLContext, and QXcbEglContext.
Definition at line 551 of file qeglplatformcontext.cpp.