示例#1
0
        public void Render(GraphicsDevice device, IRenderBlock block)
        {
            if (block != null && !(block is TRenderBlock))
            {
                throw new ArgumentException("wrong block type", "block");
            }

            this.Render(device, (TRenderBlock)block);
        }
示例#2
0
        public void Setup(GraphicsDevice device, IRenderBlock block, string basePath)
        {
            if (block != null && !(block is TRenderBlock))
            {
                throw new ArgumentException("wrong block type", "block");
            }

            this.Setup(device, (TRenderBlock)block, basePath);
        }
示例#3
0
        public static Renderers.IRenderer Instantiate(IRenderBlock block)
        {
            Type type = block.GetType();

            if (Types.ContainsKey(type) == false)
            {
                return(null);
            }

            return((Renderers.IRenderer)Activator.CreateInstance(Types[type]));
        }
        public void Setup(Device device,
                          IRenderBlock block,
                          ShaderLibrary shaderLibrary,
                          string basePath)
        {
            if (block != null && !(block is TRenderBlock))
            {
                throw new ArgumentException("wrong block type", "block");
            }

            this.Block = (TRenderBlock)block;
            this.Setup(device, shaderLibrary, basePath);
        }