summaryrefslogtreecommitdiffhomepage
path: root/examples/models/models_loading_gltf.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2021-10-14 13:37:22 +0200
committerraysan5 <[email protected]>2021-10-14 13:37:22 +0200
commitef858b0dbb1fd2bca84caf2eb8952829107a39de (patch)
tree13a374abe4087fcbe43f813fd740e1dfb2c5e018 /examples/models/models_loading_gltf.c
parentf9c8e31ed7e69ac1ba320f9b6c2e0634643d0ed0 (diff)
downloadraylib-ef858b0dbb1fd2bca84caf2eb8952829107a39de.tar.gz
raylib-ef858b0dbb1fd2bca84caf2eb8952829107a39de.zip
Review examples
Diffstat (limited to 'examples/models/models_loading_gltf.c')
-rw-r--r--examples/models/models_loading_gltf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/models/models_loading_gltf.c b/examples/models/models_loading_gltf.c
index 5ef5fc5a..ac72b9d1 100644
--- a/examples/models/models_loading_gltf.c
+++ b/examples/models/models_loading_gltf.c
@@ -40,8 +40,8 @@ int main(void)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.projection = CAMERA_PERSPECTIVE; // Camera mode type
+ // Load some models
Model model[MAX_MODELS] = { 0 };
-
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");
@@ -65,7 +65,7 @@ int main(void)
{
// Update
//----------------------------------------------------------------------------------
- UpdateCamera(&camera);
+ UpdateCamera(&camera); // Update our camera with inputs
if (IsKeyReleased(KEY_RIGHT))
{
@@ -78,6 +78,7 @@ int main(void)
currentModel--;
if (currentModel < 0) currentModel = MAX_MODELS - 1;
}
+ //----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
@@ -87,8 +88,7 @@ int main(void)
BeginMode3D(camera);
- DrawModelEx(model[currentModel], position, (Vector3){ 0.0f, 1.0f, 0.0f }, 180.0f, (Vector3){ 2.0f, 2.0f, 2.0f }, WHITE);
-
+ DrawModel(model[currentModel], position, 1.0f, WHITE);
DrawGrid(10, 1.0f); // Draw a grid
EndMode3D();