• Create Account

### #ActualYura

Posted 02 January 2013 - 04:16 AM

Basically, without shaders your CUSTOMVERTEX structure needs to be setup with FVFs in such a manner that the color associated with that vertex gets bypassed.
Check this out for further reference --> http://msdn.microsoft.com/en-us/library/windows/desktop/bb172559(v=vs.85).aspx

It's it! Setting
d3dDevice.VertexFormat = VertexFormat.Position;
is skipping the color and making lines white.

I don't want to trouble you more, but is it possible to make this lines thicker? They are very thin and when i use rotation they are partly absorbed by color triangles:

d3dDevice.SetStreamSource(0, vertices, 0, Marshal.SizeOf(typeof(Vertex)));            d3dDevice.VertexFormat = VertexFormat.Position | VertexFormat.Diffuse;
d3dDevice.Indices = triangles;
d3dDevice.DrawIndexedPrimitive(PrimitiveType.TriangleList, 0, 0, totalPointsCount, 0, totalPointsCount / 2);
d3dDevice.VertexFormat = VertexFormat.Position;
d3dDevice.Indices = lines;
d3dDevice.DrawIndexedPrimitive(PrimitiveType.LineList, 0, 0, totalPointsCount, 0, totalPointsCount);

Look at the green side of picture, some lines are missing. They are absorbed

### #1Yura

Posted 02 January 2013 - 04:14 AM

Basically, without shaders your CUSTOMVERTEX structure needs to be setup with FVFs in such a manner that the color associated with that vertex gets bypassed.

Check this out for further reference --> http://msdn.microsoft.com/en-us/library/windows/desktop/bb172559(v=vs.85).aspx

It's it! Setting

d3dDevice.VertexFormat = VertexFormat.Position;

is skipping the color and making lines white.

I don't want to trouble you more, but is it possible to make this lines thicker? They are very thin and when i use rotation they are partly absorbed by color triangles:

d3dDevice.SetStreamSource(0, vertices, 0, Marshal.SizeOf(typeof(Vertex)));

d3dDevice.VertexFormat = VertexFormat.Position | VertexFormat.Diffuse;
d3dDevice.Indices = triangles;
d3dDevice.DrawIndexedPrimitive(PrimitiveType.TriangleList, 0, 0, totalPointsCount, 0, totalPointsCount / 2);

d3dDevice.VertexFormat = VertexFormat.Position;
d3dDevice.Indices = lines;
d3dDevice.DrawIndexedPrimitive(PrimitiveType.LineList, 0, 0, totalPointsCount, 0, totalPointsCount);

http://imageshack.us/photo/my-images/27/capture4df.png/

Look at the green side of picture, some lines are missing. They are absorbed

PARTNERS