Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] Multiple Dynamic Render Targets to Update Images

Author
Message
Todd Riggins
19
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 2nd Feb 2009 03:04 Edited at: 5th Aug 2009 09:47
Hi all. I found this rendering target stuff pretty neat and thought I would share this. I cant believe I was missing out on the speed! pcRaider indirectly reminded me of the newsletter 69 article about this stuff. So thanks pcRaider!

This example demostrates that you can use multiple rendering targets and update it's target size area dynamically during runtime. This example updates the render targets every frame to just show how it effects the fps. Obviously, we would want to change the target size only when needed to not effect the fps this way. Ofcoarse as in this example as an extreme case, the more rendering targets you change in size at each frame, the slower it gets.

What can it be used for? For me, I needed a fast way to update a target scrolling area such as a word editor or a treeview area in my gui Im making. I could also imagine a use for it for a chat dialog like what MMO's use where you can resize the chat window to see more messages.

This is by far faster then trying to cut/clip images inside a rectangler area and updating images via the Get Image command and/or transfering specified image data through memblocks. Can't wait to use this method in my C coded plug-in.

Hope somebody can find this useful...



Login to post a reply

Server time is: 2024-05-02 10:22:56
Your offset time is: 2024-05-02 10:22:56