This repository was archived by the owner on Aug 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Home
realvictorprm edited this page Apr 2, 2017
·
3 revisions
To get started follow the steps on readme. If you already followed them you're ready to go.
Before using anything of glfw you must have to call glfw.Init ()
.
Even tough it's already static initialized as soon as you make any call to the library it could still result in seg faults if the first call goes for example to Glfw.createWindow (...)
!
To acquire a window simply create one with the class Window or GLFWwindow: The following example shows some classic usage of glfw. F# Code:
//Create a window with the oop binding
let window = new Window(500, 500, "Glfw test window")
//You need to be notified if the size changed?
//Simply add a handler to the Size changed event
do window.SizeChanged.Add (fun args -> printfn "Size changed! New width %A, new height %A" args.width args.height)