示例#1
0
GlxBackend::~GlxBackend()
{
    if (isFailed()) {
        m_overlayWindow->destroy();
    }
    // TODO: cleanup in error case
    // do cleanup after initBuffer()
    cleanupGL();
    doneCurrent();

    gs_tripleBufferUndetected = true;
    gs_tripleBufferNeedsDetection = false;

    if (ctx)
        glXDestroyContext(display(), ctx);

    if (glxWindow)
        glXDestroyWindow(display(), glxWindow);

    if (window)
        XDestroyWindow(display(), window);

    overlayWindow()->destroy();
    delete m_overlayWindow;
}
示例#2
0
SceneOpenGL::~SceneOpenGL()
{
    if (!init_ok) {
        // TODO this probably needs to clean up whatever has been created until the failure
        m_overlayWindow->destroy();
        return;
    }
    foreach (Window * w, windows)
    delete w;
    // do cleanup after initBuffer()
    cleanupGL();
    glXMakeCurrent(display(), None, NULL);
    glXDestroyContext(display(), ctxbuffer);
    if (m_overlayWindow->window()) {
        if (hasGLXVersion(1, 3))
            glXDestroyWindow(display(), glxbuffer);
        XDestroyWindow(display(), buffer);
        m_overlayWindow->destroy();
    } else {
        glXDestroyPixmap(display(), glxbuffer);
        XFreeGC(display(), gcroot);
        XFreePixmap(display(), buffer);
    }
    SceneOpenGL::EffectFrame::cleanup();
    checkGLError("Cleanup");
}
    RenderManagerD3D11OpenGL::~RenderManagerD3D11OpenGL() {
        cleanupGL();

        if (m_displayOpen) {
            /// @todo Add anything else we need to clean up
            m_displayOpen = false;
        }

        // @todo Clean up all of the mm_oglToD3D entries we have made.
    }
示例#4
0
EglWaylandBackend::~EglWaylandBackend()
{
    cleanupGL();
    checkGLError("Cleanup");
    doneCurrent();
    eglDestroyContext(m_display, m_context);
    eglDestroySurface(m_display, m_surface);
    eglTerminate(m_display);
    eglReleaseThread();
    if (m_overlay) {
        wl_egl_window_destroy(m_overlay);
    }
}
示例#5
0
void AbstractEglBackend::cleanup()
{
#if HAVE_WAYLAND
    if (eglUnbindWaylandDisplayWL && eglDisplay() != EGL_NO_DISPLAY) {
        eglUnbindWaylandDisplayWL(eglDisplay(), *(WaylandServer::self()->display()));
    }
#endif
    cleanupGL();
    doneCurrent();
    eglDestroyContext(m_display, m_context);
    cleanupSurfaces();
    eglTerminate(m_display);
    eglReleaseThread();
}
示例#6
0
EglOnXBackend::~EglOnXBackend()
{
    if (isFailed()) {
        m_overlayWindow->destroy();
    }
    cleanupGL();
    checkGLError("Cleanup");
    doneCurrent();
    eglDestroyContext(dpy, ctx);
    eglDestroySurface(dpy, surface);
    eglTerminate(dpy);
    eglReleaseThread();
    if (overlayWindow()->window()) {
        overlayWindow()->destroy();
    }
    delete m_overlayWindow;
}
示例#7
0
GlxBackend::~GlxBackend()
{
    if (isFailed()) {
        m_overlayWindow->destroy();
    }
    // TODO: cleanup in error case
    // do cleanup after initBuffer()
    cleanupGL();
    checkGLError("Cleanup");
    doneCurrent();

    if (ctx)
        glXDestroyContext(display(), ctx);

    if (glxWindow)
        glXDestroyWindow(display(), glxWindow);

    if (window)
        XDestroyWindow(display(), window);

    overlayWindow()->destroy();
    delete m_overlayWindow;
}
GLWindow::~GLWindow()
{
    makeCurrent();
    cleanupGL();
}
示例#9
0
GLModel::~GLModel()
{
	cleanupGL();
}