Beispiel #1
0
 /// <summary>
 /// Unloads our plugin
 /// </summary>
 public override void Unload()
 {
     if (layer != null)
     {
         Global.worldWindow.CurrentWorld.RenderableObjects.Remove(layer);
         layer.Dispose();
         layer = null;
     }
 }
Beispiel #2
0
        /// <summary>
        /// Unloads our plugin
        /// </summary>
        public override void Unload()
        {
            if (menuItem != null)
            {
                ParentApplication.ViewMenu.MenuItems.Remove(menuItem);
                menuItem.Dispose();
                menuItem = null;
            }

            if (layer != null)
            {
                Application.WorldWindow.CurrentWorld.RenderableObjects.Remove(layer);
                layer.Dispose();
                layer = null;
            }
        }
Beispiel #3
0
        /// <summary>
        /// Plugin entry point - All plugins must implement this function
        /// </summary>
        public override void Load()
        {
            Caps caps = Global.worldWindow.DrawArgs.device.DeviceCaps;

            if (!caps.DestinationBlendCaps.SupportsBlendFactor ||
                !caps.SourceBlendCaps.SupportsBlendFactor)
            {
                throw new ApplicationException("The graphics adapter is not compatible, no blend factor support.");
            }

            layer = new StereoLayer(LayerName, Global.worldWindow);
            Global.worldWindow.CurrentWorld.RenderableObjects.Add(layer);
            layer.IsOn = false; //turn off

            //            menuItem_Click(null, null);   //And on to trigger check and warning
            //   !!!!!!!!!=========Uncomment the above line to enable on startup===============!!!!!!!!!!!!
        }
Beispiel #4
0
        /// <summary>
        /// Plugin entry point - All plugins must implement this function
        /// </summary>
        public override void Load()
        {
            menuItem = new System.Windows.Forms.MenuItem();
            menuItem.Text = "Anaglyph 3D View Mode";
            menuItem.Click += new System.EventHandler(menuItem_Click);
            ParentApplication.ViewMenu.MenuItems.Add(menuItem);


            Caps caps = Application.WorldWindow.DrawArgs.device.DeviceCaps;
            if (!caps.DestinationBlendCaps.SupportsBlendFactor ||
                    !caps.SourceBlendCaps.SupportsBlendFactor)
            {
                throw new ApplicationException("The graphics adapter is not compatible, no blend factor support.");
            }

            layer = new StereoLayer(LayerName, Application.WorldWindow);
            Application.WorldWindow.CurrentWorld.RenderableObjects.Add(layer);
            layer.IsOn = false; //turn off

            //            menuItem_Click(null, null);   //And on to trigger check and warning
            //   !!!!!!!!!=========Uncomment the above line to enable on startup===============!!!!!!!!!!!!
        }
Beispiel #5
0
        /// <summary>
        /// Plugin entry point - All plugins must implement this function
        /// </summary>
        public override void Load()
        {
            menuItem        = new System.Windows.Forms.MenuItem();
            menuItem.Text   = "Anaglyph 3D View Mode";
            menuItem.Click += new System.EventHandler(menuItem_Click);
            ParentApplication.ViewMenu.MenuItems.Add(menuItem);


            Caps caps = Application.WorldWindow.DrawArgs.device.DeviceCaps;

            if (!caps.DestinationBlendCaps.SupportsBlendFactor ||
                !caps.SourceBlendCaps.SupportsBlendFactor)
            {
                throw new ApplicationException("The graphics adapter is not compatible, no blend factor support.");
            }

            layer = new StereoLayer(LayerName, Application.WorldWindow);
            Application.WorldWindow.CurrentWorld.RenderableObjects.Add(layer);
            layer.IsOn = false; //turn off

            //            menuItem_Click(null, null);   //And on to trigger check and warning
            //   !!!!!!!!!=========Uncomment the above line to enable on startup===============!!!!!!!!!!!!
        }
Beispiel #6
0
        /// <summary>
        /// Unloads our plugin
        /// </summary>
        public override void Unload()
        {
            if (menuItem != null)
            {
                ParentApplication.ViewMenu.MenuItems.Remove(menuItem);
                menuItem.Dispose();
                menuItem = null;
            }

            if (layer != null)
            {
                Application.WorldWindow.CurrentWorld.RenderableObjects.Remove(layer);
                layer.Dispose();
                layer = null;
            }
        }