private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (null != m_Timer)
            {
                m_Timer.Stop();
                m_Timer = null;
            }

            if (null != m_Scene)
            {
                m_Scene.Dispose();
                m_Scene = null;
            }
        }
        public MainWindow()
        {
            InitializeComponent();

            m_Scene = new OpenCLRenderer.Scene();
            List <string> listDevices = m_Scene.GetDevices();

            m_Scene.Dispose();
            m_Scene = null;

            ContextMenu contextMenu = new ContextMenu();

            foreach (string strDevice in listDevices)
            {
                MenuItem item = new MenuItem();
                item.Header = strDevice;
                item.Click += Item_Click;

                contextMenu.Items.Add(item);
            }
            ContextMenu = contextMenu;
        }