VirtualBox

Changeset 23630 in vbox


Ignore:
Timestamp:
Oct 8, 2009 7:32:50 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53315
Message:

video 2d accel: fix gl context issue for old ATI drivers on linux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp

    r23588 r23630  
    30733073}
    30743074
     3075class VBoxGLContext : public QGLContext
     3076{
     3077public:
     3078    VBoxGLContext (const QGLFormat & format ) :
     3079        QGLContext(format),
     3080        mAllowDoneCurrent(true)
     3081    {
     3082    }
     3083
     3084    void doneCurrent()
     3085    {
     3086        if(!mAllowDoneCurrent)
     3087            return;
     3088        QGLContext::doneCurrent();
     3089    }
     3090
     3091    bool isDoneCurrentAllowed() { return mAllowDoneCurrent; }
     3092    void allowDoneCurrent(bool bAllow) { mAllowDoneCurrent = bAllow; }
     3093private:
     3094    bool mAllowDoneCurrent;
     3095};
    30753096
    30763097VBoxGLWidget::VBoxGLWidget (VBoxConsoleView *aView, QWidget *aParent)
    3077     : QGLWidget (VBoxGLWidget::vboxGLFormat(), aParent),
     3098    : QGLWidget (new VBoxGLContext(VBoxGLWidget::vboxGLFormat()), aParent),
    30783099    mSurfHandleTable(128), /* 128 should be enough */
    30793100    mpfnOp(NULL),
     
    52825303{
    52835304    mpOverlayWidget = new VBoxGLWidget (aView, aView->viewport());
     5305
     5306    VBoxGLContext *pc = (VBoxGLContext*)mpOverlayWidget->context();
     5307    pc->allowDoneCurrent(false);
     5308
    52845309    mOverlayWidgetVisible = true; /* to ensure it is set hidden with vboxShowOverlay */
    52855310    vboxShowOverlay(false);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette