GL_LIGHTING is not used.

If we use the programmable pipeline (shaders), the lighting doesn't
work anyway and we need to manually implement it if we actually want
it.
glEnable(GL_TEXTURE2D) not needed if using shaders.

http://stackoverflow.com/questions/4041124/should-glenablegl-texture2d-be-applied-per-texture-unit#comment4346616_4043077
Implement z-index. Move alpha testing into shader.

Whilst the alpha testing provided by the fixed function pipeline
does work in OpenGL 2.1, it does not in OpenGL ES 2.0. Provided
later versions of OpenGL get rid of this entirely, this offers
better compatibility with the future.