pub struct OpenGl { /* private fields */ }
Implementations
sourceimpl OpenGl
impl OpenGl
pub unsafe fn new_from_function<F>(load_fn: F) -> Result<Self, ErrorKind> where
F: FnMut(&str) -> *const c_void,
pub fn new_from_glutin_context(
windowed_context: &ContextWrapper<PossiblyCurrent, Window>
) -> Result<Self, ErrorKind>
pub fn is_opengles(&self) -> bool
sourcepub fn set_screen_target(
&mut self,
framebuffer_object: Option<<Context as HasContext>::Framebuffer>
)
pub fn set_screen_target(
&mut self,
framebuffer_object: Option<<Context as HasContext>::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
fn set_size(&mut self, width: u32, height: u32, _dpi: f32)
fn render(
&mut self,
images: &mut ImageStore<Self::Image>,
verts: &[Vertex],
commands: Vec<Command>
)
fn alloc_image(&mut self, info: ImageInfo) -> Result<Self::Image, ErrorKind>
fn update_image(
&mut self,
image: &mut Self::Image,
data: ImageSource<'_>,
x: usize,
y: usize
) -> Result<(), ErrorKind>
fn delete_image(&mut self, image: Self::Image, image_id: ImageId)
fn screenshot(&mut self) -> Result<ImgVec<RGBA8>, ErrorKind>
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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more