using StgSharp.Graphics; using StgSharp.Graphics.GL; using System; using System.Collections.Generic; using System.Text; namespace StgSharp.Logic { public partial class ViewModelBase { private List allView; public View BuildNewView( ViewPortDesigner designer, (int x, int y, int z) unitCubeSize ) { View ret = new View(this.context, designer,unitCubeSize); allView.Add(ret); return ret; } public T BuildRenderStream(View v, (int, int, int) cube) where T : RenderStream { T ret = Activator.CreateInstance(typeof(T), v.Port, cube) as T ?? throw new InvalidOperationException("Cannot build new render stream."); ret.timeProvider = this.frameTimeProvider; ret.InternalInit(); return ret; } } }