From 02660346c30796192ed3727259d065a5ca9ff88d Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 20 Dec 2014 15:36:31 +0900 Subject: [PATCH] Call gl.Flush in DrawTexture --- ids.go | 1 - internal/opengl/internal/shader/drawtexture.go | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ids.go b/ids.go index fd582cd93..354428cf6 100644 --- a/ids.go +++ b/ids.go @@ -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 } diff --git a/internal/opengl/internal/shader/drawtexture.go b/internal/opengl/internal/shader/drawtexture.go index 93a53cfc0..5f561387e 100644 --- a/internal/opengl/internal/shader/drawtexture.go +++ b/internal/opengl/internal/shader/drawtexture.go @@ -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() }