Replace deprecated GL api usage from gl_hud. It also supports OpenGLES.