pub struct Gl { /* private fields */ }Implementations
sourceimpl Gl
impl Gl
pub fn new(canvas: &HtmlCanvasElement) -> Result<Gl, GlError>
pub fn context(&self) -> &Context
pub fn instanced_arrays(&self) -> &AngleInstancedArrays
pub fn settings() -> impl Settings
pub fn apply<R>(&self, settings: impl Settings, callback: impl FnOnce() -> R) -> R
pub fn program(&self, fragment: &str, vertex: &str) -> Result<Program, GlError>
pub fn items_buffer<I>(
&self,
data: &[I],
usage: BufferUsage
) -> Result<ItemsBuffer<I>, GlError> where
I: Item,
pub fn clear_color_buffer(&self)
pub fn clear_depth_buffer(&self)
pub fn clear_buffers(&self)
pub fn texture(
&self,
width: u32,
height: u32,
data_type: TextureType,
format: TextureFormat,
data: TextureContent
) -> Result<Texture, GlError>
pub fn depth_buffer(
&self,
width: u32,
height: u32
) -> Result<DepthBuffer, GlError>
pub fn frame_buffer(&self) -> Result<FrameBuffer, GlError>
pub fn frame_buffer_with_color(
&self,
texture: Texture
) -> Result<FrameBuffer, GlError>
pub fn frame_buffer_with_depth(
&self,
texture: Texture,
depth_buffer: DepthBuffer
) -> Result<FrameBuffer, GlError>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Gl
impl !Send for Gl
impl !Sync for Gl
impl Unpin for Gl
impl !UnwindSafe for Gl
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