diff options
| author | Ray <raysan5@gmail.com> | 2015-09-03 01:49:58 +0200 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2015-09-03 01:49:58 +0200 |
| commit | 77558eec0caf0736fa36c96b5807d928317d3dd7 (patch) | |
| tree | 860d9e77d27729fa2572aa8207d77f8def083ccd /examples/models_obj_loading.c | |
| parent | 858ccb350dab317483bf58a5852f88df0a49a7b2 (diff) | |
| parent | d05acb1b6878b101ecbde0aeb3aa1bcf80b960af (diff) | |
| download | raylib-1.3.0-installer.tar.gz raylib-1.3.0-installer.zip | |
Merge pull request #28 from raysan5/develop1.3.0-installer1.3.0
Integrating Develop branch
Diffstat (limited to 'examples/models_obj_loading.c')
| -rw-r--r-- | examples/models_obj_loading.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/models_obj_loading.c b/examples/models_obj_loading.c index ef024356..dc302f99 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 + 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(); |
