From 5cb33c4b2e85782f945d173548df03f368265950 Mon Sep 17 00:00:00 2001 From: "Asad M. Zaman" Date: Tue, 25 Nov 2003 03:39:26 +0000 Subject: [PATCH] made a mistake on the earlier bug fix --- pandatool/src/softegg/softToEggConverter.cxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pandatool/src/softegg/softToEggConverter.cxx b/pandatool/src/softegg/softToEggConverter.cxx index 034c20bd40..b9405906f5 100755 --- a/pandatool/src/softegg/softToEggConverter.cxx +++ b/pandatool/src/softegg/softToEggConverter.cxx @@ -1156,16 +1156,18 @@ make_polyset(SoftNodeDesc *node_desc, EggGroup *egg_group, SAA_ModelType type) { } // if texture present set the texture coordinates - if (node_desc->textures && node_desc->numTexTri[idx]) { + if (node_desc->textures) { float u, v; - u = uCoords[i]; - v = 1.0f - vCoords[i]; - softegg_cat.spam() << "texcoords[" << i << "] = " << u << " " - << v << endl; - - vert.set_uv(TexCoordd(u, v)); - // vert.set_uv(TexCoordd(uCoords[i], vCoords[i])); + if (uCoords && vCoords) { + u = uCoords[i]; + v = 1.0f - vCoords[i]; + softegg_cat.spam() << "texcoords[" << i << "] = " << u << " " + << v << endl; + + vert.set_uv(TexCoordd(u, v)); + // vert.set_uv(TexCoordd(uCoords[i], vCoords[i])); + } } vert.set_external_index(indices[i]); egg_poly->add_vertex(vpool->create_unique_vertex(vert));