diff options
| author | David Reid <[email protected]> | 2018-07-01 20:52:50 +1000 |
|---|---|---|
| committer | David Reid <[email protected]> | 2018-07-01 20:52:50 +1000 |
| commit | fec0a4f2e37e63cdbc531f6914a55442d520a104 (patch) | |
| tree | 546a30f60fbe76abb24a2514ba824ec210674c36 /examples/models/models_obj_loading.c | |
| parent | bce7a7b5765defcfb5692dc73e7251c8dd3e9fe2 (diff) | |
| parent | 7dedb84fd07f81cbe3f7c299b7e6e3f4e9959391 (diff) | |
| download | raylib-fec0a4f2e37e63cdbc531f6914a55442d520a104.tar.gz raylib-fec0a4f2e37e63cdbc531f6914a55442d520a104.zip | |
Merge branch 'master' of https://github.com/raysan5/raylib into dr/mini_al
Diffstat (limited to 'examples/models/models_obj_loading.c')
| -rw-r--r-- | examples/models/models_obj_loading.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/models/models_obj_loading.c b/examples/models/models_obj_loading.c index 45eb3e98..7ec2d3f0 100644 --- a/examples/models/models_obj_loading.c +++ b/examples/models/models_obj_loading.c @@ -22,15 +22,15 @@ int main() // Define the camera to look into our 3d world Camera camera = { 0 }; - camera.position = (Vector3){ 3.0f, 3.0f, 3.0f }; // Camera position - camera.target = (Vector3){ 0.0f, 1.5f, 0.0f }; // Camera looking at point + camera.position = (Vector3){ 8.0f, 8.0f, 8.0f }; // Camera position + camera.target = (Vector3){ 0.0f, 2.5f, 0.0f }; // Camera looking at point camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target) camera.fovy = 45.0f; // Camera field-of-view Y camera.type = CAMERA_PERSPECTIVE; // Camera mode type - Model dwarf = LoadModel("resources/model/dwarf.obj"); // Load OBJ model - Texture2D texture = LoadTexture("resources/model/dwarf_diffuse.png"); // Load model texture - dwarf.material.maps[MAP_DIFFUSE].texture = texture; // Set map diffuse texture + Model model = LoadModel("resources/models/castle.obj"); // Load OBJ model + Texture2D texture = LoadTexture("resources/models/castle_diffuse.png"); // Load model texture + model.material.maps[MAP_DIFFUSE].texture = texture; // Set map diffuse texture Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position SetTargetFPS(60); // Set our game to run at 60 frames-per-second @@ -52,7 +52,7 @@ int main() BeginMode3D(camera); - DrawModel(dwarf, position, 2.0f, WHITE); // Draw 3d model with texture + DrawModel(model, position, 0.2f, WHITE); // Draw 3d model with texture DrawGrid(10, 1.0f); // Draw a grid @@ -60,7 +60,7 @@ int main() EndMode3D(); - DrawText("(c) Dwarf 3D model by David Moreno", screenWidth - 200, screenHeight - 20, 10, GRAY); + DrawText("(c) Castle 3D model by Alberto Cano", screenWidth - 200, screenHeight - 20, 10, GRAY); DrawFPS(10, 10); @@ -71,7 +71,7 @@ int main() // De-Initialization //-------------------------------------------------------------------------------------- UnloadTexture(texture); // Unload texture - UnloadModel(dwarf); // Unload model + UnloadModel(model); // Unload model CloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- |
