Пример #1
0
		public Universe(Connection connection, ElementHost host)
		{
			InitializeComponent();

			m_connection = connection;
			m_host = host;

			m_container = new D3DImageSlimDX();
			m_container.IsFrontBufferAvailableChanged += new DependencyPropertyChangedEventHandler(OnIsFrontBufferAvailableChanged);
			RenderImage.Source = m_container;

			m_scene = new Scene(m_host, m_connection);
			var texture = m_scene.SharedTexture;
			m_container.SetBackBufferSlimDX(texture);
			BeginRenderingScene();
		}
Пример #2
0
        public Universe(Connection connection, ElementHost host)
        {
            InitializeComponent();

            m_connection = connection;
            m_host       = host;

            m_container = new D3DImageSlimDX();
            m_container.IsFrontBufferAvailableChanged += new DependencyPropertyChangedEventHandler(OnIsFrontBufferAvailableChanged);
            RenderImage.Source = m_container;

            m_scene = new Scene(m_host, m_connection);
            var texture = m_scene.SharedTexture;

            m_container.SetBackBufferSlimDX(texture);
            BeginRenderingScene();
        }