pub fn new(ctx: &Context) -> Result<GLES2Context, glib::Error> {
        unsafe {
            let mut error = ptr::null_mut();
            let ret = ffi::cogl_gles2_context_new(ctx.to_glib_none().0, &mut error);
            if error.is_null() {
                Ok(from_glib_full(ret))
            } else {
                Err(from_glib_full(error))
            }
        }
    }
/// Allocates a new OpenGLES 2.0 context that can be used to render to
/// `CoglOffscreen` framebuffers (Rendering to `Onscreen`
/// framebuffers is not currently supported).
///
/// To actually access the OpenGLES 2.0 api itself you need to use
/// `GLES2Context::get_vtable`. You should not try to directly link
/// to and use the symbols provided by the a system OpenGLES 2.0
/// driver.
///
/// Once you have allocated an OpenGLES 2.0 context you can make it
/// current using `cogl_push_gles2_context`. For those familiar with
/// using the EGL api, this serves a similar purpose to eglMakeCurrent.
///
/// `<note>`Before using this api applications can check for OpenGLES 2.0
/// api support by checking for `FeatureID::OglFeatureIdGles2Context` support
/// with `cogl_has_feature`. This function will return `false` and
/// return an `GLES2ContextError::Unsupported` error if the
/// feature isn't available.`</note>`
///
/// ## `ctx`
/// A `Context`
///
/// # Returns
///
/// A newly allocated `GLES2Context` or `None` if there
///  was an error and `error` will be updated in that case.
Allocates a new OpenGLES 2.0 context that can be used to render to
`CoglOffscreen` framebuffers (Rendering to `Onscreen`
framebuffers is not currently supported).

To actually access the OpenGLES 2.0 api itself you need to use
`GLES2Context::get_vtable`. You should not try to directly link
to and use the symbols provided by the a system OpenGLES 2.0
driver.

Once you have allocated an OpenGLES 2.0 context you can make it
current using `cogl_push_gles2_context`. For those familiar with
using the EGL api, this serves a similar purpose to eglMakeCurrent.


Allocates a new OpenGLES 2 . 0 context that can be used to render to ` CoglOffscreen ` framebuffers ( Rendering to ` Onscreen ` framebuffers is not currently supported ) . To actually access the OpenGLES 2 . 0 api itself you need to use ` GLES2Context :: get_vtable ` . You should not try to directly link to and use the symbols provided by the a system OpenGLES 2 . 0 driver . Once you have allocated an OpenGLES 2 . 0 context you can make it current using ` cogl_push_gles2_context ` . For those familiar with using the EGL api this serves a similar purpose to eglMakeCurrent .
pub fn new(ctx: &Context) -> Result<GLES2Context, glib::Error> {
        unsafe {
            let mut error = ptr::null_mut();
            let ret = ffi::cogl_gles2_context_new(ctx.to_glib_none().0, &mut error);
            if error.is_null() {
                Ok(from_glib_full(ret))
            } else {
                Err(from_glib_full(error))
            }
        }
    }
pub fn new ( ctx : & Context ) -> Result < GLES2Context , glib :: Error > { unsafe { let mut error = ptr :: null_mut ( ) ; let ret = ffi :: cogl_gles2_context_new ( ctx . to_glib_none ( ) . 0 , & mut error ) ; if error . is_null ( ) { Ok ( from_glib_full ( ret ) ) } else { Err ( from_glib_full ( error ) ) } } }
Allocates a new OpenGLES 2.0 context that can be used to render to
`CoglOffscreen` framebuffers (Rendering to `Onscreen`
framebuffers is not currently supported).
Allocates a new OpenGLES 2 . 0 context that can be used to render to ` CoglOffscreen ` framebuffers ( Rendering to ` Onscreen ` framebuffers is not currently supported ) .
ctx
&Context
A newly allocated `GLES2Context` or `None` if there
was an error and `error` will be updated in that case.
A newly allocated ` GLES2Context ` or ` None ` if there was an error and ` error ` will be updated in that case .
ctx
&Context
`ctx`
None