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 DisplayManager(PresentationPanel presentationPanel, IGL gl, GLManager glManager)
        {
            GL        = gl;
            GLManager = glManager;
            this.presentationPanel = presentationPanel;
            GraphicsControl        = this.presentationPanel.GraphicsControl;
            CR_GraphicsControl     = GLManager.GetContextForGraphicsControl(GraphicsControl);

            //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 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 #3
0
        public DisplayManager(PresentationPanel presentationPanel, IGL gl, GLManager glManager)
        {
            GL        = gl;
            GLManager = glManager;
            this.presentationPanel = presentationPanel;
            GraphicsControl        = this.presentationPanel.GraphicsControl;
            CR_GraphicsControl     = GLManager.GetContextForGraphicsControl(GraphicsControl);

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

            Renderer = GL.CreateRenderer();

            VideoTextureFrugalizer = new 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();
        }