Slightly reducde the number of calls to glUniformMatrix4fv.

It doesn't make a big difference to bigass1 (yet ?), but it does clean up
apitrace a little.
This commit is contained in:
Bill Currie 2012-07-03 10:57:35 +09:00
parent 1a1b406e5b
commit e170f4ee75

View file

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