Merge: gamnit: miscellaneous services and a few fixes
authorJean Privat <jean@pryen.org>
Sat, 21 May 2016 05:40:41 +0000 (01:40 -0400)
committerJean Privat <jean@pryen.org>
Sat, 21 May 2016 05:40:41 +0000 (01:40 -0400)
commit0c7f4096799525d33960b7561656af4ea654759a
treef28395f8e12a79e37b354a7406f0bcf8c1aa235e
parente64164276317dab27de8adc453f73ba945f89b8d
parentdfe118fc99a04e4f8b706758e9624c586c17d2b5
Merge: gamnit: miscellaneous services and a few fixes

This PR groups features required by my recent unpublished tech demos built on gamnit.

Here are more details on the less intuitive commits:

* The change to `current_fps` lets a program use it right from the beginning and gives a value which is somewhat realistic (vs returning 0).
* The `placeholder_model` can be useful when quickly writing the prototype of a game to get something visible in the 3D space.
* The doc of `subtexture` clarifies an ambiguity as to whether the method expected pixel offsets or proportional values out of 1.0.
* The tool `texture_atlas_parser` can be useful to other games.
* `draw_mode` is very useful to create optimized `Mesh`, using `gl_TRIANGLE_STRIP` and `gl_TRIANGLE_FAN`.
* The old API of `triangulate` was counter-intuitive. The result was put in a parameter and the list of points was cleared in the process. This PR offers a simple method and the recursive implementation as an optimized alternative. ping @BlackMinou
* `tinks_vr` is not playable but it shows how to convert a gamnit game to a basic VR version.

Pull-Request: #2115
Reviewed-by: Jean Privat <jean@pryen.org>