Subversion Repositories eduke32

Rev

Rev 6656 | Rev 6827 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6656 Rev 6776
Line 620... Line 620...
620
{
620
{
621
    if (basepaltable[id] == NULL)
621
    if (basepaltable[id] == NULL)
622
        basepaltable[id] = (uint8_t *) Xmalloc(768);
622
        basepaltable[id] = (uint8_t *) Xmalloc(768);
623
623
624
    Bmemcpy(basepaltable[id], table, 768);
624
    Bmemcpy(basepaltable[id], table, 768);
-
 
625
-
 
626
    uploadbasepalette(id);
625
}
627
}
626
void removebasepal(int32_t const id)
628
void removebasepal(int32_t const id)
627
{
629
{
628
    if (id == 0)
630
    if (id == 0)
629
        Bmemset(basepaltable[id], 0, 768);
631
        Bmemset(basepaltable[id], 0, 768);
Line 716... Line 718...
716
        // XXX: no-HW-gamma OpenGL platforms will exhibit bad performance with
718
        // XXX: no-HW-gamma OpenGL platforms will exhibit bad performance with
717
        // simultaneous basepal and tint changes?
719
        // simultaneous basepal and tint changes?
718
        const int32_t doinvalidate = (paldidchange || (palsumdidchange && !gammabrightness));
720
        const int32_t doinvalidate = (paldidchange || (palsumdidchange && !gammabrightness));
719
721
720
        if (!(flags&2) && doinvalidate)
722
        if (!(flags&2) && doinvalidate)
721
            gltexinvalidatetype(INVALIDATE_ALL);
723
            gltexinvalidatetype(INVALIDATE_ALL_NON_INDEXED);
722
        if (!(flags&8) && doinvalidate)
724
        if (!(flags&8) && doinvalidate)
723
            gltexinvalidatetype(INVALIDATE_ART);
725
            gltexinvalidatetype(INVALIDATE_ART_NON_INDEXED);
724
#ifdef POLYMER
726
#ifdef POLYMER
725
        if ((getrendermode() == REND_POLYMER) && doinvalidate)
727
        if ((getrendermode() == REND_POLYMER) && doinvalidate)
726
            polymer_texinvalidate();
728
            polymer_texinvalidate();
727
#endif
729
#endif
728
    }
730
    }