Remove GlobalWin.CR_GL because it wasn't being used
This commit is contained in:
parent
0796c14046
commit
28f9d0ee0d
|
@ -13,8 +13,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static IGL GL;
|
public static IGL GL;
|
||||||
|
|
||||||
public static GLManager.ContextRef CR_GL;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The IGL_TK to be used for specifically opengl operations (accessing textures from opengl-based cores)
|
/// The IGL_TK to be used for specifically opengl operations (accessing textures from opengl-based cores)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -121,7 +121,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
BizHawk.Client.Common.StringLogUtil.DefaultToDisk = Global.Config.MoviesOnDisk;
|
BizHawk.Client.Common.StringLogUtil.DefaultToDisk = Global.Config.MoviesOnDisk;
|
||||||
BizHawk.Client.Common.StringLogUtil.DefaultToAWE = Global.Config.MoviesInAWE;
|
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++)
|
for (int i = 0; i < args.Length; i++)
|
||||||
{
|
{
|
||||||
var arg = args[i].ToLower();
|
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);
|
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);
|
GLManager.CreateInstance(GlobalWin.IGL_GL);
|
||||||
GlobalWin.GLManager = GLManager.Instance;
|
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
|
//now create the "GL" context for the display method. we can reuse the IGL_TK context if opengl display method is chosen
|
||||||
REDO_DISPMETHOD:
|
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);
|
var e2 = new Exception("Initialization of Direct3d 9 Display Method failed; falling back to GDI+", ex);
|
||||||
new ExceptionBox(e2).ShowDialog();
|
new ExceptionBox(e2).ShowDialog();
|
||||||
//fallback
|
|
||||||
|
// fallback
|
||||||
Global.Config.DispMethod = Config.EDispMethod.GdiPlus;
|
Global.Config.DispMethod = Config.EDispMethod.GdiPlus;
|
||||||
goto REDO_DISPMETHOD;
|
goto REDO_DISPMETHOD;
|
||||||
}
|
}
|
||||||
|
@ -161,17 +161,18 @@ namespace BizHawk.Client.EmuHawk
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GlobalWin.GL = GlobalWin.IGL_GL;
|
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;
|
int version = GlobalWin.IGL_GL.Version;
|
||||||
if (version < 200)
|
if (version < 200)
|
||||||
{
|
{
|
||||||
//fallback
|
// fallback
|
||||||
Global.Config.DispMethod = Config.EDispMethod.GdiPlus;
|
Global.Config.DispMethod = Config.EDispMethod.GdiPlus;
|
||||||
goto REDO_DISPMETHOD;
|
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
|
try
|
||||||
{
|
{
|
||||||
using (GlobalWin.GL.CreateRenderer()) { }
|
using (GlobalWin.GL.CreateRenderer()) { }
|
||||||
|
|
Loading…
Reference in New Issue