Struct components::platform::core::GLES2Context
source · [−]pub struct GLES2Context {}
Implementations
sourceimpl GLES2Context
impl GLES2Context
sourcepub fn new(ctx: &Context) -> GLES2Context
pub fn new(ctx: &Context) -> GLES2Context
Allocates a new OpenGLES 2.0 context that can be used to render to
Offscreen
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 push_gles2_context
. For those familiar with
using the EGL api, this serves a similar purpose to eglMakeCurrent.
Before using this api applications can check for OpenGLES 2.0
api support by checking for FeatureID::OglFeatureIdGles2Context
support
with has_feature
. This fn will return false
and
return an GLES2ContextError::Unsupported
error if the
feature isn’t available.
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
Auto Trait Implementations
impl RefUnwindSafe for GLES2Context
impl Send for GLES2Context
impl Sync for GLES2Context
impl Unpin for GLES2Context
impl UnwindSafe for GLES2Context
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
fn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.