Two Render Windows

Problems building or running the engine, queries about how to use features etc.
Post Reply
fytyllovewhy
Gnoblar
Posts: 4
Joined: Tue Jun 15, 2010 6:18 pm

Two Render Windows

Post by fytyllovewhy »

Hi, everyone. I have two render windows A and B, three entities X, Y and Z. M and N are in the same scene.
I want X is only seen in A, Y is only seen in B, and Z is seen in both. I tried the code below, but Z doesn't move in A while Z moves in B.
Can anybody help me? I do appreciate that.

Code: Select all

Ogre::Root &root = Ogre::Root::getSingleton();
X->setVisible(true);
Y->setVisible(false);
A->setActive(true);
B->setActive(false);
root.renderOneFrame();
X->setVisible(false);
Y->setVisible(true);
A->setActive(false);
B->setActive(true);
root.renderOneFrame();
User avatar
omniter
OGRE Contributor
OGRE Contributor
Posts: 424
Joined: Thu Mar 19, 2009 8:08 am
Location: Canada
x 44

Re: Two Render Windows

Post by omniter »

Where are you moving Z? From the looks of your code, I'm guessing you're moving it in a frame listener? If that's the case, then your renderOneFrame is triggering the update that moves Z. This happens after you render with A, but before you render with B. This means that the move is only reflected in B.
Post Reply