48 #include <QtCore/QDebug> 50 #include <X11/extensions/Xcomposite.h> 54 , mGlxIntegration(glxIntegration)
58 , mConfig(
qglx_findConfig(glxIntegration->xDisplay(),glxIntegration->screen(),window->
widget()->platformWindowFormat()))
59 , mWaitingForSyncCallback(false)
61 XVisualInfo *visualInfo = glXGetVisualFromFBConfig(glxIntegration->
xDisplay(),
mConfig);
90 return (
void *) glXGetProcAddress(reinterpret_cast<GLubyte *>(procName.
toLatin1().
data()));
112 while (mWaitingForSyncCallback) {
120 if (size.isEmpty()) {
134 XSetWindowAttributes
a;
139 0, visualInfo->depth, InputOutput, visualInfo->visual,
140 CWBackPixel|CWBorderPixel|CWColormap, &
a);
QPointer< QWidget > widget
char * data()
Returns a pointer to the data stored in the byte array.
QPlatformWindowFormat qglx_platformWindowFromGLXFBConfig(Display *display, GLXFBConfig config, GLXContext ctx)
void swapBuffers()
Reimplement in subclass to native swap buffers calls.
struct wl_visual * argbVisual()
virtual void doneCurrent()
Reimplement in subclass to release current context.
Display * xDisplay() const
long ASN1_INTEGER_get ASN1_INTEGER * a
QWaylandDisplay * waylandDisplay() const
The QString class provides a Unicode character string.
void makeCurrent()
Reimplement in subclass to do makeCurrent on native GL context.
void doneCurrent()
Reimplement in subclass to release current context.
void * getProcAddress(const QString &procName)
Reimplement in subclass to native getProcAddr calls.
QPlatformWindowFormat platformWindowFormat() const
QWidget has the function qplatformWindowFormat().
QSize size() const
Returns the size of the rectangle.
struct wl_xcomposite * waylandXComposite() const
static const char * data(const QByteArray &arr)
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
virtual void makeCurrent()
Reimplement in subclass to do makeCurrent on native GL context.
void attach(QWaylandBuffer *buffer)
QWaylandXCompositeGLXWindow * mWindow
GLXFBConfig qglx_findConfig(Display *display, int screen, const QPlatformWindowFormat &format, int drawableBit)
#define TRUE
Synonym for true.
The QPlatformGLContext class provides an abstraction for native GL contexts.
QWaylandXCompositeGLXIntegration * mGlxIntegration
QWaylandXCompositeGLXContext(QWaylandXCompositeGLXIntegration *glxIntegration, QWaylandXCompositeGLXWindow *window)
static void sync_function(void *data)
The QPoint class defines a point in the plane using integer precision.
Window rootWindow() const
The QRect class defines a rectangle in the plane using integer precision.
bool mWaitingForSyncCallback
The QSize class defines the size of a two-dimensional object using integer point precision.
void damage(const QRect &rect)
struct wl_display * wl_display() const