40 #include <QtGui/qoffscreensurface.h>
63 , m_pbuffer(EGL_NO_SURFACE)
73 const char *vendor = eglQueryString(display, EGL_VENDOR);
74 if (vendor && strstr(vendor,
"Mesa"))
75 m_hasSurfaceless =
false;
83 const EGLint attributes[] = {
86 EGL_LARGEST_PBUFFER, EGL_FALSE,
90 m_pbuffer = eglCreatePbufferSurface(m_display,
config, attributes);
92 if (m_pbuffer != EGL_NO_SURFACE)
99 if (m_pbuffer != EGL_NO_SURFACE)
100 eglDestroySurface(m_display, m_pbuffer);
105 return m_pbuffer != EGL_NO_SURFACE || m_hasSurfaceless;
bool isValid() const override
QEGLPbuffer(EGLDisplay display, const QSurfaceFormat &format, QOffscreenSurface *offscreenSurface, QEGLPlatformContext::Flags flags={ })
The QOffscreenSurface class represents an offscreen surface in the underlying platform.
QSize size() const override
constexpr int height() const noexcept
constexpr int width() const noexcept
EGLConfig q_configFromGLFormat(EGLDisplay display, const QSurfaceFormat &format, bool highestPixelFormat, int surfaceType)
QSurfaceFormat q_glFormatFromConfig(EGLDisplay display, const EGLConfig config, const QSurfaceFormat &referenceFormat)
bool q_hasEglExtension(EGLDisplay display, const char *extensionName)
typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform
GLint GLsizei GLsizei GLenum format