Ejemplo n.º 1
0
        public virtual void generateRenderCommandLists()
        {
            preCommands.Clear();
            postCommands.Clear();

            preCommands.Add(new PushDebugMarkerCommand(String.Format("View {0}-execute", name)));


            onPreGenerateCommands();

            //reset the device so this view can update as appropriate
            preCommands.Add(new DeviceResetCommand());

            //bind the camera for the view
            preCommands.Add(new BindCameraCommand(camera));

            foreach (Pass p in myPasses)
            {
                p.generateRenderCommandLists();
            }

            onPostGenerateCommands();

            postCommands.Add(new PopDebugMarkerCommand());
        }
Ejemplo n.º 2
0
        public virtual void generateRenderCommandLists()
        {
            preCommands.Clear();
            postCommands.Clear();

            preCommands.Add(new PushDebugMarkerCommand(String.Format("Pass {0}:{1}-execute", view.name, name)));

            if (renderTarget != null)
            {
                preCommands.Add(new SetRenderTargetCommand(renderTarget));
            }

            if (clearTarget == true)
            {
                preCommands.Add(new ClearColorCommand(clearColor));
                preCommands.Add(new ClearCommand(clearMask));
            }

            //called after setting render target so that any user commands inserted will affect (or change) the render target
            onPreGenerateCommands();

            stats.queueCount  = myRenderQueues.Count;
            stats.renderCalls = 0;
            stats.name        = name;
            stats.technique   = technique;

            //add the view specific commands for each render queue
            foreach (BaseRenderQueue rq in myRenderQueues.Values)
            {
                rq.commands.Clear();
                rq.generateRenderCommands();
            }

            onPostGenerateCommands();

            postCommands.Add(new PopDebugMarkerCommand());

            stats.renderCalls += preCommands.Count;
            stats.renderCalls += postCommands.Count;
            foreach (BaseRenderQueue rq in myRenderQueues.Values)
            {
                stats.renderCalls += rq.commands.Count;
            }
        }
Ejemplo n.º 3
0
 public virtual void reset()
 {
     commands.Clear();
 }