I have created a little DirectX 3D program using C# in VS2008. Program uses both a Windows form and a Directx 3D device. Program runs fine in a couple of different PC's. I have two machine with issues. I am using DirectX 9 Mar09 SDK. All the machines run dxdiag no problems... 3D Cube rotates like a charm. On one machine, the 3D object that I build with my triangles
simply does not appear. Some text that I draw during render appears fine.. On second problem machine, the triangles all seem to be coming out of one vertex in 3D space(really odd).. I have code that rotates object..
For vertex buffer I am using:
vbb = new VertexBuffer(typeof(CustomVertex.PositionTextured), 97, D3device, Usage.Dynamic | Usage.WriteOnly, CustomVertex.PositionTextured.Format, Pool.Default);
I am also using indices:
ibb = new IndexBuffer(typeof(int), c_VERTices, D3device, Usage.WriteOnly, Pool.Default);
I am using a texture array:
public Texture[] texture = new Texture[23];
This is the gist of device init:
presentParams.Windowed = true;
presentParams.SwapEffect = SwapEffect.Discard;
DevType = Microsoft.DirectX.Direct3D.DeviceType.Hardware; // try simple hardware..
D3device =
new Microsoft.DirectX.Direct3D.Device(0, DevType, this, DevFlags, presentParams);
The render loop just iterates through the buffer drawing triangle strips:
D3device.DrawIndexedPrimitives(PrimitiveType.TriangleStrip, 0, 0, c_VERTices, 4 * b, 2);
(Went through enough issues to get triangles to cull properly and show the correct texture.. Machines 1,2 & 3 work fine. Machines Z & D are dogs.. But dxdiag works on all)
Any ideas from anyone who has seen any kind of graphics card inconsistencies would be greatly appreciated..
As a followup question, is there any location(link) from which Dxdiag code can be downloaded...