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)
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>

1  2 
lib/gamnit/depth/depth.nit

@@@ -17,8 -17,8 +17,9 @@@ module dept
  
  intrude import more_materials
  import more_models
 +import model_dimensions
  import particles
+ import selection
  
  redef class App