diff options
| author | Ray <raysan5@gmail.com> | 2018-06-30 20:02:32 +0200 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2018-06-30 20:02:32 +0200 |
| commit | a1d9c3399558842f3b4faf00a92db5badb6a4b9f (patch) | |
| tree | 035e49af39440510ace423dc811f1c685d5f560d /examples/models/models_obj_loading.c | |
| parent | c8b378ae50ce8ef219c2b6f1d28543d3465e386c (diff) | |
| download | raylib-a1d9c3399558842f3b4faf00a92db5badb6a4b9f.tar.gz raylib-a1d9c3399558842f3b4faf00a92db5badb6a4b9f.zip | |
Reviewed models and examples
Diffstat (limited to 'examples/models/models_obj_loading.c')
| -rw-r--r-- | examples/models/models_obj_loading.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/models/models_obj_loading.c b/examples/models/models_obj_loading.c index de2dc176..7ec2d3f0 100644 --- a/examples/models/models_obj_loading.c +++ b/examples/models/models_obj_loading.c @@ -28,9 +28,9 @@ int main() camera.fovy = 45.0f; // Camera field-of-view Y camera.type = CAMERA_PERSPECTIVE; // Camera mode type - Model dwarf = LoadModel("resources/medieval/castle.obj"); // Load OBJ model - Texture2D texture = LoadTexture("resources/medieval/castle_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, 0.2f, WHITE); // Draw 3d model with texture + DrawModel(model, position, 0.2f, WHITE); // Draw 3d model with texture DrawGrid(10, 1.0f); // Draw a grid @@ -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 //-------------------------------------------------------------------------------------- |
