public static void RunMainLoop() { while (!GlfwApp.ShouldClose()) { //--------------- //render phase and swap GlfwApp.UpdateWindowsFrame(); /* Poll for and process events */ Glfw.PollEvents(); } Glfw.Terminate(); }
public GlFwForm(int w, int h, string title = "") { GlfwApp.InitGlFwForm(this, w, h, title); this.SetBounds(0, 0, w, h); //setup default int max = Math.Max(w, h); //------------------------------------ GL.Enable(EnableCap.Blend); GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); GL.ClearColor(1, 1, 1, 1); //-------------------------------------------------------------------------------- //setup viewport size //set up canvas GL.Viewport(0, 0, max, max); SetDrawFrameDelegate(OnPaint); }