コード例 #1
0
ファイル: DisplayManager.cs プロジェクト: Kabuto/BizHawk
		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();
		}
コード例 #2
0
ファイル: GLManager.cs プロジェクト: TechnoTaff/BizHawk
 public static void CreateInstance()
 {
     if (Instance != null)
     {
         throw new InvalidOperationException("Attempt to create more than one GLManager");
     }
     Instance = new GLManager();
 }
コード例 #3
0
ファイル: GLManager.cs プロジェクト: cas1993per/bizhawk
 public static void CreateInstance()
 {
     if (Instance != null) throw new InvalidOperationException("Attempt to create more than one GLManager");
     Instance = new GLManager();
 }