Provides creation and management functionality for a Direct3D9 rendering device and related objects.
Inheritance: IDisposable
Exemple #1
0
        /// <summary>
        /// Initializes a <see cref="DeviceContext9">Direct3D9 device context</see> according to the specified settings.
        /// The base class retains ownership of the context and will dispose of it when appropriate.
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <returns>The initialized device context.</returns>
        protected void InitializeDevice(DeviceSettings9 settings)
        {
            var result = new DeviceContext9(_form.Handle, settings);

            userInterfaceRenderer = new UserInterfaceRenderer9(result.Device, settings.Width, settings.Height);
            apiContext            = result;
            Context = result;

            this.globalSettings.Device = Context.Device;
            this.globalSettings.Init();
        }
        public Cartographer()
        {
            InitializeComponent();

            BuildTree(null, -1);

            this.Disposed += new EventHandler(Cleanup);

            var settings = new Renderer.DeviceSettings9()
            {
                AdapterOrdinal = 0,
                CreationFlags = SlimDX.Direct3D9.CreateFlags.HardwareVertexProcessing,
                Width = 128,
                Height = 128
            };
            context = new Renderer.DeviceContext9(this.Handle, settings);
        }
        public Cartographer()
        {
            InitializeComponent();

            BuildTree(null, -1);

            this.Disposed += new EventHandler(Cleanup);

            var settings = new Renderer.DeviceSettings9()
            {
                AdapterOrdinal = 0,
                CreationFlags = SlimDX.Direct3D9.CreateFlags.HardwareVertexProcessing,
                Width = 128,
                Height = 128
            };
            context = new Renderer.DeviceContext9(this.Handle, settings);
        }
Exemple #4
0
        /// <summary>
        /// Initializes a <see cref="DeviceContext9">Direct3D9 device context</see> according to the specified settings.
        /// The base class retains ownership of the context and will dispose of it when appropriate.
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <returns>The initialized device context.</returns>
        protected void InitializeDevice(DeviceSettings9 settings)
        {
            var result = new DeviceContext9(_form.Handle, settings);
            userInterfaceRenderer = new UserInterfaceRenderer9(result.Device, settings.Width, settings.Height);
            apiContext = result;
            Context = result;

            this.globalSettings.Device = Context.Device;
            this.globalSettings.Init();
        }