static void Main() { // UI initialization (before accessing GraphicsContext and others) Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); #if DEBUG Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException); #endif // Check requirements StringBuilder missingReq = new StringBuilder(); if (!GraphicsContext.CurrentCaps.GlExtensions.VertexShader_ARB) { missingReq.Append("- GL_ARB_vertex_shader\n"); } if (missingReq.Length > 0) { MessageBox.Show( String.Format("Unable to run sample. The following required extensions are not implemented:\n {0}", missingReq.ToString()), "Error...", MessageBoxButtons.OK, MessageBoxIcon.Error ); return; } // Load shaders library ShadersLibrary.Merge("HelloNewton.Shaders.ShadersLibrary.xml"); // Run UI Application.Run(new SampleForm()); }