The OpenGLES2RenderContext allows access to OpenGL ES 2.0 features when OpenGL or OpenGL ES is the render context type of the Window.

Using an OpenGL ES context on a desktop platform enables support for cross-platform code that should run on the majority of desktop and mobile platforms (when using hardware acceleration).

Platforms supporting an OpenGL ES context are compatible with the Lime WebGLRenderContext if you would prefer to write WebGL-style code, or support web browsers with the same code.

You can convert from lime.graphics.RenderContext, lime.graphics.OpenGLRenderContext, lime.graphics.OpenGLES3RenderContext, lime.graphics.opengl.GL, and can convert to lime.graphics.WebGLRenderContext directly if desired:

var gles2:OpenGLES2RenderContext = window.context;
var gles2:OpenGLES2RenderContext = gl;
var gles2:OpenGLES2RenderContext = gles3;
var gles2:OpenGLES2RenderContext = GL;

var webgl:WebGLRenderContext = gles2;