summaryrefslogtreecommitdiffhomepage
path: root/examples/models
diff options
context:
space:
mode:
authorHristo Stamenov <[email protected]>2021-05-26 21:23:13 +0300
committerGitHub <[email protected]>2021-05-26 20:23:13 +0200
commit470574517ab61ed71d769261cdcc136e8d0220d8 (patch)
treecbc68c71ccfc8e4d3cc8cecc342bceb83b37de95 /examples/models
parentc5ef96272f4500cae428844d9ba0e5810eebd698 (diff)
downloadraylib-470574517ab61ed71d769261cdcc136e8d0220d8.tar.gz
raylib-470574517ab61ed71d769261cdcc136e8d0220d8.zip
Implement vertex color attribute for GLTF and IQM (#1790)
Added a simple cube with vertex colors for testing both.
Diffstat (limited to 'examples/models')
-rw-r--r--examples/models/models_gltf_model.c5
-rw-r--r--examples/models/resources/gltf/vertex_colored_object.glbbin0 -> 2512 bytes
-rw-r--r--examples/models/resources/models/vertex_colored_object.iqmbin0 -> 1800 bytes
3 files changed, 3 insertions, 2 deletions
diff --git a/examples/models/models_gltf_model.c b/examples/models/models_gltf_model.c
index d5bd1687..3475b3f0 100644
--- a/examples/models/models_gltf_model.c
+++ b/examples/models/models_gltf_model.c
@@ -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;
diff --git a/examples/models/resources/gltf/vertex_colored_object.glb b/examples/models/resources/gltf/vertex_colored_object.glb
new file mode 100644
index 00000000..0b57eddb
--- /dev/null
+++ b/examples/models/resources/gltf/vertex_colored_object.glb
Binary files differ
diff --git a/examples/models/resources/models/vertex_colored_object.iqm b/examples/models/resources/models/vertex_colored_object.iqm
new file mode 100644
index 00000000..ad0db07e
--- /dev/null
+++ b/examples/models/resources/models/vertex_colored_object.iqm
Binary files differ