diff options
| author | Ray <[email protected]> | 2018-02-24 12:31:32 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2018-02-24 12:31:32 +0100 |
| commit | 077bef42861644f1f25070d23363a1bfa2e7a4a6 (patch) | |
| tree | 2c0b177e9348b795c2b0c6d334557d2823dc3ffa /src/raylib.h | |
| parent | 6d64327a874b09e93290d1525edd5347a9787b84 (diff) | |
| download | raylib-077bef42861644f1f25070d23363a1bfa2e7a4a6.tar.gz raylib-077bef42861644f1f25070d23363a1bfa2e7a4a6.zip | |
Support 4 components mesh.tangent data
Added struct Vector4 for convenience
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/raylib.h b/src/raylib.h index 782dd4e5..41755dc3 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -322,6 +322,14 @@ typedef struct Vector3 { float z; } Vector3; +// Vector4 type +typedef struct Vector4 { + float x; + float y; + float z; + float w; +} Vector4; + // Matrix type (OpenGL style 4x4 - right handed, column major) typedef struct Matrix { float m0, m4, m8, m12; @@ -422,7 +430,7 @@ typedef struct Mesh { 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) + 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) |
