diff --git a/renderer.c b/renderer.c index 6e1147c..61c52c6 100644 --- a/renderer.c +++ b/renderer.c @@ -9,8 +9,6 @@ #include #include -#define MAX_VERTS_PER_DRAW 8U - static int drm_fd; static drmModeConnector *conn; static drmModeCrtc *crtc; @@ -22,7 +20,7 @@ static int front, back; static uint32_t width, height; static mat3_t view; -static vec3_t vert_buf[MAX_VERTS_PER_DRAW]; +static vec3_t vert_buf[MAX_VERTS]; static void page_flip_handler(int, unsigned, unsigned, unsigned, void *) { @@ -146,7 +144,7 @@ void renderer_swap() void renderer_draw(const vec2_t *vs, unsigned count, mat3_t model) { mat3_t transform = mat3_mul_mat3(view, model); - assert(count < MAX_VERTS_PER_DRAW); + assert(count < MAX_VERTS); for (unsigned i = 0; i < count; ++i) vert_buf[i] = mat3_mul_vec3(transform, vec2_extend(vs[i])); for (unsigned i = 1; i < count; ++i) diff --git a/renderer.h b/renderer.h index ff628d5..00b1007 100644 --- a/renderer.h +++ b/renderer.h @@ -5,6 +5,8 @@ #include +#define MAX_VERTS 8U + typedef struct { int drm_fd; float aspect;