protected override void OnLoad(EventArgs e) { using (ILifetimeScope scope = lifetimeScope.BeginLifetimeScope()) { ISceneFactory sceneFactory = scope.Resolve <ISceneFactory>(); ClientModel client; using (StreamReader sr = new StreamReader(Path.Combine(Directory.GetCurrentDirectory(), "Json", "model.json"))) { client = JsonConvert.DeserializeObject <ClientModel>(sr.ReadToEnd()); } scene = sceneFactory.CreateScene(client.Scene); GL.ClearColor(0.0f, 0.0f, 0.0f, 1.0f); GL.Enable(EnableCap.Texture2D); GL.Disable(EnableCap.DepthTest); GL.Hint(HintTarget.PerspectiveCorrectionHint, HintMode.Nicest); renderService.Initialise(); } base.OnLoad(e); }