Vertex Declaration with Color

Sep 21, 2010 at 12:22 AM

Hi i'm using the example of advanced particles(3d) to draw bounding boxes and spheres in my game, i have a collection with VertexPositionColor type from XNA.Graphics, i was wondering.. how to draw a linestrip like in CullTestVisualizer with Color, i know that the  shader has a FillColor but it affects all the shapes or a single box or sphere, but my collection has the color for each vertex so i dunno how to draw a IVertices sending VertexPositionColor as a type instead Vector3...


Sep 21, 2010 at 12:35 AM

This may sound silly but i find the answer... the only thing to do is create a IVertices, this way:   verts = new Vertices<VertexPositionColor>(list); and use a VertexColor Shader instead FillSolid Shader and thats it. :-)