Initializes and returns a newly allocated rendering context with the specified version of OpenGL ES rendering API and the specified sharegroup.
- iOS 2.0–12.0Deprecated
- tvOS 9.0–12.0Deprecated
The desired version of the OpenGL ES rendering API. For legal values, see
A sharegroup obtained from another
An initialized context object, or
nil if the object couldn't be created.
To issue OpenGL ES commands to this context, you must first make it the current drawing context by calling
OpenGL ES objects such as textures, renderbuffers, framebuffers and vertex buffers are shared across all contexts that are created with the same sharegroup. To specify that a new context should be initialized in an existing sharegroup, retrieve the
sharegroup property from a previously initialized context and pass it as a parameter to this initialization method. Pass
nil as the
sharegroup parameter to create a new
EAGLSharegroup object attached to the context.