projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new characters and anim blending
[carveJwlIkooP6JGAAIwe30JlM.git]
/
model.h
diff --git
a/model.h
b/model.h
index 2aaf48358517283fa72d6c40a1e0b1d6194e28a7..648554118ea613aedabd18582a301fbe3ef330b1 100644
(file)
--- a/
model.h
+++ b/
model.h
@@
-1,3
+1,6
@@
+#ifndef MODEL_H
+#define MODEL_H
+
#include "vg/vg.h"
typedef struct model model;
#include "vg/vg.h"
typedef struct model model;
@@
-36,6
+39,7
@@
struct submodel
vertex_count;
boxf bbx;
vertex_count;
boxf bbx;
+ v3f pivot;
sdf_primative sdf;
enum esdf_type
sdf_primative sdf;
enum esdf_type
@@
-65,6
+69,12
@@
struct glmesh
u32 indice_count;
};
u32 indice_count;
};
+#define VERTEX_STANDARD_ATTRIBUTES \
+ "layout (location=0) in vec3 a_co;" \
+ "layout (location=1) in vec3 a_norm;" \
+ "layout (location=2) in vec4 a_colour;" \
+ "layout (location=3) in vec2 a_uv;"
+
static void mesh_upload( glmesh *mesh,
model_vert *verts, u32 vert_count,
u32 *indices, u32 indice_count )
static void mesh_upload( glmesh *mesh,
model_vert *verts, u32 vert_count,
u32 *indices, u32 indice_count )
@@
-183,3
+193,5
@@
static void model_unpack( model *model, glmesh *mesh )
mesh_upload( mesh, model_vertex_base( model ), model->vertex_count,
model_indice_base( model ), model->indice_count );
}
mesh_upload( mesh, model_vertex_base( model ), model->vertex_count,
model_indice_base( model ), model->indice_count );
}
+
+#endif