This PR adds a few services to the low-level graphics modules to prepare for gamnit.
This is the 2nd PR to use a new style for the glesv2 module. The old code has not yet been fully updated, so the style may vary in the same module. The new style try to stay as close as possible to the names and signatures used by the OpenGL ES 2.0 C API and by webgl.
As usual with this module, for more documentation please refer to the official doc at https://www.khronos.org/opengles/sdk/docs/man/.
Pull-Request: #1708
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
self.setDataSource(fd, start_offset, length);
return 1;
}catch(Exception e) {
- Log.e("Error loading the Media Player with a file descriptor", e.getMessage());
return 0;
}
`}
end
redef fun play do
- if self.error != null then return
if not is_loaded then load
+ if self.error != null then return
soundpool.play(soundpool_id)
end
end
redef fun play do
- if self.error != null then return
if not is_loaded then load
+ if self.error != null then return
media_player.start
end