public void Render() { GLO.MakeCurrent(); GL.ClearColor(Color.Gray); // GL.DepthMask(true); GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); GLO.SwapBuffers(); GLO.Invalidate(); }
//初始化 private void Awake() { if (Instance == null) { DontDestroyOnLoad(gameObject); Instance = this; } else if (Instance != null) { Destroy(gameObject); } }
private void MainView_Load(object sender, EventArgs e) { //if(GLO == null) //{ GLO.Resize += GLO_Resize; GLO.Paint += GLO_Paint; Text = GL.GetString(StringName.Vendor) + " " + GL.GetString(StringName.Renderer) + " " + GL.GetString(StringName.Version); VF = new VForm(); VF.Set(Width, Height); Application.Idle += Application_Idle; //MessageBox.Show(Text); GLO.Invalidate(); }