![]() |
Qt 6.x
The Qt SDK
|
#include <qglxintegration.h>
Public Member Functions | |
QGLXContext (Display *display, QXcbScreen *screen, const QSurfaceFormat &format, QPlatformOpenGLContext *share) | |
QGLXContext (Display *display, GLXContext context, void *visualInfo, QPlatformOpenGLContext *share) | |
~QGLXContext () | |
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 |
GLXContext | nativeContext () const override |
GLXContext | glxContext () const |
GLXFBConfig | glxConfig () const |
![]() | |
QPlatformOpenGLContext () | |
virtual | ~QPlatformOpenGLContext () |
virtual void | initialize () |
Called after a new instance is constructed. | |
virtual QSurfaceFormat | format () const =0 |
virtual void | swapBuffers (QPlatformSurface *surface)=0 |
Reimplement in subclass to native swap buffers calls. | |
virtual GLuint | defaultFramebufferObject (QPlatformSurface *surface) const |
Reimplement in subclass if your platform uses framebuffer objects for surfaces. | |
virtual bool | makeCurrent (QPlatformSurface *surface)=0 |
virtual void | doneCurrent ()=0 |
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. | |
virtual bool | isSharing () const |
virtual bool | isValid () const |
virtual QFunctionPointer | getProcAddress (const char *procName)=0 |
Reimplement in subclass to allow dynamic querying of OpenGL symbols. | |
QOpenGLContext * | context () const |
Static Public Member Functions | |
static bool | supportsThreading () |
static void | queryDummyContext () |
![]() | |
static bool | parseOpenGLVersion (const QByteArray &versionString, int &major, int &minor) |
Definition at line 20 of file qglxintegration.h.
QGLXContext::QGLXContext | ( | Display * | display, |
QXcbScreen * | screen, | ||
const QSurfaceFormat & | format, | ||
QPlatformOpenGLContext * | share | ||
) |
Definition at line 186 of file qglxintegration.cpp.
References QSurfaceFormat::CoreProfile, createDummyWindow(), QList< T >::data(), QSurfaceFormat::DebugContext, QSurfaceFormat::DefaultRenderableType, QSurfaceFormat::DeprecatedFunctions, QPlatformOpenGLContext::format(), GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB, GLX_CONTEXT_CORE_PROFILE_BIT_ARB, GLX_CONTEXT_ES2_PROFILE_BIT_EXT, GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB, GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB, GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV, GLX_LOSE_CONTEXT_ON_RESET_ARB, glxContext(), glXCreateContextAttribsARBProc, i, QOpenGLContext::LibGL, QSurfaceFormat::majorVersion(), QSurfaceFormat::minorVersion(), None, QSurfaceFormat::OpenGL, QSurfaceFormat::OpenGLES, QOpenGLContext::openGLModuleType(), QSurfaceFormat::profile(), Q_ASSERT, Q_UNLIKELY, qFatal, qglx_findConfig(), qglx_findVisualInfo(), qglx_surfaceFormatFromGLXFBConfig(), qMin(), QOPENGLF_APIENTRYP, QSurfaceFormat::renderableType(), QSurfaceFormat::ResetNotification, screen, QSurfaceFormat::setOption(), QSurfaceFormat::setOptions(), QSurfaceFormat::setRenderableType(), QList< T >::size(), QByteArray::split(), QSurfaceFormat::testOption(), updateFormatFromContext(), and window().
QGLXContext::QGLXContext | ( | Display * | display, |
GLXContext | context, | ||
void * | visualInfo, | ||
QPlatformOpenGLContext * | share | ||
) |
Definition at line 372 of file qglxintegration.cpp.
References QPlatformOpenGLContext::context(), createDummyWindow(), glxContext(), QOpenGLContext::LibGL, None, QSurfaceFormat::OpenGL, QSurfaceFormat::OpenGLES, QOpenGLContext::openGLModuleType(), Q_ASSERT, qglx_surfaceFormatFromGLXFBConfig(), qglx_surfaceFormatFromVisualInfo(), qWarning, QSurfaceFormat::setRenderableType(), Success, updateFormatFromContext(), and window().
QGLXContext::~QGLXContext | ( | ) |
Definition at line 454 of file qglxintegration.cpp.
|
overridevirtual |
Implements QPlatformOpenGLContext.
Definition at line 532 of file qglxintegration.cpp.
|
overridevirtual |
Implements QPlatformOpenGLContext.
Definition at line 565 of file qglxintegration.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 560 of file qglxintegration.cpp.
|
inline |
Definition at line 40 of file qglxintegration.h.
|
inline |
Definition at line 39 of file qglxintegration.h.
Referenced by QGLXContext(), QGLXContext(), and nativeContext().
|
overridevirtual |
Reimplemented from QPlatformOpenGLContext.
Definition at line 570 of file qglxintegration.cpp.
|
overridevirtual |
Reimplemented from QPlatformOpenGLContext.
Definition at line 575 of file qglxintegration.cpp.
|
overridevirtual |
Implements QPlatformOpenGLContext.
Definition at line 471 of file qglxintegration.cpp.
References QListSpecialMethodsBase< T >::contains(), QPlatformSurface::format(), QSurface::Offscreen, QGLXPbuffer::pbuffer(), Q_ASSERT, screen, screenForPlatformSurface(), QByteArray::split(), QSurface::supportsOpenGL(), QPlatformSurface::surface(), QSurface::surfaceClass(), QSurfaceFormat::swapInterval(), void, QSurface::Window, and window().
|
inlineoverride |
Definition at line 37 of file qglxintegration.h.
References glxContext().
|
static |
Definition at line 598 of file qglxintegration.cpp.
References QRegularExpressionMatch::captured(), QXcbObject::connection(), QPlatformOpenGLContext::context(), QOffscreenSurface::create(), QOpenGLContext::create(), QOpenGLContext::currentContext(), QScopedPointer< T, Cleanup >::data(), QOpenGLContext::doneCurrent(), QString::fromLatin1(), QScreen::handle(), i, QOpenGLContext::makeCurrent(), QRegularExpression::match(), QSurface::OpenGLSurface, QGuiApplication::primaryScreen, qCDebug, qEnvironmentVariableIsSet(), qglx_threadedgl_blacklist_renderer, qglx_threadedgl_blacklist_vendor, QStringLiteral, qWarning, renderer, QScopedPointer< T, Cleanup >::reset(), screen, QOpenGLContext::surface(), QString::toInt(), and window().
Referenced by supportsThreading().
|
static |
Definition at line 714 of file qglxintegration.cpp.
References queryDummyContext().
Referenced by QXcbGlxIntegration::supportsThreadedOpenGL().
|
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.
Definition at line 541 of file qglxintegration.cpp.
References QXcbWindow::needsSync(), QSurface::Offscreen, QXcbWindow::postSyncWindowRequest(), QPlatformSurface::surface(), QSurface::surfaceClass(), QSurface::Window, and xcb_window().