Jump to content
  • Advertisement

Archived

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

Milos

Rendering to texture

This topic is 5859 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!