[][src]Struct ngen::platform::Platform

pub struct Platform<'p> {
    pub temp_arena: &'p mut TempArena,
    // some fields omitted
}

Fields

temp_arena: &'p mut TempArena

Implementations

impl<'p> Platform<'p>[src]

pub fn new(
    renderer: &'p mut OpenGLRenderer,
    temp_arena: &'p mut TempArena
) -> Self
[src]

pub fn load_image(&mut self, path: &str) -> Result<Bitmap, String>[src]

Used to synchronously load an image from disk and submit it to OpenGL. The resuling struct, assuming the image exists, contains the OpenGL id along with image dimensions. It does not contain actual image data at this point. In the future, we may change the API to allow the user to modify images sent to the GPU, but at this point we don't.

Auto Trait Implementations

impl<'p> !RefUnwindSafe for Platform<'p>

impl<'p> !Send for Platform<'p>

impl<'p> !Sync for Platform<'p>

impl<'p> Unpin for Platform<'p>

impl<'p> !UnwindSafe for Platform<'p>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

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

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

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

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.

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.