private void OnLoad(object sender, EventArgs e) { Title = $"{EmbeddedFiles.AppName} | {EmbeddedFiles.Title_Unsaved}"; Icon = EmbeddedFiles.logo; // Set up lighting GL.ShadeModel(ShadingModel.Smooth); GL.Enable(EnableCap.ColorMaterial); // Set up caps GL.Enable(EnableCap.DepthTest); GL.Enable(EnableCap.RescaleNormal); GL.Disable(EnableCap.Texture2D); GL.Disable(EnableCap.CullFace); // Set up blending GL.Enable(EnableCap.Blend); GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha); // Set background color GL.ClearColor(Color.FromArgb(255, 13, 13, 13)); // Init keyboard to ensure first frame won't NPE _keyboard = Keyboard.GetState(); _terrainGenerator = new CsTerrainGenerator(); _renderManager = new RenderManager(this, _terrainGenerator); _terrainLayerList = new RenderController(this); _terrainLayerList.Show(); _scriptWatcher = new ScriptWatcher(); _scriptWatcher.FileChanged += OnScriptChanged; Lumberjack.Info(EmbeddedFiles.Info_WindowLoaded); }