/// <summary> /// Attempts to resolve an <see cref="IWindowPlatform" />. /// </summary> /// <exception cref="NotSupportedException"> /// Thrown if no applicable <see cref="IWindowPlatform" /> was found. /// </exception> public static void Init() { var glfwPlatform = new GlfwPlatform(); if (glfwPlatform.IsApplicable) { SilkManager.Register <IWindowPlatform>(glfwPlatform); SilkManager.Register <IGLSymbolLoader>(new GlfwLoader()); return; } // TODO: Mobile if (!SilkManager.IsRegistered <IWindowPlatform>()) { throw new NotSupportedException("Couldn't find a suitable windowing platform. Generally, this means that your GLFW library is missing."); } }
/// <summary> /// Attempts to resolve an <see cref="IWindowPlatform" />. /// </summary> /// <exception cref="NotSupportedException"> /// Thrown if no applicable <see cref="IWindowPlatform" /> was found. /// </exception> public static void Init() { var glfwPlatform = new GlfwPlatform(); if (glfwPlatform.IsApplicable) { SilkManager.Register <IWindowPlatform>(glfwPlatform); SilkManager.Register <IGLSymbolLoader>(new GlfwLoader()); return; } // TODO: Mobile if (!SilkManager.IsRegistered <IWindowPlatform>()) { throw new NotSupportedException ( "Couldn't find a suitable windowing platform. You probably forgot to copy a glfw3 library into " + "your bin/Debug or bin/Release folder (this won't be a problem in Preview 4)" ); } }