Canvas: ensure render order equals order in property tree.

Prevents also changing the render order if changing eg. the size
of a Canvas.
This commit is contained in:
Thomas Geymayer
2013-07-26 23:31:44 +02:00
parent a2e25e7940
commit a284107249

View File

@@ -221,6 +221,10 @@ namespace canvas
osg::Camera* camera = _texture.getCamera();
// TODO Allow custom render order? For now just keep in order with
// property tree.
camera->setRenderOrder(osg::Camera::PRE_RENDER, _node->getIndex());
osg::Vec4 clear_color(0.0f, 0.0f, 0.0f , 1.0f);
parseColor(_node->getStringValue("background"), clear_color);
camera->setClearColor(clear_color);