Not rendering the viewport background (or fully transparant)

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
Maestro81
Gnoblar
Posts: 23
Joined: Wed Jul 02, 2008 7:30 pm
x 3

Not rendering the viewport background (or fully transparant)

Post by Maestro81 »

I am working on an AR project and wonder how I can exclude the background from rendering (such that it just shows the UI widget behind it).

My first attempt is to just set the background color fully transparant (alpha=0). However, it will just show the color value of the background color, even though it's fully transparant (white, in case of the attached screenshot)

Code: Select all

	Ogre::ColourValue backgroundColor(1, 1, 1, 0);
	Ogre::Viewport* viewPort = m_ogreWindow->addViewport( m_camera );
		
	viewPort->setBackgroundColour(backgroundColor);;
	viewPort->setClearEveryFrame(true);
	viewPort->setOverlaysEnabled(false);
	viewPort->setSkiesEnabled(false);
Could it be that the framebuffer does not support alpha channels and I need to render to texture? How would one go about rendering only the scene, excluding not the background?
Attachments
Untitled.png
Post Reply