abstract away the text instance dynamic array stuff and pass the correct shader when drawing quads/circles/triangles

This commit is contained in:
2023-11-26 03:55:13 +02:00
parent 750299b0ab
commit 809dc11f57
2 changed files with 46 additions and 32 deletions
+6 -6
View File
@@ -23,11 +23,11 @@ typedef struct TextInstance {
float model[4][4];
} TextInstance;
typedef struct Text {
TextInstance *instance_data;
int instance_count;
int instance_capacity;
} Text;
typedef struct TextInstanceList {
TextInstance *data;
int size;
int capacity;
} TextInstanceList;
typedef struct Context {
bool should_quit;
@@ -35,7 +35,7 @@ typedef struct Context {
Size screen_size;
Size window_size;
ZephFont font;
Text texts;
TextInstanceList texts;
Matrix4x4 projection;
} Context;