Exemple #1
0
        public Layer(int depth = 0)
        {
            Depth     = depth;
            _entities = new List <Entity>();

            GraphicsCulling = Mononoke.Graphics.Renderer.BasicCulling;
            _drawCommands   = new List <IDrawCommand>();
        }
Exemple #2
0
        private void RenderCamera(Camera cam)
        {
            Scene scene = Mononoke.Scenes.Current;

            foreach (Layer layer in scene.Layers)
            {
                IGraphicsCulling graphicsCulling = layer.GraphicsCulling;
                foreach (IDrawCommand cmd in layer.DrawCommands)
                {
                    if (!cmd.Accept(cam, graphicsCulling))
                    {
                        continue;
                    }
                    cmd.Execute(cam);
                }
            }
        }
Exemple #3
0
 public override bool Accept(Camera cam, IGraphicsCulling graphicsCulling)
 {
     return(graphicsCulling.WillDraw(cam, this));
 }
Exemple #4
0
 public override bool Accept(Camera cam, IGraphicsCulling graphicsCulling)
 {
     // TODO
     return(true);
     //return renderer.WillDraw(cam, this);
 }
Exemple #5
0
 public abstract bool Accept(Camera cam, IGraphicsCulling graphicsCulling);