From 97d6f46f75685afba67debb63c07a7501b3ebc71 Mon Sep 17 00:00:00 2001 From: Ragnvald Maartmann-Moe IV Date: Fri, 2 Aug 2002 18:07:53 +0000 Subject: [PATCH] Speed up 16bit coord alias models a bit. (only one VectorScale per vertex now) --- libs/video/renderer/gl/gl_mod_alias.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libs/video/renderer/gl/gl_mod_alias.c b/libs/video/renderer/gl/gl_mod_alias.c index b41f9015e..11f53ff35 100644 --- a/libs/video/renderer/gl/gl_mod_alias.c +++ b/libs/video/renderer/gl/gl_mod_alias.c @@ -329,16 +329,15 @@ GL_GetAliasFrameVerts16 (int frame, aliashdr_t *paliashdr, entity_t *e) verts1 = verts + e->pose1 * count; verts2 = verts + e->pose2 * count; - if (!blend) { + if (blend == 0.0) { verts = verts1; - } else if (blend == 1) { + } else if (blend == 1.0) { verts = verts2; } else { for (i = 0, vo_v = vo->verts; i < count; i++, vo_v++, verts1++, verts2++) { - VectorScale (verts1->v, 1.0 / 256.0, v1); - VectorScale (verts2->v, 1.0 / 256.0, v2); VectorBlend (v1, v2, blend, vo_v->vert); + VectorScale (vo_v->vert, 1.0 / 256.0, vo_v->vert); vo_v->lightdot = shadedots[verts1->lightnormalindex] * (1.0 - blend) + shadedots[verts2->lightnormalindex] * blend; @@ -423,9 +422,9 @@ GL_GetAliasFrameVerts (int frame, aliashdr_t *paliashdr, entity_t *e) verts1 = verts + e->pose1 * count; verts2 = verts + e->pose2 * count; - if (!blend) { + if (blend == 1.0) { verts = verts1; - } else if (blend == 1) { + } else if (blend == 1.0) { verts = verts2; } else { for (i = 0, vo_v = vo->verts; i < count;