Reviewed models and examples
This commit is contained in:
parent
c8b378ae50
commit
a1d9c33995
29 changed files with 42 additions and 493 deletions
|
@ -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
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue