Something went wrong. Try again.
Software renderer in C
Something went wrong. Try again.
431 B · 20 lines
C
at main
123456789101112131415161718192021#pragma once
#include "defs.h"#include <stdbool.h>
typedef struct { void *internal_data; Framebuffer ve_fb; f32 last_time; f32 dt;} ve_context;
#define MAX_FPS 120#define FRAME_TIME_MS (1000.0 / MAX_FPS)
bool backend_init(ve_context *ctx, const char *title, u32 w, u32 h);f32 backend_get_time();bool backend_event_loop(ve_context *ctx);void backend_update(ve_context *ctx);void backend_cleanup(ve_context *ctx);