VirtualBox

Changeset 3729 in vbox for trunk/src/VBox/HostServices


Ignore:
Timestamp:
Jul 20, 2007 10:11:37 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
23033
Message:

Update from Alexander Eichner.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/gllindrv.cpp

    r3716 r3729  
    4242    return (XIO_handler(d));
    4343}*/
     44
     45/* X11 server connection for all OpenGL clients.
     46 * Neccessary because Mesa and DRI cannot handle more than one
     47 * connection per thread (only hardware acceleration, software rendering
     48 * runs fine with more than one connection).
     49 * Would crash in vboxglDisconnect if on every vboxglConnect
     50 * a new Display is created */
     51Display *glXDisplay = NULL;
    4452
    4553static Bool WaitForNotify( Display *dpy, XEvent *event, XPointer arg ) {
     
    158166    Log(("vboxglGlobalInit\n"));
    159167
     168    glXDisplay = XOpenDisplay(NULL);
     169
    160170    /*vboxInitOpenGLExtensions();*/
    161171    return VINF_SUCCESS;
     
    252262    pClient->xWindow = 0;
    253263
    254     pClient->dpy = XOpenDisplay(NULL);
     264    pClient->dpy = glXDisplay;
    255265
    256266    if (pClient->dpy) {
     
    298308
    299309#ifdef VBOX_OGL_DEBUG_WINDOW_OUTPUT
    300     if (pClient->dpy) {
    301         if (pClient->xWindow != 0) {
    302             XUnmapWindow(pClient->dpy, pClient->xWindow);
    303             XDestroyWindow(pClient->dpy, pClient->xWindow);
    304         }
    305         if (pClient->PixelFormatToFBConfigMapper) {
    306             XFree(pClient->PixelFormatToFBConfigMapper);
    307         }
    308         XCloseDisplay(pClient->dpy);
    309     }
     310    if (pClient->xWindow != 0) {
     311        XUnmapWindow(pClient->dpy, pClient->xWindow);
     312        XDestroyWindow(pClient->dpy, pClient->xWindow);
     313    }
     314    if (pClient->PixelFormatToFBConfigMapper) {
     315        XFree(pClient->PixelFormatToFBConfigMapper);
     316    }
     317
    310318    pClient->dpy = NULL;
    311319    pClient->xWindow = 0;
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