mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Polymer: Revert part of r5481. We can't rely on the sprite trackers to tell us when tsprites change.
git-svn-id: https://svn.eduke32.com/eduke32@5774 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
d8c03ba267
commit
3adda0cbd3
2 changed files with 6 additions and 10 deletions
|
@ -320,7 +320,7 @@ typedef struct s_prwall {
|
|||
|
||||
typedef struct s_prsprite {
|
||||
_prplane plane;
|
||||
uint32_t trackedrev;
|
||||
uint32_t hash;
|
||||
} _prsprite;
|
||||
|
||||
typedef struct s_prmirror {
|
||||
|
@ -371,7 +371,7 @@ extern _prsprite *prsprites[MAXSPRITES];
|
|||
static inline void polymer_invalidatesprite(int32_t i)
|
||||
{
|
||||
if (prsprites[i])
|
||||
prsprites[i]->trackedrev = UINT32_MAX;
|
||||
prsprites[i]->hash = 0xDEADBEEF;
|
||||
}
|
||||
|
||||
extern GLuint prartmaps[MAXTILES];
|
||||
|
|
|
@ -3868,7 +3868,7 @@ void polymer_updatesprite(int32_t snum)
|
|||
s->plane.buffer = (_prvert *)Xcalloc(4, sizeof(_prvert)); // XXX
|
||||
s->plane.vertcount = 4;
|
||||
s->plane.mapvbo_vertoffset = -1;
|
||||
s->trackedrev = UINT32_MAX;
|
||||
s->hash = 0xDEADBEEF;
|
||||
}
|
||||
|
||||
if ((tspr->cstat & 48) && (pr_vbos > 0) && !s->plane.vbo)
|
||||
|
@ -3886,16 +3886,12 @@ void polymer_updatesprite(int32_t snum)
|
|||
|
||||
if (tspr->cstat & 48 && searchit != 2)
|
||||
{
|
||||
#ifndef UNTRACKED_STRUCTS
|
||||
uint32_t const changed = spritechanged[tspr->owner];
|
||||
#else
|
||||
uint32_t const changed = XXH32((uint8_t *) tspr, offsetof(spritetype, owner), 0xDEADBEEF);
|
||||
#endif
|
||||
|
||||
if (changed == s->trackedrev && tspr->picnum == curpicnum)
|
||||
if (changed == s->hash)
|
||||
return;
|
||||
|
||||
s->trackedrev = changed;
|
||||
s->hash = changed;
|
||||
}
|
||||
|
||||
polymer_getbuildmaterial(&s->plane.material, curpicnum, tspr->pal, tspr->shade,
|
||||
|
@ -3915,7 +3911,7 @@ void polymer_updatesprite(int32_t snum)
|
|||
if (searchit == 2)
|
||||
{
|
||||
polymer_drawsearchplane(&s->plane, NULL, 0x03, (GLubyte *) &tspr->owner);
|
||||
s->trackedrev = UINT32_MAX;
|
||||
s->hash = 0xDEADBEEF;
|
||||
}
|
||||
|
||||
curpicnum = tspr->picnum;
|
||||
|
|
Loading…
Reference in a new issue