Implement vertex color attribute for GLTF and IQM (#1790)

Added a simple cube with vertex colors for testing both.
This commit is contained in:
Hristo Stamenov 2021-05-26 21:23:13 +03:00 committed by GitHub
parent c5ef96272f
commit 470574517a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 58 additions and 3 deletions

View file

@ -21,7 +21,7 @@
#include <stdlib.h>
#define MAX_MODELS 6
#define MAX_MODELS 7
int main(void)
{
@ -30,7 +30,7 @@ int main(void)
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [models] example - model animation");
InitWindow(screenWidth, screenHeight, "raylib [models] example - model");
// Define the camera to look into our 3d world
Camera camera = { 0 };
@ -48,6 +48,7 @@ int main(void)
model[3] = LoadModel("resources/gltf/BoxAnimated.glb");
model[4] = LoadModel("resources/gltf/AnimatedTriangle.gltf");
model[5] = LoadModel("resources/gltf/AnimatedMorphCube.glb");
model[6] = LoadModel("resources/gltf/vertex_colored_object.glb");
int currentModel = 0;