Adapts OpenGL code to be OpenGL-ES2 compatible (enable with USE_GLES)

Use OGL_DIRECT_LINK to enable at compile time linking of the OpenGL library
Pandora and GCW specific changes