~GLContextWGL()
    {
        MarkDestroyed();

        sWGLLib[mLibType].fDeleteContext(mContext);

        if (mPBuffer)
            sWGLLib[mLibType].fDestroyPbuffer(mPBuffer);
        if (mWnd)
            DestroyWindow(mWnd);
    }
Пример #2
0
    ~GLContextGLX()
    {
        MarkDestroyed();

        // see bug 659842 comment 76
#ifdef DEBUG
        bool success =
#endif
        mGLX->xMakeCurrent(mDisplay, None, nullptr);
        NS_ABORT_IF_FALSE(success,
            "glXMakeCurrent failed to release GL context before we call glXDestroyContext!");

        mGLX->xDestroyContext(mDisplay, mContext);

        if (mDeleteDrawable) {
            mGLX->xDestroyPixmap(mDisplay, mDrawable);
        }
    }