예제 #1
0
        public override void getRenderCommands(List <RenderCommandList> renderCmdLists)
        {
            renderCmdLists.Add(preCommands);

            //render opaque and transparent terrain objects
            renderCmdLists.Add(myOpaqueTerrainQueue.commands);
            renderCmdLists.Add(myTransparentTerrainQueue.commands);

            if (myWaterTerrainQueue.commands.Count > 0)
            {
                //setup the water render target
                RenderCommandList w = new RenderCommandList();
                w.Add(new SetRenderTargetCommand(myWaterRenderTarget));
                renderCmdLists.Add(w);

                //render the water commands
                renderCmdLists.Add(myWaterTerrainQueue.commands);

                //setup the water post render command
                w = new RenderCommandList();
                w.Add(new SetRenderTargetCommand(renderTarget));


                renderCmdLists.Add(w);
            }

            renderCmdLists.Add(postCommands);
        }
 private void _returnCommandList(RenderCommandList list)
 {
     list.Commands.Clear();
     _storeInPool(_poolCommandList, list);
 }