public unsafe int bufferNode(ref IntPtr buffer, Node n, Material.Property pass)
        {
            int count = 0;

            if (n.myChildren != null)
            {
                for (int i = 0; i < 8; i++)
                {
                    count += bufferNode(ref buffer, n.myChildren[i], pass);
                }
            }
            else
            {
                if (n.isVisible() == false)
                {
                    return(0);
                }

                if (n.myMaterial.property != pass)
                {
                    return(0);
                }

                I1I1B12 node = new I1I1B12();
                node.Morton     = n.myKey.myValue;
                node.MaterialId = n.myMaterial.packedTextures;
                for (int i = 0; i < 12; i++)
                {
                    node.Edges[i] = n.myEdgeSpans[i];
                }

                Marshal.StructureToPtr(node, buffer, false);
                buffer += I1I1B12.stride;
                return(1);
            }

            return(count);
        }
        //public override void prepareFrameBegin() { }
        //public override void preparePerFrame(Renderable r) { }
        //public override void preparePerViewBegin(View v) { }
        //public override void preparePerView(Renderable r, View v) { }
        //public override void preparePerViewFinalize(View v) { }
        //public override void preparePerPassBegin(Pass p) { }
        //public override void preparePerPass(Renderable r, Pass p) { }

        public override void preparePerPassFinalize(Pass p)
        {
            base.preparePerPassFinalize(p);

            foreach (BaseRenderQueue rq in p.renderQueues.Values)
            {
                if (rq.myPipeline.vaoState.vao == null)
                {
                    rq.myPipeline.vaoState.vao = new VertexArrayObject();
                    rq.myPipeline.vaoState.vao.bindVertexFormat(rq.myPipeline.shaderState.shaderProgram, I1I1B12.bindings());
                }
            }
        }