How to force the rendering window to update before Copying the render target to an image

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
tlogre
Gnoblar
Posts: 18
Joined: Tue Oct 03, 2017 7:27 pm
x 1

How to force the rendering window to update before Copying the render target to an image

Post by tlogre »

I have a need to force my rendering window to "flush" changes I have made to a scene before saving the contents of the rendering window to an image.

I use OgreRenderTarget::copyContentsToMemory to obtain the contents of the render window. This function works fine if I allow the system to render on its own time before calling the function.

But, I have an need to modify the scene, force an immediate update to the window, and then capture immediately. Is there a way to do this?
xrgo
OGRE Expert User
OGRE Expert User
Posts: 1148
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile
x 168

Re: How to force the rendering window to update before Copying the render target to an image

Post by xrgo »

Hi!
Call the method on a frameListener::frameEnded
tlogre
Gnoblar
Posts: 18
Joined: Tue Oct 03, 2017 7:27 pm
x 1

Re: How to force the rendering window to update before Copying the render target to an image

Post by tlogre »

Worked Great! Thanks for the fast response!
Post Reply