I have never used Managed DirectX or .Net languages in any way ( I use C++ for DirectX apps ) so that makes it a bit more difficult.
Quote:
1) Yes.. but not SetTransform(), there is a read/set Transform property
This definately sounds like the managed equivalent of the C++ function ID3DXSprite::SetTransform(). Try setting this property before you call the C# equivalent of ID3DXSprite::Begin(). I am not saying it will work, but I am thinking it is best to explore all possibilities.
Quote:
3) (I'm using C#/MDX)
flareTest.Begin(SpriteFlags.SortTexture | SpriteFlags.ObjectSpace);
Sprite.Transform = Matrix.Scaling(0.02f, 0.02f, 0.02f);
Sprite.Draw(Texture, new Rectangle(0, 0, 32, 32), new Vector3(16, 16, 0), new Vector3(0, 0, 0), Color.Gray);
flareTest.End();
These lines look OK, but I can't be sure because I don't use C#
Quote:
So, to 'Add a sprite to the list of batched sprites.', I need to call Draw(), but for each sprite do I need to do a Begin() and End()? If each End() call 'Restores the device to the state it was in before', wouldnt doing Begin() and End() for each sprite be inefficient?
As I read it, you can draw the same sprite object several times between Begin and End with different state/properties/textures.
If you use several different sprite objects, you will need to call Begin and End for each sprite object.
I will try and write a test app tomorrow to solve the problem.
If I find solution I will post the code in C++ and hopefully someone can convert to C# for you.
If I don't find a solution, I will let you know anyway.
HTH,
Cambo_frog