separate the rest of general drawing code

This commit is contained in:
veclavtalica
2025-01-03 21:59:00 +03:00
parent 472a0657f3
commit 4f2b8ccd01
5 changed files with 378 additions and 376 deletions

View File

@ -113,6 +113,73 @@ typedef struct TextCache {
} TextCache;
/* TODO: try using the fact we utilize edge coloring and step virtual color attributes to bogus points */
/* this is only doable is we take out color attribute to separate array or a portion of it */
/* interleaved vertex array data */
typedef struct ElementIndexedQuad {
/* upper-left */
Vec2 v0;
Vec2 uv0;
Color c0;
/* bottom-left */
Vec2 v1;
Vec2 uv1;
Color c1;
/* bottom-right */
Vec2 v2;
Vec2 uv2;
Color c2;
/* upper-right */
Vec2 v3;
Vec2 uv3;
Color c3;
} ElementIndexedQuad;
typedef struct ElementIndexedQuadWithoutColor {
/* upper-left */
Vec2 v0;
Vec2 uv0;
/* bottom-left */
Vec2 v1;
Vec2 uv1;
/* bottom-right */
Vec2 v2;
Vec2 uv2;
/* upper-right */
Vec2 v3;
Vec2 uv3;
} ElementIndexedQuadWithoutColor;
typedef struct ElementIndexedQuadWithoutTexture {
/* upper-left */
Vec2 v0;
Color c0;
/* bottom-left */
Vec2 v1;
Color c1;
/* bottom-right */
Vec2 v2;
Color c2;
/* upper-right */
Vec2 v3;
Color c3;
} ElementIndexedQuadWithoutTexture;
typedef struct ElementIndexedQuadWithoutColorWithoutTexture {
/* upper-left */
Vec2 v0;
/* bottom-left */
Vec2 v1;
/* bottom-right */
Vec2 v2;
/* upper-right */
Vec2 v3;
} ElementIndexedQuadWithoutColorWithoutTexture;
/* renders the background, then the primitives in all render queues */
void render(void);