camera reset and default state

This commit is contained in:
veclavtalica 2025-02-02 01:41:02 +03:00
parent dfd888a80a
commit 2120f6876c
3 changed files with 5 additions and 3 deletions

View File

@ -25,7 +25,9 @@ Matrix4 camera_look_at_matrix;
double depth_range_low, depth_range_high;
void render_queue_clear(void) {
void render_clear(void) {
draw_camera((Vec3){0, 0, 0}, (Vec3){0, 0, 1}, (Vec3){0, 1, 0}, 1.57079632679f, 1);
text_cache_reset_arena(&ctx.text_cache);
/* since i don't intend to free the queues, */

View File

@ -230,7 +230,7 @@ bool render_init(void);
void render(void);
/* clears all render queues */
void render_queue_clear(void);
void render_clear(void);
/* fills two existing arrays with the geometry data of a circle */
/* the size of indices must be at least 3 times the number of vertices */

View File

@ -211,7 +211,7 @@ static void main_loop(void) {
while (ctx.frame_accumulator >= ctx.desired_frametime) {
frames += 1;
/* TODO: disable rendering pushes on not-last ? */
render_queue_clear();
render_clear();
poll_events();
if (ctx.window_size_has_changed)
update_viewport();