Remove GlobalWin.CR_GL because it wasn't being used

This commit is contained in:
adelikat 2017-05-22 11:16:15 -05:00
parent 0796c14046
commit 28f9d0ee0d
2 changed files with 9 additions and 10 deletions

View File

@ -13,8 +13,6 @@ namespace BizHawk.Client.EmuHawk
/// </summary>
public static IGL GL;
public static GLManager.ContextRef CR_GL;
/// <summary>
/// The IGL_TK to be used for specifically opengl operations (accessing textures from opengl-based cores)
/// </summary>

View File

@ -121,7 +121,7 @@ namespace BizHawk.Client.EmuHawk
BizHawk.Client.Common.StringLogUtil.DefaultToDisk = Global.Config.MoviesOnDisk;
BizHawk.Client.Common.StringLogUtil.DefaultToAWE = Global.Config.MoviesInAWE;
//super hacky! this needs to be done first. still not worth the trouble to make this system fully proper
// super hacky! this needs to be done first. still not worth the trouble to make this system fully proper
for (int i = 0; i < args.Length; i++)
{
var arg = args[i].ToLower();
@ -131,13 +131,12 @@ namespace BizHawk.Client.EmuHawk
}
}
//create IGL context. we do this whether or not the user has selected OpenGL, so that we can run opengl-based emulator cores
// create IGL context. we do this whether or not the user has selected OpenGL, so that we can run opengl-based emulator cores
GlobalWin.IGL_GL = new Bizware.BizwareGL.Drivers.OpenTK.IGL_TK(2, 0, false);
//setup the GL context manager, needed for coping with multiple opengl cores vs opengl display method
// setup the GL context manager, needed for coping with multiple opengl cores vs opengl display method
GLManager.CreateInstance(GlobalWin.IGL_GL);
GlobalWin.GLManager = GLManager.Instance;
GlobalWin.CR_GL = GlobalWin.GLManager.GetContextForIGL(GlobalWin.GL);
//now create the "GL" context for the display method. we can reuse the IGL_TK context if opengl display method is chosen
REDO_DISPMETHOD:
@ -153,7 +152,8 @@ namespace BizHawk.Client.EmuHawk
{
var e2 = new Exception("Initialization of Direct3d 9 Display Method failed; falling back to GDI+", ex);
new ExceptionBox(e2).ShowDialog();
//fallback
// fallback
Global.Config.DispMethod = Config.EDispMethod.GdiPlus;
goto REDO_DISPMETHOD;
}
@ -161,17 +161,18 @@ namespace BizHawk.Client.EmuHawk
else
{
GlobalWin.GL = GlobalWin.IGL_GL;
//check the opengl version and dont even try to boot this crap up if its too old
// check the opengl version and dont even try to boot this crap up if its too old
int version = GlobalWin.IGL_GL.Version;
if (version < 200)
{
//fallback
// fallback
Global.Config.DispMethod = Config.EDispMethod.GdiPlus;
goto REDO_DISPMETHOD;
}
}
//try creating a GUI Renderer. If that doesn't succeed. we fallback
// try creating a GUI Renderer. If that doesn't succeed. we fallback
try
{
using (GlobalWin.GL.CreateRenderer()) { }