Fix multiple OpenGL errors

These changes were required for the GLSL shaders to compile on my AMD R9 270X running the 4.4.12874 drivers on Ubuntu 14.04 LTS. Added a TextureArrayMultiDrawBuffer solution, which uses a GL_DRAW_INDIRECT_BUFFER compared to TextureArrayMultiDraw. The latter does not work on AMD Linux