VirtualBox

Ignore:
Timestamp:
Apr 18, 2013 5:44:22 PM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: 1.work around 4.2.12 saved state issues, 2. saved state fixes

File:
1 edited

Legend:

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

    r45248 r45616  
    307307    crStateSwitchPrepare(cr_server.bUseMultipleContexts ? NULL : ctx, oldCtx, idDrawFBO, idReadFBO);
    308308
    309     /*
    310     crDebug("**** %s client %d  curCtx=%d curWin=%d", __func__,
    311                     cr_server.curClient->number, ctxPos, window);
    312     */
    313     cr_server.curClient->currentContextNumber = context;
    314     cr_server.curClient->currentCtxInfo = ctxInfo;
    315     cr_server.curClient->currentMural = mural;
    316     cr_server.curClient->currentWindow = window;
    317 
    318     CRASSERT(cr_server.curClient->currentCtxInfo);
    319     CRASSERT(cr_server.curClient->currentCtxInfo->pContext);
     309    if (cr_server.curClient)
     310    {
     311        /*
     312        crDebug("**** %s client %d  curCtx=%d curWin=%d", __func__,
     313                        cr_server.curClient->number, ctxPos, window);
     314        */
     315        cr_server.curClient->currentContextNumber = context;
     316        cr_server.curClient->currentCtxInfo = ctxInfo;
     317        cr_server.curClient->currentMural = mural;
     318        cr_server.curClient->currentWindow = window;
     319
     320        CRASSERT(cr_server.curClient->currentCtxInfo);
     321        CRASSERT(cr_server.curClient->currentCtxInfo->pContext);
     322    }
    320323
    321324    /* This is a hack to force updating the 'current' attribs */
     
    401404
    402405    if (!ctx->framebufferobject.drawFB
    403             && (ctx->buffer.drawBuffer == GL_FRONT || ctx->buffer.drawBuffer == GL_FRONT_LEFT))
     406            && (ctx->buffer.drawBuffer == GL_FRONT || ctx->buffer.drawBuffer == GL_FRONT_LEFT)
     407            && cr_server.curClient)
    404408        cr_server.curClient->currentMural->bFbDraw = GL_TRUE;
    405409
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