graphics: Remove unneeded 'if'

This commit is contained in:
Hajime Hoshi 2016-02-16 01:55:39 +09:00
parent f5b4179142
commit 6d2148f3ea

View File

@ -87,9 +87,6 @@ func drawTexture(c *opengl.Context, texture opengl.Texture, projectionMatrix *[4
vertices[16*i+14] = int16(u1) vertices[16*i+14] = int16(u1)
vertices[16*i+15] = int16(v1) vertices[16*i+15] = int16(v1)
} }
if len(vertices) == 0 {
return nil
}
c.BufferSubData(c.ArrayBuffer, vertices[:16*quads.Len()]) c.BufferSubData(c.ArrayBuffer, vertices[:16*quads.Len()])
c.DrawElements(c.Triangles, 6*quads.Len()) c.DrawElements(c.Triangles, 6*quads.Len())
return nil return nil