[SOLVED] RenderBox

mrmclovin

10-07-2009 22:28:01

Hi! I can't figure out how to use the RenderBox. What is the IViewport/OgreViewport for? When I look at the code it does'nt seem to do anything apart from altering background colour?

When I try this code, all I see is the main Viewport capturing from the main camera. (The OgreViewport is also capturing from the main camera!). MyGUI is working since I can see the mouse pointer and move it around!
Viewport* vp = getRenderWindow()->addViewport(mCamera);

initialiseGui(); // initialise MyGUI!
MyGUI::OgreViewport* vp2 = new MyGUI::OgreViewport(mCamera);
mRenderBox->setViewport(vp2);
mRenderBox->setBackgroundColour(MyGUI::Colour::Zero);

Using SVN version 1-2 weeks old.

Altren

11-07-2009 00:55:23

What is the IViewport/OgreViewport for?It is for other renderers: MyGUI also support DirectX render now.
all I see is the main Viewport capturing from the main camera. (The OgreViewport is also capturing from the main camera!).Not sure that I understood what you said :) So you see no widget as if you haven't created RenderBox at all?

mrmclovin

11-07-2009 01:59:44

Sorry, my fault .. it actually worked.. My eyes just hussled me :)
Thanks for your help anyway!