java.lang.UnsupportedOperationException: Only 'Triangles' mesh mode is supported.

I’m trying to draw a line using and I keep getting this exception: java.lang.UnsupportedOperationException: Only ‘Triangles’ mesh mode is supported.



Here is my code:

[java] Line line = new Line(start, end);

Geometry targetLine = new Geometry(“TargetLine”, line);

Material mat_line = new Material(assetManager, “Common/MatDefs/Misc/SolidColor.j3md”);

mat_line.setColor(“m_Color”, ColorRGBA.Red);

targetLine.setMaterial(mat_line);

rootNode.attachChild(targetLine);[/java]



Can anyone explain to me what’s wrong?



Thanks,

Andy

Try using another material, like wireframe.

normen said:
Try using another material, like wireframe.

That didn't work either.

Your example works for me, could you post the entire stack trace please?