From 8a5b0061555e48ed96f024449d587eeb77ef8002 Mon Sep 17 00:00:00 2001 From: cxgeorge <> Date: Wed, 25 Jul 2001 19:00:29 +0000 Subject: [PATCH] small opt --- panda/src/dxgsg/dxGraphicsStateGuardian.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx index 0db41b74d9..b3a9a9f447 100644 --- a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx +++ b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx @@ -2479,7 +2479,12 @@ draw_multitri(Geom *geom, D3DPRIMITIVETYPE trilisttype) { geom->get_colors(colors,ColorBinding,cindexes); geom->get_texcoords(texcoords,TexCoordBinding,tindexes); - GeomVertFormat GeomVrtFmt=FlatVerts; + GeomVertFormat GeomVrtFmt; + +#ifdef DONT_USE_DRAWPRIMSTRIDED + GeomVrtFmt=MixedFmtVerts; +#else + GeomVrtFmt=FlatVerts; // first determine if we're indexed or non-indexed @@ -2492,13 +2497,10 @@ draw_multitri(Geom *geom, D3DPRIMITIVETYPE trilisttype) { } else if (!((vindexes==NULL)&&(cindexes==NULL)&&(tindexes==NULL)&&(nindexes==NULL))) GeomVrtFmt=MixedFmtVerts; -#ifdef DONT_USE_DRAWPRIMSTRIDED - GeomVrtFmt=MixedFmtVerts; -#endif - if(!geom->uses_components()) { GeomVrtFmt=MixedFmtVerts; // dont need efficiency here, just use simpler codepath } +#endif // for Indexed Prims and mixed indexed/non-indexed prims, we will use old pipeline // cant handle indexed prims because usually have different index arrays for different components,