private static void visit(SceneGraphNode node, RenderingContext rc)
        {
#if DEBUG_SCENE_GRAPH_RENDERING
#if DEBUG_SCENE_GRAPH_RENDERING_VERBOSE
            Console.WriteLine(node.ToString());
#else
            Console.WriteLine("".PadLeft(node.Depth, '\t') + "<" + node.GetNodeName() + ">");
#endif
#endif
            if (!node.Validate())
            {
                Console.WriteLine("X3D Validation [failed]");
            }

            if (!node.HasRendered)
            {
                node.PreRenderOnce(rc);
                node.HasRendered = true;
            }
            node.PreRender();

            if (node.Hidden)
            {
                node.KeepAlive(rc);
            }
            else
            {
                node.Render(rc);
            }
        }
        private static void leave(SceneGraphNode node, RenderingContext rc)
        {
#if DEBUG_SCENE_GRAPH_RENDERING
#if DEBUG_SCENE_GRAPH_RENDERING_VERBOSE
            //Console.WriteLine("~"+node.ToString());
#else
            Console.WriteLine("".PadLeft(node.Depth, '\t') + "</" + node.GetNodeName() + ">");
#endif
#endif
            if (!node.Hidden)
            {
                node.PostRender(rc);
            }
        }