Fixed crash when using ShapeDrawable with a TriangleMesh or ConvexHull shape due to missing texture coords

This commit is contained in:
Robert Osfield
2018-05-13 11:52:06 +01:00
parent 7a3e0445ba
commit 640b03b671
2 changed files with 21 additions and 4 deletions

View File

@@ -768,10 +768,13 @@ class OSG_EXPORT BuildShapeGeometryVisitor : public ConstShapeVisitor
virtual void apply(const CompositeShape&);
void Normal(const Vec3f& v) { _normals->push_back(v); }
void Normal3f(float x, float y, float z) { _normals->push_back(Vec3(x,y,z)); }
void TexCoord2f(float x, float y) { _texcoords->push_back(Vec2(x,y)); }
void Vertex(const Vec3f& v) { _vertices->push_back(v); }
void Vertex3f(float x, float y, float z) { _vertices->push_back(Vec3(x,y,z)); }
void Normal3f(float x, float y, float z) { Normal(Vec3(x,y,z)); }
void TexCoord(const Vec2f& tc) { _texcoords->push_back(tc); }
void TexCoord2f(float x, float y) { TexCoord(Vec2(x,y)); }
void Vertex(const Vec3f& v);
void Vertex3f(float x, float y, float z) { Vertex(Vec3(x,y,z)); }
void setMatrix(const Matrixd& m);