Struct cogl::GLES2Context[][src]

pub struct GLES2Context(_, _);

Implementations

impl GLES2Context[src]

pub fn new(ctx: &Context) -> Result<GLES2Context, Error>[src]

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.

Trait Implementations

impl Clone for GLES2Context[src]

impl Debug for GLES2Context[src]

impl Display for GLES2Context[src]

impl Eq for GLES2Context[src]

impl Hash for GLES2Context[src]

impl IsA<Object> for GLES2Context[src]

impl Ord for GLES2Context[src]

impl<T: ObjectType> PartialEq<T> for GLES2Context[src]

impl<T: ObjectType> PartialOrd<T> for GLES2Context[src]

impl StaticType for GLES2Context[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 
[src]

impl<T> Cast for T where
    T: ObjectType
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: SetValue + Send + ToValue + ?Sized
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.