MacOS can have an X server installed. Modified the code so that it prefers the native Carbon/Quartz platform driver over X in this case.

This commit is contained in:
the_fiddler 2009-11-06 17:58:35 +00:00
parent 7c82f66942
commit 70eba0eb20

View file

@ -46,15 +46,15 @@ namespace OpenTK.Platform
static Factory()
{
if (Configuration.RunningOnWindows) Default = new Windows.WinFactory();
else if (Configuration.RunningOnX11) Default = new X11.X11Factory();
else if (Configuration.RunningOnMacOS) Default = new MacOS.MacOSFactory();
else if (Configuration.RunningOnX11) Default = new X11.X11Factory();
else Default = new UnsupportedPlatform();
if (Egl.Egl.IsSupported)
{
if (Configuration.RunningOnWindows) Embedded = new Egl.EglWinPlatformFactory();
else if (Configuration.RunningOnX11) Embedded = new Egl.EglX11PlatformFactory();
else if (Configuration.RunningOnMacOS) Embedded = new Egl.EglMacPlatformFactory();
else if (Configuration.RunningOnX11) Embedded = new Egl.EglX11PlatformFactory();
else Embedded = new UnsupportedPlatform();
}
else Embedded = new UnsupportedPlatform();