fast sprite rendering with quadtrees

This commit is contained in:
2025-01-14 13:53:49 -06:00
parent d8cad40c50
commit 28f0b5478b
8 changed files with 497 additions and 109 deletions

View File

@@ -3,6 +3,7 @@
#include "HandmadeMath.h"
#include <quickjs.h>
#include "render.h"
typedef struct transform {
HMM_Vec3 pos;
@@ -12,10 +13,12 @@ typedef struct transform {
HMM_Mat3 cache3;
HMM_Mat3 gcache3;
HMM_Mat4 gcache;
rect rcache;
int dirty;
struct transform *parent;
JSValue jsparent;
struct transform *children;
JSValue *jschildren;
} transform;
transform *make_transform();
@@ -50,6 +53,7 @@ HMM_Mat3 transform2mat3(transform *t);
HMM_Mat4 transform2mat4_global(transform *t);
HMM_Mat3 transform2mat3_global(transform *t);
rect transform2rect(transform *t);
int transform_dirty_chain(transform *t);
transform mat2transform(HMM_Mat4 m);