mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
gg: fix clear function
This commit is contained in:
parent
8bfb5425e3
commit
14c273f273
@ -38,7 +38,7 @@ pub:
|
|||||||
height int
|
height int
|
||||||
use_ortho bool
|
use_ortho bool
|
||||||
retina bool
|
retina bool
|
||||||
|
|
||||||
font_size int
|
font_size int
|
||||||
font_path string
|
font_path string
|
||||||
create_window bool
|
create_window bool
|
||||||
@ -113,7 +113,7 @@ pub fn new_context(cfg Cfg) &GG {
|
|||||||
vao: vao
|
vao: vao
|
||||||
vbo: vbo
|
vbo: vbo
|
||||||
window: window
|
window: window
|
||||||
|
|
||||||
// /line_vao: gl.gen_vertex_array()
|
// /line_vao: gl.gen_vertex_array()
|
||||||
// /line_vbo: gl.gen_buffer()
|
// /line_vbo: gl.gen_buffer()
|
||||||
//text_ctx: new_context_text(cfg, scale),
|
//text_ctx: new_context_text(cfg, scale),
|
||||||
@ -136,8 +136,8 @@ pub fn (gg &GG) render_loop() bool {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
pub fn clear(color gx.Color) {
|
pub fn clear(color gx.Color) {
|
||||||
|
gl.clear_color(color.r, color.g, color.b, 255)
|
||||||
gl.clear()
|
gl.clear()
|
||||||
gl.clear_color(255, 255, 255, 255)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (gg &GG) render() {
|
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, y + h, x + w, y + h, color)
|
||||||
c.draw_line_c(x + w, y, x + w, y + h, color)
|
c.draw_line_c(x + w, y, x + w, y + h, color)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user