hot_reload: fix graph.v compilation

pull/4669/head
Delyan Angelov 2020-05-01 14:44:22 +03:00
parent 6b08cbcb7a
commit 13e0e63514
1 changed files with 3 additions and 4 deletions

View File

@ -18,17 +18,16 @@ struct Context {
fn main() {
glfw.init_glfw()
ctx:= &Context{
gg: gg.new_context(gg.Cfg {
gconfig := gg.Cfg {
width: Size
height: Size
use_ortho: true
create_window: true
window_title: 'Graph builder'
window_user_ptr: ctx
always_on_top: true
})
}
ctx := &Context{ gg: gg.new_context(gconfig) }
ctx.gg.window.set_user_ptr( ctx )
go update() // update the scene in the background in case the window isn't focused
for {
if ctx.gg.window.should_close() {