-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathProgram.fs
55 lines (41 loc) · 1.13 KB
/
Program.fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
(*
Thomas Ortners legendary Box selection demo
*)
open System
open Aardvark.Base
open Aardvark.Rendering
open Aardvark.Application
open Aardvark.Application.Slim
open Aardvark.UI
open Suave
open Suave.WebPart
open Aardium
[<EntryPoint; STAThread>]
let main argv =
Aardvark.Init()
Aardium.init()
// media apps require a runtime, which serves as renderer for your render controls.
// you can use OpenGL or VulkanApplication.
let useVulkan = false
let runtime, disposable =
if useVulkan then
let app = new Aardvark.Rendering.Vulkan.HeadlessVulkanApplication()
app.Runtime :> IRuntime, app :> IDisposable
else
let app = new OpenGlApplication()
app.Runtime :> IRuntime, app :> IDisposable
use __ = disposable
let app = App.app
let instance =
app |> App.start
WebPart.startServerLocalhost 4321 [
MutableApp.toWebPart' runtime false instance
Suave.Files.browseHome
] |> ignore
Aardium.run {
url "http://localhost:4321/"
width 1024
height 768
debug true
}
0