Merge: Intro gamnit depth, the 3D game framework for Nit
This PR intro the base structure of a framework for portable 3D game development in Nit.
This framework is based on a list of `Actor`, in `app::actors`, which are drawn at each frame. Each actor is composed of a model and other information specific to this instance: position in the world, rotation and scaling. Each `Model` is either a composite of models or it is composed of a `Mesh` defining its geometry and a `Material` defining how to draw the model. `Material` can be subclassed to use custom shaders. These main classes are defined in the module `depth_core`.
_gamnit depth_ is built upon _app.nit_ and it works well with _gamnit flat_ (renamed from _gamnit simple_2d_). Clients are portable across GNU/Linux and Android, and _gamnit flat_ can still be used for UI elements.
This framework is far from complete at this point, however it designed for extensibility.
Here's a list of _gamnit depth_ implemented features and todo:
### Mesh
- [x] Create 3D simple meshes: cube, plane and UVSphere.
- [ ] Create simple debug meshes: axis arrows, etc.
### Material
- [x] Simple material with uniform ambient, diffuse and specular colors
- [x] Normals visualization materials
- [ ] Depth material
- [x] Texture material with ambient and diffuse lighting
- [ ] Texture material with specular lighting (implement Blinn Phong in GLSL, most attributes are already present)
- [ ] Texture material with normals mapping
### Models
- [x] Load models from .obj and .mtl files.
- [ ] Load models from a binary model format
- [x] Fallback on a simple material and mesh on load errors
### Sample programs
- [x] Sample minimal graphics-only application: model_viewer
- [ ] Merge the globe example with model_viewer
- [ ] Simple client game (like Asteronits for `gamnit::flat`)
### Other engine features
- [x] Composite pattern to manage simple models (single mesh to single material) and composite models
- [ ] Scene framework with a tree-like structure
- [ ] Particle emitters.
- [ ] Support for multiple light types and instances.
- [ ] Optimized GPU side caching with VBO.
- [ ] Optimized C side caching of models data.
- [ ] VR support (at least Cardboard)
- [ ] Hardware key services.
- [ ] Line-3D model collision (as in simple model selection from mouse click)
### Known bugs
- [ ] TexturedMaterial affects 2D sprites geometry, more data is needed to debug.
Pull-Request: #1920
Reviewed-by: Jean Privat <jean@pryen.org>