private void glControl1_MouseMove(object sender, MouseEventArgs e) { if (e.Button.HasFlag(MouseButtons.Left) && Rotating) { GlMain.Rotating(e.X, glControl1.Height - e.Y); glControl1.Invalidate(); } }
private void glControl1_MouseUp(object sender, MouseEventArgs e) { if (e.Button.HasFlag(MouseButtons.Left)) { GlMain.EndRotating(e.X, glControl1.Height - e.Y); Rotating = false; } }
private void glControl1_MouseDown(object sender, MouseEventArgs e) { if (e.Button.HasFlag(MouseButtons.Left)) { GlMain.StartRotating(e.X, glControl1.Height - e.Y); Rotating = true; } }
private void glControl1_Render(object sender, OpenGL.GlControlEventArgs e) { GlMain.Draw(); if (glControl1.Animation != GlMain.Animating) { glControl1.Animation = GlMain.Animating; } }
private void glControl1_DoubleClick(object sender, EventArgs e) { GlMain.ResetRotation(); glControl1.Invalidate(); }
private void glControl1_SizeChanged(object sender, EventArgs e) { GlMain.Resize(glControl1.Width, glControl1.Height); glControl1.Invalidate(); }
private void glControl1_ContextDestroying(object sender, OpenGL.GlControlEventArgs e) { GlMain.Destroy(); }
private void glControl1_ContextCreated(object sender, OpenGL.GlControlEventArgs e) { GlMain.Initialize(); GlMain.Resize(glControl1.Width, glControl1.Height); }