From a284107249309d3ce53e4720ef02e2a701fca9ae Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Fri, 26 Jul 2013 23:31:44 +0200 Subject: [PATCH] Canvas: ensure render order equals order in property tree. Prevents also changing the render order if changing eg. the size of a Canvas. --- simgear/canvas/Canvas.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/simgear/canvas/Canvas.cxx b/simgear/canvas/Canvas.cxx index fa671238..99fc08cd 100644 --- a/simgear/canvas/Canvas.cxx +++ b/simgear/canvas/Canvas.cxx @@ -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); -- 2.39.5