mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 10:55:32 +00:00
[Mac] Resource registration moved to the facades
This commit is contained in:
parent
ac2ae4a4bb
commit
050a93d4af
|
@ -43,35 +43,34 @@ namespace OpenTK.Platform.MacOS
|
|||
internal const float ScrollFactor = 0.1f;
|
||||
internal static bool ExclusiveFullscreen = false;
|
||||
|
||||
readonly IInputDriver2 InputDriver = new HIDInput();
|
||||
readonly IInputDriver2 InputDriver;
|
||||
|
||||
public MacOSFactory()
|
||||
{
|
||||
NSApplication.Initialize();
|
||||
InputDriver = new HIDInput();
|
||||
}
|
||||
|
||||
#region IPlatformFactory Members
|
||||
|
||||
public override INativeWindow CreateNativeWindow(int x, int y, int width, int height, string title, GraphicsMode mode, GameWindowFlags options, DisplayDevice device)
|
||||
{
|
||||
INativeWindow window = new CocoaNativeWindow(x, y, width, height, title, mode, options, device);
|
||||
RegisterResource(window);
|
||||
return window;
|
||||
return new CocoaNativeWindow(x, y, width, height, title, mode, options, device);
|
||||
}
|
||||
|
||||
public override IDisplayDeviceDriver CreateDisplayDeviceDriver()
|
||||
{
|
||||
// Does not implement IDisposable
|
||||
return new QuartzDisplayDeviceDriver();
|
||||
}
|
||||
|
||||
public override IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
|
||||
{
|
||||
IGraphicsContext context = new CocoaContext(mode, window, shareContext, major, minor);
|
||||
RegisterResource(context);
|
||||
return context;
|
||||
return new CocoaContext(mode, window, shareContext, major, minor);
|
||||
}
|
||||
|
||||
public override IGraphicsContext CreateGLContext(ContextHandle handle, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
|
||||
{
|
||||
IGraphicsContext context = new CocoaContext(handle, window, shareContext, major, minor);
|
||||
RegisterResource(context);
|
||||
return context;
|
||||
return new CocoaContext(handle, window, shareContext, major, minor);
|
||||
}
|
||||
|
||||
public override GraphicsContext.GetCurrentContextDelegate CreateGetCurrentGraphicsContext()
|
||||
|
|
Loading…
Reference in a new issue