From 1f278496ea31b0b7abf287d0d49c0fe51df9143a Mon Sep 17 00:00:00 2001 From: cxgeorge <> Date: Thu, 7 Mar 2002 00:23:54 +0000 Subject: [PATCH] fix problem in draw_tri --- panda/src/dxgsg/dxGraphicsStateGuardian.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx index 056d665b13..a886b6765a 100644 --- a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx +++ b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx @@ -3398,16 +3398,15 @@ draw_multitri(Geom *geom, D3DPRIMITIVETYPE trilisttype) { _perComp = 0x0; bool bIsTriList=(trilisttype==D3DPT_TRIANGLESTRIP); - bool bPerPrimColor=false; + bool bPerPrimColor=(ColorBinding == G_PER_PRIM); bool bPerPrimNormal; - bool bUseTexCoordOnlyLoop = (((ColorBinding == G_OVERALL) || (ColorBinding == G_PER_PRIM)) && + bool bUseTexCoordOnlyLoop = (((ColorBinding == G_OVERALL) || bPerPrimColor) && (NormalBinding == G_OFF) && (TexCoordBinding != G_OFF)); if(bUseTexCoordOnlyLoop) { - if(ColorBinding == G_PER_PRIM) { - _perPrim |= PER_COLOR; - bPerPrimColor=true; + if(bPerPrimColor) { + _perPrim = PER_COLOR; } } else { switch (NormalBinding) {