Beispiel #1
0
		public DisplayManager(PresentationPanel presentationPanel, IGL gl, GLManager glManager)
		{
			GL = gl;
			this.presentationPanel = presentationPanel;
			GraphicsControl = this.presentationPanel.GraphicsControl;
			CR_GraphicsControl = glManager.GetContextForGraphicsControl(GraphicsControl);
			_glManager = glManager;

			//it's sort of important for these to be initialized to something nonzero
			currEmuWidth = currEmuHeight = 1;

			if (GL is BizHawk.Bizware.BizwareGL.Drivers.OpenTK.IGL_TK)
				Renderer = new GuiRenderer(GL);
			else if (GL is BizHawk.Bizware.BizwareGL.Drivers.SlimDX.IGL_SlimDX9)
				Renderer = new GuiRenderer(GL);
			else
				Renderer = new GDIPlusGuiRenderer((BizHawk.Bizware.BizwareGL.Drivers.GdiPlus.IGL_GdiPlus)GL);

			VideoTextureFrugalizer = new BizHawk.Client.EmuHawk.TextureFrugalizer(GL);

			ShaderChainFrugalizers = new RenderTargetFrugalizer[16]; //hacky hardcoded limit.. need some other way to manage these
			for (int i = 0; i < 16; i++)
			{
				ShaderChainFrugalizers[i] = new RenderTargetFrugalizer(GL);
			}

			RefreshUserShader();
		}
Beispiel #2
0
		public void Init()
		{
			PresentationPanel = new PresentationPanel(this, GL);
			CR_GL = GLManager.GetContextForIGL(GL);
			DisplayManager = new DisplayManager(PresentationPanel, GL ,GLManager);

			Controls.Add(PresentationPanel);
			Controls.SetChildIndex(PresentationPanel, 0);
		}
 public void Dispose()
 {
     _context.Dispose();
     _context = null;
     _panel   = null;
 }