VirtualBox

Changeset 75811 in vbox for trunk/src/VBox/Devices/Graphics


Ignore:
Timestamp:
Nov 29, 2018 12:07:41 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
127014
Message:

DevVGA-SVGA3d-ogl.cpp: get rid of the overlay window on X11 host.

Location:
trunk/src/VBox/Devices/Graphics
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp

    r70938 r75811  
    15471547#else
    15481548    pHlp->pfnPrintf(pHlp, "window:                  %p\n", pContext->window);
    1549     pHlp->pfnPrintf(pHlp, "fMapped:                 %RTbool\n", pContext->fMapped);
    15501549    if (pContext->window)
    15511550        vmsvga3dInfoHostWindow(pHlp, (uintptr_t)pContext->window);
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-internal.h

    r75752 r75811  
    782782    /** Device context window handle */
    783783    Window                  window;
    784     /** flag whether the window is mapped (=visible) */
    785     bool                    fMapped;
    786784#endif
    787785
     
    874872    SSMFIELD_ENTRY_IGNORE(          VMSVGA3DCONTEXT, glxContext),
    875873    SSMFIELD_ENTRY_IGNORE(          VMSVGA3DCONTEXT, window),
    876     SSMFIELD_ENTRY_IGNORE(          VMSVGA3DCONTEXT, fMapped),
    877874# endif
    878875
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp

    r75752 r75811  
    30043004
    30053005#else
    3006     /** @todo No overlay like on Windows. */
    3007     VMSVGASCREENOBJECT *pScreen = vmsvgaGetScreenObject(pThis, 0);
    3008     uint32_t const uWidth  = pScreen ? pScreen->cWidth : -1;
    3009     uint32_t const uHeight = pScreen ? pScreen->cHeight: -1;
    3010 
    3011     Window hostWindow = (Window)pThis->svga.u64HostWindowId;
    3012 
    30133006    if (pState->display == NULL)
    30143007    {
     
    30273020        }
    30283021    }
     3022
     3023    /* Create a small 4x4 window required for GL context. */
    30293024    int attrib[] =
    30303025    {
     
    30423037    swa.border_pixel = 0;
    30433038    swa.background_pixel = 0;
    3044     swa.event_mask = StructureNotifyMask | ExposureMask;
     3039    swa.event_mask = StructureNotifyMask;
    30453040    unsigned long flags = CWBorderPixel | CWBackPixel | CWColormap | CWEventMask;
    3046     pContext->window = XCreateWindow(pState->display, hostWindow,//XDefaultRootWindow(pState->display),//hostWindow,
    3047                                      0, 0, uWidth, uHeight,
     3041    pContext->window = XCreateWindow(pState->display, XDefaultRootWindow(pState->display),
     3042                                     0, 0, 4, 4,
    30483043                                     0, vi->depth, InputOutput,
    30493044                                     vi->visual, flags, &swa);
    3050     AssertMsgReturn(pContext->window, ("XCreateWindow failed"), VERR_INTERNAL_ERROR);
    3051     //uint32_t cardinal_alpha = (uint32_t) (0.5 * (uint32_t)-1); - unused
    3052 
    3053     /* the window is hidden by default and only mapped when CommandPresent is executed on it */
     3045    AssertLogRelMsgReturn(pContext->window, ("XCreateWindow failed"), VERR_INTERNAL_ERROR);
     3046
     3047    /* The window is hidden by default and never mapped, because we only render offscreen and never present to it. */
    30543048
    30553049    GLXContext shareContext = pSharedCtx ? pSharedCtx->glxContext : NULL;
    30563050    pContext->glxContext = glXCreateContext(pState->display, vi, shareContext, GL_TRUE);
    3057     AssertMsgReturn(pContext->glxContext, ("glXCreateContext failed"), VERR_INTERNAL_ERROR);
     3051    AssertLogRelMsgReturn(pContext->glxContext, ("glXCreateContext failed"), VERR_INTERNAL_ERROR);
    30583052#endif
    30593053
     
    47734767        /* Record the texture state for vm state saving. */
    47744768        if (    pTextureState[i].stage < RT_ELEMENTS(pContext->state.aTextureStates)
    4775             &&  pTextureState[i].name < RT_ELEMENTS(pContext->state.aTextureStates[0]))
     4769            &&  (unsigned)pTextureState[i].name < RT_ELEMENTS(pContext->state.aTextureStates[0]))
    47764770        {
    47774771            pContext->state.aTextureStates[pTextureState[i].stage][pTextureState[i].name] = pTextureState[i];
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