use previous frame as background

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
kokoilie
Posts: 9
Joined: Sun Sep 02, 2012 3:47 pm

use previous frame as background

Post by kokoilie »

i'm trying to make a rotating effect
the camera isn't projecting on the whole window and the next frame is rotated a bit, roughly like this
;......-\--------------
;........\
;.........\
(-) previous frame
(\) current frame
(...) just needed a way to position the symbols correctly
i've managed to make a close effect by omitting the IrrBeginScene in the loop but what i end up with is when the model was closer to the camera then i can hide behind it's "ghost" projections

i was wondering if there is a command to use an image (like the previous frame) the be used as background color in the IrrBeginScene function
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: use previous frame as background

Post by hendu »

GL doesn't guarantee that not clearing will leave the existing image there. So you need to capture the image somehow, and then render it again at the start of the next frame.
kokoilie
Posts: 9
Joined: Sun Sep 02, 2012 3:47 pm

Re: use previous frame as background

Post by kokoilie »

that's exactly the point but i hoped i'll find more help about it here

i might try exploring what can i do tho it's always easier to be taught by someone who already did it
rcalvin
Posts: 31
Joined: Tue Jan 08, 2013 1:58 am

Re: use previous frame as background

Post by rcalvin »

Hey,

I don't really understand what you are trying to describe, but it sounds to me like you need to render to a texture, slap that texture on a quad, and then render the quad before anything else on the next cycle of the loop. I believe their is an official tutorial that deals with RTTs.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: use previous frame as background

Post by hendu »

Grab a screenquad from the code snippets forum. Using it will let you render the image; for RTT use see the RTT example as mentioned.
Post Reply