VirtualBox

Changeset 34133 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Nov 17, 2010 9:24:06 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
67851
Message:

crOpenGL: add workaround for glut based apps on linux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/glx.c

    r33595 r34133  
    1313#include "stub.h"
    1414#include "dri_glx.h"
     15#include "GL/internal/glcore.h"
    1516
    1617#include <X11/Xregion.h>
     
    18301831    }
    18311832    */
    1832 
    18331833    {
    18341834        XVisualInfo temp, *pret;
     
    18401840        XUNLOCK(dpy);
    18411841       
    1842         if (nret!=1) crWarning("XGetVisualInfo returned %i visuals for %p", nret, config);
     1842        if (nret!=1)
     1843        {
     1844            crWarning("XGetVisualInfo returned %i visuals for %p", nret, config);
     1845            /* Hack for glut based apps.
     1846               We fail to patch first call to glXChooseFBConfigSGIX, which ends up in the mesa's fbconfigs being passed to this function later.
     1847            */
     1848            if (!nret && config)
     1849            {
     1850                temp.visualid = (VisualID) ((__GLcontextModes*)config)->visualID;
     1851                XLOCK(dpy);
     1852                pret = XGetVisualInfo(dpy, VisualIDMask, &temp, &nret);
     1853                XUNLOCK(dpy);
     1854                crWarning("Retry with %#x returned %i visuals", ((__GLcontextModes*)config)->visualID, nret);
     1855            }
     1856        }
    18431857        //crDebug("glXGetVisualFromFBConfig(cfg/visid==0x%x): depth=%i", (int) config, pret->depth);
     1858//crDebug("here");
    18441859        return pret;
    18451860    }
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