pub struct Window { /* private fields */ }
Expand description
opengl::Window provides a subset of the methods to implement the Window trait. It can be embedded in another window implementation which provides an opengl context.
Implementations§
Source§impl Window
impl Window
Sourcepub fn new(ctx: OpenGlContext) -> Self
pub fn new(ctx: OpenGlContext) -> Self
Create an opengl window
pub fn clear_color(&mut self, color: Color)
pub fn get_clear_color(&self) -> Color
Sourcepub fn viewport(&mut self, x: i32, y: i32, width: u32, height: u32)
pub fn viewport(&mut self, x: i32, y: i32, width: u32, height: u32)
Set the viewport. Wrapping windows will probably want to do this when they detect a resize.
pub fn prepare_draw( &mut self, screen_size: (f32, f32), first_pass: bool, ) -> DrawContext<'_, OpenGlRenderPlatform>
pub fn take_screenshot(&self) -> Box<[u8]>
Auto Trait Implementations§
impl Freeze for Window
impl !RefUnwindSafe for Window
impl !Send for Window
impl !Sync for Window
impl Unpin for Window
impl !UnwindSafe for Window
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ToggleButtonValue<()> for T
impl<T> ToggleButtonValue<()> for T
Source§fn get_value(&self, _extra: &WidgetExtra<'_>)
fn get_value(&self, _extra: &WidgetExtra<'_>)
Get the value associated with this toggle button content.
Source§impl<T> ToggleButtonValue<WidgetId> for T
impl<T> ToggleButtonValue<WidgetId> for T
Source§fn get_value(&self, extra: &WidgetExtra<'_>) -> WidgetId
fn get_value(&self, extra: &WidgetExtra<'_>) -> WidgetId
Get the value associated with this toggle button content.