Fixed build on OpenGL ES.
Merge branch 'master' into compatibility