Render is color not uint8_t

This commit is contained in:
2025-09-11 22:20:21 -05:00
parent c8f8170ec2
commit 268e9ffefd
12 changed files with 64 additions and 53 deletions

View File

@@ -34,10 +34,7 @@ void quadBuffer(
const float_t minY,
const float_t maxX,
const float_t maxY,
const uint8_t r,
const uint8_t g,
const uint8_t b,
const uint8_t a,
const color_t color,
const float_t u0,
const float_t v0,
const float_t u1,
@@ -48,34 +45,34 @@ void quadBuffer(
// First triangle
vertices[0] = (meshvertex_t) {
{ r, g, b, a }, // Color
{ color.r, color.g, color.b, color.a }, // Color
{ u0, v0 }, // UV
{ minX, minY, z } // Position
};
vertices[1] = (meshvertex_t) {
{ r, g, b, a }, // Color
{ color.r, color.g, color.b, color.a }, // Color
{ u1, v0 }, // UV
{ maxX, minY, z } // Position
};
vertices[2] = (meshvertex_t) {
{ r, g, b, a }, // Color
{ color.r, color.g, color.b, color.a }, // Color
{ u1, v1 }, // UV
{ maxX, maxY, z } // Position
};
// Second triangle
vertices[3] = (meshvertex_t) {
{ r, g, b, a }, // Color
{ color.r, color.g, color.b, color.a }, // Color
{ u0, v0 }, // UV
{ minX, minY, z } // Position
};
vertices[4] = (meshvertex_t) {
{ r, g, b, a }, // Color
{ color.r, color.g, color.b, color.a }, // Color
{ u1, v1 }, // UV
{ maxX, maxY, z } // Position
};
vertices[5] = (meshvertex_t) {
{ r, g, b, a }, // Color
{ color.r, color.g, color.b, color.a }, // Color
{ u0, v1 }, // UV
{ minX, maxY, z } // Position
};

View File

@@ -7,6 +7,7 @@
#pragma once
#include "mesh.h"
#include "display/color.h"
#define QUAD_VERTEX_COUNT 6
#define QUAD_PRIMITIVE_TYPE MESH_PRIMITIVE_TRIANGLES
@@ -42,10 +43,7 @@ void quadBuffer(
const float_t minY,
const float_t maxX,
const float_t maxY,
const uint8_t r,
const uint8_t g,
const uint8_t b,
const uint8_t a,
const color_t color,
const float_t u0,
const float_t v0,
const float_t u1,