aboutsummaryrefslogtreecommitdiff
path: root/examples/models_obj_loading.c
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2015-09-02 01:07:16 +0200
committerraysan5 <raysan5@gmail.com>2015-09-02 01:07:16 +0200
commite28fef6ee0a1a35171e27cde6bbfd7bc4025dc4a (patch)
tree320de8cb75ab5a9857478cf5e60bf9a22d720cf7 /examples/models_obj_loading.c
parent9a578c59624f671418a1f3b046b6b09aa4233909 (diff)
downloadraylib-e28fef6ee0a1a35171e27cde6bbfd7bc4025dc4a.tar.gz
raylib-e28fef6ee0a1a35171e27cde6bbfd7bc4025dc4a.zip
Reviewed examples
Diffstat (limited to 'examples/models_obj_loading.c')
-rw-r--r--examples/models_obj_loading.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/examples/models_obj_loading.c b/examples/models_obj_loading.c
index ef024356..f508e7ba 100644
--- a/examples/models_obj_loading.c
+++ b/examples/models_obj_loading.c
@@ -23,8 +23,8 @@ int main()
// Define the camera to look into our 3d world
Camera camera = {{ 3.0, 3.0, 3.0 }, { 0.0, 1.5, 0.0 }, { 0.0, 1.0, 0.0 }};
- Texture2D texture = LoadTexture("resources/model/dwarf_diffuse.png"); // Load model texture
- Model dwarf = LoadModel("resources/model/dwarf.obj"); // Load OBJ model
+ 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
Vector3 position = { 0.0, 0.0, 0.0 }; // Set model position
@@ -36,10 +36,7 @@ int main()
{
// Update
//----------------------------------------------------------------------------------
- if (IsKeyDown(KEY_LEFT)) position.x -= 0.2;
- if (IsKeyDown(KEY_RIGHT)) position.x += 0.2;
- if (IsKeyDown(KEY_UP)) position.z -= 0.2;
- if (IsKeyDown(KEY_DOWN)) position.z += 0.2;
+ //...
//----------------------------------------------------------------------------------
// Draw
@@ -54,7 +51,7 @@ int main()
DrawGrid(10.0, 1.0); // Draw a grid
- DrawGizmo(position); // Draw gizmo
+ DrawGizmo(position); // Draw gizmo
End3dMode();