Skip to content
Snippets Groups Projects
Commit c3e5e4fd authored by Allen Ray's avatar Allen Ray
Browse files

Moved triangle clipping to the proper location

parent e79a8c37
No related branches found
No related tags found
No related merge requests found
......@@ -315,6 +315,10 @@ func (ct *canvasTriangles) draw(tex *glhf.Texture, bounds pixel.Rect) {
ct.dst.shader.s.SetUniformAttr(loc, u.Value())
}
if clip, has := ct.ClipRect(); has {
gl.Scissor(int32(clip.Min.X), int32(clip.Min.Y), int32(clip.W()), int32(clip.H()))
}
if tex == nil {
ct.vs.Begin()
ct.vs.Draw()
......@@ -327,9 +331,6 @@ func (ct *canvasTriangles) draw(tex *glhf.Texture, bounds pixel.Rect) {
}
ct.vs.Begin()
if clip, has := ct.ClipRect(); has {
gl.Scissor(int32(clip.Min.X), int32(clip.Min.Y), int32(clip.W()), int32(clip.H()))
}
ct.vs.Draw()
ct.vs.End()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment