Esempio n. 1
0
 //============================================================
 // <T>设置渲染过程。</T>
 //============================================================
 public override void Setup()
 {
     base.Setup();
     _program          = RDxCore.EffectConsole.Get(_device, "design.merge");
     _rectangle        = new FDxRectangleGeometry();
     _rectangle.Device = _device;
     _rectangle.Setup();
 }
Esempio 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);
            }
        }