Esempio n. 1
0
        /// <summary>
        /// Create a new instance of the dummy. The constructor will autom. add the instance itself to the <see cref="D3D11Host.Services"/> container of <see cref="host"/>.
        /// </summary>
        /// <param name="host"></param>
        public WpfGraphicsDeviceService(WpfGame host)
        {
            if (host == null)
            {
                throw new ArgumentNullException(nameof(host));
            }

            if (host.Services.GetService(typeof(IGraphicsDeviceService)) != null)
            {
                throw new NotSupportedException("A graphics device service is already registered.");
            }

            GraphicsDevice = host.GraphicsDevice;
            host.Services.AddService(typeof(IGraphicsDeviceService), this);
        }
 public WpfDrawableGameComponent(WpfGame game) : base(game)
 {
     _game = game;
 }
Esempio n. 3
0
 public WpfGameComponent(WpfGame game)
 {
     Game = game;
 }