When creating games with large levels it is often easy to run into memory limitations. Large maps also contain repetitive drawing of things like grass, trees, mountains, and so on. This recipe will show you how to efficiently render a polygon that is filled in with a repeated texture. These can be drawn at any size and still only use a small amount of memory and CPU time.
Please refer to the project
RecipeCollection01 for full working code of this recipe.
Execute the following code:
#import "Vector3D.h" //Included for CPP polygon triangulation #import "triangulate.h" #include <stdio.h> ...