VirtualBox

Ignore:
Timestamp:
Jun 5, 2014 9:18:41 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
94217
Message:

crOpenGL: wglShareLists support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_misc.c

    r51524 r51559  
    9494
    9595    switch (target) {
     96        case GL_SHARE_LISTS_CR:
     97        {
     98            CRContextInfo *pCtx[2];
     99            GLint *ai32Values;
     100            int i;
     101            if (count != 2)
     102            {
     103                WARN(("GL_SHARE_LISTS_CR invalid cound %d", count));
     104                return;
     105            }
     106
     107            if (type != GL_UNSIGNED_INT && type != GL_INT)
     108            {
     109                WARN(("GL_SHARE_LISTS_CR invalid type %d", type));
     110                return;
     111            }
     112
     113            ai32Values = (GLint*)values;
     114
     115            for (i = 0; i < 2; ++i)
     116            {
     117                const int32_t val = ai32Values[i];
     118
     119                if (val == 0)
     120                {
     121                    WARN(("GL_SHARE_LISTS_CR invalid value[%d] %d", i, val));
     122                    return;
     123                }
     124
     125                pCtx[i] = (CRContextInfo *) crHashtableSearch(cr_server.contextTable, val);
     126                if (!pCtx[i])
     127                {
     128                    WARN(("GL_SHARE_LISTS_CR invalid pCtx1 for value[%d] %d", i, val));
     129                    return;
     130                }
     131
     132                if (!pCtx[i]->pContext)
     133                {
     134                    WARN(("GL_SHARE_LISTS_CR invalid pCtx1 pContext for value[%d] %d", i, val));
     135                    return;
     136                }
     137            }
     138
     139            crStateShareLists(pCtx[0]->pContext, pCtx[1]->pContext);
     140
     141            break;
     142        }
     143
    96144    case GL_SET_MAX_VIEWPORT_CR:
    97145        {
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