VirtualBox

Ignore:
Timestamp:
Mar 25, 2010 2:36:56 PM (15 years ago)
Author:
vboxsync
Message:

crOpenGL: some initial support for new multimonitor code

Location:
trunk/src/VBox/HostServices/SharedOpenGL/render
Files:
4 edited

Legend:

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

    r24782 r27708  
    10391039}
    10401040
     1041DECLEXPORT(void) renderspuReparentWindow(GLint window)
     1042{
     1043    WindowInfo *pWindow;
     1044    CRASSERT(window >= 0);
     1045
     1046    pWindow = (WindowInfo *) crHashtableSearch(render_spu.windowTable, window);
     1047
     1048    if (!pWindow)
     1049    {
     1050        crDebug("Render SPU: Attempt to reparent invalid window (%d)", window);
     1051        return;
     1052    }
     1053
     1054#if defined(WINDOWS) || defined(GLX)
     1055    renderspu_SystemReparentWindow(pWindow);
     1056#endif
     1057}
    10411058
    10421059#if defined(DARWIN)
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.h

    r22509 r27708  
    315315extern void RENDER_APIENTRY renderspuSwapBuffers( GLint window, GLint flags );
    316316
     317#if defined(WINDOWS) || defined(GLX)
     318extern void renderspu_SystemReparentWindow(WindowInfo *window);
     319#endif
     320
    317321#ifdef __cplusplus
    318322extern "C" {
     
    320324DECLEXPORT(void) renderspuSetWindowId(uint64_t winId);
    321325DECLEXPORT(void) renderspuSetRootVisibleRegion(GLint cRects, GLint *pRects);
     326DECLEXPORT(void) renderspuReparentWindow(GLint window);
    322327#ifdef __cplusplus
    323328}
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_glx.c

    r21476 r27708  
    16731673    }
    16741674}
     1675
     1676void renderspu_SystemReparentWindow(WindowInfo *window)
     1677{
     1678    Window parent;
     1679
     1680    parent = render_spu_parent_window_id>0 ? render_spu_parent_window_id :
     1681                                             RootWindow(window->visual->dpy, window->visual->visual->screen);
     1682
     1683    XReparentWindow(window->visual->dpy, window->window, parent, window->x, window->y);
     1684}
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_wgl.c

    r20583 r27708  
    8484            crWarning( "Render SPU: caught WM_CLOSE -- quitting." );
    8585            exit( 0 );
     86            break;
     87
     88        case WM_DESTROY:
     89            crDebug( "Render SPU: caught WM_DESTROY for our window" );
    8690            break;
    8791
     
    480484        /* NO ERROR CODE FOR SHOWWINDOW */
    481485        crDebug( "Render SPU: Showing the window" );
     486        crDebug("renderspu_SystemCreateWindow: showwindow: %x", window->hWnd);
    482487        ShowWindow( window->hWnd, SW_SHOWNORMAL );
    483488    }
     
    724729        /* NO ERROR CODE FOR SHOWWINDOW */
    725730        crDebug( "Render SPU: Showing the window" );
     731        crDebug("renderspu_SystemVBoxCreateWindow: showwindow: %x", window->hWnd);
    726732        ShowWindow( window->hWnd, SW_SHOWNORMAL );
    727733    }
     
    758764{
    759765    if (showIt)
     766    {
     767        crDebug("SHOW renderspu_SystemShowWindow: %x", window->hWnd);
    760768        ShowWindow( window->hWnd, SW_SHOWNORMAL );
     769    }
    761770    else
     771    {
     772        crDebug("HIDE renderspu_SystemShowWindow: %x", window->hWnd);
    762773        ShowWindow( window->hWnd, SW_HIDE );
     774    }
    763775}
    764776
     
    859871            }
    860872
     873            crDebug("MakeCurrent 0x%x, 0x%x", window->device_context, context->hRC);
    861874            if (!render_spu.ws.wglMakeCurrent(window->device_context, context->hRC))
    862875            {
     
    10441057    }
    10451058}
     1059
     1060void renderspu_SystemReparentWindow(WindowInfo *window)
     1061{
     1062    SetParent(window->hWnd, render_spu_parent_window_id);
     1063}
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