public WinFactory() { if (System.Environment.OSVersion.Version.Major >= 6) { // Enable high-dpi support // Only available on Windows Vista and higher bool result = Functions.SetProcessDPIAware(); Debug.Print("SetProcessDPIAware() returned {0}", result); } }
public WinFactory() { if (System.Environment.OSVersion.Version.Major <= 4) { throw new PlatformNotSupportedException("OpenTK requires Windows XP or higher"); } if (System.Environment.OSVersion.Version.Major >= 6) { if (Toolkit.Options.EnableHighResolution) { // Enable high-dpi support // Only available on Windows Vista and higher bool result = Functions.SetProcessDPIAware(); Debug.Print("SetProcessDPIAware() returned {0}", result); } } }
public WinFactory() { if (System.Environment.OSVersion.Version.Major <= 4) { throw new PlatformNotSupportedException("OpenTK requires Windows XP or higher"); } // Dynamically load opengl32.dll in order to use the extension loading capabilities of Wgl. // Note: opengl32.dll must be loaded before gdi32.dll, otherwise strange failures may occur // (such as "error: 2000" when calling wglSetPixelFormat or slowness/lag on specific GPUs). LoadOpenGL(); if (System.Environment.OSVersion.Version.Major >= 6) { if (Toolkit.Options.EnableHighResolution) { // Enable high-dpi support // Only available on Windows Vista and higher bool result = Functions.SetProcessDPIAware(); Debug.Print("SetProcessDPIAware() returned {0}", result); } } }