public GraphicsProfileInfoDlg(GraphicsProfile profile)
        {
            InitializeComponent();

            label2.Text = profile.Name;
            label4.Text = profile.Desc;

            GraphicsDeviceRequirements req = profile.RecommendedVariation;
            AddItem("Hardware TnL", req.HardwareTnL, 0);
            AddItem("Device Type", req.DeviceType, 0);
            AddItem("Display Format", req.DisplayFormat, 0);
            AddItem("Multi-Sample", req.MultiSample, 0);
            AddItem("Pixel Shader", req.PixelShader, 0);
            AddItem("Vertex Shader", req.VertexShader, 0);
            AddItem("Pure Device", req.Pure, 0);

            req = profile.MinReqs;
            AddItem("Hardware TnL", req.HardwareTnL, 1);
            AddItem("Device Type", req.DeviceType, 1);
            AddItem("Display Format", req.DisplayFormat, 1);
            AddItem("Multi-Sample", req.MultiSample, 1);
            AddItem("Pixel Shader", req.PixelShader, 1);
            AddItem("Vertex Shader", req.VertexShader, 1);
            AddItem("Pure Device", req.Pure, 1);
        }
        public VisRenderingContext3D(ISettings settings, Control targetRenderArea,
                                     CommonDeviceInterface cdi, GraphicsProfile gProfile)
            : base(targetRenderArea, gProfile, cdi, (HashTableSettings)settings)
        {
            /*List<ISharableResource> shared = new List<ISharableResource>();
            ILayer layer = (ILayer)devIf.GetSharedResource("file://media/ui/common/WelcomeLayer.xml", ref shared);
            layers.InsertLayer(layer, uint.MinValue);*/

            //deMap = new DigitalElevationMap(new Size(), null);
            //deMap.Init(devIf.Device);
            
            loadingLayer = new LoadingLayer(devIf, new Point(), new Size(300, 300), "LoadingLayer", null, null);
            layers.InsertLayer(loadingLayer, uint.MinValue);
        }
        public UI3DVisControl()
        {
            InitializeComponent();

            diffuseDataSrcs = new List<DataSourceItem>();
            heightDataSrcs = new List<DataSourceItem>();

            // create profiles
            profiles = new GraphicsProfile[1];
            profiles[0] = new DEMGraphicsProfile("CPU Basic Profile", "Basic rendering of CPU DEM",
                                              new GraphicsDeviceRequirements(MultiSampleType.None, DeviceType.Hardware,
                                                                             new Format[] { Format.X8R8G8B8 }, 1, true,
                                                                             new DepthFormat[] { DepthFormat.D16 },
                                                                             false, false),
                                              new GraphicsDeviceRequirements(MultiSampleType.FourSamples, DeviceType.Hardware,
                                                                             new Format[] { Format.X8R8G8B8 }, 1, true,
                                                                             new DepthFormat[] { DepthFormat.D16 },
                                                                             true, true,
                                                                             new Version(1, 1), new Version(2, 0)));
        }
        public RenderingContext3D(Control targetRenderArea, GraphicsProfile profile, CommonDeviceInterface cdi,
                                  HashTableSettings localSettings)
        {
            isDeviceLost = false;
            isActive = false;
            hasFocus = false;

            this.targetRenderArea = targetRenderArea;
            outProfile = profile;
            log = cdi.GeneralLog;

            presentParams = new PresentParameters();
            outCaps = cdi.DeviceCaps;

            layers = new LayerStack();

            InitializeEnvironment(cdi, localSettings);

            view3D = new RenderingView3DPer(Matrix.Identity, Matrix.Identity);
            view3D.Near = 0.1f;
            view3D.Far = 25;

            int sceneSize = 60;
            sManager = new GenericSceneManager<SceneEntity>(gDevice, outSettings,
                                                            new Vector3(sceneSize / 2f, sceneSize / 2f, sceneSize / 2f), sceneSize);
        }