152 int window_width = window->dimensions.width; |
152 int window_width = window->dimensions.width; |
153 int window_height = window->dimensions.height; |
153 int window_height = window->dimensions.height; |
154 glViewport(0, 0, window_width, window_height); |
154 glViewport(0, 0, window_width, window_height); |
155 glClear(GL_COLOR_BUFFER_BIT); |
155 glClear(GL_COLOR_BUFFER_BIT); |
156 |
156 |
|
157 // Execute all behaviors |
|
158 // TODO: this can eventually be parallelized |
|
159 for (unsigned int i = 0; i < ASC_MAX_SCENES; i++) { |
|
160 asc_scene_execute_behaviors(&window->scenes[i]); |
|
161 } |
|
162 asc_scene_execute_behaviors(&window->ui); |
|
163 |
157 // Draw all scenes |
164 // Draw all scenes |
158 for (unsigned int i = 0; i < ASC_MAX_SCENES; i++) { |
165 for (unsigned int i = 0; i < ASC_MAX_SCENES; i++) { |
159 asc_scene_draw(&window->scenes[i]); |
166 asc_scene_draw(&window->scenes[i]); |
160 } |
167 } |
161 asc_scene_draw(&window->ui); |
168 asc_scene_draw(&window->ui); |