Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qglxintegration.cpp File Reference

(02de77535f2a94cbeb7e0ea01895ba4e556e165c)

#include <QDebug>
#include "qxcbwindow.h"
#include "qxcbscreen.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <GL/glx.h>
#include <QtGui/qguiapplication.h>
#include <QtGui/QOpenGLContext>
#include <QtGui/QOffscreenSurface>
#include "qglxintegration.h"
#include <QtGui/private/qglxconvenience_p.h>
#include "qxcbglintegration.h"
Include dependency graph for qglxintegration.cpp:

Go to the source code of this file.

Macros

#define register   /* C++17 deprecated register */
#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB   0x00000001
#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB   0x00000002
#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT   0x00000004
#define GLX_CONTEXT_PROFILE_MASK_ARB   0x9126
#define GL_CONTEXT_FLAG_DEBUG_BIT   0x00000002
#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB   0x00000004
#define GL_RESET_NOTIFICATION_STRATEGY_ARB   0x8256
#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB   0x8256
#define GL_LOSE_CONTEXT_ON_RESET_ARB   0x8252
#define GLX_LOSE_CONTEXT_ON_RESET_ARB   0x8252
#define GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV   0x20F7

Typedefs

typedef const GLubyte *(* glGetStringiProc) (GLenum, GLuint)

Functions

static Window createDummyWindow (Display *dpy, XVisualInfo *visualInfo, int screenNumber, Window rootWin)
static Window createDummyWindow (Display *dpy, GLXFBConfig config, int screenNumber, Window rootWin)
static QByteArray getGlString (GLenum param)
static bool hasGlExtension (const QSurfaceFormat &format, const char *ext)
static void updateFormatFromContext (QSurfaceFormat &format)
static QXcbScreenscreenForPlatformSurface (QPlatformSurface *surface)

Variables

QT_BEGIN_NAMESPACE typedef GLXContext(* glXCreateContextAttribsARBProc )(Display *, GLXFBConfig, GLXContext, Bool, const int *)
static const char * qglx_threadedgl_blacklist_renderer []
static const char * qglx_threadedgl_blacklist_vendor []

Macro Definition Documentation

◆ GL_CONTEXT_FLAG_DEBUG_BIT

#define GL_CONTEXT_FLAG_DEBUG_BIT   0x00000002

Definition at line 50 of file qglxintegration.cpp.

◆ GL_LOSE_CONTEXT_ON_RESET_ARB

#define GL_LOSE_CONTEXT_ON_RESET_ARB   0x8252

Definition at line 66 of file qglxintegration.cpp.

◆ GL_RESET_NOTIFICATION_STRATEGY_ARB

#define GL_RESET_NOTIFICATION_STRATEGY_ARB   0x8256

Definition at line 58 of file qglxintegration.cpp.

◆ GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB

#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB   0x00000002

Definition at line 38 of file qglxintegration.cpp.

◆ GLX_CONTEXT_CORE_PROFILE_BIT_ARB

#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB   0x00000001

Definition at line 34 of file qglxintegration.cpp.

◆ GLX_CONTEXT_ES2_PROFILE_BIT_EXT

#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT   0x00000004

Definition at line 42 of file qglxintegration.cpp.

◆ GLX_CONTEXT_PROFILE_MASK_ARB

#define GLX_CONTEXT_PROFILE_MASK_ARB   0x9126

Definition at line 46 of file qglxintegration.cpp.

◆ GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB

#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB   0x8256

Definition at line 62 of file qglxintegration.cpp.

◆ GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB

#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB   0x00000004

Definition at line 54 of file qglxintegration.cpp.

◆ GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV

#define GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV   0x20F7

Definition at line 74 of file qglxintegration.cpp.

◆ GLX_LOSE_CONTEXT_ON_RESET_ARB

#define GLX_LOSE_CONTEXT_ON_RESET_ARB   0x8252

Definition at line 70 of file qglxintegration.cpp.

◆ register

#define register   /* C++17 deprecated register */

Definition at line 10 of file qglxintegration.cpp.

Typedef Documentation

◆ glGetStringiProc

typedef const GLubyte *(* glGetStringiProc)(GLenum, GLuint)

Definition at line 31 of file qglxintegration.cpp.

Function Documentation

◆ createDummyWindow() [1/2]

Window createDummyWindow ( Display * dpy,
GLXFBConfig config,
int screenNumber,
Window rootWin )
static

Definition at line 97 of file qglxintegration.cpp.

References createDummyWindow().

Referenced by QGLXContext::QGLXContext().

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

◆ createDummyWindow() [2/2]

Window createDummyWindow ( Display * dpy,
XVisualInfo * visualInfo,
int screenNumber,
Window rootWin )
static

Definition at line 77 of file qglxintegration.cpp.

Referenced by QGLXContext::QGLXContext(), and createDummyWindow().

Here is the caller graph for this function:

◆ getGlString()

QByteArray getGlString ( GLenum param)
inlinestatic

Definition at line 107 of file qglxintegration.cpp.

Referenced by updateFormatFromContext().

Here is the caller graph for this function:

◆ hasGlExtension()

bool hasGlExtension ( const QSurfaceFormat & format,
const char * ext )
static

Definition at line 114 of file qglxintegration.cpp.

◆ screenForPlatformSurface()

QXcbScreen * screenForPlatformSurface ( QPlatformSurface * surface)
static

Definition at line 461 of file qglxintegration.cpp.

◆ updateFormatFromContext()

void updateFormatFromContext ( QSurfaceFormat & format)
static

Definition at line 135 of file qglxintegration.cpp.

References getGlString().

Here is the call graph for this function:

Variable Documentation

◆ glXCreateContextAttribsARBProc

QT_BEGIN_NAMESPACE typedef GLXContext(* glXCreateContextAttribsARBProc)(Display *, GLXFBConfig, GLXContext, Bool, const int *) ( Display * ,
GLXFBConfig ,
GLXContext ,
Bool ,
const int *  )

Definition at line 30 of file qglxintegration.cpp.

◆ qglx_threadedgl_blacklist_renderer

const char * qglx_threadedgl_blacklist_renderer
static
Initial value:
= {
"Chromium",
nullptr
}

Definition at line 588 of file qglxintegration.cpp.

Referenced by QGLXContext::queryDummyContext().

◆ qglx_threadedgl_blacklist_vendor

const char * qglx_threadedgl_blacklist_vendor
static
Initial value:
= {
"llvmpipe",
"nouveau",
nullptr
}

Definition at line 593 of file qglxintegration.cpp.

Referenced by QGLXContext::queryDummyContext().