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
qglxintegration.cpp File Reference

(da898fca026f629be0ed234f0a89a99bc662385d)

#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 49 of file qglxintegration.cpp.

Referenced by updateFormatFromContext().

◆ GL_LOSE_CONTEXT_ON_RESET_ARB

#define GL_LOSE_CONTEXT_ON_RESET_ARB   0x8252

Definition at line 65 of file qglxintegration.cpp.

Referenced by updateFormatFromContext().

◆ GL_RESET_NOTIFICATION_STRATEGY_ARB

#define GL_RESET_NOTIFICATION_STRATEGY_ARB   0x8256

Definition at line 57 of file qglxintegration.cpp.

Referenced by updateFormatFromContext().

◆ GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB

#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB   0x00000002

Definition at line 37 of file qglxintegration.cpp.

Referenced by QGLXContext::QGLXContext().

◆ GLX_CONTEXT_CORE_PROFILE_BIT_ARB

#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB   0x00000001

Definition at line 33 of file qglxintegration.cpp.

Referenced by QGLXContext::QGLXContext().

◆ GLX_CONTEXT_ES2_PROFILE_BIT_EXT

#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT   0x00000004

Definition at line 41 of file qglxintegration.cpp.

Referenced by QGLXContext::QGLXContext().

◆ GLX_CONTEXT_PROFILE_MASK_ARB

#define GLX_CONTEXT_PROFILE_MASK_ARB   0x9126

Definition at line 45 of file qglxintegration.cpp.

Referenced by QGLXContext::QGLXContext().

◆ GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB

#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB   0x8256

Definition at line 61 of file qglxintegration.cpp.

Referenced by QGLXContext::QGLXContext().

◆ GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB

#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB   0x00000004

Definition at line 53 of file qglxintegration.cpp.

Referenced by QGLXContext::QGLXContext().

◆ GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV

#define GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV   0x20F7

Definition at line 73 of file qglxintegration.cpp.

Referenced by QGLXContext::QGLXContext().

◆ GLX_LOSE_CONTEXT_ON_RESET_ARB

#define GLX_LOSE_CONTEXT_ON_RESET_ARB   0x8252

Definition at line 69 of file qglxintegration.cpp.

Referenced by QGLXContext::QGLXContext().

◆ register

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

Definition at line 9 of file qglxintegration.cpp.

Typedef Documentation

◆ glGetStringiProc

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

Definition at line 30 of file qglxintegration.cpp.

Function Documentation

◆ createDummyWindow() [1/2]

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

Definition at line 96 of file qglxintegration.cpp.

References createDummyWindow(), Q_UNLIKELY, qFatal, and window().

+ Here is the call graph for this function:

◆ createDummyWindow() [2/2]

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

Definition at line 76 of file qglxintegration.cpp.

References window().

Referenced by QGLXContext::QGLXContext(), QGLXContext::QGLXContext(), createDummyGLWindow(), createDummyWindow(), QQuickDesignerSupportItems::createPrimitive(), and QWindowsClipboard::registerViewer().

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

◆ getGlString()

static QByteArray getGlString ( GLenum param)
inlinestatic

Definition at line 106 of file qglxintegration.cpp.

References QByteArray().

Referenced by updateFormatFromContext().

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

◆ hasGlExtension()

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

Definition at line 113 of file qglxintegration.cpp.

References GL_NUM_EXTENSIONS, GLint(), and i.

Referenced by updateFormatFromContext().

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

◆ screenForPlatformSurface()

static QXcbScreen * screenForPlatformSurface ( QPlatformSurface * surface)
static

Definition at line 460 of file qglxintegration.cpp.

References QSurface::Offscreen, screen, QPlatformSurface::surface(), QSurface::surfaceClass(), and QSurface::Window.

Referenced by QGLXContext::makeCurrent().

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

◆ updateFormatFromContext()

static void updateFormatFromContext ( QSurfaceFormat & format)
static

Variable Documentation

◆ glXCreateContextAttribsARBProc

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

Definition at line 29 of file qglxintegration.cpp.

Referenced by QGLXContext::QGLXContext().

◆ qglx_threadedgl_blacklist_renderer

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

Definition at line 587 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 592 of file qglxintegration.cpp.

Referenced by QGLXContext::queryDummyContext().