Archived

This topic is now archived and is closed to further replies.

Milos

Rendering to texture

Recommended Posts

Milos    122
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

Share this post


Link to post
Share on other sites
Sharky    197
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

Share this post


Link to post
Share on other sites
a person    118
animated 2d sprite animation could also be done using multiple frames on a single texture and just changing texture coordinates.

Share this post


Link to post
Share on other sites
Milos    122
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

Share this post


Link to post
Share on other sites