summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/main.go b/main.go
index e74cd1f..b4d52cf 100644
--- a/main.go
+++ b/main.go
@@ -8,12 +8,6 @@ import (
"flag"
)
-func init() {
- // lock this program to one OS thread (details: https://golang.org/pkg/runtime/#LockOSThread)
- log.Println("Locking OS thread")
- runtime.LockOSThread()
-}
-
func main() {
// read command line arguments
@@ -27,6 +21,10 @@ func main() {
}
vertices = stl.toVertices()
+ // lock this program to one OS thread (details: https://golang.org/pkg/runtime/#LockOSThread)
+ log.Println("Locking OS thread")
+ runtime.LockOSThread()
+
// initialize application (includes GLFW/window)
var app App = newApp(&stl)
defer app.terminate() // GLFW needs to be terminated!