The OpenGLRenderContext allows access to OpenGL features when OpenGL is the render context type of the Window. Historically, Lime was designed for WebGL render support on all platforms, and support has expanded to provide additional OpenGL ES native APIs.

Support for desktop OpenGL-specific features is currently sparse, but the OpenGLRenderContext provides the platform for us to add additional desktop specific features.

The OpenGLRenderContext is not compatible with mobile or web targets, but it can be converted to an OpenGL ES or a WebGL-style context for cross-platform development.

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

var gl:OpenGLRenderContext = window.context;
var gl:OpenGLRenderContext = GL;

var gles3:OpenGLES3RenderContext = gl;
var gles2:OpenGLES2RenderContext = gl;
var webgl2:WebGL2RenderContext = gl;
var webgl:WebGLRenderContext = gl;