Reviewed models examples paths

This commit is contained in:
raysan5 2021-10-12 21:01:49 +02:00
parent 007e840be1
commit f1659d78d3
5 changed files with 23 additions and 23 deletions

View file

@ -39,15 +39,15 @@ int main(void)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.projection = CAMERA_PERSPECTIVE; // Camera mode type
Model model = LoadModel("resources/guy/guy.iqm"); // Load the animated model mesh and basic data
Texture2D texture = LoadTexture("resources/guy/guytex.png"); // Load model texture and set material
Model model = LoadModel("resources/models/iqm/guy.iqm"); // Load the animated model mesh and basic data
Texture2D texture = LoadTexture("resources/models/iqm/guytex.png"); // Load model texture and set material
SetMaterialTexture(&model.materials[0], MATERIAL_MAP_DIFFUSE, texture); // Set model material map texture
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
// Load animation data
int animsCount = 0;
ModelAnimation *anims = LoadModelAnimations("resources/guy/guyanim.iqm", &animsCount);
ModelAnimation *anims = LoadModelAnimations("resources/models/iqm/guyanim.iqm", &animsCount);
int animFrameCounter = 0;
SetCameraMode(camera, CAMERA_FREE); // Set free camera mode

View file

@ -42,14 +42,14 @@ int main(void)
Model model[MAX_MODELS] = { 0 };
model[0] = LoadModel("resources/gltf/raylib_32x32.glb");
model[1] = LoadModel("resources/gltf/rigged_figure.glb");
model[2] = LoadModel("resources/gltf/GearboxAssy.glb");
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");
model[7] = LoadModel("resources/gltf/girl.glb");
model[0] = LoadModel("resources/models/gltf/raylib_32x32.glb");
model[1] = LoadModel("resources/models/gltf/rigged_figure.glb");
model[2] = LoadModel("resources/models/gltf/GearboxAssy.glb");
model[3] = LoadModel("resources/models/gltf/BoxAnimated.glb");
model[4] = LoadModel("resources/models/gltf/AnimatedTriangle.gltf");
model[5] = LoadModel("resources/models/gltf/AnimatedMorphCube.glb");
model[6] = LoadModel("resources/models/gltf/vertex_colored_object.glb");
model[7] = LoadModel("resources/models/gltf/girl.glb");
int currentModel = 0;

View file

@ -5,9 +5,9 @@
* This example has been created using raylib 3.8 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Example contributed by Johann Nadalutti
* Example contributed by Johann Nadalutti (@procfxgen)
*
* Copyright (c) 2021 Johann Nadalutti
* Copyright (c) 2021 Johann Nadalutti (@procfxgen)
*
********************************************************************************************/

View file

@ -35,8 +35,8 @@ int main(void)
Ray ray = { 0 }; // Picking ray
Model tower = LoadModel("resources/models/turret.obj"); // Load OBJ model
Texture2D texture = LoadTexture("resources/models/turret_diffuse.png"); // Load model texture
Model tower = LoadModel("resources/models/obj/turret.obj"); // Load OBJ model
Texture2D texture = LoadTexture("resources/models/obj/turret_diffuse.png"); // Load model texture
tower.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set model diffuse texture
Vector3 towerPos = { 0.0f, 0.0f, 0.0f }; // Set model position