Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QGLXContext Class Reference

#include <qglxintegration.h>

+ Inheritance diagram for QGLXContext:
+ Collaboration diagram for QGLXContext:

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
 
- Public Member Functions inherited from QPlatformOpenGLContext
 QPlatformOpenGLContext ()
 
virtual ~QPlatformOpenGLContext ()
 
virtual void initialize ()
 Called after a new instance is constructed.
 
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.
 
QOpenGLContextcontext () const
 

Static Public Member Functions

static bool supportsThreading ()
 
static void queryDummyContext ()
 
- Static Public Member Functions inherited from QPlatformOpenGLContext
static bool parseOpenGLVersion (const QByteArray &versionString, int &major, int &minor)
 

Detailed Description

Definition at line 20 of file qglxintegration.h.

Constructor & Destructor Documentation

◆ QGLXContext() [1/2]

◆ QGLXContext() [2/2]

QGLXContext::QGLXContext ( Display * display,
GLXContext context,
void * visualInfo,
QPlatformOpenGLContext * share )

◆ ~QGLXContext()

QGLXContext::~QGLXContext ( )

Definition at line 454 of file qglxintegration.cpp.

Member Function Documentation

◆ doneCurrent()

void QGLXContext::doneCurrent ( )
overridevirtual

Implements QPlatformOpenGLContext.

Definition at line 532 of file qglxintegration.cpp.

◆ format()

QSurfaceFormat QGLXContext::format ( ) const
overridevirtual

Implements QPlatformOpenGLContext.

Definition at line 565 of file qglxintegration.cpp.

◆ getProcAddress()

QFunctionPointer QGLXContext::getProcAddress ( const char * procName)
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.

◆ glxConfig()

GLXFBConfig QGLXContext::glxConfig ( ) const
inline

Definition at line 40 of file qglxintegration.h.

◆ glxContext()

GLXContext QGLXContext::glxContext ( ) const
inline

Definition at line 39 of file qglxintegration.h.

Referenced by QGLXContext(), QGLXContext(), and nativeContext().

+ Here is the caller graph for this function:

◆ isSharing()

bool QGLXContext::isSharing ( ) const
overridevirtual

Reimplemented from QPlatformOpenGLContext.

Definition at line 570 of file qglxintegration.cpp.

◆ isValid()

bool QGLXContext::isValid ( ) const
overridevirtual

Reimplemented from QPlatformOpenGLContext.

Definition at line 575 of file qglxintegration.cpp.

◆ makeCurrent()

bool QGLXContext::makeCurrent ( QPlatformSurface * surface)
overridevirtual

Implements QPlatformOpenGLContext.

Definition at line 471 of file qglxintegration.cpp.

References QPlatformSurface::format(), QSurface::Offscreen, QGLXPbuffer::pbuffer(), Q_ASSERT, QByteArray(), screen, screenForPlatformSurface(), QSurface::supportsOpenGL(), QPlatformSurface::surface(), QSurface::surfaceClass(), void, QSurface::Window, and window().

+ Here is the call graph for this function:

◆ nativeContext()

GLXContext QGLXContext::nativeContext ( ) const
inlineoverride

Definition at line 37 of file qglxintegration.h.

References glxContext().

+ Here is the call graph for this function:

◆ queryDummyContext()

void QGLXContext::queryDummyContext ( )
static

Definition at line 598 of file qglxintegration.cpp.

References QRegularExpressionMatch::captured(), QXcbObject::connection(), QPlatformOpenGLContext::context(), QOffscreenSurface::create(), QOpenGLContext::create(), QOpenGLContext::currentContext(), QOpenGLContext::doneCurrent(), QString::fromLatin1(), QScreen::handle(), i, QOpenGLContext::makeCurrent(), QSurface::OpenGLSurface, QGuiApplication::primaryScreen, qCDebug, qEnvironmentVariableIsSet(), qglx_threadedgl_blacklist_renderer, qglx_threadedgl_blacklist_vendor, QStringLiteral, qWarning, renderer, screen, QString::toInt(), and window().

Referenced by supportsThreading().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ supportsThreading()

bool QGLXContext::supportsThreading ( )
static

Definition at line 714 of file qglxintegration.cpp.

References queryDummyContext().

Referenced by QXcbGlxIntegration::supportsThreadedOpenGL().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ swapBuffers()

void QGLXContext::swapBuffers ( QPlatformSurface * surface)
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().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: