Struct rust_gl::context::Context[][src]

pub struct Context {
Show fields pub gl: Rc<GL>, pub array_buffer: Target<GL, { GL::ARRAY_BUFFER }>, pub copy_read_buffer: Target<GL, { GL::COPY_READ_BUFFER }>, pub copy_write_buffer: Target<GL, { GL::COPY_WRITE_BUFFER }>, pub element_array_buffer: Target<GL, { GL::ELEMENT_ARRAY_BUFFER }>, pub pixel_pack_buffer: Target<GL, { GL::PIXEL_PACK_BUFFER }>, pub pixel_unpack_buffer: Target<GL, { GL::PIXEL_UNPACK_BUFFER }>, pub transform_feedback_buffer: Target<GL, { GL::TRANSFORM_FEEDBACK_BUFFER }>, pub uniform_buffer: Target<GL, { GL::UNIFORM_BUFFER }>, pub texture_2d: TextureTarget<GL, { GL::TEXTURE_2D }>, pub texture_cube_map: TextureTarget<GL, { GL::TEXTURE_CUBE_MAP }>, pub texture_3d: TextureTarget<GL, { GL::TEXTURE_3D }>, pub texture_2d_array: TextureTarget<GL, { GL::TEXTURE_3D }>,
}

Fields

gl: Rc<GL>array_buffer: Target<GL, { GL::ARRAY_BUFFER }>copy_read_buffer: Target<GL, { GL::COPY_READ_BUFFER }>copy_write_buffer: Target<GL, { GL::COPY_WRITE_BUFFER }>element_array_buffer: Target<GL, { GL::ELEMENT_ARRAY_BUFFER }>pixel_pack_buffer: Target<GL, { GL::PIXEL_PACK_BUFFER }>pixel_unpack_buffer: Target<GL, { GL::PIXEL_UNPACK_BUFFER }>transform_feedback_buffer: Target<GL, { GL::TRANSFORM_FEEDBACK_BUFFER }>uniform_buffer: Target<GL, { GL::UNIFORM_BUFFER }>texture_2d: TextureTarget<GL, { GL::TEXTURE_2D }>texture_cube_map: TextureTarget<GL, { GL::TEXTURE_CUBE_MAP }>texture_3d: TextureTarget<GL, { GL::TEXTURE_3D }>texture_2d_array: TextureTarget<GL, { GL::TEXTURE_3D }>

Implementations

impl Context[src]

pub fn draw_arrays(&mut self, mode: u32, range: Range<i32>)[src]

pub fn draw_elements<T>(&mut self, mode: u32, range: Range<i32>) where
    T: GLType
[src]

impl Context[src]

pub fn load<T>(&mut self, input: T) -> Result<Obj, Error> where
    T: BufRead
[src]

impl Context[src]

pub fn bind<'context, 'vao>(
    &'context mut self,
    vao: &'vao mut WebGlVertexArrayObject
) -> Binder<'context, 'vao>
[src]

impl<'context, 'vertex, 'fragment> Context[src]

pub fn program<U, A>(
    &'context self,
    vertex_shader: &'vertex VertexShader,
    fragment_shader: &'fragment FragmentShader
) -> ProgramBuilder<'context, 'vertex, 'fragment, U, A>
[src]

Constructs a program builder.

impl Context[src]

pub fn using<'context, 'program, U, A>(
    &'context mut self,
    program: &'program mut Program<U, A>
) -> Using<'context, 'program, U, A>
[src]

Trait Implementations

impl Deref for Context[src]

type Target = GL

The resulting type after dereferencing.

fn deref(&self) -> &Self::Target[src]

Dereferences the value.

impl From<WebGl2RenderingContext> for Context[src]

fn from(gl: GL) -> Context[src]

Performs the conversion.

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]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.