Revert "Slightly reducde the number of calls to glUniformMatrix4fv."

This reverts commit e170f4ee75.

It turns out I messed up something in the patch. I noticed the problem
while playing digs04.bsp: many sub-model surfaces, particularly those with
animated textures, were not being transformed correctly. As this patch did
not make a large performance difference, it's probably better to just
revert it. I might revisit it later.
This commit is contained in:
Bill Currie 2012-07-11 08:12:57 +09:00
parent ede65fb28c
commit 12319cfcdf

View file

@ -805,13 +805,11 @@ draw_elechain (elechain_t *ec, int matloc, int vertloc, int tlstloc,
qfeglVertexAttrib4fv (quake_bsp.color.location, color);
}
}
if (ec->elements && ec->elements->list->size) {
if (ec->transform) {
Mat4Mult (bsp_vp, ec->transform, mat);
qfeglUniformMatrix4fv (matloc, 1, false, mat);
} else {
qfeglUniformMatrix4fv (matloc, 1, false, bsp_vp);
}
if (ec->transform) {
Mat4Mult (bsp_vp, ec->transform, mat);
qfeglUniformMatrix4fv (matloc, 1, false, mat);
} else {
qfeglUniformMatrix4fv (matloc, 1, false, bsp_vp);
}
for (el = ec->elements; el; el = el->next) {
if (!el->list->size)