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.viewPortDisplay, designer,unitCubeSize); allView.Add(ret); return ret; } public T BuildRenderStream(View view) where T : RenderStream { T ret = Activator.CreateInstance(typeof(T), view.Port, view.UnitCubeSize) as T ?? throw new InvalidOperationException("Cannot build new render stream."); ret.timeProvider = this.frameTimeProvider; ret.InternalInit(); return ret; } } }