From ba6d10dec054e372c371d4d3c7559c0bd3577ebe Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 16 May 2016 11:34:41 +0900 Subject: [PATCH] graphics: Remove indexBufferLines --- internal/graphics/program.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/internal/graphics/program.go b/internal/graphics/program.go index e98e0f547..8c0898b5f 100644 --- a/internal/graphics/program.go +++ b/internal/graphics/program.go @@ -21,9 +21,9 @@ import ( ) type openGLState struct { - indexBufferLines opengl.Buffer - indexBufferQuads opengl.Buffer - programTexture opengl.Program + indexBufferQuads opengl.Buffer + programTexture opengl.Program + lastProgram opengl.Program lastProjectionMatrix []float32 lastModelviewMatrix []float32 @@ -89,12 +89,6 @@ func (s *openGLState) initialize(c *opengl.Context) error { } s.indexBufferQuads = c.NewBuffer(c.ElementArrayBuffer, indices, c.StaticDraw) - indices = make([]uint16, indicesNum) - for i := 0; i < len(indices); i++ { - indices[i] = uint16(i) - } - s.indexBufferLines = c.NewBuffer(c.ElementArrayBuffer, indices, c.StaticDraw) - return nil }