Rendering to texture

Started by
3 comments, last by Milos 21 years, 10 months ago
Hi, I have a rader simple question. If I want to make simple changes to a texture I use to render on a box, where changes would be something like drawing an animated 2D sprite, is it faster to render these sprites directly on texture or to use CopyRects() ? On, and one more thing, is it faster to use CopyRects or to do this by locking surfaces and coping DWORDS manualy? Thanks! -Milos
-Milos
Advertisement
Just take a look at the DX SDK samples. WARNING: The fps is reduced to half the speed it was (well, maybe a bit less)

Gerben
First check that your hardware supports render to texture and if it does... great - I would recommend using render to texture. If done properly and you have half decent graphics hardware then you can maintain a good frame rate (obviously depends on what is happening in your 3D scene).

I recently wrote a little 3D demo that rendered the entire scene to a 1024x1024 texture. I then put this texture on a view aligned quad for display. This made it possible to do some funky things by playing around with the ''scene'' texture.

Cheers,
Sharky
animated 2d sprite animation could also be done using multiple frames on a single texture and just changing texture coordinates.
What I am trying to do is to make a skybox with lots of animations like birds and such. These are all 2D sprites and I only wonder if it''s faster to render these sprites directly on the texture or just CopyRects()...

-Milos
-Milos

This topic is closed to new replies.

Advertisement