Ifdef out some code for OpenGLES systems

Change-Id: I6058a1b2623886eab93d7014d11d777144be612d
Merge topic 'gles_fix' into master

81666b51 Ifdef out some code for OpenGLES systems