private void xnaVisual_LoadContent(object sender, XNAControl.GraphicsDeviceEventArgs e) { foreach (var item in gridMain.ContextMenu.Items) { if (item is VisualRenderMenuItem) { (item as VisualRenderMenuItem).Plugin.LoadContent(e.GraphicsDevice); } } if (MenuItem.Plugin.System != null) { m_curRenderItem.Plugin.Start(xnaVisual.RenderSize, MenuItem.Plugin.System); } }
private void xnaVisual_RenderXna(object sender, XNAControl.GraphicsDeviceEventArgs e) { if (m_runVisual && this.IsEnabled) { if (m_curRenderItem != null) { m_curRenderItem.Plugin.Update(e.GraphicsDevice); m_curRenderItem.Plugin.Draw(e.GraphicsDevice); } } else { e.GraphicsDevice.Clear(Color.Black); } }