Inline DisplayManager._glManager

This commit is contained in:
YoshiRulz 2021-06-15 13:46:17 +10:00
parent f251492a21
commit 40c53e0c1f
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 3 additions and 7 deletions

View File

@ -17,10 +17,6 @@ namespace BizHawk.Client.EmuHawk
private GraphicsControl _lastVsyncSettingGraphicsControl;
// rendering resources:
private readonly GLManager _glManager;
// layer resources
private readonly PresentationPanel _presentationPanel; // well, its the final layer's target, at least
@ -44,11 +40,11 @@ namespace BizHawk.Client.EmuHawk
// setup the GL context manager, needed for coping with multiple opengl cores vs opengl display method
// but is it tho? --yoshi
_glManager = GLManager.Instance;
_crGraphicsControl = _glManager.GetContextForGraphicsControl(_graphicsControl);
// turns out it was, calling Instance getter here initialises it, and the encapsulated Activate call is necessary too --yoshi
_crGraphicsControl = GLManager.Instance.GetContextForGraphicsControl(_graphicsControl);
}
protected override void ActivateGLContext() => _glManager.Activate(_crGraphicsControl);
protected override void ActivateGLContext() => GLManager.Instance.Activate(_crGraphicsControl);
protected override Size GetGraphicsControlSize() => _graphicsControl.Size;