[SDL2] Use SDL_JoystickNameForIndex to get the name of a joystick given its index.
Disable searching for OpenGL in the CMake process.
[GL] Includes GLES headers.

A #define is added to replace GLdouble by GLfloat, as the former is not
available in OpenGL ES.

The error cases in gl_error.cpp are enclosed by #define in order to test if
the error codes are available on the platform or not.

Numeric constants are casted to GLdouble in std::{min,max} calls.
[SDL2] Use new wheel events in mouse handling.

The mouse wheel is not a button anymore. The old button codes and events are now
removed and we use SDL_MouseWheelEvent to get the updates.

SDL_EventState( SDL_MOUSEWHEEL, SDL_ENABLE ) is called at initialization but I
do not know it is required.
[SDL2] Update keyboard handling with SDL 2 API.

Character input is obtained with SDL_TextInputEvent. Key down events are not
used anymore. We used to carry the key code alongside with the characters. It is
not possible anymore so the key code in our key_info will be zero when the info
is about a character.

SDL_GetKeyState() is renamed SDL_GetKeyboardState().
SDL_EnableKeyRepeat() is gone.
SDL_EnableUNICODE() is gone.

SDLMod is now SDL_KeyMod.

The folowing key codes have been renamed:

SDLK_KP[0-9] -> SDL_KP_[0-9]
SDLK_[LR]SUPER -> SDL_[LR]GUI
SDLK_PRINT -> SDLK_PRINKSCREEN
SDLK_NUMLOCK -> SDLK_NUMLOCKCLEAR
SDLK_SCROLLOCK -> SDLK_SCROLLLOCK
SDLK_BREAK is gone.
[SDL2] Mouse position is adjusted using the size of the focused window.

SDL_GetVideoSurface() does not exist anymore. We get the active window with
SDL_GetMouseFocus() then we request its size with SDL_GetWindowSize().
Merge branch 'master' of github.com:j-jorge/bear into android-port
[SDL2] Update screen management with SDL 2's API.

SDL_SetVideoMode() does not exist anymore. We use SDL_CreateWindow() instead,
followed by SDL_GL_CreateContext.

We keep the pointer returned by this CreateWindow to get the size of the window
in the places where SDL_GetVideoInfo() and SDL_GetVideoSurface where used.

m_display_size is not needed anymore. We use SDL_GetDesktopDisplayMode() to find
the initial screen resolution.

Finding the most suitable screen resolution is done with SDL_GetDisplayMode().

The event processing uses the new SDL_PeepEvents() interface and searches only
for SDL_QUIT. I am not sure that the old loop was not incorrect.
[SDL2] Use SDL API to access the properties of SDL_Window.

And do not try to access its fields directly…

It was the last SDL related change \o/ (for the compilation).
[GL] Replace OpenGL calls by the GLES equivalents.

GLES does not support shaders. Since I do not need shaders yet, I have added
#define instructions to simulate a shader API that does nothing.

The direct rendering mode is replaced by vertex objects.
The generic items library is a static library on Android.
The resource pool can receive various subsystems.

The search in directories are now done by a directory_resource_pool. Each
directory is handled by a resource pool.

A macro has been added to throw an exception when the SDL returns an error, in
bear::visual.
Fix incorrect computation of the vertex colors.
Add missing comment.
bear::input handles touch events.

There is a "finger" controller which dispatches instances of finger_event.

bear::mouse_detector process the touch event as the mouse events. This
behavior can be disabled.
The directory used by bear::engine::default_game_filesystem can be given to the constructor.
Code clean up and profiling logs.

The main loop is more clear.

We measure the time spent in progress and rendering and log it if it is higher
than the allowed time window.
Remove the useless call to glFlush().
gui_layer and transition_layer process the finger events.
Optimize the rendering procedure in the OpenGL part.

The drawing of the elements is now postponed until we know all of them. A new
class gl_state stores the information needed to draw the element and we can
merge it with an existing element in needed.