summaryrefslogtreecommitdiffhomepage
path: root/examples/models_obj_loading.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/models_obj_loading.c')
-rw-r--r--examples/models_obj_loading.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/models_obj_loading.c b/examples/models_obj_loading.c
index 41f4569a..50d42d2e 100644
--- a/examples/models_obj_loading.c
+++ b/examples/models_obj_loading.c
@@ -21,11 +21,11 @@ int main()
InitWindow(screenWidth, screenHeight, "raylib [models] example - obj model loading");
// Define the camera to look into our 3d world
- Camera camera = {{ 3.0f, 3.0f, 3.0f }, { 0.0f, 1.5f, 0.0f }, { 0.0f, 1.0f, 0.0f }};
+ Camera camera = {{ 3.0f, 3.0f, 3.0f }, { 0.0f, 1.5f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f };
Model dwarf = LoadModel("resources/model/dwarf.obj"); // Load OBJ model
Texture2D texture = LoadTexture("resources/model/dwarf_diffuse.png"); // Load model texture
- SetModelTexture(&dwarf, texture); // Bind texture to model
+ dwarf.material.texDiffuse = texture; // Set dwarf model 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
@@ -49,7 +49,7 @@ int main()
DrawModel(dwarf, position, 2.0f, WHITE); // Draw 3d model with texture
- DrawGrid(10, 1.0f); // Draw a grid
+ DrawGrid(10, 1.0f); // Draw a grid
DrawGizmo(position); // Draw gizmo