diff options
| author | Ray <raysan5@gmail.com> | 2016-05-08 23:50:35 +0200 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2016-05-08 23:50:35 +0200 |
| commit | f7d4951165e8bece5ae58cd4c92b08e4f29cbef7 (patch) | |
| tree | 410e7ac3221c2df459ad77d7fe770a79888b1953 /src/raylib.h | |
| parent | 0bcb873cbb3758d67b1d263fafb6be818ddbf067 (diff) | |
| download | raylib-f7d4951165e8bece5ae58cd4c92b08e4f29cbef7.tar.gz raylib-f7d4951165e8bece5ae58cd4c92b08e4f29cbef7.zip | |
Improved vertex attribs support for models
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/raylib.h b/src/raylib.h index 60384444..1258bffc 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -369,12 +369,12 @@ typedef struct BoundingBox { // Vertex data definning a mesh typedef struct Mesh { int vertexCount; // num vertices - float *vertices; // vertex position (XYZ - 3 components per vertex) - float *texcoords; // vertex texture coordinates (UV - 2 components per vertex) - float *texcoords2; // vertex second texture coordinates (useful for lightmaps) - float *normals; // vertex normals (XYZ - 3 components per vertex) - float *tangents; // vertex tangents (XYZ - 3 components per vertex) - unsigned char *colors; // vertex colors (RGBA - 4 components per vertex) + 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) + float *normals; // vertex normals (XYZ - 3 components per vertex) (shader-location = 2) + float *tangents; // vertex tangents (XYZ - 3 components per vertex) (shader-location = 4) + unsigned char *colors; // vertex colors (RGBA - 4 components per vertex) (shader-location = 3) BoundingBox bounds; // mesh limits defined by min and max points @@ -391,6 +391,8 @@ typedef struct Shader { int texcoordLoc; // Texcoord attribute location point (default-location = 1) int normalLoc; // Normal attribute location point (default-location = 2) int colorLoc; // Color attibute location point (default-location = 3) + int tangentLoc; // Tangent attribute location point (default-location = 4) + int texcoord2Loc; // Texcoord2 attribute location point (default-location = 5) // Uniform locations int mvpLoc; // ModelView-Projection matrix uniform location point (vertex shader) |
