From 14c273f273c2bd8bff1d0cb2f775ec755e43455c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Abreu=20Garc=C3=ADa?= Date: Tue, 22 Oct 2019 22:06:56 +0200 Subject: [PATCH] gg: fix clear function --- vlib/gg/gg.v | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vlib/gg/gg.v b/vlib/gg/gg.v index 8f5be04c49..f4b96ff0f0 100644 --- a/vlib/gg/gg.v +++ b/vlib/gg/gg.v @@ -38,7 +38,7 @@ pub: height int use_ortho bool retina bool - + font_size int font_path string create_window bool @@ -113,7 +113,7 @@ pub fn new_context(cfg Cfg) &GG { vao: vao vbo: vbo window: window - + // /line_vao: gl.gen_vertex_array() // /line_vbo: gl.gen_buffer() //text_ctx: new_context_text(cfg, scale), @@ -136,8 +136,8 @@ pub fn (gg &GG) render_loop() bool { */ pub fn clear(color gx.Color) { + gl.clear_color(color.r, color.g, color.b, 255) gl.clear() - gl.clear_color(255, 255, 255, 255) } pub fn (gg &GG) render() { @@ -437,4 +437,3 @@ pub fn (c &GG) draw_empty_rect(x, y, w, h int, color gx.Color) { c.draw_line_c(x, y + h, x + w, y + h, color) c.draw_line_c(x + w, y, x + w, y + h, color) } -