Struct Display

Source
pub struct Display { /* private fields */ }
Expand description

To render anything with adi_gpu, you have to make a Display

Trait Implementations§

Source§

impl Display for Display

Source§

fn color(&mut self, color: (f32, f32, f32))

Set the background color for the Display. Read more
Source§

fn update(&mut self) -> Option<Input>

Get input, if there’s any. If there’s no input, update the Display and return None.
Source§

fn camera(&mut self, xyz: Vec3, rotate_xyz: Vec3)

Move the camera. Read more
Source§

fn model(&mut self, vertices: &[f32], fans: Vec<(u32, u32)>) -> Model

Create a new Model for this Display.
Source§

fn fog(&mut self, fog: Option<(f32, f32)>)

Set the fog for the display. Read more
Source§

fn texture(&mut self, wh: (u16, u16), graphic: &VFrame) -> Texture

Create a new Texture for this Display.
Source§

fn gradient(&mut self, colors: &[f32]) -> Gradient

Create a new Gradient for this Display.
Source§

fn texcoords(&mut self, texcoords: &[f32]) -> TexCoords

Create new TexCoords for this Display.
Source§

fn set_texture( &mut self, texture: &mut Texture, wh: (u16, u16), graphic: &VFrame, )

Set the pixels for a Texture.
Source§

fn shape_solid( &mut self, model: &Model, transform: Transform, color: [f32; 4], blending: bool, fog: bool, camera: bool, ) -> Shape

Create a new shape with a solid color.
Source§

fn shape_gradient( &mut self, model: &Model, transform: Transform, colors: Gradient, blending: bool, fog: bool, camera: bool, ) -> Shape

Create a new shape shaded by a gradient (1 color per vertex).
Source§

fn shape_texture( &mut self, model: &Model, transform: Transform, texture: &Texture, tc: TexCoords, blending: bool, fog: bool, camera: bool, ) -> Shape

Create a new shape shaded by a texture using texture coordinates. Read more
Source§

fn shape_faded( &mut self, model: &Model, transform: Transform, texture: &Texture, tc: TexCoords, alpha: f32, fog: bool, camera: bool, ) -> Shape

Create a new shape shaded by a texture using texture coordinates and alpha. Read more
Source§

fn shape_tinted( &mut self, model: &Model, transform: Transform, texture: &Texture, tc: TexCoords, tint: [f32; 4], blending: bool, fog: bool, camera: bool, ) -> Shape

Create a new shape shaded by a texture using texture coordinates and tint. Read more
Source§

fn shape_complex( &mut self, model: &Model, transform: Transform, texture: &Texture, tc: TexCoords, tints: Gradient, blending: bool, fog: bool, camera: bool, ) -> Shape

Create a new shape shaded by a texture using texture coordinates and tint per vertex. Read more
Source§

fn drop_shape(&mut self, shape: &Shape)

Drop a shape (don’t draw it anymore).
Source§

fn transform(&mut self, shape: &Shape, transform: Transform)

Transform the shape.
Source§

fn resize(&mut self, wh: (u16, u16))

Resize the display.
Source§

fn wh(&self) -> (u16, u16)

Get the width and height of the window, as a tuple.

Auto Trait Implementations§

§

impl Freeze for Display

§

impl !RefUnwindSafe for Display

§

impl !Send for Display

§

impl !Sync for Display

§

impl Unpin for Display

§

impl !UnwindSafe for Display

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.