Ejemplo n.º 1
0
 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();
     }
 }
Ejemplo n.º 2
0
 private void glControl1_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button.HasFlag(MouseButtons.Left))
     {
         GlMain.EndRotating(e.X, glControl1.Height - e.Y);
         Rotating = false;
     }
 }
Ejemplo n.º 3
0
 private void glControl1_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button.HasFlag(MouseButtons.Left))
     {
         GlMain.StartRotating(e.X, glControl1.Height - e.Y);
         Rotating = true;
     }
 }
Ejemplo n.º 4
0
 private void glControl1_Render(object sender, OpenGL.GlControlEventArgs e)
 {
     GlMain.Draw();
     if (glControl1.Animation != GlMain.Animating)
     {
         glControl1.Animation = GlMain.Animating;
     }
 }
Ejemplo n.º 5
0
 private void glControl1_DoubleClick(object sender, EventArgs e)
 {
     GlMain.ResetRotation();
     glControl1.Invalidate();
 }
Ejemplo n.º 6
0
 private void glControl1_SizeChanged(object sender, EventArgs e)
 {
     GlMain.Resize(glControl1.Width, glControl1.Height);
     glControl1.Invalidate();
 }
Ejemplo n.º 7
0
 private void glControl1_ContextDestroying(object sender, OpenGL.GlControlEventArgs e)
 {
     GlMain.Destroy();
 }
Ejemplo n.º 8
0
 private void glControl1_ContextCreated(object sender, OpenGL.GlControlEventArgs e)
 {
     GlMain.Initialize();
     GlMain.Resize(glControl1.Width, glControl1.Height);
 }