From f96110e09ecabad5da3520e36731e89afef89755 Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 22 Feb 2016 07:17:32 -0600 Subject: [PATCH] crusty old project that couldnt possibly be working now compiles and still doesnt work --- BizHawk.Client.MultiHawk/GlobalWin.cs | 8 ++++---- BizHawk.Client.MultiHawk/Mainform.cs | 11 ++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/BizHawk.Client.MultiHawk/GlobalWin.cs b/BizHawk.Client.MultiHawk/GlobalWin.cs index 102153502f..45794b7700 100644 --- a/BizHawk.Client.MultiHawk/GlobalWin.cs +++ b/BizHawk.Client.MultiHawk/GlobalWin.cs @@ -8,14 +8,14 @@ namespace BizHawk.Client.MultiHawk { public static Mainform MainForm; //public static ToolManager Tools; - //public static IGL GL; - //public static Bizware.BizwareGL.Drivers.OpenTK.IGL_TK IGL_GL; - //public static GLManager.ContextRef CR_GL; + public static IGL GL; + public static Bizware.BizwareGL.Drivers.OpenTK.IGL_TK IGL_GL; + public static BizHawk.Client.EmuHawk.GLManager.ContextRef CR_GL; //public static Sound Sound; //public static PresentationPanel PresentationPanel; //public static OSDManager OSD = new OSDManager(); //public static DisplayManager DisplayManager; - //public static GLManager GLManager; + public static BizHawk.Client.EmuHawk.GLManager GLManager; //input state which has been destined for game controller inputs are coalesced here //public static ControllerInputCoalescer ControllerInputCoalescer = new ControllerInputCoalescer(); diff --git a/BizHawk.Client.MultiHawk/Mainform.cs b/BizHawk.Client.MultiHawk/Mainform.cs index d879d2e942..b08e98a234 100644 --- a/BizHawk.Client.MultiHawk/Mainform.cs +++ b/BizHawk.Client.MultiHawk/Mainform.cs @@ -33,7 +33,7 @@ namespace BizHawk.Client.MultiHawk public Mainform(string[] args) { - GLManager.CreateInstance(); + GLManager.CreateInstance(GlobalWin.IGL_GL); InitializeComponent(); _throttle = new BizHawk.Client.EmuHawk.Throttle(); @@ -319,15 +319,16 @@ namespace BizHawk.Client.MultiHawk Text = Path.GetFileNameWithoutExtension(StripArchivePath(path)), Emulator = loader.LoadedEmulator, - GL = new Bizware.BizwareGL.Drivers.OpenTK.IGL_TK(), + GL = new Bizware.BizwareGL.Drivers.OpenTK.IGL_TK(2,0,false), GLManager = GLManager.Instance, Game = loader.Game, CurrentRomPath = loader.CanonicalFullPath }; - nextComm.RequestGLContext = () => ew.GLManager.CreateGLContext(); - nextComm.ActivateGLContext = (gl) => ew.GLManager.Activate((GLManager.ContextRef)ew.GL); - nextComm.DeactivateGLContext = () => ew.GLManager.Deactivate(); + nextComm.ReleaseGLContext = (o) => GlobalWin.GLManager.ReleaseGLContext(o); + nextComm.RequestGLContext = (major, minor, forward) => GlobalWin.GLManager.CreateGLContext(major, minor, forward); + nextComm.ActivateGLContext = (gl) => GlobalWin.GLManager.Activate((GLManager.ContextRef)gl); + nextComm.DeactivateGLContext = () => GlobalWin.GLManager.Deactivate(); ew.CoreComm = nextComm; ew.Init();