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); }
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); }
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); }