1.1 --- a/src/scene.c Thu Mar 21 20:24:31 2024 +0100 1.2 +++ b/src/scene.c Thu Mar 21 20:34:33 2024 +0100 1.3 @@ -102,9 +102,9 @@ 1.4 } 1.5 1.6 // check if geometry needs update 1.7 - if (node->need_full_update) { 1.8 + if (node->need_graphics_update) { 1.9 assert(node->update_func != NULL); 1.10 - node->need_full_update = false; 1.11 + node->need_graphics_update = false; 1.12 node->update_func(node); 1.13 } 1.14 if (node->need_transform_update) { 1.15 @@ -150,10 +150,16 @@ 1.16 camera->update(camera); 1.17 1.18 // for the NONE group, the draw func is expected to do everything 1.19 + glEnable(GL_DEPTH_TEST); 1.20 + glDisable(GL_BLEND); 1.21 asc_scene_draw_render_group(scene->rg_none); 1.22 1.23 // draw the FONTS group 1.24 + glDisable(GL_DEPTH_TEST); 1.25 + glEnable(GL_BLEND); 1.26 + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1.27 // TODO: see if we can really always ignore the view matrix 1.28 + // TODO: compute render order for alpha blending to work correctly 1.29 glUseProgram(ASC_SHADER_FONT.base.id); 1.30 glUniformMatrix4fv(ASC_SHADER_FONT.base.projection, 1, 1.31 GL_FALSE, camera->projection);