From feff22144689df9da5ddb8e9693326b77feb7949 Mon Sep 17 00:00:00 2001 From: xengineering Date: Fri, 21 May 2021 14:02:40 +0200 Subject: Refactor OpenGL-related Code --- main.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'main.go') 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) } } -- cgit v1.2.3-70-g09d2