public override void OnMouseActivity(object sender, NewTOAPIA.UI.MouseActivityArgs mea) { if (mea.ActivityType != MouseActivityType.MouseDown) return; switch (mea.ButtonActivity) { case MouseButtonActivity.LeftButtonDown: { diffuseMaterial[0] += 0.1f; if (diffuseMaterial[0] > 1.0) diffuseMaterial[0] = 0.0f; GI.Color4(diffuseMaterial); } break; case MouseButtonActivity.MiddleButtonDown: { diffuseMaterial[1] += 0.1f; if (diffuseMaterial[1] > 1.0) diffuseMaterial[1] = 0.0f; GI.Color4(diffuseMaterial); } break; case MouseButtonActivity.RightButtonDown: { diffuseMaterial[2] += 0.1f; if (diffuseMaterial[2] > 1.0) diffuseMaterial[2] = 0.0f; GI.Color4(diffuseMaterial); } break; default: break; } }
public override void MouseActivity(object sender, NewTOAPIA.UI.MouseEventArgs mevent) { BufferChunk chunk = new BufferChunk(1024); chunk += SpaceControlChannel.SC_MouseEvent; CodecUtils.Pack(chunk, mevent.Source); chunk += mevent.MouseID; chunk += (int)mevent.EventType; chunk += (int)mevent.Button; chunk += mevent.X; chunk += mevent.Y; chunk += mevent.Clicks; chunk += mevent.Delta; PackCommand(chunk); }
protected override void RenderContent(NewTOAPIA.GL.GraphicsInterface gi) { GLAspectLines lineAspects = new GLAspectLines(gi); lineAspects.LineWidth = 3.5f; gi.Begin(BeginMode.LineStrip); gi.Vertex(0.0f, 25.0f); gi.Vertex(50.0f, 100.0f); gi.Vertex(100.0f, 25.0f); gi.Vertex(225.0f, 115.0f); gi.Vertex(300.0f, 50.0f); gi.Vertex(375.0f, 100.0f); gi.Vertex(460.0f, 25.0f); gi.Vertex(525.0f, 100.0f); gi.Vertex(600.0f, 20.0f); gi.Vertex(675.0f, 70.0f); gi.Vertex(750.0f, 25.0f); gi.Vertex(800.0f, 90.0f); gi.End(); }
public override IntPtr OnKeyboardActivity(object sender, NewTOAPIA.UI.KeyboardActivityArgs kbde) { if (kbde.AcitivityType == NewTOAPIA.UI.KeyActivityType.KeyUp) { switch (kbde.VirtualKeyCode) { case NewTOAPIA.UI.VirtualKeyCodes.Space: if (fDemoCounter >= Models.Count) fDemoCounter = 0; Model = Models[fDemoCounter]; Model.SetContext(View.GLContext); System.Drawing.Rectangle rect = GetClientRectangle(); Model.OnSetViewport(rect.Width, rect.Height); fDemoCounter++; break; } RenderFrame(); } return IntPtr.Zero; }
public override void Draw(NewTOAPIA.UI.DrawEvent devent) { devent.GraphPort.DrawImage(SourcePixelBuffer, srcDstPoints, SourceRectangle(), GraphicsUnit.Pixel); }
public override void OnMouseActivity(object sender, NewTOAPIA.UI.MouseActivityArgs me) { if (me.ActivityType == NewTOAPIA.UI.MouseActivityType.MouseDown) OnMouseDown(me); }
public override void Render(NewTOAPIA.GL.GraphicsInterface gi) { throw new NotImplementedException(); }
/// <summary> /// The GraphportChunkEncoder calls this method automatically when it has /// a chunk that is ready to send out to the network. /// </summary> /// <param name="command"></param> void GDIChunkPacked(NewTOAPIA.BufferChunk command) { Channel.Send(command); }
void GDIChunkPacked(NewTOAPIA.BufferChunk command) { fRtpSender.Send(command); }
void SendCommand(NewTOAPIA.BufferChunk command) { fRtpSender.Send(command); }
public override void OnKeyboardActivity(object sender, NewTOAPIA.UI.KeyboardActivityArgs kbde) { //if (kbde.EventType == KeyEventType.KeyUp) //{ // GI.Redisplay(); //} }