Lots of minor changes for Examples to build with OpenGL2

Change-Id: I5eadbc3da480bb19db9b99f5c648ff1d3fe2316c
Merge topic 'examples_opengl2' into master

249fd506 Lots of minor changes for Examples to build with OpenGL2