Re: 2D in D3D

From: Chris Hastings (
Date: 10/08/04

Date: Fri, 8 Oct 2004 09:31:46 -0500

Have you looked at using a different render target? That way you can render
to a single texture, and then display the texture transformed and each one.
Also, have you tried just changing the camera position?
If you need to rotate each sprite individually, rather than rotate the whole
scene, I think you need to do what you are doing, but if you just want to
move everything left or right, or rotate the entire scene, Move the camera
with (change view matrix with matrix.LookatLH) or render to a texture
(created with usage.RenderTarget and pool.default) using RenderToSurface
I hope that's what you are asking, let me know if that helps.

"Jeff" <> wrote in message
> I'm currently using Direct3D.Sprite to draw several hundred sprites to the
> screen and I would like to be able to rotate all of the sprites (as if the
> camera was rotating) or scale them (as if the camera was zooming in or
> out).
> I know I can translate and scale each one of them individually using the
> Sprite.Transform method, however, shouldn't it be as easy as just moving
> the camera and letting D3D render them at the appropriate rotation/scale
> based off the position of the camera?
> Same thing with translation... instead of moving hundreds of sprites to
> the left each frame (to simulate scrolling) wouldn't it be better to just
> move ONE camera to the right each frame?