VirtualBox

Changeset 18680 in vbox for trunk/src


Ignore:
Timestamp:
Apr 3, 2009 11:40:48 AM (16 years ago)
Author:
vboxsync
Message:

crOpenGL-OSX: more fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_agl.c

    r18654 r18680  
    171171                                   r.size.height };
    172172                    renderspu_SystemSetRootVisibleRegion(1, &l);
     173
     174                    /* Temporary save the current active context */
     175                    AGLContext tmpContext = render_spu.ws.aglGetCurrentContext();
    173176                    crHashtableWalk(render_spu.windowTable, crClipRootHelper, NULL);
     177                    /* Reapply the last active context */
     178                    if (tmpContext)
     179                    {
     180                        OSStatus result = render_spu.ws.aglSetCurrentContext(tmpContext);
     181                        CHECK_AGL_RC (result, "Render SPU (windowEvtHndlr): SetCurrentContext Failed");
     182                        result = render_spu.ws.aglUpdateContext(tmpContext);
     183                        CHECK_AGL_RC (result, "Render SPU (windowEvtHndlr): UpdateContext Failed");
     184                    }
    174185#endif
    175186                    break;
     
    637648
    638649//    DEBUG_MSG_POETZSCH (("Swapped %d context %x visible: %d\n", window->id, context->context, IsWindowVisible (window->window)));
    639     if (context->visual->visAttribs & CR_DOUBLE_BIT)
     650    if (context->visual &&
     651        context->visual->visAttribs & CR_DOUBLE_BIT)
    640652        render_spu.ws.aglSwapBuffers(context->context);
    641653    else
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