Qt 4.8
Public Functions | Properties | List of all members
QWaylandEglIntegration Class Reference

#include <qwaylandeglintegration.h>

Inheritance diagram for QWaylandEglIntegration:
QWaylandGLIntegration

Public Functions

QWaylandWindowcreateEglWindow (QWidget *window)
 
EGLDisplay eglDisplay () const
 
void initialize ()
 
struct wl_egl_display * nativeDisplay () const
 
 QWaylandEglIntegration (struct wl_display *waylandDisplay)
 
 ~QWaylandEglIntegration ()
 
- Public Functions inherited from QWaylandGLIntegration
 QWaylandGLIntegration ()
 
virtual ~QWaylandGLIntegration ()
 

Properties

EGLDisplay mEglDisplay
 
struct wl_display * mWaylandDisplay
 

Additional Inherited Members

- Static Public Functions inherited from QWaylandGLIntegration
static QWaylandGLIntegrationcreateGLIntegration (QWaylandDisplay *waylandDisplay)
 

Detailed Description

Definition at line 52 of file qwaylandeglintegration.h.

Constructors and Destructors

◆ QWaylandEglIntegration()

QWaylandEglIntegration::QWaylandEglIntegration ( struct wl_display *  waylandDisplay)

Definition at line 50 of file qwaylandeglintegration.cpp.

Referenced by eglDisplay().

51  : mWaylandDisplay(waylandDisplay)
52 {
53  qDebug() << "Using Wayland-EGL";
54 }
Q_CORE_EXPORT void qDebug(const char *,...)
struct wl_display * mWaylandDisplay

◆ ~QWaylandEglIntegration()

QWaylandEglIntegration::~QWaylandEglIntegration ( )

Definition at line 57 of file qwaylandeglintegration.cpp.

58 {
59  eglTerminate(mEglDisplay);
60 }

Functions

◆ createEglWindow()

QWaylandWindow * QWaylandEglIntegration::createEglWindow ( QWidget window)
virtual

Implements QWaylandGLIntegration.

Definition at line 76 of file qwaylandeglintegration.cpp.

77 {
78  return new QWaylandEglWindow(window);
79 }

◆ eglDisplay()

EGLDisplay QWaylandEglIntegration::eglDisplay ( ) const

Definition at line 81 of file qwaylandeglintegration.cpp.

Referenced by QWaylandEglWindow::glContext(), and QWaylandEglWindow::newSurfaceCreated().

82 {
83  return mEglDisplay;
84 }

◆ initialize()

void QWaylandEglIntegration::initialize ( )
virtual

Implements QWaylandGLIntegration.

Definition at line 62 of file qwaylandeglintegration.cpp.

63 {
64  EGLint major,minor;
65  mEglDisplay = eglGetDisplay(mWaylandDisplay);
66  if (mEglDisplay == NULL) {
67  qWarning("EGL not available");
68  } else {
69  if (!eglInitialize(mEglDisplay, &major, &minor)) {
70  qWarning("failed to initialize EGL display");
71  return;
72  }
73  }
74 }
Q_CORE_EXPORT void qWarning(const char *,...)
struct wl_display * mWaylandDisplay

◆ nativeDisplay()

struct wl_egl_display* QWaylandEglIntegration::nativeDisplay ( ) const

Properties

◆ mEglDisplay

EGLDisplay QWaylandEglIntegration::mEglDisplay
private

Definition at line 67 of file qwaylandeglintegration.h.

Referenced by eglDisplay(), initialize(), and ~QWaylandEglIntegration().

◆ mWaylandDisplay

struct wl_display* QWaylandEglIntegration::mWaylandDisplay
private

Definition at line 65 of file qwaylandeglintegration.h.

Referenced by initialize().


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