[−][src]Struct golem::Context
The context required to interact with the GPU
Methods
impl Context
[src]
pub fn from_glow(gl: Context) -> Result<Context, GolemError>
[src]
Create an instance from an OpenGL context
pub fn set_viewport(&self, x: u32, y: u32, width: u32, height: u32)
[src]
Set the section of the framebuffer that will be rendered to
By default, this is the entire internal area of the window. When switching to a
Surface
, it's generally important to set the viewport to its area.
pub fn set_clear_color(&self, r: f32, g: f32, b: f32, a: f32)
[src]
Set the color the render target will be cleared to by clear
pub fn clear(&self)
[src]
Clear the current render target to the render color (see set_clear_color
)
pub fn set_blend_mode(&self, blend_state: Option<BlendMode>)
[src]
Set the blend mode, with None
disabling blending
By default, this is None
See the documentation for BlendMode
for the various blending options
Auto Trait Implementations
impl !RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,