useful functions for using opengl es on raspberry pi