Original Post
So, I'm trying to port my application over to C# using the .NET 2.0 MDX assemblies. No go. I'm trying to render some transformed vertices, as a first step. Everything runs great, but nothing gets rendered. The clear operation is running correctly. Also, I'm not getting any exceptions, so I'm assuming everything is running correctly. The debug runtimes return nothing useful. I've turned off Z-buffering, alphablending, culling and lighting. I've set all matrices, even though I'm drawing transformed vertices, so it shouldn't matter. The only thing I can think of is not locking/unlocking the buffer correctly. It's not throwing an exception though, so I'm not too sure. Here's my lock code: Any ideas? Thanks a bunch. [EDIT] Turns out one of the overloads of the setstreamsource wasn't working right. Using a different one (the one with all 4 arguments) worked. [Edited by - sirob on December 19, 2005 7:46:54 AM]
GraphicsBuffer buff =
m_Buffer.Lock<Microsoft.DirectX.Direct3D.CustomVertex.TransformedColored>(0, 20 * 29, LockFlags.None);
Microsoft.DirectX.Direct3D.CustomVertex.TransformedColored[] verts = m_Window.GetVertexData();
for (short i = 0; i < 29; i++)
buff.GetBuffer<Microsoft.DirectX.Direct3D.CustomVertex.TransformedColored>() = verts;
m_Buffer.Unlock();