From 71e26e12a62bed347305d49423c2d02d400afff4 Mon Sep 17 00:00:00 2001
From: faiface <faiface@ksp.sk>
Date: Wed, 11 Jan 2017 23:18:10 +0100
Subject: [PATCH] minor change

---
 window.go | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/window.go b/window.go
index 9d2dfad..cf4d8f7 100644
--- a/window.go
+++ b/window.go
@@ -395,6 +395,22 @@ func (wt *windowTriangles) Draw() {
 	})
 }
 
+func (wt *windowTriangles) resize(len int) {
+	if len > wt.Len() {
+		newData := make([]pixelgl.VertexData, len-wt.Len())
+		// default values
+		for i := range newData {
+			newData[i] = make(pixelgl.VertexData)
+			newData[i][colorVec4] = mgl32.Vec4{1, 1, 1, 1}
+			newData[i][textureVec2] = mgl32.Vec2{-1, -1}
+		}
+		wt.data = append(wt.data, newData...)
+	}
+	if len < wt.Len() {
+		wt.data = wt.data[:len]
+	}
+}
+
 func (wt *windowTriangles) updateData(offset int, t Triangles) {
 	if t, ok := t.(TrianglesPosition); ok {
 		for i := offset; i < offset+t.Len(); i++ {
@@ -427,22 +443,6 @@ func (wt *windowTriangles) updateData(offset int, t Triangles) {
 	}
 }
 
-func (wt *windowTriangles) resize(len int) {
-	if len > wt.Len() {
-		newData := make([]pixelgl.VertexData, len-wt.Len())
-		// default values
-		for i := range newData {
-			newData[i] = make(pixelgl.VertexData)
-			newData[i][colorVec4] = mgl32.Vec4{1, 1, 1, 1}
-			newData[i][textureVec2] = mgl32.Vec2{-1, -1}
-		}
-		wt.data = append(wt.data, newData...)
-	}
-	if len < wt.Len() {
-		wt.data = wt.data[:len]
-	}
-}
-
 func (wt *windowTriangles) submitData() {
 	data := wt.data // avoid race condition
 	pixelgl.DoNoBlock(func() {
-- 
GitLab