VirtualBox

Changeset 46174 in vbox for trunk/src/VBox/GuestHost


Ignore:
Timestamp:
May 20, 2013 12:17:39 PM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: texture support fixes

Location:
trunk/src/VBox/GuestHost/OpenGL
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/include/state/cr_texture.h

    r41057 r46174  
    243243DECLEXPORT(GLuint) STATE_APIENTRY crStateGetTextureObjHWID(CRTextureObj *tobj);
    244244
     245void crStateRegTextures(GLsizei n, GLuint *names);
     246
    245247#ifdef __cplusplus
    246248}
  • 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
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