replace categorized, sorted render queues with a single ordered 2d queue

This commit is contained in:
2024-07-15 23:31:54 -03:00
parent 5ae59b51d3
commit bdf2a54107
5 changed files with 71 additions and 123 deletions

View File

@ -20,9 +20,7 @@ typedef struct context {
struct texture_cache texture_cache;
struct input_state input;
struct sprite_primitive *render_queue_sprites;
struct rect_primitive *render_queue_rectangles;
struct circle_primitive *render_queue_circles;
struct primitive_2d *render_queue_2d;
struct mesh_batch_item *uncolored_mesh_batches;
struct audio_channel_item *audio_channels;
@ -38,7 +36,7 @@ typedef struct context {
int64_t prev_frame_time;
int64_t desired_frametime; /* how long one tick should be */
int64_t frame_accumulator;
int64_t delta_averager_residual;
int64_t delta_averager_residual;
int64_t time_averager[4];
int64_t delta_time; /* preserves real time frame delta with no manipilation */
uint64_t tick_count;