Merge: gamnit: intro selection services using pixel picking
authorJean Privat <jean@pryen.org>
Mon, 27 Jun 2016 21:58:29 +0000 (17:58 -0400)
committerJean Privat <jean@pryen.org>
Mon, 27 Jun 2016 21:58:29 +0000 (17:58 -0400)
commit201657e871918426afab7b1ca85f378334433c0e
tree4e4e4e8e4e08791625ae13071993e8ba96e8898b
parent9a405b203d8d934557b544a7ad349f29925e10ed
parentd7b8c0ede13a88b4994fbd39d614810ed4c47f34
Merge: gamnit: intro selection services using pixel picking

Intro the selection services for gamnit. It uses a simple color picking algorithm, drawing all the actors to the buffer, each with a unique color used to identify which actor is visible at any pixel.

This algorithm is slow, but it works out of the box with any program. It is recommended for the clients to implement their own optimized alternative adapted to their program for better performances.

The changes to the OpenGL ES wrapper let us use glGet* functions that return a vector of values.
The use of an offset may require more than one call to get the full values, but it's quite simple.

In the future, it should be extended with support for the sprites of the _flat_ API.

Pull-Request: #2205
Reviewed-by: Jean Privat <jean@pryen.org>
lib/gamnit/depth/depth.nit