Boilerplate code for the TextureView class, can be used as a drop-in replacement of GLSurfaceView