static public void Initialize(Size resolution, int msaasamples, string mediapath, GameWindowFlags flags = GameWindowFlags.Default) { StartTime = DateTime.Now; MSAASamples = msaasamples; World = new World(); Media.SearchPath = mediapath; Media.LoadFileMap(); ShadowMaps = new ShadowMapsArrayTexture(512, 512); Resolution = resolution; SetCurrentThreadCores(1); ShaderPool = new ShaderPool(); var thread = Task.Factory.StartNew(() => { SetCurrentThreadCores(2); DisplayAdapter = new VEngineWindowAdapter("VEngine App", resolution.Width, resolution.Height, flags); GraphicsSettings.UseDeferred = true; GraphicsSettings.UseRSM = false; GraphicsSettings.UseVDAO = true; GraphicsSettings.UseFog = false; GraphicsSettings.UseBloom = false; GraphicsSettings.UseLightPoints = true; DisplayAdapter.CursorVisible = false; Invoke(() => Initialized = true); DisplayAdapter.Run(); }); while(!Initialized) ; }
static public void Initialize(Size resolution, int msaasamples, string mediapath, GameWindowFlags flags = GameWindowFlags.Default) { StartTime = DateTime.Now; MSAASamples = msaasamples; World = new World(); Media.SearchPath = mediapath; Media.LoadFileMap(); //CascadeShadowMaps = new CascadeShadows(Vector3.One, new float[] { 10, 25, 50, 500, 1000, 10000 }, 10000); //CascadeShadowMaps = new CascadeShadows(Vector3.One, new float[] { }, 10000); Resolution = resolution; SetCurrentThreadCores(1); ShaderPool = new ShaderPool(); var thread = Task.Factory.StartNew(() => { SetCurrentThreadCores(2); DisplayAdapter = new VEngineWindowAdapter("VEngine App", resolution.Width, resolution.Height, flags); DisplayAdapter.MainRenderer.GraphicsSettings.UseDeferred = false; DisplayAdapter.MainRenderer.GraphicsSettings.UseRSM = false; DisplayAdapter.MainRenderer.GraphicsSettings.UseVDAO = false; DisplayAdapter.MainRenderer.GraphicsSettings.UseFog = false; DisplayAdapter.MainRenderer.GraphicsSettings.UseBloom = false; DisplayAdapter.MainRenderer.GraphicsSettings.UseCubeMapGI = false; DisplayAdapter.CursorVisible = false; Invoke(() => Initialized = true); DisplayAdapter.Run(); }); while (!Initialized) { ; } }