]> git.mxchange.org Git - simgear.git/commitdiff
Canvas: ensure render order equals order in property tree.
authorThomas Geymayer <tomgey@gmail.com>
Fri, 26 Jul 2013 21:31:44 +0000 (23:31 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Fri, 26 Jul 2013 21:31:46 +0000 (23:31 +0200)
Prevents also changing the render order if changing eg. the size
of a Canvas.

simgear/canvas/Canvas.cxx

index fa6712389c22ecaf2357cfb9b225f98f090ed63d..99fc08cdad1261047c593a2943fa39153ec77f36 100644 (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);