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

            RenderCommandList cmds = new RenderCommandList();

            List <PostEffect> activeEffects = new List <PostEffect>();

            foreach (PostEffect e in myEffects)
            {
                if (e.enabled == true)
                {
                    activeEffects.Add(e);
                }
            }

            foreach (PostEffect e in activeEffects)
            {
                cmds.AddRange(e.getCommands());
            }

            if (activeEffects.Count > 0)
            {
                cmds.Add(new SetRenderTargetCommand(renderTarget));
                cmds.Add(new CopyFramebufferCommand(activeEffects[activeEffects.Count - 1].output, view.viewport.width, view.viewport.height));
            }

            renderCmdLists.Add(cmds);
            renderCmdLists.Add(postCommands);
        }
Exemple #2
0
        public View(String viewName, Camera c, Viewport v)
        {
            name                       = viewName;
            camera                     = c;
            viewport                   = v;
            isActive                   = true;
            myPasses                   = new List <Pass>();
            myRenderCommandLists       = new List <RenderCommandList>();
            myVisibleRenderablesByType = new Dictionary <string, List <Renderable> >();
            processRenderables         = true;

            preCommands  = new RenderCommandList();
            postCommands = new RenderCommandList();
        }
Exemple #3
0
        public Pass(string name, string technique)
        {
            myName                     = name;
            myTechnique                = technique;
            renderTarget               = null;
            clearTarget                = false;
            myRenderQueues             = new Dictionary <ulong, BaseRenderQueue>();
            myVisibleRenderablesByType = new Dictionary <string, List <Renderable> >();
            preCommands                = new RenderCommandList();
            postCommands               = new RenderCommandList();
            filter                     = new NullFilter();

            clearTarget = false;
            clearColor  = new Color4(0.2f, 0.2f, 0.2f, 1.0f);
            clearMask   = ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit;
        }
        public override void getRenderCommands(List <RenderCommandList> renderCmdLists)
        {
            renderCmdLists.Add(preCommands);

            RenderCommandList cmds = new RenderCommandList();

            foreach (PostEffect e in myEffects)
            {
                cmds.AddRange(e.getCommands());
            }

            if (myEffects.Count > 0)
            {
                cmds.Add(new SetRenderTargetCommand(renderTarget));
                cmds.Add(new CopyFramebufferCommand(myEffects[myEffects.Count - 1].output, view.viewport.width, view.viewport.height));
            }

            renderCmdLists.Add(cmds);

            renderCmdLists.Add(postCommands);
        }
Exemple #5
0
 public BaseRenderQueue(PipelineState pipeline)
 {
     myPipeline = pipeline;
     commands   = new RenderCommandList();
 }