Struct glitter::context::ContextOf [] [src]

pub struct ContextOf<B, F, P, R, T> { /* fields omitted */ }

The type that represents the whole "OpenGL state machine". This is the core of glitter's design, and what enables the notion of safety.

To understand how it works, let's look at some code snippets:

This code will compile without errors:

#[macro_use] extern crate glitter;
use glitter::prelude::*;

let gl = unsafe { glitter::Context::current_context() };
let mut buffer = gl.gen_buffer();
let (mut gl_buffer, gl) = gl.bind_array_buffer(&mut buffer);
gl.buffer_bytes(&mut gl_buffer, &[1, 2, 3], glitter::STATIC_DRAW);

...and this code won't:

Be careful when using this code, it's not being tested!
let gl: glitter::ContextOf<BufferBinder, _, _, _, _> = unsafe {
    glitter::Context::current_context()
};
let mut buffer_1 = unsafe { gl.gen_buffer() };
let mut buffer_2 = unsafe { gl.gen_buffer() };
let (mut gl_buffer_1, gl): (_, ContextOf<BufferBinderOf<(), _>, _, _, _, _>) = gl.bind_array_buffer(&mut buffer_1);
unsafe { gl.buffer_byte(&mut gl_buffer_1); }
let (mut gl_buffer_2, gl) = gl.bind_array_buffer(&mut buffer_2);
//                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// error: no method named `bind_array_buffer` found for type `...` found in
//        the current scope
// note: the method `bind_array_buffer` exists but the following trait
//       bounds were not satisfied: `() : BorrowMut<ArrayBufferBinder>`,
//       `() : BorrowMut<ArrayBufferBinder>`

The magic of glitter lies in the two return values of bind_array_buffer: it returns both a "buffer binding" (something that represents that we have a buffer currently bound, so we can send data to it), as well as a new context, which doesn't have the bind_array_buffer method. How can we achieve this type-level magic? Well, by using generic type parameters, of course!

Generic Type Parameters

Each of the generic type parameters represents a distinct 'piece' of OpenGL state. Here's the state that each type parameter encapsulates:

As we saw with the above snippet, each type parameter can take on one of two types: either a Binding type (meaning that it has an unbound target that can be bound to), or the () type (meaning that the target has already been used in a binding).

When a generic parameter is present (i.e., when it isn't just ()), that means that that 'part' of OpenGL state is free to be bound.

Generic Code

In some circumstances, taking a concrete Context by value will be too strict. Additionally, being generic over all of the type parameters adds a great deal of complexity, and still isn't sufficient for all circumstances. For these cases, there are a number of traits that exist, which allow for much more flexibility than using a ContextOf instance directly. The traits in question are:

Methods

impl<B, F, P, R, T> ContextOf<B, F, P, R, T>
[src]

[src]

Use a function to load OpenGL function pointers. This function must be called before calling ContextOf::current_context.

Safety

load_fn takes an OpenGL function name, and must return a function pointer that can be used as this OpenGL function.

[src]

Get the current OpenGL context.

Safety

Before calling this function, a context must be created and set within the current thread, and an OpenGL library needs to be loaded by calling the ContextOf::load_with function.

Additionally, special care needs to be taken with this function to maintain the invariants about bindings and targets. Here's an example of how this function can be abused:

Be careful when using this code, it's not being tested!
// Get a fresh version the current context
let gl = unsafe { glitter::Context::current_context() };
// Create a buffer
let mut buffer_1 = gl.gen_buffer();
// Bind the buffer to the `GL_ARRAY_BUFFER` taret
let (gl_buffer_1, gl) = gl.bind_array_buffer(&mut buffer_1);

// Get a fresh version of the current context again
let gl_2 = unsafe { Context::current_context() };
// Create a new buffer
let mut buffer_2 = gl_2.gen_buffer();
// Bind the new buffer to `GL_ARRAY_BUFFER` (*replacing the
// old binding*)
let (gl_buffer_2, gl_2) = gl_2.bind_array_buffer(&mut buffer_2);

// Send some data to the buffers:
gl_buffer_2.buffer_bytes(&[1, 2, 3], glitter::STATIC_DRAW);

// Current data:
// buffer_1: {uninitialized}
// buffer_2: [1, 2, 3]

gl_buffer_1.buffer_bytes(&[4, 5, 6], glitter::STATIC_DRAW);
^~~~~~~~~~~~~~~~~~~~~~~~
 UNSOUNDNESS: gl_buffer_1 refers to GL_ARRAY_BUFFER, which was
              invalidated by gl_buffer_2. This call overwrites buffer_2
              and leaves buffer_1 uninitialized.

// Current data:
// buffer_1: {uninitialized}
// buffer_2: [4, 5, 6]

[src]

Get an OpenGL error that was generated since the last call to ContextOf::get_error(), or None is none occurred.

Note

When the debug_assertions configuration option is set, ContextOf::get_error is automatically called after most OpenGL function calls (and the program will often panic if an error was generated).

[src]

Return a new ContextOf, where the type parameters of the new context are borrows of the current context. This function shouldn't be necessary in most circumstances, and will likely be removed from the public API in a future release.

[src]

Return a new ContextOf, where the type parameters of the new context are mutable borrows of the current context. This function shouldn't be necessary in most circumstances, and will likely be removed from the public API in a future release.

[src]

Replace the current context's internal buffers field (of type B) with a new value, returning the old value and a new context. This function will likely be removed from the public API in the future.

Example

// Get the current context
let gl = unsafe { glitter::Context::current_context() };
// Replace the context's buffer binder with `()`
let (gl_buffer_binder, gl) = gl.swap_buffers(());

[src]

Replace the current context's internal framebuffer field (of type F) with a new value, returning the old value and a new context. This function will likely be removed from the public API in the future.

Example

// Get the current context
let gl = unsafe { glitter::Context::current_context() };
// Replace the context's framebuffer binder with `()`
let (gl_framebuffer_binder, gl) = gl.swap_framebuffer(());

[src]

Replace the current context's internal program field (of type P) with a new value, returning the old value and a new context. This function will likely be removed from the public API in the future.

Example

// Get the current context
let gl = unsafe { glitter::Context::current_context() };
// Replace the context's program binder with `()`
let (gl_program_binder, gl) = gl.swap_program(());

[src]

Replace the current context's internal renderbuffer field (of type B) with a new value, returning a new context and the old value. This function will likely be removed from the public API in the future.

Example

// Get the current context
let gl = unsafe { glitter::Context::current_context() };
// Replace the context's renderbuffer binder with `()`
let (gl_renderbuffer_binder, gl) = gl.swap_renderbuffer(());

[src]

Replace the current context's internal tex_units field (of type T) with a new value, returning the old value and a new context. This function will likely be removed from the public API in the future.

Example

// Get the current context
let gl = unsafe { glitter::Context::current_context() };
// Replace the context's texture unit binder with `()`
let (gl_tex_unit_binder, gl) = gl.swap_tex_units(());

impl<B, F, P, R, T> ContextOf<B, F, P, R, T>
[src]

[src]

Create a new, empty index buffer.

Trait Implementations

impl<BA, BE, F, P, R, T> ArrayBufferContext for ContextOf<BufferBinderOf<BA, BE>, F, P, R, T> where
    BA: BorrowMut<ArrayBufferBinder>, 
[src]

The type of binder this context contains.

The OpenGL context that will be returned after binding the array buffer.

[src]

Split this context into a binder and the remaining context.

[src]

Bind a buffer to this context's array buffer, returning a new context and a binding. Read more

impl<'a, BA, BE, F, P, R, T> ArrayBufferContext for &'a mut ContextOf<BufferBinderOf<BA, BE>, F, P, R, T> where
    BA: BorrowMut<ArrayBufferBinder>, 
[src]

The type of binder this context contains.

The OpenGL context that will be returned after binding the array buffer.

[src]

Split this context into a binder and the remaining context.

[src]

Bind a buffer to this context's array buffer, returning a new context and a binding. Read more

impl<'a, BA, BE, F, P, R, T> ArrayBufferContext for &'a mut ContextOf<&'a mut BufferBinderOf<BA, BE>, F, P, R, T> where
    BA: BorrowMut<ArrayBufferBinder>,
    F: ToMut<'a>,
    P: ToMut<'a>,
    R: ToMut<'a>,
    T: ToMut<'a>, 
[src]

The type of binder this context contains.

The OpenGL context that will be returned after binding the array buffer.

[src]

Split this context into a binder and the remaining context.

[src]

Bind a buffer to this context's array buffer, returning a new context and a binding. Read more

impl<BA, BE, F, P, R, T> ElementArrayBufferContext for ContextOf<BufferBinderOf<BA, BE>, F, P, R, T> where
    BE: BorrowMut<ElementArrayBufferBinder>, 
[src]

The type of binder this context contains.

The OpenGL context that will be returned after binding the element array buffer. Read more

[src]

Split this context into a binder and the remaining context.

[src]

Bind a buffer to this context's element array buffer, returning a new context and a binding. Read more

impl<'a, BA, BE, F, P, R, T> ElementArrayBufferContext for &'a mut ContextOf<BufferBinderOf<BA, BE>, F, P, R, T> where
    BE: BorrowMut<ElementArrayBufferBinder>, 
[src]

The type of binder this context contains.

The OpenGL context that will be returned after binding the element array buffer. Read more

[src]

Split this context into a binder and the remaining context.

[src]

Bind a buffer to this context's element array buffer, returning a new context and a binding. Read more

impl<'a, BA, BE, F, P, R, T> ElementArrayBufferContext for &'a mut ContextOf<&'a mut BufferBinderOf<BA, BE>, F, P, R, T> where
    BE: BorrowMut<ElementArrayBufferBinder>,
    F: ToMut<'a>,
    P: ToMut<'a>,
    R: ToMut<'a>,
    T: ToMut<'a>, 
[src]

The type of binder this context contains.

The OpenGL context that will be returned after binding the element array buffer. Read more

[src]

Split this context into a binder and the remaining context.

[src]

Bind a buffer to this context's element array buffer, returning a new context and a binding. Read more

impl<BA, BE, F, P, R, T> BufferContext for ContextOf<BufferBinderOf<BA, BE>, F, P, R, T> where
    BA: BorrowMut<ArrayBufferBinder>,
    BE: BorrowMut<ElementArrayBufferBinder>, 
[src]

impl<'a, BA, BE, F, P, R, T> BufferContext for &'a mut ContextOf<BufferBinderOf<BA, BE>, F, P, R, T> where
    BA: BorrowMut<ArrayBufferBinder>,
    BE: BorrowMut<ElementArrayBufferBinder>,
    F: ToMut<'a>,
    P: ToMut<'a>,
    R: ToMut<'a>,
    T: ToMut<'a>, 
[src]

impl<'a, BA, BE, F, P, R, T> BufferContext for &'a mut ContextOf<&'a mut BufferBinderOf<BA, BE>, F, P, R, T> where
    BA: BorrowMut<ArrayBufferBinder>,
    BE: BorrowMut<ElementArrayBufferBinder>,
    F: ToMut<'a>,
    P: ToMut<'a>,
    R: ToMut<'a>,
    T: ToMut<'a>, 
[src]

impl<B, F, P, R, T> FramebufferContext for ContextOf<B, F, P, R, T> where
    F: BorrowMut<FramebufferBinder>, 
[src]

The type of binder this context contains.

The OpenGL context that will be returned after binding a framebuffer.

[src]

Split the context into a binder and the remaining context.

[src]

Bind a buffer to this context's framebuffer, returning a new context and a binding. Read more

impl<'a, B, F, P, R, T> FramebufferContext for &'a mut ContextOf<B, F, P, R, T> where
    F: BorrowMut<FramebufferBinder>, 
[src]

The type of binder this context contains.

The OpenGL context that will be returned after binding a framebuffer.

[src]

Split the context into a binder and the remaining context.

[src]

Bind a buffer to this context's framebuffer, returning a new context and a binding. Read more

impl<B, F, P, R, T> ProgramContext for ContextOf<B, F, P, R, T> where
    P: BorrowMut<ProgramBinder>, 
[src]

The type of binder this context contains.

The OpenGL context that will be returned after binding a program.

[src]

Split the context into a binder and the remaining context.

[src]

Bind a program to this context's program, returning a new context and a binding. Read more

impl<'a, B, F, P, R, T> ProgramContext for &'a mut ContextOf<B, F, P, R, T> where
    &'a mut P: BorrowMut<ProgramBinder>, 
[src]

The type of binder this context contains.

The OpenGL context that will be returned after binding a program.

[src]

Split the context into a binder and the remaining context.

[src]

Bind a program to this context's program, returning a new context and a binding. Read more

impl<B, F, P, R, T> RenderbufferContext for ContextOf<B, F, P, R, T> where
    R: BorrowMut<RenderbufferBinder>, 
[src]

The type of binder this context contains.

The OpenGL context that will be returned after binding a renderbuffer.

[src]

Split the context into a binder and the remaining context.

[src]

Bind a renderbuffer to this context's renderbuffer, returning a new context and a binding. Read more

impl<'a, B, F, P, R, T> RenderbufferContext for &'a mut ContextOf<B, F, P, R, T> where
    R: BorrowMut<RenderbufferBinder>, 
[src]

The type of binder this context contains.

The OpenGL context that will be returned after binding a renderbuffer.

[src]

Split the context into a binder and the remaining context.

[src]

Bind a renderbuffer to this context's renderbuffer, returning a new context and a binding. Read more

impl<B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit0Context for ContextOf<B, F, P, R, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T0: BorrowMut<TextureUnit0>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 0th texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 0th texture unit active, returning a binding and the remaining context Read more

impl<'a, B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit0Context for &'a mut ContextOf<B, F, P, R, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T0: BorrowMut<TextureUnit0>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 0th texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 0th texture unit active, returning a binding and the remaining context Read more

impl<'a, B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit0Context for &'a mut ContextOf<B, F, P, R, &'a mut TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T0: BorrowMut<TextureUnit0>,
    B: ToMut<'a>,
    F: ToMut<'a>,
    P: ToMut<'a>,
    R: ToMut<'a>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 0th texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 0th texture unit active, returning a binding and the remaining context Read more

impl<B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit1Context for ContextOf<B, F, P, R, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T1: BorrowMut<TextureUnit1>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 1st texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 1st texture unit active, returning a binding and the remaining context Read more

impl<'a, B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit1Context for &'a mut ContextOf<B, F, P, R, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T1: BorrowMut<TextureUnit1>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 1st texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 1st texture unit active, returning a binding and the remaining context Read more

impl<'a, B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit1Context for &'a mut ContextOf<B, F, P, R, &'a mut TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T1: BorrowMut<TextureUnit1>,
    B: ToMut<'a>,
    F: ToMut<'a>,
    P: ToMut<'a>,
    R: ToMut<'a>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 1st texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 1st texture unit active, returning a binding and the remaining context Read more

impl<B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit2Context for ContextOf<B, F, P, R, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T2: BorrowMut<TextureUnit2>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 2nd texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 2nd texture unit active, returning a binding and the remaining context Read more

impl<'a, B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit2Context for &'a mut ContextOf<B, F, P, R, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T2: BorrowMut<TextureUnit2>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 2nd texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 2nd texture unit active, returning a binding and the remaining context Read more

impl<'a, B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit2Context for &'a mut ContextOf<B, F, P, R, &'a mut TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T2: BorrowMut<TextureUnit2>,
    B: ToMut<'a>,
    F: ToMut<'a>,
    P: ToMut<'a>,
    R: ToMut<'a>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 2nd texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 2nd texture unit active, returning a binding and the remaining context Read more

impl<B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit3Context for ContextOf<B, F, P, R, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T3: BorrowMut<TextureUnit3>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 3rd texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 3rd texture unit active, returning a binding and the remaining context Read more

impl<'a, B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit3Context for &'a mut ContextOf<B, F, P, R, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T3: BorrowMut<TextureUnit3>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 3rd texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 3rd texture unit active, returning a binding and the remaining context Read more

impl<'a, B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit3Context for &'a mut ContextOf<B, F, P, R, &'a mut TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T3: BorrowMut<TextureUnit3>,
    B: ToMut<'a>,
    F: ToMut<'a>,
    P: ToMut<'a>,
    R: ToMut<'a>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 3rd texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 3rd texture unit active, returning a binding and the remaining context Read more

impl<B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit4Context for ContextOf<B, F, P, R, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T4: BorrowMut<TextureUnit4>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 4th texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 4th texture unit active, returning a binding and the remaining context Read more

impl<'a, B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit4Context for &'a mut ContextOf<B, F, P, R, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T4: BorrowMut<TextureUnit4>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 4th texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 4th texture unit active, returning a binding and the remaining context Read more

impl<'a, B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit4Context for &'a mut ContextOf<B, F, P, R, &'a mut TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T4: BorrowMut<TextureUnit4>,
    B: ToMut<'a>,
    F: ToMut<'a>,
    P: ToMut<'a>,
    R: ToMut<'a>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 4th texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 4th texture unit active, returning a binding and the remaining context Read more

impl<B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit5Context for ContextOf<B, F, P, R, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T5: BorrowMut<TextureUnit5>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 5th texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 5th texture unit active, returning a binding and the remaining context Read more

impl<'a, B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit5Context for &'a mut ContextOf<B, F, P, R, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T5: BorrowMut<TextureUnit5>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 5th texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 5th texture unit active, returning a binding and the remaining context Read more

impl<'a, B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit5Context for &'a mut ContextOf<B, F, P, R, &'a mut TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T5: BorrowMut<TextureUnit5>,
    B: ToMut<'a>,
    F: ToMut<'a>,
    P: ToMut<'a>,
    R: ToMut<'a>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 5th texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 5th texture unit active, returning a binding and the remaining context Read more

impl<B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit6Context for ContextOf<B, F, P, R, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T6: BorrowMut<TextureUnit6>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 6th texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 6th texture unit active, returning a binding and the remaining context Read more

impl<'a, B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit6Context for &'a mut ContextOf<B, F, P, R, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T6: BorrowMut<TextureUnit6>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 6th texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 6th texture unit active, returning a binding and the remaining context Read more

impl<'a, B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit6Context for &'a mut ContextOf<B, F, P, R, &'a mut TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T6: BorrowMut<TextureUnit6>,
    B: ToMut<'a>,
    F: ToMut<'a>,
    P: ToMut<'a>,
    R: ToMut<'a>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 6th texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 6th texture unit active, returning a binding and the remaining context Read more

impl<B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit7Context for ContextOf<B, F, P, R, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T7: BorrowMut<TextureUnit7>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 7th texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 7th texture unit active, returning a binding and the remaining context Read more

impl<'a, B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit7Context for &'a mut ContextOf<B, F, P, R, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T7: BorrowMut<TextureUnit7>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 7th texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 7th texture unit active, returning a binding and the remaining context Read more

impl<'a, B, F, P, R, T0, T1, T2, T3, T4, T5, T6, T7> TextureUnit7Context for &'a mut ContextOf<B, F, P, R, &'a mut TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>> where
    T7: BorrowMut<TextureUnit7>,
    B: ToMut<'a>,
    F: ToMut<'a>,
    P: ToMut<'a>,
    R: ToMut<'a>, 
[src]

The type of unit this context contains.

The OpenGL context that will be returned after making the texture unit active. Read more

[src]

Split the 7th texture unit from the context, returning the unit and the remaining context. Read more

[src]

Make the 7th texture unit active, returning a binding and the remaining context Read more

impl<B, F, P, R, T> BaseContext for ContextOf<B, F, P, R, T>
[src]

impl<'a, B, F, P, R, T> BaseContext for &'a mut ContextOf<B, F, P, R, T>
[src]

impl<B, F, P, R, T> AContext for ContextOf<B, F, P, R, T>
[src]

impl<'a, B, F, P, R, T> AContext for &'a mut ContextOf<B, F, P, R, T>
[src]