gg: use sgl.begin_triangles when drawing triangles (#12083)

pull/12097/head
Larpon 2021-10-07 02:45:23 +02:00 committed by GitHub
parent 42c088896a
commit f454d30318
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,7 @@ pub fn (ctx &Context) draw_triangle(x f32, y f32, x2 f32, y2 f32, x3 f32, y3 f32
sgl.load_pipeline(ctx.timage_pip) sgl.load_pipeline(ctx.timage_pip)
} }
sgl.c4b(c.r, c.g, c.b, c.a) sgl.c4b(c.r, c.g, c.b, c.a)
sgl.begin_quads() sgl.begin_triangles()
sgl.v2f(x * ctx.scale, y * ctx.scale) sgl.v2f(x * ctx.scale, y * ctx.scale)
sgl.v2f(x2 * ctx.scale, y2 * ctx.scale) sgl.v2f(x2 * ctx.scale, y2 * ctx.scale)
sgl.v2f(x3 * ctx.scale, y3 * ctx.scale) sgl.v2f(x3 * ctx.scale, y3 * ctx.scale)