/// <summary> /// Initializes a new instance of the <see cref="ApplicationHost" /> class. /// </summary> /// <param name="applicationPaths">The application paths.</param> /// <param name="logManager">The log manager.</param> /// <param name="options">The options.</param> /// <param name="fileSystem">The file system.</param> /// <param name="remotePackageName">Name of the remote package.</param> /// <param name="supportsNativeWebSocket">if set to <c>true</c> [supports native web socket].</param> /// <param name="nativeApp">The native application.</param> public ApplicationHost(ServerApplicationPaths applicationPaths, ILogManager logManager, StartupOptions options, IFileSystem fileSystem, string remotePackageName, bool supportsNativeWebSocket, INativeApp nativeApp) : base(applicationPaths, logManager, fileSystem) { _startupOptions = options; _remotePackageName = remotePackageName; _supportsNativeWebSocket = supportsNativeWebSocket; NativeApp = nativeApp; }
public Loader(INativeApp app, params string[] paths) { if (app == null) { throw new NullReferenceException(nameof(app)); } if (paths == null) { throw new NullReferenceException(nameof(paths)); } this.app = app; this.paths = paths; this.results = new object[paths.Length]; }
public static void Run(INativeApp nativeApp, Logger logger = null) { using (var taskRunner = new TaskRunner(logger)) using (var host = new Host(nativeApp, appName: "Test", appVersion: 1, logger: logger)) using (var window = host.CreateWindow(windowSize: (1280, 720), deviceRequirements)) { RenderScene scene = new RenderScene(window, reflectionTexture: new TextureInfo(LoadTex("textures/skybox.cube")), postVertProg: LoadProg("shaders/bin/post_fullscreen.vert.spv"), bloomFragProg: LoadProg("shaders/bin/post_bloom.frag.spv"), aoFragProg: LoadProg("shaders/bin/post_ambientocclusion.frag.spv"), gaussBlurFragProg: LoadProg("shaders/bin/post_blur_gaussian.frag.spv"), boxBlurFragProg: LoadProg("shaders/bin/post_blur_box.frag.spv"), compositionFragProg: LoadProg("shaders/bin/post_baselighting.frag.spv"), logger); window.AttachScene(scene); //Add terrain to the scene AddTerrain(nativeApp, taskRunner, scene, renderOrder: 900, textureSources: new []
public static void SetNativeApp(INativeApp app) { _app = app; }