Rename MAX_VERTS_PER_DRAW to MAX_VERTS

This commit is contained in:
Camden Dixie O'Brien
2025-10-13 20:14:10 +01:00
parent 6d02f0947d
commit 44d3bbef69
2 changed files with 4 additions and 4 deletions

View File

@@ -9,8 +9,6 @@
#include <unistd.h>
#include <xf86drm.h>
#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)

View File

@@ -5,6 +5,8 @@
#include <stdint.h>
#define MAX_VERTS 8U
typedef struct {
int drm_fd;
float aspect;