summaryrefslogtreecommitdiffhomepage
path: root/examples/models/models_yaw_pitch_roll.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2021-10-19 14:58:04 +0200
committerraysan5 <[email protected]>2021-10-19 14:58:04 +0200
commit2e151408bb54204b07985da41c260665a7f9376b (patch)
treeb9320791dfd5db5187521ebcbae548a3c2932480 /examples/models/models_yaw_pitch_roll.c
parentfec0ce34c5da82fcd36446abddd235e36bc0f5be (diff)
downloadraylib-2e151408bb54204b07985da41c260665a7f9376b.tar.gz
raylib-2e151408bb54204b07985da41c260665a7f9376b.zip
REVIEWED: models_yaw_pitch_roll
Diffstat (limited to 'examples/models/models_yaw_pitch_roll.c')
-rw-r--r--examples/models/models_yaw_pitch_roll.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/models/models_yaw_pitch_roll.c b/examples/models/models_yaw_pitch_roll.c
index 19d5edc7..d9d4b9c7 100644
--- a/examples/models/models_yaw_pitch_roll.c
+++ b/examples/models/models_yaw_pitch_roll.c
@@ -32,9 +32,9 @@ int main(void)
camera.fovy = 30.0f; // Camera field-of-view Y
camera.projection = CAMERA_PERSPECTIVE; // Camera type
- // Model loading
- // NOTE: Diffuse map loaded automatically
- Model model = LoadModel("resources/models/gltf/plane/plane.gltf");
+ Model model = LoadModel("resources/models/obj/plane.obj"); // Load model
+ Texture2D texture = LoadTexture("resources/models/obj/plane_diffuse.png"); // Load model texture
+ model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set map diffuse texture
float pitch = 0.0f;
float roll = 0.0f;
@@ -88,7 +88,7 @@ int main(void)
// Draw 3D model (recomended to draw 3D always before 2D)
BeginMode3D(camera);
- DrawModel(model, (Vector3){ 0.0f, 0.0f, 15.0f }, 0.25f, WHITE); // Draw 3d model with texture
+ DrawModel(model, (Vector3){ 0.0f, -8.0f, 0.0f }, 1.0f, WHITE); // Draw 3d model with texture
DrawGrid(10, 10.0f);
EndMode3D();