Ver código fonte

updated README.md

leonsal 8 anos atrás
pai
commit
b4d66c1d5a
1 arquivos alterados com 7 adições e 3 exclusões
  1. 7 3
      README.md

+ 7 - 3
README.md

@@ -96,7 +96,11 @@ import (
 func main() {
 
 	// Creates window and OpenGL context
-	win, err := window.New("glfw", 800, 600, "Hello G3N", false)
+	wmgr, err := window.Manager("glfw")
+	if err != nil {
+		panic(err)
+	}
+	win, err := wmgr.CreateWindow(800, 600, "Hello G3N", false)
 	if err != nil {
 		panic(err)
 	}
@@ -113,7 +117,7 @@ func main() {
 
 	// Sets the OpenGL viewport size the same as the window size
 	// This normally should be updated if the window is resized.
-	width, height := win.GetSize()
+	width, height := win.Size()
 	gs.Viewport(0, 0, int32(width), int32(height))
 
 	// Creates scene for 3D objects
@@ -163,7 +167,7 @@ func main() {
 
 		// Update window and checks for I/O events
 		win.SwapBuffers()
-		win.PollEvents()
+		wmgr.PollEvents()
 	}
 }