mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +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);
|
||||
}
|
||||
}
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue