First working version of IQM animations
Still a work in progress but it already works... Current riqm API could be simplified...
This commit is contained in:
parent
a5311eddf0
commit
198a023527
8 changed files with 81 additions and 6456 deletions
10
src/raylib.h
10
src/raylib.h
|
@ -461,6 +461,7 @@ typedef struct Mesh {
|
|||
int vertexCount; // Number of vertices stored in arrays
|
||||
int triangleCount; // Number of triangles stored (indexed or not)
|
||||
|
||||
// Default vertex data
|
||||
float *vertices; // Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
|
||||
float *texcoords; // Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
|
||||
float *texcoords2; // Vertex second texture coordinates (useful for lightmaps) (shader-location = 5)
|
||||
|
@ -468,9 +469,16 @@ typedef struct Mesh {
|
|||
float *tangents; // Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)
|
||||
unsigned char *colors; // Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
|
||||
unsigned short *indices;// Vertex indices (in case vertex data comes indexed)
|
||||
|
||||
// Animation vertex data
|
||||
float *baseVertices; // Vertex base position (required to apply bones transformations)
|
||||
float *baseNormals; // Vertex base normals (required to apply bones transformations)
|
||||
float *weightBias; // Vertex weight bias
|
||||
int *weightId; // Vertex weight id
|
||||
|
||||
// OpenGL identifiers
|
||||
unsigned int vaoId; // OpenGL Vertex Array Object id
|
||||
unsigned int vboId[7]; // OpenGL Vertex Buffer Objects id (7 types of vertex data)
|
||||
unsigned int vboId[7]; // OpenGL Vertex Buffer Objects id (default vertex data)
|
||||
} Mesh;
|
||||
|
||||
// Shader type (generic)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue