Call gl.Flush in DrawTexture

This commit is contained in:
Hajime Hoshi 2014-12-20 15:36:31 +09:00
parent 77ba18c2de
commit 02660346c3
2 changed files with 2 additions and 1 deletions

1
ids.go
View File

@ -73,7 +73,6 @@ func (i *ids) drawTexture(target *RenderTarget, texture *Texture, parts []Textur
quads := textureQuads(parts, glTexture.Width(), glTexture.Height())
w, h := target.Size()
shader.DrawTexture(glTexture.Native(), target.texture.glTexture.Native(), w, h, projectionMatrix, quads, &geo, &color)
gl.Flush()
return nil
}

View File

@ -126,4 +126,6 @@ func DrawTexture(native gl.Texture, target gl.Texture, width, height int, projec
texCoord0AttrLocation.AttribPointer(2, gl.FLOAT, false, 0, texCoords0)
texCoord1AttrLocation.AttribPointer(2, gl.FLOAT, false, 0, texCoords1)
gl.DrawElements(gl.TRIANGLES, len(indicies), gl.UNSIGNED_INT, indicies)
gl.Flush()
}