pub struct OpenGl { /* private fields */ }
Implementations
sourceimpl OpenGl
impl OpenGl
pub fn new() -> Result<Self, ErrorKind>
pub fn is_opengles(&self) -> bool
sourcepub fn set_screen_target(&mut self, framebuffer_object: Option<Framebuffer>)
pub fn set_screen_target(&mut self, framebuffer_object: Option<Framebuffer>)
Make the “Screen” RenderTarget actually render to a framebuffer object. This is useful when
embedding femtovg into another program where final composition is handled by an external task.
The given framebuffer_object
must refer to a Framebuffer Object created on the current OpenGL
Context, and must have a depth & stencil attachment.
Pass None
to clear any previous Framebuffer Object ID that was passed and target rendering to
the default target (normally the window).
Trait Implementations
sourceimpl Renderer for OpenGl
impl Renderer for OpenGl
type Image = GlTexture
type Image = GlTexture
Renderer image
sourcefn render(
&mut self,
images: &mut ImageStore<Self::Image>,
verts: &[Vertex],
commands: Vec<Command>
)
fn render(
&mut self,
images: &mut ImageStore<Self::Image>,
verts: &[Vertex],
commands: Vec<Command>
)
Renderer image
sourcefn update_image(
&mut self,
image: &mut Self::Image,
data: ImageSource<'_>,
x: usize,
y: usize
) -> Result<(), ErrorKind>
fn update_image(
&mut self,
image: &mut Self::Image,
data: ImageSource<'_>,
x: usize,
y: usize
) -> Result<(), ErrorKind>
Update image
sourcefn delete_image(&mut self, image: Self::Image, image_id: ImageId)
fn delete_image(&mut self, image: Self::Image, image_id: ImageId)
Delete image
Auto Trait Implementations
impl !RefUnwindSafe for OpenGl
impl Send for OpenGl
impl Sync for OpenGl
impl Unpin for OpenGl
impl !UnwindSafe for OpenGl
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
sourceimpl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
sourcefn 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
.