Ejemplo n.º 1
0
 //============================================================
 public void FilterRenderables(FDxRenderableCollection renderables)
 {
     renderables.Clear();
     foreach (FDxDisplay display in _displays)
     {
         display.FilterRenderables(renderables);
     }
 }
Ejemplo n.º 2
0
        //============================================================
        // <T>绘制区域内所有节点集合。</T>
        //
        // @param p:region 区域
        //============================================================
        public virtual void DrawRegion(FDxRegion region)
        {
            // 绘制处理
            FDxRenderableCollection renderables = region.Renderables;
            int count = renderables.Count;

            for (int n = 0; n < count; n++)
            {
                FDxRenderable renderable = renderables[n];
                // 设置程序
                FDxProgram program = renderable.Programs.Find(_name);
                if (null == program)
                {
                    program = RDxCore.EffectConsole.Get(_device, _name);
                    renderable.Programs.Set(_name, program);
                }
                _device.Program = program;
                // 设置顶点缓冲
                DrawRenderable(region, renderable, program as FDxEffect);
            }
        }