src/window.c

changeset 100
5231da78831e
parent 99
ac143db979dc
equal deleted inserted replaced
99:ac143db979dc 100:5231da78831e
74 &window->dimensions.height 74 &window->dimensions.height
75 ); 75 );
76 window->resized = true; // count initial sizing as resize 76 window->resized = true; // count initial sizing as resize
77 77
78 if (asc_gl_context_initialize(&window->glctx, window->window, &settings->glsettings)) { 78 if (asc_gl_context_initialize(&window->glctx, window->window, &settings->glsettings)) {
79 asc_scene_init(&window->ui); 79 asc_scene_init(&window->ui, (AscCameraParams){
80 asc_camera_ortho(&window->ui.camera, (asc_recti){ 80 .type = ASC_CAMERA_ORTHO,
81 0, 0, window->dimensions.width, window->dimensions.height 81 .ortho.rect = (asc_recti){
82 0, 0, window->dimensions.width, window->dimensions.height
83 }
82 }); 84 });
83 asc_dprintf("Window %u initialized at index %u", window->id, index); 85 asc_dprintf("Window %u initialized at index %u", window->id, index);
84 asc_context.active_window = index; 86 asc_context.active_window = index;
85 } else { 87 } else {
86 asc_error("Creating GL context failed for window %u at index %u", window->id, index); 88 asc_error("Creating GL context failed for window %u at index %u", window->id, index);

mercurial