summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorxengineering <mail2xengineering@protonmail.com>2021-05-21 14:02:40 +0200
committerxengineering <mail2xengineering@protonmail.com>2021-05-21 14:02:40 +0200
commitfeff22144689df9da5ddb8e9693326b77feb7949 (patch)
treecf8af3404cbf0bc749eeebd93ce9a120e62ab975 /main.go
parentc8f8de20f5ff03d94a969e23cfe77d52e10b3ab4 (diff)
downloadstlscope-feff22144689df9da5ddb8e9693326b77feb7949.tar
stlscope-feff22144689df9da5ddb8e9693326b77feb7949.tar.zst
stlscope-feff22144689df9da5ddb8e9693326b77feb7949.zip
Refactor OpenGL-related Code
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/main.go b/main.go
index e2d6e43..8f2afcc 100644
--- a/main.go
+++ b/main.go
@@ -30,15 +30,13 @@ func main() {
var app App = newApp()
defer app.terminate() // GLFW needs to be terminated!
- // init OpenGL
- program := initOpenGL()
-
- vao := makeVao(triangle)
+ // initialize graphics
+ var graphics Graphics = newGraphics()
// main loop
for !app.window.ShouldClose() {
+ graphics.draw()
app.handle()
- draw(vao, program)
}
}