gg: cleanup the minimal gg program more
parent
32b74dd348
commit
852d85b3a9
|
@ -11,7 +11,6 @@ fn main() {
|
|||
window_title: 'Polygons'
|
||||
frame_fn: frame
|
||||
)
|
||||
context.user_data = context
|
||||
context.run()
|
||||
}
|
||||
|
||||
|
|
|
@ -179,6 +179,9 @@ pub fn new_context(cfg Config) &Context {
|
|||
ui_mode: cfg.ui_mode
|
||||
native_rendering: cfg.native_rendering
|
||||
}
|
||||
if isnil(cfg.user_data) {
|
||||
g.user_data = g
|
||||
}
|
||||
g.set_bg_color(cfg.bg_color)
|
||||
// C.printf('new_context() %p\n', cfg.user_data)
|
||||
window := C.sapp_desc{
|
||||
|
|
Loading…
Reference in New Issue