Trait zng_view::extensions::OpenGlContext
source · pub trait OpenGlContext {
// Required methods
fn is_current(&self) -> bool;
fn make_current(&mut self);
fn gl(&self) -> &Rc<dyn Gl>;
fn render_mode(&self) -> RenderMode;
fn resize(&mut self, size: PxSize);
fn is_software(&self) -> bool;
fn swap_buffers(&mut self);
}
Expand description
Represents a managed OpenGL context connected to a window or headless surface.
Required Methods§
sourcefn is_current(&self) -> bool
fn is_current(&self) -> bool
Context is current on the calling thread.
sourcefn make_current(&mut self)
fn make_current(&mut self)
Make context current on the calling thread.
sourcefn render_mode(&self) -> RenderMode
fn render_mode(&self) -> RenderMode
Actual render mode used to create the context.
sourcefn is_software(&self) -> bool
fn is_software(&self) -> bool
If the context runs on the CPU, not a GPU.
sourcefn swap_buffers(&mut self)
fn swap_buffers(&mut self)
Swap buffers if the context is double-buffered.