Horde3D http://horde3d.org/forums/ |
|
Is it possible to dynamically change size of rendertargets? http://horde3d.org/forums/viewtopic.php?f=2&t=1641 |
Page 1 of 1 |
Author: | worstplayer [ 18.02.2012, 12:37 ] |
Post subject: | Is it possible to dynamically change size of rendertargets? |
I'm working on a little experimental texture painting program. http://www.youtube.com/watch?v=haMfp641sHM Horde works surprisingly well for this purpose, with one exception: I'm using a rendertarget to store each texture point's 3D position (similar to deferred lighting). This, unlike projection, allows for pixel-perfect seamless painting but this only works when the buffer is exact same size as the texture. And that's my problem, I can't set buffer size inside the application, so i have to edit pipeline.xml to match size of the edited texture. Is there some way to change buffer dimensions from inside the application? ResizePipelineBuffers changes all at once, including those i don't want resized. |
Author: | Volker [ 18.02.2012, 13:07 ] | ||
Post subject: | Re: Is it possible to dynamically change size of rendertarge | ||
One way would be to change the pipeline xml width to a dynamically created one with the new width and height settings and reload the pipeline resource. A more efficient one, may be the following (UNTESTED) patch.
|
Author: | worstplayer [ 18.02.2012, 14:14 ] |
Post subject: | Re: Is it possible to dynamically change size of rendertarge |
Wow, that was fast! Works perfectly after small change ( replaced ResHandle with H3DRes in DLL void h3dResizePipelineBuffer( ResHandle pipeRes, int index, int width, int height ); otherwise it refused to compile) Thanks for the help. |
Author: | Volker [ 18.02.2012, 15:01 ] |
Post subject: | Re: Is it possible to dynamically change size of rendertarge |
Thanks for the feedback, i replaced the patch with a fixed version |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |