From 12319cfcdfc69fd64a7745219d60e548fa4c9b05 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 11 Jul 2012 08:12:57 +0900 Subject: [PATCH] Revert "Slightly reducde the number of calls to glUniformMatrix4fv." This reverts commit e170f4ee75ac8263336d1a0960b975fee1e42a03. 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. --- libs/video/renderer/glsl/glsl_bsp.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/libs/video/renderer/glsl/glsl_bsp.c b/libs/video/renderer/glsl/glsl_bsp.c index e09a62613..ecffcef56 100644 --- a/libs/video/renderer/glsl/glsl_bsp.c +++ b/libs/video/renderer/glsl/glsl_bsp.c @@ -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)