public SceneWindow(RadegastInstance instance) : base(instance) { InitializeComponent(); this.Instance = instance; this.Client = instance.Client; UseMultiSampling = Instance.GlobalSettings["use_multi_sampling"]; genericTaskThread = new Thread(new ThreadStart(GenericTaskRunner)); genericTaskThread.IsBackground = true; genericTaskThread.Name = "Generic task queue"; genericTaskThread.Start(); renderer = new MeshmerizerR(); renderTimer = new System.Diagnostics.Stopwatch(); renderTimer.Start(); // Camera initial setting Camera = new Camera(); InitCamera(); SetWaterPlanes(); chatOverlay = new ChatOverlay(instance, this); cbChatType.SelectedIndex = 1; DrawDistance = Instance.GlobalSettings["draw_distance"]; pnlDebug.Visible = Instance.GlobalSettings["scene_viewer_debug_panel"]; Client.Objects.TerseObjectUpdate += new EventHandler<TerseObjectUpdateEventArgs>(Objects_TerseObjectUpdate); Client.Objects.ObjectUpdate += new EventHandler<PrimEventArgs>(Objects_ObjectUpdate); Client.Objects.AvatarUpdate += new EventHandler<AvatarUpdateEventArgs>(Objects_AvatarUpdate); Client.Network.RegisterCallback(PacketType.KillObject, KillObjectHandler); Client.Network.SimChanged += new EventHandler<SimChangedEventArgs>(Network_SimChanged); Client.Terrain.LandPatchReceived += new EventHandler<LandPatchReceivedEventArgs>(Terrain_LandPatchReceived); Client.Avatars.AvatarAnimation += new EventHandler<AvatarAnimationEventArgs>(AvatarAnimationChanged); Client.Avatars.AvatarAppearance += new EventHandler<AvatarAppearanceEventArgs>(Avatars_AvatarAppearance); Client.Appearance.AppearanceSet += new EventHandler<AppearanceSetEventArgs>(Appearance_AppearanceSet); Instance.Netcom.ClientDisconnected += new EventHandler<DisconnectedEventArgs>(Netcom_ClientDisconnected); Application.Idle += new EventHandler(Application_Idle); }
public SceneWindow(RadegastInstance instance) : base(instance) { InitializeComponent(); Disposed += new EventHandler(frmPrimWorkshop_Disposed); this.Instance = instance; this.Client = instance.Client; UseMultiSampling = cbAA.Checked = instance.GlobalSettings["use_multi_sampling"]; cbAA.CheckedChanged += cbAA_CheckedChanged; this.instance = instance; genericTaskThread = new Thread(new ThreadStart(GenericTaskRunner)); genericTaskThread.IsBackground = true; genericTaskThread.Name = "Generic task queue"; genericTaskThread.Start(); renderer = new MeshmerizerR(); renderTimer = new System.Diagnostics.Stopwatch(); renderTimer.Start(); // Camera initial setting Camera = new Camera(); InitCamera(); tbDrawDistance.Value = (int)DrawDistance; lblDrawDistance.Text = string.Format("Draw distance: {0}", tbDrawDistance.Value); Client.Objects.TerseObjectUpdate += new EventHandler<TerseObjectUpdateEventArgs>(Objects_TerseObjectUpdate); Client.Objects.ObjectUpdate += new EventHandler<PrimEventArgs>(Objects_ObjectUpdate); Client.Objects.ObjectDataBlockUpdate += new EventHandler<ObjectDataBlockUpdateEventArgs>(Objects_ObjectDataBlockUpdate); Client.Objects.KillObject += new EventHandler<KillObjectEventArgs>(Objects_KillObject); Client.Network.SimChanged += new EventHandler<SimChangedEventArgs>(Network_SimChanged); Client.Terrain.LandPatchReceived += new EventHandler<LandPatchReceivedEventArgs>(Terrain_LandPatchReceived); Client.Avatars.AvatarAnimation += new EventHandler<AvatarAnimationEventArgs>(AvatarAnimationChanged); Client.Avatars.AvatarAppearance += new EventHandler<AvatarAppearanceEventArgs>(Avatars_AvatarAppearance); Client.Appearance.AppearanceSet += new EventHandler<AppearanceSetEventArgs>(Appearance_AppearanceSet); Instance.Netcom.ClientDisconnected += new EventHandler<DisconnectedEventArgs>(Netcom_ClientDisconnected); Application.Idle += new EventHandler(Application_Idle); }