VirtualBox

Ignore:
Timestamp:
Jan 25, 2013 6:38:32 PM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: window destuction fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c

    r44290 r44389  
    168168    crServerDeleteMuralFBO(mural);
    169169
     170    if (cr_server.currentMural == mural)
     171    {
     172        CRMuralInfo *dummyMural = crServerGetDummyMural(cr_server.MainContextInfo.CreateInfo.visualBits);
     173        /* reset the current context to some dummy values to ensure render spu does not switch to a default "0" context,
     174         * which might lead to muralFBO (offscreen rendering) gl entities being created in a scope of that context */
     175        cr_server.head_spu->dispatch_table.MakeCurrent(dummyMural->spuWindow, 0, cr_server.MainContextInfo.SpuContext);
     176        cr_server.currentWindow = -1;
     177        cr_server.currentMural = NULL;
     178    }
     179    else
     180    {
     181        CRASSERT(cr_server.currentWindow != mural->CreateInfo.externalID);
     182    }
     183
     184
    170185    cr_server.head_spu->dispatch_table.WindowDestroy( mural->spuWindow );
    171186
     
    214229    crServerMuralTerm(mural);
    215230
    216     if (cr_server.currentWindow == window)
    217     {
    218         cr_server.currentWindow = -1;
    219         CRASSERT(cr_server.currentMural == mural);
    220         cr_server.currentMural = NULL;
    221     }
    222     else
    223     {
    224         CRASSERT(cr_server.currentMural != mural);
    225     }
     231    CRASSERT(cr_server.currentWindow != window);
    226232
    227233    if (cr_server.curClient)
Note: See TracChangeset for help on using the changeset viewer.

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