mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
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:
parent
1a1b406e5b
commit
e170f4ee75
1 changed files with 7 additions and 5 deletions
|
@ -805,11 +805,13 @@ draw_elechain (elechain_t *ec, int matloc, int vertloc, int tlstloc,
|
||||||
qfeglVertexAttrib4fv (quake_bsp.color.location, color);
|
qfeglVertexAttrib4fv (quake_bsp.color.location, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ec->transform) {
|
if (ec->elements && ec->elements->list->size) {
|
||||||
Mat4Mult (bsp_vp, ec->transform, mat);
|
if (ec->transform) {
|
||||||
qfeglUniformMatrix4fv (matloc, 1, false, mat);
|
Mat4Mult (bsp_vp, ec->transform, mat);
|
||||||
} else {
|
qfeglUniformMatrix4fv (matloc, 1, false, mat);
|
||||||
qfeglUniformMatrix4fv (matloc, 1, false, bsp_vp);
|
} else {
|
||||||
|
qfeglUniformMatrix4fv (matloc, 1, false, bsp_vp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (el = ec->elements; el; el = el->next) {
|
for (el = ec->elements; el; el = el->next) {
|
||||||
if (!el->list->size)
|
if (!el->list->size)
|
||||||
|
|
Loading…
Reference in a new issue