diff options
| author | Ray <raysan5@gmail.com> | 2018-12-15 23:31:56 +0100 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2018-12-15 23:31:56 +0100 |
| commit | 7d81e673ed7f399305ae12f69267190ade93064d (patch) | |
| tree | b0704bb5e71417e4ab51f6c090540077cf3fced8 /examples/models | |
| parent | 4008a075a857f7674fe82331dae2636fc593dade (diff) | |
| download | raylib-7d81e673ed7f399305ae12f69267190ade93064d.tar.gz raylib-7d81e673ed7f399305ae12f69267190ade93064d.zip | |
ADDED: GenMeshPoly()
To generate 2D polygonal shape
Diffstat (limited to 'examples/models')
| -rw-r--r-- | examples/models/models_mesh_generation.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/models/models_mesh_generation.c b/examples/models/models_mesh_generation.c index c02bd91a..d64889bd 100644 --- a/examples/models/models_mesh_generation.c +++ b/examples/models/models_mesh_generation.c @@ -11,7 +11,7 @@ #include "raylib.h" -#define NUM_MODELS 7 // We generate 7 parametric 3d shapes +#define NUM_MODELS 8 // We generate 8 parametric 3d shapes int main() { @@ -36,6 +36,7 @@ int main() models[4] = LoadModelFromMesh(GenMeshCylinder(1, 2, 16)); models[5] = LoadModelFromMesh(GenMeshTorus(0.25f, 4.0f, 16, 32)); models[6] = LoadModelFromMesh(GenMeshKnot(1.0f, 2.0f, 16, 128)); + models[7] = LoadModelFromMesh(GenMeshPoly(5, 2.0f)); // Set checked texture as default diffuse component for all models material for (int i = 0; i < NUM_MODELS; i++) models[i].material.maps[MAP_DIFFUSE].texture = texture; @@ -93,6 +94,7 @@ int main() case 4: DrawText("CYLINDER", 680, 10, 20, DARKBLUE); break; case 5: DrawText("TORUS", 680, 10, 20, DARKBLUE); break; case 6: DrawText("KNOT", 680, 10, 20, DARKBLUE); break; + case 7: DrawText("POLY", 680, 10, 20, DARKBLUE); break; default: break; } |
