Ogre::Viewport* viewport = mRenderWindow->addViewport(mCamera); viewport->setBackgroundColour(Ogre::ColourValue(0.0, 0.0, 0.0)); viewport->setDimensions(0.0, 0.0, 0.5, 1.0);
Ogre::Viewport* viewport = mRenderWindow->addViewport(mCamera, 1, 0, 0, 0.5, 1.0); viewport->setBackgroundColour(Ogre::ColourValue(0.0, 0.0, 0.0));This example creates a viewport on the right half of the screen for a given camera, using the `addViewport` method with additional parameters. The `setBackgroundColour` method sets the background color of the viewport to black. Package Library: OGRE - Object-Oriented Graphics Rendering Engine.