   Order in a CustomVertex.TransformedColored array
  I have a problem I cannot understand.Is there any order when creating a CustomVertex.TransformedColored array ? Because when I create a vertexbuffer and draw on device like this:var _vertices = new CustomVertex.TransformedColored[3];_vertices[0] = new CustomVertex.TransformedColored(100.0f, 100.0f, 0.5f, 1.0f, Color.Blue.ToArgb());_vertices[1] = new CustomVertex.TransformedColored(200.0f, 200.0f, 0.5f, 1.0f, Color.Blue.ToArgb());_vertices[2] = new CustomVertex.TransformedColored(100.0f, 200.0f, 0.5f, 1.0f, Color.Blue.ToArgb());var vertexBuffer = new VertexBuffer(typeof (CustomVertex.TransformedColored), _vertices.Length, device, 0, CustomVertex.TransformedColored.Format, Pool.Default);vertexBuffer.SetData(facet3.Vertices, 0, LockFlags.None);device.VertexFormat = CustomVertex.TransformedColored.Format;device.SetStreamSource(0, vertexBuffer, 0);device.DrawPrimitives(PrimitiveType.TriangleList, 0, _vertices.Length/3);It works perfectly, my triangle is displayed successfully.But when I just switch index 1 with index 2 of my CustomVertex.TransformedColored array, the triangle is no more displayed:var _vertices = new CustomVertex.TransformedColored[3];_vertices[0] = new CustomVertex.TransformedColored(100.0f, 100.0f, 0.5f, 1.0f, Color.Blue.ToArgb());_vertices[1] = new CustomVertex.TransformedColored(100.0f, 200.0f, 0.5f, 1.0f, Color.Blue.ToArgb());_vertices[2] = new CustomVertex.TransformedColored(200.0f, 200.0f, 0.5f, 1.0f, Color.Blue.ToArgb());var vertexBuffer = new VertexBuffer(typeof (CustomVertex.TransformedColored), _vertices.Length, device, 0, CustomVertex.TransformedColored.Format, Pool.Default);vertexBuffer.SetData(facet3.Vertices, 0, LockFlags.None);device.VertexFormat = CustomVertex.TransformedColored.Format;device.SetStreamSource(0, vertexBuffer, 0);device.DrawPrimitives(PrimitiveType.TriangleList, 0, _vertices.Length/3);Can someone explain the difference ?   
  D3D culls triangles that are in counter-clockwise order. In the first case, the vertices specify a triangle in clockwise order, in the second they're counter-clockwise.In C++ you can change or disable the culling mode with:pDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);the C# function will be similar.   ;  OK it works fine thank you very much :pIs there performance issue to set Cull Mode to None rather than Clockwise or CounterClockwise ?   ;Quote:Original post by skroueOK it works fine thank you very much :pIs there performance issue to set Cull Mode to None rather than Clockwise or CounterClockwise ?If there's more "stuff" drawn, it's lower performance.For drawing 2D, it's usual to disable culling, but you almost always want it enabled for drawing 3D, so you're not drawing the back of a model (Which will always be obscured by the front).   ;  OK thank you for quick answering this threadHow I mark this thread as Resolved ? :)   ;Quote:Original post by skroueHow I mark this thread as Resolved ? :)You don't [smile]You can edit your original post to change the subject if you wish (E.g. to add "(Resolved)"), but there's not really any point - other people are welcome to come along and post alternative suggestions / contradictions if they want.   