示例#1
0
        /// <summary>
        /// Attaches the host (the DPFcanvas in the window) to this to access its resources
        /// </summary>
        /// <param name="host"></param>
        public void Attach(ISceneHost host)
        {
            try
            {
                this._host = host;

                // Assure that a device is set.
                if (host.Device == null)
                {
                    throw new Exception("Scene host device is null");
                }

                SetupRenderer();
                FSMain.CreateRenderables();

                Initialized = true;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#2
0
        /// <summary>
        /// Attaches the host (the DPFcanvas in the window) to this to access its resources
        /// </summary>
        /// <param name="host"></param>
        public void Attach(ISceneHost host)
        {
            try
            {
                this._host = host;

                // Assure that a device is set.
                if (host.Device == null)
                    throw new Exception("Scene host device is null");

                SetupRenderer();
                FSMain.CreateRenderables();

                Initialized = true;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }