Original Post
Hey Guys, I'm working on a tile engine in Managed DX and C#. I would like to use a sprite sheet for the tile map, but I would also like to avoid locking and unlock the vertex buffer every time I switch UVs (in order to access a different tile image). I came across something called texture transforms, and it seems to be what I need; a transformation applied to the UVs in the fixed pipeline. I can't seem to get it to work though, or find much documentation on the topic. Here is what I am doing:
ManD3D.m_device.Transform.Texture0 = Matrix.Translation(new Vector3(UOffSet, VOffSet, 0.0f));
// ...render mesh This call doesn't seem to be affecting the texture coordinates at all. Am I on the right track, or completely off here? Is there a renderstate or something I need to set? Any example code would be fantastic! Thanks! Matt Hughson [Edited by - matthughson on October 15, 2005 4:47:27 PM]