Example #1
0
bool QWindowsEGLContext::makeCurrent(QPlatformSurface *surface)
{
    bool ok = false;
    QWindowsWindow *window = static_cast<QWindowsWindow *>(surface);
    if (EGLSurface eglSurface = window->ensureEglSurfaceHandle(m_staticContext, eglConfig())) {
        ok = eglMakeCurrent(eglDisplay(), eglSurface, eglSurface, eglContext());
        if (!ok)
            qWarning("%s: eglMakeCurrent() failed, eglError: 0x%x, this: %p \n",
                     Q_FUNC_INFO, eglGetError(), this);
    }
    return ok;
}
Example #2
0
File: x11.cpp Project: nyorain/iro
std::unique_ptr<SurfaceContext> X11Backend::createSurfaceContext() const
{
	return std::make_unique<DefaultSurfaceContext>(*eglContext());
}
EglFSWaylandContext::~EglFSWaylandContext()
{
    delete m_blitter;
    eglDestroyContext(eglDisplay(), eglContext());
}