VirtualBox

忽略:
時間撮記:
2013-5-20 下午12:17:39 (12 年 以前)
作者:
vboxsync
訊息:

crOpenGL: texture support fixes

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_texture.c

    r45488 r46174  
    636636}
    637637
     638void crStateRegTextures(GLsizei n, GLuint *names)
     639{
     640    CRContext *g = GetCurrentContext();
     641    crStateRegNames(g, g->shared->textureTable, n, names);
     642}
     643
    638644void crStateGenNames(CRContext *g, CRHashTable *table, GLsizei n, GLuint *names)
    639645{
     
    782788        GLuint name = textures[i];
    783789        CRTextureObj *tObj;
     790        if (!name)
     791            continue;
     792
    784793        GET_TOBJ(tObj, g, name);
    785         if (name && tObj)
     794        if (tObj)
    786795        {
    787796            GLuint j;
     
    806815            crHashtableDelete(g->shared->textureTable, name, (CRHashtableCallback)crStateDeleteTextureObject);
    807816        }
     817        else
     818        {
     819            /* call crHashtableDelete in any way, to ensure the allocated key is freed */
     820            Assert(crHashtableIsKeyUsed(g->shared->textureTable, name));
     821            crHashtableDelete(g->shared->textureTable, name, NULL);
     822        }
    808823    }
    809824
     
    896911    {
    897912#ifdef IN_GUEST
     913        Assert(crHashtableIsKeyUsed(g->shared->textureTable, texture));
    898914        if (used)
    899915        {
     
    9971013    if (!tobj)
    9981014    {
     1015        Assert(crHashtableIsKeyUsed(g->shared->textureTable, texture));
    9991016        tobj = crStateTextureAllocate_t(g, texture);
    10001017    }
     
    33033320{
    33043321    CRContext *g = GetCurrentContext();
    3305     CRTextureObj *tobj = GET_TOBJ(tobj, g, id);
     3322    CRTextureObj *tobj;
     3323
     3324    GET_TOBJ(tobj, g, id);
    33063325
    33073326#ifdef DEBUG_misha
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette